Demonstration of Table Popin in Web Dynpro

...Previous

Step 13: Create one column to the table. Right click on this created column and select ‘Insert Cell Variant’. One popup will follow; provide ‘table_popin_toggle_cell’ in ID and ‘TablePopinToggleCell’ as Type, as in below figure.

Step 14: Go to the properties of “Table_popin_toggle_cell” in tablecolumn and provide ‘TOGGLE_CELL’ in ‘Variant key’ property.

 

Step 15: Go to the properties of TableColumn and provide ‘TOGGLE_CELL’ in ‘Selected Cell Variant’ property as in figure.

 

Step 16: Go to the properties of ‘Table’ and bind SelectedPopin property with table_popin attribute of Sflight node.

Write following code on GET_DATA action of button in view:  

Method ONACTIONGET_DATA .

* <<<Internal table declaration>>>
  
DATA T_SFLIGHT TYPE STANDARD TABLE OF SFLIGHT.

* <<<Reference of Node CARRID through code wizard>>>
  
DATA LO_ND_CARRID TYPE REF TO IF_WD_CONTEXT_NODE.
  
DATA LO_EL_CARRID TYPE REF TO IF_WD_CONTEXT_ELEMENT.
  
DATA LS_CARRID TYPE WD_THIS->ELEMENT_CARRID.
*   navigate from <CONTEXT> to <CARRID> via lead selection
  LO_ND_CARRID = WD_CONTEXT->GET_CHILD_NODE( NAME =
                             WD_THIS->WDCTX_CARRID ).
*   get element via lead selection
  LO_EL_CARRID = LO_ND_CARRID->GET_ELEMENT( ).
*   get all declared attributes
  LO_EL_CARRID->GET_STATIC_ATTRIBUTES(
    
IMPORTING
      STATIC_ATTRIBUTES = LS_CARRID ).

* <<<Reference of Node SFLIGHT through code wizard>>>
  
DATA LO_ND_SFLIGHT TYPE REF TO IF_WD_CONTEXT_NODE.
  
DATA LO_EL_SFLIGHT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
  
DATA LS_SFLIGHT TYPE WD_THIS->ELEMENT_SFLIGHT.
* navigate from <CONTEXT> to <SFLIGHT> via lead selection
  LO_ND_SFLIGHT = WD_CONTEXT->GET_CHILD_NODE( NAME =
WD_THIS->WDCTX_SFLIGHT ).

* <<<Data selection from database based on provided Carrid
  
SELECT FROM  SFLIGHT
      
INTO TABLE T_SFLIGHT
           
WHERE CARRID = LS_CARRID-CARRID.

* <<<Binding internal table to the SFLIGHT Node>>>
  LO_ND_SFLIGHT->BIND_TABLE( T_SFLIGHT ).

ENDMETHOD.
 

Step 17: Save and activate the component.  

Step 18: Create an application and test it.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image