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: 

compare two work areas

Former Member
0 Kudos

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

Former Member
0 Kudos

If both structures are same then u can use..

if wa1 EQ WA2.

*both are same

endif.

8 REPLIES 8

Former Member
0 Kudos

If both structures are same then u can use..

if wa1 EQ WA2.

*both are same

endif.

Former Member
0 Kudos

HEllo,

U can check like this:

<b>IF WA1 EQ WA2

ENDIF.</b>

Vasanth

Former Member
0 Kudos

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?

0 Kudos

hi George,

do this way ..

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

regards,

Santosh

0 Kudos
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.

0 Kudos
SELECT SINGLE * FROM XXXX
                            INTO wa
                            WHERE matnr = wa-matnr
                            AND  xxxx = wa-xxx.

Specify all the key fiedls in teh whree condition.

0 Kudos

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.

Former Member
0 Kudos

This message was moderated.