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

problem in ITAB

Former Member
0 Likes
444

Hi friends ,

i am having in my itab,

matnr----prty

50----


01

50----


02

50----


03

51----


01

52----


01

52----


02

for matnr 50 i want to take pry ---03

52----02,51---01..

my result shouls be .....

matnr----prty

50----


03

50----


03

50----


03

51----


01

52----


02

52----


02

can any one give some idea......

regards

veeer

3 REPLIES 3
Read only

Former Member
0 Likes
415

hi

sort itab by matnr party ascending.

loop at itab1.

at end of matnr.

move-corresponding itab1 to itab2.

append itab2.

endat.

endloop

itab2 will contain your desired entries

if helpful, reward

Sathish. R

Read only

Former Member
0 Likes
415

sort itab by matnr ascending

prty descending.

loop at itab into wa.

at new matnr.

move wa-prty to prty.

end at.

write: / wa-matnr,prty.

endloop.

Message was edited by:

Naveena M

Read only

Former Member
0 Likes
415

1.sort the internal table in ascending order of matnr and descending order of prty

loop at itab into wa1 .

AT new of matnr .

ls_matnr = wa1-matnr.

wa2 = wa1.

append wa1 to itab2 .

endat .

if ls_matnr eq wa1-matnr .

append wa2 to itab2.

endloop.