Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sapscript not creating spool

Former Member
0 Likes
1,465

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!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
877

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 ..

5 REPLIES 5
Read only

Former Member
0 Likes
877

yes it is possiable.

down load same software on line.

Read only

Former Member
0 Likes
878

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 ..

Read only

Former Member
0 Likes
877

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

Read only

Former Member
0 Likes
877

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?

Read only

Former Member
0 Likes
877

Problem solved, the spool was not creating because I was pushing the Print Preview button, insted of Print!