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: 

Access an input field

0 Kudos

Hello everyone,

I have a variable in which I have stored the name of an i/o field from a screen. How can I assign a value to that i/o field using the name from the variable?

1 ACCEPTED SOLUTION

dev_parbutteea
Active Contributor

Hi,

something like this should work:

PARAMETERS: p_value TYPE char10..

DATA : gv_variable TYPE char10 VALUE 'P_VALUE' .

FIELD-SYMBOLS : <fs> TYPE any.

ASSIGN (gv_variable) TO <fs>.

<fs> = 'Testing'.

write: 'writing :', p_value.

3 REPLIES 3

dev_parbutteea
Active Contributor

Hi,

something like this should work:

PARAMETERS: p_value TYPE char10..

DATA : gv_variable TYPE char10 VALUE 'P_VALUE' .

FIELD-SYMBOLS : <fs> TYPE any.

ASSIGN (gv_variable) TO <fs>.

<fs> = 'Testing'.

write: 'writing :', p_value.

0 Kudos

And it works for any variable of course, not only for global variables corresponding to screen fields.

0 Kudos

It worked! Thank you very much!