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

dynamic naming for screen fields possible?

Former Member
0 Likes
464

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

Former Member
0 Likes
438

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

Former Member
0 Likes
439

Do the following:

field-symbols: <fs> type any.

assign txt_file to <fs>.

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

:

:

Regards,

Michael

Read only

Former Member
0 Likes
438

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)