Application Development 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: 

Serial No. issue

Former Member
0 Kudos

Hi Friends,

I am new to SAP, I have a requirement where i need to add a count of serial no. to a report of Order creation.

How can i do it, can any one help me with a sample code.

Your feed back will be appreciated...........and rewarded.

4 REPLIES 4

former_member598013
Active Contributor
0 Kudos

Hi Murali,

Welcome to SDN Community...

Try to put the counter while printing the text in the report output.. This will solve your problem

EX: Data: counter type i value 1.

Loop at itab.

write:/10 counter , 30 itab-order.

counter = counter + 1.

Endloop.

Former Member
0 Kudos

Hi,

Use the collect stmt. or loop through the internal table and add the values.

or use the SUM aggregate function in the select query to give you the total of the field.

select sum(xxx) into ws from table tbl order by f`1 f2 group by .....

regards,

Subramanian

Former Member
0 Kudos

Hi Murali,

You have to use Number Ranges concept

use FM NUMBER_GET_NEXT and give the object as AUFTRAG for orders

and give the number range from table NRIV

former_member156446
Active Contributor
0 Kudos

Change ur deceleration of it_output to add counter..

loop at it_output into wa_output.
move sy-tabix to wa_output-counter.

modify it_output form wa_output transporting counter.
clear: wa_output.
endloop.