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: 

dynamic naming for screen fields possible?

Former Member
0 Kudos

Hi.

I am trying to loop through some screen fields, and hence need to dynamically name the fields. I use the following codes, but it gave me an error:

*********************************

IF MAND_CHECK = 'X' AND (TXT_FILE) IS INITIAL.

"TXT_FILE is a variable that contains the name of the screen field.

SET CURSOR FIELD TXT_FILE.

"TXT_FILE is a variable that contains the name of the screen field.

ENDIF.

*********************************

Error: Fehlerhafter logischer Ausdruck "(TXT_FILE)": Nach "(".......

1 ACCEPTED SOLUTION

former_member589029
Active Contributor
0 Kudos

Do the following:

field-symbols: <fs> type any.

assign txt_file to <fs>.

if mand_check eq 'X' and <fs> is initial.

:

:

Regards,

Michael

2 REPLIES 2

former_member589029
Active Contributor
0 Kudos

Do the following:

field-symbols: <fs> type any.

assign txt_file to <fs>.

if mand_check eq 'X' and <fs> is initial.

:

:

Regards,

Michael

Former Member
0 Kudos

Ok, solved on this one, with minor changes:

should be: assign (txt_file) to <fs>.

and not: assign txt_file to <fs>.

(note the parenthesis)