cancel
Showing results for 
Search instead for 
Did you mean: 

SPOOL NUMBER FOR PDF FORM

Former Member
0 Kudos

Hi @ll,

How to get the spool number when i trigger a print from PDF .

best regards

Heidi

fp_outputparams-getpdf = 'X'.
fp_outputparams-nodialog = 'X'.
fp_outputparams-dest = 'PDFT'.
fp_outputparams-ARCMODE = '3'.
fp_outputparams-reqnew = '1'.

* Language and country setting (here US as an example)
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.

* PRINT:

*/ Sets the output parameters and opens the spool job
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc 0.
*/ <error handling>
ENDIF.

* Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'ZSDXX_SALES_ORDER1'
IMPORTING
e_funcname = fm_name.
IF sy-subrc 0.
*/ <error handling>
ENDIF.


* Call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
zord_iface = gs_prt
IMPORTING
/1bcdwb/formoutput = fp_fpformoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3.
IF sy-subrc 0.
* <error handling>
ENDIF.

*/ Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* e_result =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc 0.
* <error handling>
ENDIF.

Edited by: Heidi Heinzberger on Feb 11, 2011 10:06 AM

Code tags added by: kishan P on Feb 11, 2011 3:54 PM

Accepted Solutions (1)

Accepted Solutions (1)

brad_bohn
Active Contributor
0 Kudos

The spool ID's are a component table of the output of the function FP_JOB_CLOSE. You simply need to read the E_RESULT-SPOOLIDS table.

Former Member
0 Kudos

Thanks for all of answers.

This ist the answer. Thanks @Brad Bohn

E_RESULT-SPOOLIDS

Answers (2)

Answers (2)

madhu_vadlamani
Active Contributor
0 Kudos

Hi

As brod told just go a head with that. Once you will get that spool no keep that spool in RSTXPDFT4 and get in pdf format. i think this will solve that.

Regards,

Madhu.

Former Member
0 Kudos

Hii,

just run this program in se38 rstxpdft4 give spool number ur putput will come in PDF.

regards,

sri