SAP CONVERT_ABAPSPOOLJOB_2_PDF Function Module for









CONVERT_ABAPSPOOLJOB_2_PDF is a standard convert abapspooljob 2 pdf SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for convert abapspooljob 2 pdf FM, simply by entering the name CONVERT_ABAPSPOOLJOB_2_PDF into the relevant SAP transaction such as SE37 or SE38.

Function Group: STXW
Program Name: SAPLSTXW
Main Program: SAPLSTXW
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CONVERT_ABAPSPOOLJOB_2_PDF pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'"
EXPORTING
SRC_SPOOLID = "Spool request number
* NO_DIALOG = "
* DST_DEVICE = "Spool: Output Device
* PDF_DESTINATION = "
* NO_BACKGROUND = "
* GET_SIZE_FROM_FORMAT = "
* USE_CASCADING = ' ' "

IMPORTING
PDF_BYTECOUNT = "
PDF_SPOOLID = "Spool request number
LIST_PAGECOUNT = "
BTC_JOBNAME = "Background job name
BTC_JOBCOUNT = "Background job number
BIN_FILE = "

TABLES
* PDF = "PDF File

EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1 ERR_BTCJOB_SUBMIT_FAILED = 10 ERR_BTCJOB_CLOSE_FAILED = 11 ERR_NO_SPOOLJOB = 2 ERR_NO_PERMISSION = 3 ERR_CONV_NOT_POSSIBLE = 4 ERR_BAD_DESTDEVICE = 5 USER_CANCELLED = 6 ERR_SPOOLERROR = 7 ERR_TEMSEERROR = 8 ERR_BTCJOB_OPEN_FAILED = 9
.



IMPORTING Parameters details for CONVERT_ABAPSPOOLJOB_2_PDF

SRC_SPOOLID - Spool request number

Data type: TSP01-RQIDENT
Optional: No
Call by Reference: Yes

NO_DIALOG -

Data type: C
Optional: Yes
Call by Reference: Yes

DST_DEVICE - Spool: Output Device

Data type: TSP03-PADEST
Optional: Yes
Call by Reference: No ( called with pass by value option)

PDF_DESTINATION -

Data type: C
Optional: Yes
Call by Reference: Yes

NO_BACKGROUND -

Data type: C
Optional: Yes
Call by Reference: Yes

GET_SIZE_FROM_FORMAT -

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

USE_CASCADING -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for CONVERT_ABAPSPOOLJOB_2_PDF

PDF_BYTECOUNT -

Data type: I
Optional: No
Call by Reference: Yes

PDF_SPOOLID - Spool request number

Data type: TSP01-RQIDENT
Optional: No
Call by Reference: Yes

LIST_PAGECOUNT -

Data type: I
Optional: No
Call by Reference: Yes

BTC_JOBNAME - Background job name

Data type: TBTCJOB-JOBNAME
Optional: No
Call by Reference: Yes

BTC_JOBCOUNT - Background job number

Data type: TBTCJOB-JOBCOUNT
Optional: No
Call by Reference: Yes

BIN_FILE -

Data type: XSTRING
Optional: No
Call by Reference: Yes

TABLES Parameters details for CONVERT_ABAPSPOOLJOB_2_PDF

PDF - PDF File

Data type: TLINE
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ERR_NO_ABAP_SPOOLJOB -

Data type:
Optional: No
Call by Reference: Yes

ERR_BTCJOB_SUBMIT_FAILED -

Data type:
Optional: No
Call by Reference: Yes

ERR_BTCJOB_CLOSE_FAILED -

Data type:
Optional: No
Call by Reference: Yes

ERR_NO_SPOOLJOB -

Data type:
Optional: No
Call by Reference: Yes

ERR_NO_PERMISSION -

Data type:
Optional: No
Call by Reference: Yes

ERR_CONV_NOT_POSSIBLE -

Data type:
Optional: No
Call by Reference: Yes

ERR_BAD_DESTDEVICE -

Data type:
Optional: No
Call by Reference: Yes

USER_CANCELLED - Cancelled by user

