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: 

comparing the data of 2 fileds

Former Member
0 Kudos

Hi

i have two fileds f1 and f2 in an internal table.i want to compare the data in these two fileds ,

how to compare?

thank you.

sunny.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

loop at itab into wa

read table itab into wa1 with key

compare here with wa1 and wa

endloop.

shiva

7 REPLIES 7

Former Member
0 Kudos

hi

loop at itab into wa

read table itab into wa1 with key

compare here with wa1 and wa

endloop.

shiva

0 Kudos

Hi

Now iwant to compare the data( ex: row1 and row2 data) of particular field f1 .how to compare?

thank you

sunny

0 Kudos

Hi sunny,

Loop at itab.

if itab1-f1 = perticular_field

endif.

if itab-f2 = perticular_field.

endif.

if the perticular field is another itab. then

use read table

endloop.

regards

Ramchander Rao.k

0 Kudos

Hi,

Loop at itab1 into wa1.

v_index = sy-index+1.

read table itab1 into wa2 index v_index.

Compare wa1-field and wa2-field.

endloop.

This will help!

Regards,

Prashant

0 Kudos

thank you

0 Kudos

thank you

former_member1245113
Active Contributor
0 Kudos

hi,

Where you want to compare against which variable.

loop at itab.

if itab-f1 = itab-f2

endif.

endloop.

this is the simplest form

regards

Ramchander Rao.k

Edited by: ramchander krishnamraju on Nov 27, 2008 10:48 AM