‎2007 Nov 05 9:01 AM
Hello gurus, is it possible to create a spool, when seeing and printing the sapscript at run-time?
I am using FM GET_TEXT_PRINT_PARAMETERS but is not creating any spool.
Thanks in advance!
‎2007 Nov 05 9:20 AM
HI ,
WEL I GUESS IF U HAVENT CHECK THE BOX AS delete after output which is just displayed when u get ur printpreview then u should always get a spool created automaticaly ..
Thanks
Rohit
Reward if helpful ..
‎2007 Nov 05 9:17 AM
‎2007 Nov 05 9:20 AM
HI ,
WEL I GUESS IF U HAVENT CHECK THE BOX AS delete after output which is just displayed when u get ur printpreview then u should always get a spool created automaticaly ..
Thanks
Rohit
Reward if helpful ..
‎2007 Nov 05 9:21 AM
Hi,
Try like this:
FORM open_form.
DATA : tmp_answer.
itcpo-tdimmed = 'X' .
perform fill_itcpo.
itcpo-tdgetotf = 'X'.
itcpo-tdpreview = space.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = layout
language = sy-langu
options = itcpo
device = 'PRINTER'
dialog = ' '
options = it_itcpo
EXCEPTIONS
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM.
form fill_itcpo .
REFRESH it_itcpo.
CLEAR it_itcpo.
it_itcpo-TDPAGESLCT = SPACE.
it_itcpo-TDCOPIES = SPACE.
it_itcpo-TDDEST = 'LOCL'.
it_itcpo-TDPRINTER = SPACE.
it_itcpo-TDPREVIEW = SPACE.
it_itcpo-TDNOPREV = SPACE.
it_itcpo-TDNOPRINT = SPACE.
it_itcpo-TDNEWID = 'X'.
it_itcpo-TDDATASET = SPACE.
it_itcpo-TDSUFFIX1 = SPACE.
it_itcpo-TDSUFFIX2 = SPACE.
it_itcpo-TDLIFETIME = SPACE.
it_itcpo-TDSCHEDULE = SPACE.
it_itcpo-TDSENDDATE = SPACE.
it_itcpo-TDSENDTIME = SPACE.
it_itcpo-TDTELELAND = SPACE.
it_itcpo-TDTELENUM = SPACE.
it_itcpo-TDTITLE = SPACE.
it_itcpo-TDTEST = SPACE.
it_itcpo-TDPROGRAM = 'Z_1IEWT_CERT_F01'.
it_itcpo-TDSCRNPOS = SPACE.
it_itcpo-TDCOVER = SPACE.
it_itcpo-TDCOVTITLE = SPACE.
it_itcpo-TDRECEIVER = SPACE.
it_itcpo-TDDIVISION = SPACE.
it_itcpo-TDAUTORITY = SPACE.
it_itcpo-TDARMOD = SPACE.
it_itcpo-TDIEXIT = SPACE.
it_itcpo-TDGETOTF = 'X'.
it_itcpo-tdgetotf = space.
it_itcpo-TDFAXUSER = SPACE.
it_itcpo-TDIMMED = 'X'.
it_itcpo-TDDELETE = SPACE.
endform. " fill_itcpo
call function 'CLOSE_FORM'
IMPORTING
RESULT = LS_ITCPP
TABLES
OTFDATA = it_otfdata
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
OTHERS = 4.
if sy-subrc eq 0.
submit rstxpdft4 with spoolno = ls_itcpp-tdspoolid and return.
endif.
Regards,
Bhaskar
‎2007 Nov 05 9:38 AM
Karthikeyan: I don't understand you sorry.
ROHIT GUPTA: The delete after output is already disabled.
Bhaskar: I need the user enter the parameters for the output.
The form still without creating the spool. Any more ideas please?
‎2007 Nov 05 10:05 AM
Problem solved, the spool was not creating because I was pushing the Print Preview button, insted of Print!