on 01-30-2007 10:52 AM
there is button in my report(print) when click on this it needs to display the report output in a script (which is designed for this)
Please help me how to declare my itab variables in Script....
only the data and page number will change rest all text elments are constant for differnet pages.
the code in the USER_COMMAND of reuse_GRID_DISPLAY is
WHEN 'PRINT'.
i_itcpo-tdimmed = 'X'.
i_itcpo-tddelete = 'X'.
CALL FUNCTION 'START_FORM'
EXPORTING
ARCHIVE_INDEX =
form = 'ZSCRIPT'
language = 'SY-LANGU'
startpage = 'FIRST'
EXCEPTIONS
form = 1
format = 2
unended = 3
unopened = 4
unused = 5
spool_error = 6
OTHERS = 7.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
application = 'TX'
device = 'PRINTER'
dialog = 'X'
form = 'ZSCRIPT'
options = i_itcpo
language = sy-langu.
PERFORM print_data.
CALL FUNCTION 'CLOSE_FORM'.
MESSAGE s208(00) WITH ' Form Successfully Printed.'.
CALL FUNCTION 'END_FORM'.
THE PERFORM DETAILS................
*Left logo
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LLOGO'
EXCEPTIONS
OTHERS = 1.
*script header
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER'
EXCEPTIONS
OTHERS = 1.
*standard text
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TEXT'
EXCEPTIONS
OTHERS = 1.
*dispos detials
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DISPOSI'
EXCEPTIONS
OTHERS = 1.
*ECN number
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ECN'
EXCEPTIONS
OTHERS = 1.
*out_tab headings and data
LOOP AT it_rep_out INTO wa_rep_out.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DETAIL_A'
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
ENDIF.
ENDLOOP.
*Comments from selection screen
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'FOOTER'
EXCEPTIONS
OTHERS = 1.
Hi,
i think you don't need to use the start_form at all.
Also, for write_form fms, you need to pass the window name also.
Refer this program as an example: RSTXEXP1
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
first store all the relevant data in internal table itab.
loop at itab.
call write form
endloop.
care should be taken that you write the itab in main window.
in script just add
&itab-var1& &itab-var2& and so on...
Regards,
sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.