sapdev logo background
sapdev logo sapdev logo

Create field Refering to datatype of webDynpro context element

Below is the ABAP code to define a data field based on an ABAP web dynpro context element. The context element is 'USER_DETAILS' within view 'MAIN'. See here for how to create context within your ABAP web dynpro.

If for example your context element was EKKO_RECORDS then the below ABAP code would refer to type if_main=>element_EKKO_RECORDS.

Also if your context element 'USER_DETAILS' is within view 'FIRST' then the code below would refer to type if_first=>element_USER_DETAILS

* Simply change the view name and context element name to refer to your wdp data type
 Data: wa_userdet type if_main=>element_USER_DETAILS.

comments powered by Disqus