on 10-14-2008 8:55 AM
Hi all,
I am currently working on a customized Transfer Order form using sapscript.
I understand in saprscript can pagebreak automaticall when the window is filled with records.
However, it does't remain the header on the first page. The subsequent pages doesnt have the header which display in the first page.
Nevertheless, I have managed to do so by initial the variable FLG_HU_PRINT.
Can someone tells me, how could the program detects when the window is fully occupied?
The reason why I need to know is I need to perform certain action (call a FORM) when it is happened.
At present, I am hardcoded line 13, the program will perform page break and initial the variable FLG_HU_PRINT.
DATA: lv_counter TYPE i.
SORT XRLDRI BY TANUM VLTYP.
LOOP AT XRLDRI
lv_counter = lv_counter + 1.
IF lv_counter >= 13. "<-----------How could the program determine when the window is fully occupied?
call function 'CONTROL_FORM'
exporting
command = 'NEW-WINDOW'.
CLEAR: lv_counter, FLG_HU_PRINT.
ENDIF.
IF NOT lv_tanum IS INITIAL AND NOT lv_vltyp IS INITIAL.
IF lv_tanum <> XRLDRI-tanum OR lv_vltyp <> XRLDRI-vltyp.
call function 'CONTROL_FORM'
exporting
command = 'NEW-WINDOW'.
lv_tanum = XRLDRI-tanum.
lv_vltyp = XRLDRI-vltyp.
CLEAR: FLG_HU_PRINT.
ENDIF.
ELSE.
lv_tanum = XRLDRI-tanum.
lv_vltyp = XRLDRI-vltyp.
ENDIF.
PERFORM MULTI_PRINT.
ENDLOOP.
Thanks in advance.
Hi,
IF lv_counter >= 13 this condition means Lv_counter is equal to 13 or morethan then it enters.
I think just change it to IF lv_counter <= 13.It can work.
Regards,
Shiva Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.