Application Development 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: 

Smart Form to Spool

Former Member
0 Kudos

Hi,

Can anyone tell me some standard programs where a Smartform is sent to Spool, creating a spool number.

Regards,

Adithya M

8 REPLIES 8

FredericGirod
Active Contributor
0 Kudos

it's not due to program, it's due to the parameter : not print immediatly.

0 Kudos

Hi Fred,

Can you give me a sample code of how to pass and i also want to convert it into PDF.

Former Member
0 Kudos

to download smartform in PDF format.

Please do the following:

1. Print the smartform to the spool.

2. Note the spool number.

3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the

noted spool number.

See the below simple program and it creates spool ,use SP01 Transaction to see output.

&----


*& Report ZTESTSPOOL

*&

&----


*&

*&

&----


REPORT ztestspool.

DATA : arc_params TYPE arc_params,

v_print_parms TYPE pri_params,

w_valid TYPE char1,

w_valid_spool TYPE char1.

CONSTANTS : lc_paart LIKE sy-paart VALUE 'X_65_132', " Paper Format

lc_locl TYPE sypdest VALUE 'LOCL', " Destination

c_x TYPE char1 VALUE 'X'.

  • Setup the Print Parmaters

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

authority = space

immediately = space

new_list_id = c_x

no_dialog = c_x

user = sy-uname

IMPORTING

out_parameters = v_print_parms

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

OTHERS = 4.

IF sy-subrc NE 0.

CLEAR : v_print_parms.

ENDIF.

  • The printer destination has to be set up

IF v_print_parms-pdest = space.

v_print_parms-pdest = lc_locl.

ENDIF.

  • Explicitly set line width, and output format so that

  • the PDF conversion comes out OK

*v_print_parms-linsz = c_linsz.

v_print_parms-paart = lc_paart.

NEW-PAGE PRINT ON PARAMETERS v_print_parms NO DIALOG.

*PERFORM display_output.

write :confused_face: 'This is test for spool generation'.

NEW-PAGE PRINT OFF.

*write :confused_face: 'This is test for spool generation', sy-SPONO.

regards,

srinivas

<b>*reward for useful answers*</b>

former_member223537
Active Contributor
0 Kudos

Hi,

Refer this sample program which meets your requirement.

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

Best regards,

Prashant

0 Kudos

Hi,

Thanks for sending "Convert Spool request to PDF and send as e-mail" but this is my second requirement. My first requirement is sending "Smartform to Spool" after it is done my second requirement is Convert Spool request to PDF and send as e-mail. So i got my second requirement so can you please send any example program to solve my first requirement i.e, sending "Smartform to Spool and obtaining a Spool request"

Message was edited by:

Mahadas Adithya

Pawan_Kesari
Active Contributor
0 Kudos

while calling the smartform fm set following values in parameter OUTPUT_OPTIONS.

SSFCOMPOP-TDNEWID = 'X' .

SSFCOMPOP-TDIMMED = space .

SSFCOMPOP-TDDEST = 'LOCL' .

and following values in parameter CONTROL_PARAMETERS

SSFCTRLOP-NO_DIALOG = 'X' .

it will create spool

0 Kudos

Hi Pawan,

I have called my Smartform FM in my program & sent the values in the parameters as you said but it is showing some error i.e, "Error in spool C call: spool overflow". How to overcome this & where can i get the spool request in my program.

Message was edited by:

Mahadas Adithya

0 Kudos

Hi,

Can you please help me in sending smartform/adobi form output to spool.

Regards

Manu