06-12-2007 10:48 PM
Hi Xprts,
I developed an ampliaton to the tcode xk01, i have a dynpro with two lfa1 fields, i need to get the frist field value and call a function to return another value and update the other field, how can i get the values of the these dynpro fields, and how can i update these values too. i already try with field symbols, and assigning the 'program-table-field' to a variable, but no one returns values. pls hlp me.
Tnxs,
Steve.
06-13-2007 12:30 AM
Hi Steve,
Check if these fields have the parameter ID assigned to them. Then you can use SET PARAMETER ID to pass value, and GET PARAMETER ID to get the value.
Reward points if useful.
Regards,
Atish
06-13-2007 4:58 AM
Hi Steve,
You can read the values of the DynPro fields using the variable you assigned for the attribute 'value' while designing your screen.
To set the values for a particular field, simply set the variable associated with the value attribute of the target inputfield. If that does not work, try the following function module.
data: lt_dyfields type standard table of dynpread,
ls_dyfields type dynpread,
ls_dyfields-fieldvalue = value_you_want_to_set.
ls_dyfields-fieldname = 'FIELD_NAME'.
append ls_dyfields to lt_dyfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = lt_dyfields.
Please post back in case of issues.
Regards,
Ram