2008 Jun 19 7:19 PM
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.
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.
2008 Jun 19 7:25 PM
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.
2008 Jun 19 7:25 PM
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
2008 Jun 19 7:26 PM
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
2008 Jun 19 7:53 PM
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |