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

compare two work areas

Former Member
0 Likes
5,206

Hello experts,

Is there a way to compare two work areas with the same structure to check if the values are the same? The problem is that I don't know the fields of the work areas, I have dynamic programming & field symbols..

Any statement to do that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,474

If both structures are same then u can use..

if wa1 EQ WA2.

*both are same

endif.

8 REPLIES 8
Read only

Former Member
0 Likes
2,475

If both structures are same then u can use..

if wa1 EQ WA2.

*both are same

endif.

Read only

Former Member
0 Likes
2,474

HEllo,

U can check like this:

<b>IF WA1 EQ WA2

ENDIF.</b>

Vasanth

Read only

Former Member
0 Likes
2,474

Thank you for your answers.

Now another question. I have a filled work area. I want to select that record from the original dictionary table in another work area. I also have the index of that record. How can I write the select statement?

Read only

0 Likes
2,474

hi George,

do this way ..

select single * from <DB Table> into <WA> where <conditions >.

regards,

Santosh

Read only

0 Likes
2,474
read table itab into wa_old index <indesx no>.

select single * from table into wA_new where field1 eq wa_old-field1
                                                        field2 eq wa_old-field2.
Read only

0 Likes
2,474
SELECT SINGLE * FROM XXXX
                            INTO wa
                            WHERE matnr = wa-matnr
                            AND  xxxx = wa-xxx.

Specify all the key fiedls in teh whree condition.

Read only

0 Likes
2,474

I know to do it in the way you wrote above, but remember that I don't know the fields of the wa. the question is if I can write a dynamic select statement using the existing wa or record index.

Read only

Former Member
0 Likes
2,474

This message was moderated.