SAP Reports / Programs | Basis Components | Basis Services / Communication Interfaces | SAPscript(BC-SRV-SCR) SAP BC

RSTXPDFT4 SAP ABAP Report - Converting SAPscript (OTF) or ABAP List Spool Job to PDF







RSTXPDFT4 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter RSTXPDFT4 into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RSTXPDFT4. "Basic submit
SUBMIT RSTXPDFT4 AND RETURN. "Return to original report after report execution complete
SUBMIT RSTXPDFT4 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: DOWNLOAD = Download PDF file
Selection Text: FORMAT = Width from the Formatting
Selection Text: P_FILE = PDF file name
Selection Text: REAL = Real Width
Selection Text: SPOOLNO = Spool request
Title: Converting SAPscript (OTF) or ABAP List Spool Job to PDF
Text Symbol: 001 = Function CONVERT_OTFSPOOLJOB_2_PDF successful
Text Symbol: 002 = No OTF and ABAP Spool Requests
Text Symbol: 003 = Spool request does not exist
Text Symbol: 004 = Not authorization to read spool request
Text Symbol: 005 = Error in function CONVERT_OTFSPOOLJOB_2_PDF
Text Symbol: 006 = Function CONVERT_ABAPSPOOLJOB_2_PDF successful
Text Symbol: 007 = Error in function CONVERT_ABAPSPOOLJOB_2_PDF
Text Symbol: 008 = Conversion by batch job
Text Symbol: 009 = bytes downloaded into file
Text Symbol: 010 = Determination of Document Width (ABAP lists only)


INCLUDES used within this REPORT RSTXPDFT4

No INCLUDES are used within this REPORT code!


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

RSTS_GET_ATTRIBUTES CALL FUNCTION 'RSTS_GET_ATTRIBUTES' EXPORTING AUTHORITY = 'SP01' CLIENT = client NAME = name PART = 1 IMPORTING * CHARCO = * CREATER = * CREDATE = * DELDATE = * MAX_CREDATE = * MAX_DELDATE = * NON_UNIQ = * NOOF_PARTS = * RECTYP = * SIZE = * STOTYP = TYPE = type OBJTYPE = objtype EXCEPTIONS FB_ERROR = 1 FB_RSTS_OTHER = 2 NO_OBJECT = 3 NO_PERMISSION = 4.

CONVERT_OTFSPOOLJOB_2_PDF CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF' EXPORTING SRC_SPOOLID = spoolno NO_DIALOG = ' ' * DST_DEVICE = * PDF_DESTINATION = IMPORTING PDF_BYTECOUNT = numbytes PDF_SPOOLID = pdfspoolid * OTF_PAGECOUNT = BTC_JOBNAME = jobname BTC_JOBCOUNT = jobcount TABLES PDF = pdf EXCEPTIONS ERR_NO_OTF_SPOOLJOB = 1 ERR_NO_SPOOLJOB = 2 ERR_NO_PERMISSION = 3 ERR_CONV_NOT_POSSIBLE = 4 ERR_BAD_DSTDEVICE = 5 USER_CANCELLED = 6 ERR_SPOOLERROR = 7 ERR_TEMSEERROR = 8 ERR_BTCJOB_OPEN_FAILED = 9 ERR_BTCJOB_SUBMIT_FAILED = 10 ERR_BTCJOB_CLOSE_FAILED = 11.

CONVERT_ABAPSPOOLJOB_2_PDF CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' EXPORTING SRC_SPOOLID = spoolno NO_DIALOG = ' ' * DST_DEVICE = * PDF_DESTINATION = GET_SIZE_FROM_FORMAT = GET_SIZE_FROM_FORMAT IMPORTING PDF_BYTECOUNT = numbytes PDF_SPOOLID = pdfspoolid * LIST_PAGECOUNT = BTC_JOBNAME = jobname BTC_JOBCOUNT = jobcount TABLES PDF = pdf EXCEPTIONS ERR_NO_ABAP_SPOOLJOB = 1 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 ERR_BTCJOB_SUBMIT_FAILED = 10 ERR_BTCJOB_CLOSE_FAILED = 11.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.







The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RSTXPDFT4 or its description.