sapdev logo background
sapdev logo sapdev logo
Comments

Retrieve SAP webDynpro field value entered by user




Below is simple ABAP code which can be used to capture the value of an input field on your webDynpro for ABAP application/webpage. The field used for demonstration is bound to context attribute 'PERNR' which is within context node 'USER_DETAILS'.

If you are not familiar with context elements then see here for how to create a webdynpro context. This will show you the simple steps required to create one and how they are used within your ABAP web dynpro application.

Data: context_node type ref to if_wd_context_node,
      ld_pernr type pernr-pernr.

* Retrieve value of webDynpro field
  context_node = wd_context->get_child_node( name = 'USER_DETAILS').
  context_node->GET_ATTRIBUTE( exporting NAME = 'PERNR'
                                 importing value = ld_pernr ).



comments powered by Disqus