Data type:
Optional: No
Call by Reference: Yes

ERR_SPOOLERROR -

Data type:
Optional: No
Call by Reference: Yes

ERR_TEMSEERROR -

Data type:
Optional: No
Call by Reference: Yes

ERR_BTCJOB_OPEN_FAILED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CONVERT_ABAPSPOOLJOB_2_PDF Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lt_pdf  TYPE STANDARD TABLE OF TLINE, "   
lv_src_spoolid  TYPE TSP01-RQIDENT, "   
lv_pdf_bytecount  TYPE I, "   
lv_err_no_abap_spooljob  TYPE I, "   
lv_err_btcjob_submit_failed  TYPE I, "   
lv_err_btcjob_close_failed  TYPE I, "   
lv_no_dialog  TYPE C, "   
lv_pdf_spoolid  TYPE TSP01-RQIDENT, "   
lv_err_no_spooljob  TYPE TSP01, "   
lv_dst_device  TYPE TSP03-PADEST, "   
lv_list_pagecount  TYPE I, "   
lv_err_no_permission  TYPE I, "   
lv_btc_jobname  TYPE TBTCJOB-JOBNAME, "   
lv_pdf_destination  TYPE C, "   
lv_err_conv_not_possible  TYPE C, "   
lv_btc_jobcount  TYPE TBTCJOB-JOBCOUNT, "   
lv_no_background  TYPE C, "   
lv_err_bad_destdevice  TYPE C, "   
lv_bin_file  TYPE XSTRING, "   
lv_user_cancelled  TYPE XSTRING, "   
lv_get_size_from_format  TYPE C, "   
lv_use_cascading  TYPE C, "   SPACE
lv_err_spoolerror  TYPE C, "   
lv_err_temseerror  TYPE C, "   
lv_err_btcjob_open_failed  TYPE C. "   

  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'  "
    EXPORTING
         SRC_SPOOLID = lv_src_spoolid
         NO_DIALOG = lv_no_dialog
         DST_DEVICE = lv_dst_device
         PDF_DESTINATION = lv_pdf_destination
         NO_BACKGROUND = lv_no_background
         GET_SIZE_FROM_FORMAT = lv_get_size_from_format
         USE_CASCADING = lv_use_cascading
    IMPORTING
         PDF_BYTECOUNT = lv_pdf_bytecount
         PDF_SPOOLID = lv_pdf_spoolid
         LIST_PAGECOUNT = lv_list_pagecount
         BTC_JOBNAME = lv_btc_jobname
         BTC_JOBCOUNT = lv_btc_jobcount
         BIN_FILE = lv_bin_file
    TABLES
         PDF = lt_pdf
    EXCEPTIONS
        ERR_NO_ABAP_SPOOLJOB = 1
        ERR_BTCJOB_SUBMIT_FAILED = 10
        ERR_BTCJOB_CLOSE_FAILED = 11
        ERR_NO_SPOOLJOB = 2
        ERR_NO_PERMISSION = 3
        ERR_CONV_NOT_POSSIBLE = 4
        ERR_BAD_DESTDEVICE = 5
        USER_CANCELLED = 6
        ERR_SPOOLERROR = 7
        ERR_TEMSEERROR = 8
        ERR_BTCJOB_OPEN_FAILED = 9
. " CONVERT_ABAPSPOOLJOB_2_PDF




ABAP code using 7.40 inline data declarations to call FM CONVERT_ABAPSPOOLJOB_2_PDF

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single RQIDENT FROM TSP01 INTO @DATA(ld_src_spoolid).
 
 
 
 
 
 
"SELECT single RQIDENT FROM TSP01 INTO @DATA(ld_pdf_spoolid).
 
 
"SELECT single PADEST FROM TSP03 INTO @DATA(ld_dst_device).
 
 
 
"SELECT single JOBNAME FROM TBTCJOB INTO @DATA(ld_btc_jobname).
 
 
 
"SELECT single JOBCOUNT FROM TBTCJOB INTO @DATA(ld_btc_jobcount).
 
 
 
 
 
 
DATA(ld_use_cascading) = ' '.
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!