ABAP – Reading Dynpro Value

Home / SAP / ABAP Coding / ABAP – Reading Dynpro Value

This latest trick I discovered when creating my pull down lists.  If you’re curious, check out my previous posts dropdown list for characteristic values and dropdown list.  It turns out reading dynpro value isn’t as easy as I thought.  I expected I could just read the variable into my module…  but I guess the variable doesn’t have a value yet at that point.  So I needed this function for reading a dynpro value.

  wa_dynpfields-fieldname = ‘GV_VBELN’.
append wa_dynpfields to dynpfields.
call function ‘DYNP_VALUES_READ’
exporting
dyname               = SY-REPID
dynumb               = sy-dynnr
tables
dynpfields           = dynpfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield  = 2
invalid_dynproname   = 3
invalid_dynpronummer = 4
invalid_request      = 5
no_fielddescription  = 6
invalid_parameter    = 7
undefind_error       = 8
double_conversion    = 9
stepl_not_found      = 10
others               = 11.

Again, this is a simple task, but if you don’t know how to get the information, it’s pretty tough to use it.  So there it is, a simple function to pull in a dynpro value from the screen in order to use it in the VALUE-REQUEST statement.  Thanks for reading.

 

As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,
Mike

Leave a Reply

Your email address will not be published. Required fields are marked *