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 compare values in two field-symbols

0 Kudos

I have to compare values in two field-symbols.There structure gets created dynamically in each loop pass.

So if there are three fields eg. A B and C in field-symbols FS1 and FS2. I need to compare there values whether its ame or not.

Any suggestion would be highly helpful.

Thanks.

1 REPLY 1

Former Member
0 Kudos

Hi,

Assign the value of the fields to some other field and then do the comparison.


ASSIGN COMPONENT 1 of STRUCTURE <fs1> TO <fs_any>.

ASSIGN COMPONENT 1 of STRUCTURE <fs2> TO <fs_any1>.

IF <fs_any> = <fs_any1>.

    <Your code>

ENDIF.

You can use the index of the field position in the assign statement or the field name directly. You have to do it for all fields you want to compare.

Reward points if Helpful.

Thanks and Regards,

Lakshmi.