on 07-08-2009 8:06 AM
hi All,
i hav an issue vt sapscripts, my requirement is , i want to print the header line not only in the first page
but also in the second page .
How do i acheive this.?
regards
venkat
i hav written a peice of code sayin after so many lines call the header
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
However you have said this thread to be solved i want explain my piece of code.
Because it is also a good solution for your problem and maybe you can use this in the future.
First. PRINT HEADER.
CALL FUNCTION 'WRITE_FORM' "First header
EXPORTING element = 'ITEM_HEADER'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
Second TAKE CARE HEADER WILL BE PRINTED AT TOP OF THE MAIN IN EVERY NEW PAGE/MAIN
CALL FUNCTION 'WRITE_FORM' "Activate header
EXPORTING element = 'ITEM_HEADER'
type = 'TOP'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
Third PRINT YOUR ITEMS
LOOP AT tvbdpa.
****here are the items printed
ENDLOOP.
Last; DEACTIVATE PRINTING HEADER AT TOP OF EACH PAGE/MAIN
CALL FUNCTION 'WRITE_FORM' "Deactivate Header
EXPORTING element = 'ITEM_HEADER'
function = 'DELETE'
type = 'TOP'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
Hope anyone can use this explanation.
Gr., Frank
Hi,
try this in driver program.
CALL FUNCTION 'WRITE_FORM' "First header
EXPORTING element = 'ITEM_HEADER'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
CALL FUNCTION 'WRITE_FORM' "Activate header
EXPORTING element = 'ITEM_HEADER'
type = 'TOP'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
LOOP AT tvbdpa.
****here are the items printed
ENDLOOP.
CALL FUNCTION 'WRITE_FORM' "Deactivate Header
EXPORTING element = 'ITEM_HEADER'
function = 'DELETE'
type = 'TOP'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
This will work. It is standard SAP/
Gr., Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi venkat,
you can achieve this by two ways
copy the header window to next page also only when you required all the header data.
give the text element in the next page where ever you want to print by giving element also.
regards,
venkat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Simply add those windows to second page which u want to print on second page.
Regards,
Deepak.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it's a standard script generally first and next pages. Add your header to next page too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.