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

counting the itab

Former Member
0 Likes
584

hi all,

i have one internal table, in that i am extracting sales details, for one sales order there are N no of materials. now i need the count of the materials with respect to the sales order how i should proceed

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
561

Hi,

Loop the internal table, and read all the materials for the particular sales order into another internal table, and then use the command describe table and get the count of your materials.

Thanks

Nayan

hi all,

i have one internal table, in that i am extracting sales details, for one sales order there are N no of materials. now i need the count of the materials with respect to the sales order how i should proceed

thanks in advance.

3 REPLIES 3
Read only

Former Member
0 Likes
562

Hi,

Loop the internal table, and read all the materials for the particular sales order into another internal table, and then use the command describe table and get the count of your materials.

Thanks

Nayan

Read only

former_member156446
Active Contributor
0 Likes
561

just use a counter and loop the table and increase the counter at new matnr.

data: count type i.

loop at itab where VBELN = 'value'.
at new matnr.
count = count + 1.
endat.
endloop.

Read only

Former Member
0 Likes
561

got it thank you