Automation Engine Script Guide > AE JCL for Applications > SAP > R3_GET_JOB_SPOOL

R3_GET_JOB_SPOOL

Reads the spool list of an ABAP program step.

Transaction: SM37

Interface: AE and Standard

Syntax

R3_GET_JOB_SPOOL

Syntax Description/Format
FILE=

Name of a file to which the result (step's spool list) should be written.
Format of value: script literal 

This file is also registered as job output in the AE job.

NAME=

Name of the SAP job that contains the step.
Format of value: script literal

Not defining the job name has the effect that the system automatically uses the name of the last SAP job that has been processed via the AE job that includes this script element.

JOBCOUNT=

Job count of the SAP job that contains the step.
Format of value: script literal

Not defining the job count has the effect that the system automatically uses the value of the last SAP job that has been processed via the AE job.

If you use the parameters NAME and JOBCOUNT, keep in mind that the spool cannot be retrieved if the corresponding job has been deleted in the SAP system (setting "Delete job in CCMS after completion" in the AE job).

STEP=

Number of steps in SAP job.
Format of value: Integer

Default value: 1

NOFOUND=

Handling if the spool list could not be found.
Format of value: script literal

Allowed values: NORMAL (default value) and ABEND

NORMAL -  The AE job continues.
ABEND - The AE job ends abnormally.

MAXLINES=

Maximum number of lines that are written to the file.
Format of value: Integer

Default value: 9999

The definitions that are made here are not considered if the settings FORMAT = PDF or BIN have been specified.

SPOOLNR=

Spool-request number.
Format of value: script literal

Not defining NAME, JOBCOUNT or SPOOLNR has the effect that the system automatically uses the last SAP job that has been processed via the AE job.

FORMAT=

Output format.
Format of value: script literal

Allowed values: TXT (default), RAW (instead of the parameter RAW - see below), PDF, BIN and HTM

With the settings BIN and PDF being used, the spool list is not converted and transferred in a binary format.

PAGES=

Pages.
Format of value: script literal

Syntax of the parameter: PAGES=page[;page[;...]]

Separate the specifications for the individual page areas by using the character  ";".

Examples:

  • Page 7: PAGES="7"
  • Pages 5 to 7: PAGES="5,7"
  • Page 2 and the pages 5 to 7: PAGES="2;5,7"

The symbol $ can be used 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,$"

The parameters FORMAT( not PDF), SPOOLNR and PAGES are also available for the XBP 3.0 interface (as of version 1.1).

FILTER=

Filter setting.
Format of value: script literal

String according to which a selection should be made. Wildcard characters cannot be used.

RAW=

Supplies the spool list in untrimmed size.
Format of the value: script literal

Allowed values: YES and NO (default value)

YES - The spool list is supplied in untrimmed size (i.e. including all formatting characters).
NO - The spool list is not supplied in untrimmed size.

Automic recommends using FORMAT=RAW instead of this parameter.

ENCODING=

Encoding for the generated output file (Parameter FILE=).

For example: UTF-8

Default value: ISO-8859-1

When you specify an encoding that is not supported or invalid, the job will abort with an error message.

The SAP Forms provide an input assistant for this field which lists all the supported encodings.

Comments

This script element can be used with the following parameter combinations:

The parameter FILTER requires the AE interface and the parameter RAW requires the standard interface.

The spool list can only be transferred if the checkbox "Delete job in CCMS after completion" in the Host Attributes tab has not been activated. This limitation does not apply if either the parameter SPOOLNR has been defined or the standard XBP 3.0 interface (as of version 1.1) is used without the parameters NAME, JOBCOUNT and SPOOLNR.

Note for using the standard interface XBP3.0 with a later version than V1.1:
standard interface: As a rule, the entire spool list is sent to the SAP agent.
The standard function of the XBP interface does not allow the user to access parts of the spool list. Note that large spool lists can reduce the performance of the SAP agent. The parameter MAXLINES= is first read when the entire spool list has already been transferred.

Note that by default, created files are stored on the computer on which the agent has been installed  (for example, R3_GET_JOB_SPOOL; FILE=).

Examples

A report is activated in the example shown below. The spool list of the step is retrieved without the job name or job count being indicated as parameters.Therefore, the job last 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: