on 06-16-2009 6:41 AM
Hi,
I have a custom report with a sapscript form that contains a list of records from KNA1 table. I would like to have a different page for every different KNA1-KUNNR (change page at new kunnr). Is this possible and how?
Thanks
Hi,
Kindly follow the below steps::
1.declare first field in ur internal table as 'KUNNR'.
2.once u get the required data into ur internal table to print, SORT the internal table with KUNNR.
3.LOOP the internal table to print and use CONTROL BREAK event (AT END OF KUNNR) to trigger new page for every new KUNNR.
4.In Control Break event (AT END OF KUNNR) call the Function Module 'CONTROL_FORM', which will trigger a new page in the output.
eg:
call function 'OPEN_FORM' --> to Open the Form
LOOP AT itab.
call function 'WRITE_FORM'
exporting
element = 'ITEM_DET'.
AT END OF KUNNR.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'NEW-PAGE'.
ENDAT.
endloop.
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
You can do it break event statement based on consition and call the new page(at new , on change )
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes. it is possible.
Take one condition. in that whenever kunner is changed give the condition as go to new page.
Rgds,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.