Anda di halaman 1dari 11

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.

com
2009 SAP AG 1
Table Row Popup in Web Dynpro
Component
Applies to
Web Dynpro for ABAP, NW 7.0. For more information, visit the Web Dynpro ABAP homepage.
Summary
This document helps to create Table Rowpopin in a Web Dynpro component.

Author: Ramapavani Poruri
Company: Infosys Technologies Limited
Created on: 09 December 2009
Author Bio
Ramapavani Poruri is a Technology Analyst at Infosys Technologies Limited and is working on Web Dynpro
ABAP and Web Dynpro Java.

Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 2
Table of Content
Creation of Webdynrpo component: .............................................................................................................. 3
Creation of Table Popin UI Element: ............................................................................................................. 5
Code to close Row Pop in : ........................................................................................................................... 9
Related Content: ......................................................................................................................................... 10
Disclaimer and Liability Notice ..................................................................................................................... 11
Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 3
Creation of Webdynrpo component:
Create a view ROW_POPIN in the component ZROW_POPIN.

Create node MARA_DATA with supply function get_data.


Add an attribute to the node which is of type string.
Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 4

Go to layout and create element table and bind the table.


Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 5
Creation of Table Popin UI Element:
Create an element TablePopin and Create UI element Transparent Container under table popin to insert
contents of popin. Create an action close_popin to close the popin window.

Create table column under table and insert cell variant to create TablePopinToggleCell element.


Provide Variant key TOGGLE_CELL as shown below:
Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 6

In Table column properties, provide SelectedCellVariant property as shown below:

In Table column properties, provide SelectedPopin property as shown below.
Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 7

View is embedded in the window.

Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 8


Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 9
Code to close Row Pop in :
To close pop in window following code is to be impleemented .
METHOD onactionclose_popin.
context_element->set_attribute( name = 'TABLE_POPIN' value = '' ).
ENDMETHOD.
Following code to be written in supply function to fill node data .
DATA : itab_mara TYPE STANDARD TABLE OF MARA,
Node type ref to IF_WD_CONTEXT_NODE.
SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE itab_mara UP TO 10 ROWS.
node->bind_table( itab_mara ).

Save and activate the component.


Create application and test it .


Result as follows :

Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 10
Related Content:
For more information, visit the Web Dynpro ABAP homepage
For more information, visit the User Interface Technology homepage

Table Row Popup in Web Dynpro Component
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 11
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable wi th respect to the content of this
document.

Anda mungkin juga menyukai