on 2009 Apr 28 9:27 PM
Hello,
I am working on sapscript. MAIN window has two elements ( Order Info, Carrier Info. ) First page display only 1 - 10 records for each element in Main Window.
( In my scenario, it's possbile the either one of the element may have more then 10 record but 11th record should print in that section of Next Page )
Next page should display starting with record 11 on subsequent elements. How can i accomplish this scenario.
I apperciate your help.
Thanks
Hitesh
Request clarification before answering.
Hi,
in driver program, count the sy-tabix if it reaches '11', then call the FM 'CONTROL_FORM' and in the command give 'NEW-PAGE' and then call the WRITE_FORM of 2nd element.
write code like below in ur driver program.
eg:
data : gv_tabix.
LOOP AT itab.
gv_tabix = sy-tabix.
IF sy-tabix LE 10.
call function 'WRITE_FORM'
EXPORTING
element = element1
EXCEPTIONS
.
ENDIF.
IF gv_tabix GT 10.
call function 'CONTROL_FORM'
exporting
command = 'NEW-PAGE'.
clear gv_tabix.
ENDIF.
IF sy-tabix GT 10.
call function 'WRITE_FORM'
EXPORTING
element = element2
EXCEPTIONS
.
ENDIF.
ENDLOOP.
dont forget to give NEXT PAGE for first page as 'FIRST PAGE' name.
Hope it resolves
Rgrds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Hitesh,
U better separate it, Print one element in main window and comment out other element. For the other element u define a normal window and in the driver program append what all data for second element in to an internal table. Then use the WRITE_FORM_LINES function module to write it into other window and make sure to clear the internal table, when it reaches the next page, as if u need to print from 11 record.
For the main window element it will print automatically, as it overflows.
In the WRITE_FORM_LINES function module, the table parameters you can specify the paragraph format for the TLINE-TDFORMAT and concatenate the text with tab position as what u do in any of the windows and pass it to the TLINE-TDLINE.
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 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.