Steps for creating a Web Dynpro Component for Adobe interactive Forms using the Enumerated Drop Down Box(Web Dynpro for ABAP)

...Previous

26.   Insert the Webdynpro Script.

27.   Drag and drop the ‘Text Box’  from WebDynpro Native category under Library palette.

28.   Bind the Text Box with the element ‘ZuserSelected’.

29.   Save and activate both form and interface

30.   In the property list under Events, click on the create button for the event ‘onSubmit’ and create an action ‘CLICKME’

31.   Go to the ‘Actions’ tab of MAIN_VIEW. Action ‘CLICKME’ will appear.

32.   Copy Paste the code in the method ‘ONACTIONCLICKME’.

data lo_nd_root_node type ref to if_wd_context_node.
  data lo_el_root_node type ref to if_wd_context_element.
  data ls_root_node type wd_this->element_root_node.
  data lv_zuser type wd_this->element_root_node-zuser.

DATA:
    NODE_INFO   TYPE REF TO IF_WD_CONTEXT_NODE_INFO,
    it_dropdown   TYPE  WDR_CONTEXT_ATTR_VALUE_LIST,
    WA type WDR_CONTEXT_ATTR_VALUE,
*    wa_zpsfins02 type zpsfins02,
    IT_ZPSCAT type STANDARD TABLE OF USER_ADDR ,
    WA_ZPSCAT type USER_ADDR .

* navigate from <CONTEXT> to <ROOT_NODE> via lead selection
  lo_nd_root_node = wd_context->get_child_node( name = wd_this->wdctx_root_node ).

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

* get element via lead selection
  lo_el_root_node = lo_nd_root_node->get_element( ).
* @TODO handle not set lead selection
  if lo_el_root_node is initial.
  endif.

  select * from USER_ADDR
     into table it_zpscat up to 10 rows.
*
LOOP AT  it_zpscat INTO WA_zpscat.

 WA-text = SY-tabix.
CONCATENATE  WA-text WA_zpscat-bname inTO WA-text.
move WA_zpscat-bname TO WA-VALUE.
insert WA inTO table it_dropdown.
*append WA TO  it_dropdown.
clear WA_zpscat.
clear wa.

ENDLOOP.

   NODE_INFO = lo_nd_root_node->GET_NODE_INFO( ).

* Set Value_sets to node_info
  NODE_INFO->SET_ATTRIBUTE_VALUE_SET( NAME = 'ZUSER' VALUE_SET = it_dropdown ).

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