R3_GET_JOB_SPOOL

This script element reads the spool list of a step of type ABAP program and stores the information in a file.

Transaction: SM37
Interface: AE and Standard

Syntax

R3_GET_JOB_SPOOL

    FILE=...
    [,NAME=...]
    [,JOBCOUNT=...]
    [,STEP=...]
    [,NOFOUND=...]
    [,MAXLINES=...]
    [,SPOOLNR=...]
    [,FORMAT=...]
    [,PAGES=...]
    [,FILTER=...]
    [,RAW=...]

Parameters

  • R3_GET_JOB_SPOOL
    Reads the spool list of a step of type ABAP program

  • FILE=
    Name of a file to which the result (spool list of the step) should be written. This file is also registered as job output in the AE job. For more information, see Registered Job Output.
    Format: script literal
    Notes:
    • By setting (REPORT,REP), the content of a SAP job spool is automatically visible in the R3 job report (REP).
    • The Always delete job in CCMS after completion checkbox must be unchecked when you use R3_GET_JOB_SPOOL FILE="c:\temp\jobspool.txt".

    • By default, the created files are stored on the computer on which the agent is installed. For example R3_GET_JOB_SPOOL FILE=
  • NAME=
    (Optional) Name of the SAP job that contains the step
    Format: script literal
    Default: The name of the last SAP job that has been processed via the AE job that includes this script element.
  • JOBCOUNT=
    (Optional) Job count of the SAP job that contains the step
    Format: script literal
    Default: The value of the last SAP job that has been processed via the AE job.
    Note: You can use both parameters NAME and JOBCOUNT. In this case, make sure that the corresponding job was not deleted in the SAP system (Always delete job in CCMS after completion setting in the AE job). Otherwise, the spool cannot be retrieved.
  • STEP=
    (Optional) Number of steps in the SAP job
    Format: integer
    Default: 1
  • NOFOUND=
    (Optional) Handling if the spool list could not be found
    Format: script literal
    Allowed values:
    • NORMAL (default)
      The AE job continues
    • ABEND
      The AE job ends abnormally
  • MAXLINES=
    (Optional) Maximum number of lines that should be written to the file
    Format: integer
    Default: 9999
    Note: This parameter is ignored if you define FORMAT= PDF or BIN.
  • SPOOLNR=
    (Optional) Spool-request number
    Format: script literal
    Default: The last SAP job that has been processed via the AE job.
  • FORMAT=
    (Optional) Output format
    Format: script literal
    Allowed values:
    • TXT (default)
    • RAW
      You can use this value instead of the RAW parameter that is described below.
    • PDF
      The spool list is not converted and transferred in a binary format.
    • BIN
      The spool list is not converted and transferred in a binary format.
    • HTM
  • PAGES=
    (Optional) Pages. Separate the specifications for the individual page areas with a semicolon (;) character.
    Format: script literal
    Syntax: PAGES=page[;page[;...]]
    Examples
    • Page 7: PAGES="7"
    • Pages 5 to 7: PAGES="5,7"
    • Page 2 and the pages 5 to 7: PAGES="2;5,7

    You can use a $ symbol instead of the last page:

    • Pages 1 to 3 and the last page: PAGES="1,3;$"
    • All pages: PAGES="1,$"
    • The first and last page: PAGES="1;$"
    • The last two pages: PAGES="$-1,$"
  • FILTER=
    (Optional) Filter setting. String according to which a selection should be made. You cannot use wildcard characters.
    Format: script literal
    Required interface: AE
  • RAW=
    (Optional) Supplies the spool list in raw format
    Format:script literal
    Allowed values:
    • NO (default)
      The spool list is not supplied in raw format
    • YES
      The spool list is supplied in raw format and includes all formatting characters

    Required interface: Standard
    Note:
    You can FORMAT=RAW instead of this parameter and achieve the same result.

  • ENCODING=
    (Optional) Encoding for the generated output file that is specified with the FILE= parameter.
    Default: 
    ISO-8859-1
    Example:
    UTF-8
    Allowed values:
    The SAP Forms view on the Process page provides an input assistant that lists all the supported encoding formats. If you define an encoding format that is not supported or invalid, the job aborts with an error message.

You can use the following parameter combinations:

  • SPOOLNR
  • NAME, JOBCOUNT, STEP
  • NAME, JOBCOUNT
  • STEP
  • None of these parameters

To transfer the spool list, the Always delete job in CCMS after completion checkbox in the Start Parameters section on the SAP page must not be activated. This limitation does not apply if either the parameter SPOOLNR is defined or the standard XBP 3.0 interface (as of version 1.1) is used without the parameters NAME, JOBCOUNT and SPOOLNR. For more information, see SAP ABAP, Java and PI.

Notes for using the standard interface XBP3.0 with a later version than V1.1:

  • The entire spool list is sent to the SAP agent. The standard function of the XBP interface does not allow users to access parts of the spool list.
  • Large spool lists can reduce the performance of the SAP agent. The MAXLINES= parameter is only read when the entire spool list has already been transferred.

Examples

The following example activates a report. The spool list of the step is retrieved without the job name or job count being indicated. Therefore, the last SAP job that was processed by the agent is automatically used.

R3_ACTIVATE_REPORT REPORT='RSPO0041',VAR='STANDARD',COVERPAGE=YES
R3_GET_JOB_SPOOL FILE='c:\temp\spoollist.txt',NOFOUND=ABEND,MAXLINES=20

See also:

seealso

About SAP JCL