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: 

data comparison in an internal table

Former Member
0 Kudos

hi all,

i have a requirement like i have to print the data in the followin fashion

material stype sutype XXXX XXX XXXXXX

123 ku ok ***** *** ***********

ku ok ****** ** ********

i have all the data in final internal table the problem is like if the material no is same then the out put should be in the above fashion and im unable to compare the material in an internal table so can any one can solve this ill be much thankful

bye

anupama

4 REPLIES 4

Former Member
0 Kudos

Hi,

Use AT NEW



AT NEW MATNR.
write : 'Test'.

endAT.

Regards

Sandipan

0 Kudos

hi sandip,

thanks a lot it worked.

bye

anupama

Former Member
0 Kudos

sort itab by matnr.

loop at itab.

at new matnr.

write:/1 itab-matnr.

endat.

write:15 itab-field1,20 itab-field2.

endloop.

venkat_o
Active Contributor
0 Kudos

Hi, do these steps. 1. Sort ur internal table by MATNR

SORT Itab by matnr.
2. Then use this logic.
Loop at itab.
  at new matnr.
    Write itab-matnr.
  endat.
     Write ..remaining field.
endloop.
regards, Venkat.O