Application Development and Automation 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: 
Read only

Access an input field

0 Likes
1,162

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
Read only

dev_parbutteea
Active Contributor
1,067

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.

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?

3 REPLIES 3
Read only

dev_parbutteea
Active Contributor
1,068

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.

Read only

0 Likes
1,067

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

Read only

0 Likes
1,067

It worked! Thank you very much!