Demo on Web Dynpro Configurator

...Previous  

5.       Create an attribute with the name ‘VISIBILITY’ with the type as Boolean  

6.       Go to the main view Properties tab and select the ‘CUST_CONTR’ and click ok.  

7.       Go to the context tab and drag and drop the node ‘ND_CONFIG’ on to the main view context as shown below

 

8.       Create 4 UI elements on the main view

9.       Bind the visibility of the Company code label and the drop down with the below attribute as shown

10.   Copy paste the below code in WDDOINIT Method

METHOD wddoinit .

  
DATA lo_nd_nd_ccname TYPE REF TO if_wd_context_node.
  
DATA lt_nd_ccname TYPE wd_this->elements_nd_ccname.
  
DATA ls_nd_ccname TYPE wd_this->element_nd_ccname.

*   navigate from <CONTEXT> to <ND_CCNAME> via lead selection
  lo_nd_nd_ccname = wd_context->get_child_node( name = wd_this->wdctx_nd_ccname ).

*   @TODO handle non existant child
*   IF lo_nd_nd_ccname IS INITIAL.
*   ENDIF.

*  * @TODO compute values
*  * e.g. call a model function
*

  ls_nd_ccname-ccname = 
'Siemens'.
  
APPEND ls_nd_ccname TO lt_nd_ccname.

  ls_nd_ccname-ccname = 
'Wipro'.
  
APPEND ls_nd_ccname TO lt_nd_ccname.

  ls_nd_ccname-ccname = 
'TCS'.
  
APPEND ls_nd_ccname TO lt_nd_ccname.

  ls_nd_ccname-ccname = 
'SAP-LABS'.
  
APPEND ls_nd_ccname TO lt_nd_ccname.


  lo_nd_nd_ccname->bind_table( new_items = lt_nd_ccname set_initial_elements = abap_true ).

ENDMETHOD.

11.   Create a webdynpro application ‘ZWDC_CONFIG’ as shown below

Click here to continue...

 

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