Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

count number of rows

how to count the number of rows in a loop satisfying a specific condition

like there are 5 rows of kunnr = '10001'

I dnt want to increment counter because Im doing an inner loop for that condition

In a sense I want to compare the numbe rof records in the inner loop and outer loop where kunnr = '10001'

Former Member
Former Member replied


You can have a temporary table.

data : l_lines type i.
gt_temp[] = gt_data[].

delete gt_temp where kunnr ne '10001'.
describe gt_temp lines l_lines.

l_lines will have the necessary values.

Best regards,


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question