BASIS Function module RFC Used the same way in S/4HANA

RSPO_DOWNLOAD_SPOOLJOB Download Spool Request to File

Downloads the content of a spool request as a file to the user's PC. User tools that save report output as text or PDF without going to SP01 use it. It needs an SAP GUI connection and therefore does not work in the background; pass the spool number in ID and the file name in FNAME.

Function group
SPOX
Remote-enabled (RFC)
Yes
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
IDTSP01-RQIDENTSpool request numberYes
FNAMERLGRAP-FILENAMEFile nameYes
OUTTYPERSPODOCTYPOutput document type—
ENCODINGABAP_ENCODCharacter encoding—
FULLPATHSTRINGFull file path—

Changing parameters

ParameterTypeDescriptionRequired
DIRECTORYSTRINGDirectory—

Exceptions

  • CANNOT_RETURN — Spool content cannot be returned
  • DOWNLOAD_FAILED — Download failed
  • INVALID_DOCTYPE — Invalid document type

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'RSPO_DOWNLOAD_SPOOLJOB'
  EXPORTING
    id = lv_id
    fname = lv_fname
  CHANGING
    directory = lv_directory
  EXCEPTIONS
    cannot_return = 1
    download_failed = 2
    invalid_doctype = 3
    OTHERS = 4.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report