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

count values

Former Member
0 Likes
698

i have three tables

1.ZDOCP contains fields zzmatnr,zzmatkl

2.PRST matnr,pspnr

3.KNA1 name1

i have populted fields

in internal table i_final

i want to count zzmatkl with respective to PSPNR

or else i want to count values in internal table,,

please help experts

1 ACCEPTED SOLUTION
Read only

syed_ibrahim5
Active Participant
0 Likes
640

hi,

do you mean , you want to count the number of records in the final internal table with respect to distinct pspnr.

regards,

syed

3 REPLIES 3
Read only

syed_ibrahim5
Active Participant
0 Likes
641

hi,

do you mean , you want to count the number of records in the final internal table with respect to distinct pspnr.

regards,

syed

Read only

Former Member
0 Likes
640

Hi!

you can loop at your internal table and put a counter somethink like this:



data: aux type i.
aux = 0.

loop at itab.
aux = aux +1.
endloop.



Read only

Former Member
0 Likes
640

Hi,

u can use DESCRIBE statement if u want to count the records of internal table,

or if u want to count no of zzmatkl on the basis of zpspnr then use

loop at itab.

at new zpspnr.

if zmatkl is not initial.

count = count + 1.

endif.

endat.

endloop.

hope ur query will get resolved by this,

if yes then please give rewards and if not then let us know where u r getting problem

Cheerz

Neha

Edited by: neha1.gpta on Jun 18, 2010 2:42 PM