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

data comparison in an internal table

Former Member
0 Likes
616

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

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
Read only

Former Member
0 Likes
595

Hi,

Use AT NEW



AT NEW MATNR.
write : 'Test'.

endAT.

Regards

Sandipan

Read only

0 Likes
595

hi sandip,

thanks a lot it worked.

bye

anupama

Read only

Former Member
0 Likes
595

sort itab by matnr.

loop at itab.

at new matnr.

write:/1 itab-matnr.

endat.

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

endloop.

Read only

venkat_o
Active Contributor
0 Likes
595

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