Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign Field dynpros values

Former Member
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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