Handling ABAP Programs
Imported ABAP programs can easily be selected in the submit wizard, only a character sequence of the name needs to be entered; this avoids typos.
ABAP programs can have Variants, which can be removed and/or edited once they are imported. You can also use temporary variants, which will be deleted in the SAP System once the job has finished in the SAP System.
Imported ABAP programs can be scheduled with the following process definitions:
- SAP_AbapRun
- SAP_AbapRunPrint
- SAP_AbapRunPrintExt
- SAP_SolutionManager_AbapRun
- SAP_ClosingCockpit_AbapRun
These process definitions can be duplicated and tailored to your needs. When you specify a default queue, all SAP systems that are linked to the queue will be displayed first in the SAP Systems parameter. If you choose an SAP system that is not linked to the default queue, you will have to specify the correct queue.
Retrieving Spool Output to Process Servers
You specify a process server on the SAP system to retrieve output to. The process server must be a platform agent and the underlying platform must support JCo 3.1 or higher.
Retrieving Spool Output, Logs, and Application Logs in Other Formats
The FL_SHOWSPOOL
, FL_SHOWLOG
, and FL_SHOWAPPLLOG
parameters override the standard SHOWSPOOL
, SHOWLOG
, and SHOWAPPLLOG
parameters, respectively. The EnableFLParameters registry entry allows you to enable or disable these parameters (defaults to true
, enabled ). The available formats depend on the version of the target AS ABAP.
information
An operator message is logged for any spool format specified that is not supported by the SAP system for the specific spool type.
Spool Output
If you want other formats, or to specify multiple formats, you duplicate any of the SAP_AbapRun
process definitions and add the FL_SHOWSPOOL
parameter. The parameter accepts any of the following values:
None
- no spool will be retrieved.HTML
- retrieves the spool in HTML.PDF
- retrieves the spool as a Portable Document Format (PDF) file.Raw
- retrieves the spool in raw format.RTX
- retrieves the spool in RTX table format.BIN
- retrieves the spool in binary format; must be available in SAPGui, spool type LIST is not supported, for example.Standard
- retrieves the spool in the default format.Text
- retrieves the spool in plain text format.XLSX
- retrieves the spool in Microsoft Excel (2007+).XLS
- retrieves the spool in CSV with an XLS extension; Redwood Finance Automation automatically converts it from CSV to legacy XLS.
Multiple formats can be specified semi-colon delimited, see example below. The format(s) should work if you can retrieve the spool in the format(s) from within SAPGui.
You retrieve a specific spool list by specifying a file name filter; the following filters are supported:
<format>
- retrieve all files.<format>:*
- retrieve all files.<format>:step{no}_spool*
- retrieve all spool for the step{no}
.<format>:step*_spool{no}
- retrieve spool number{no}
for all steps.<format>:step{no}_spool{no}
- retrieve spool number{no}
for the step{no}
.<format>:step*_spool*
- retrieve all spool for all steps.<format>:step*_*
- retrieve all output for all steps which has_
.<format>:step{no}_*
- retrieve all output for step{no}
.<format>:step*
- retrieve all output for all steps.<format>:step{no}*
- retrieve all output for step number{no}
.<format>:spool*
- retrieve all spool.
Where
<format>
is eitherRaw
,XLSX
,RTX
,BIN
,PDF
,Standard
,None
,XLS
,HTML
, orText
.{no}
is the number of the step or spool.
Logs
You specify the format of the log file by duplicating any of the SAP_AbapRun
process definitions and adding the FL_SHOWLOG
parameter. The parameter accepts any of the following values:
None
- no log will be retrieved.PDF
- retrieves the log as a Portable Document Format (PDF) file.Standard
- retrieves the log in the default format.Text
- retrieves the log in plain text format.
FL_SHOWLOG
only accepts a single format. The format should work if you can retrieve the log in the format from within SAPGui.
Application Logs
You specify the format(s) of the application log file by duplicating any of the SAP_AbapRun
process definitions and adding the FL_SHOWAPPLLOG
parameter. The parameter accepts any of the following values:
None
- no application logs will be retrieved.HTML
- retrieves the spool in HTML; available with Redwood Finance Automation, only.PDF
- retrieves the application log as a Portable Document Format (PDF) file.Standard
- retrieves the application log in the default format.Text
- retrieves the application log in plain text format.XLS
- retrieves the application log in CSV with an XLS extension.
Multiple formats can be specified semi-colon delimited, see example below. The format(s) should work if you can retrieve the application logs in the format(s) from within SAPGui.
You retrieve specific log entries using the following syntax:
<Format>:[<Object>,<subObject>,<ExternalId>,<Abap>]
where
<Format>
- eitherPDF
,Standard
,None
,XLS
,HTML
, orText
.<Object>
-Object
(name) field, as displayed in SLG1.<subObject>
-subObject
(name) field, as displayed in SLG1.<ExternalID>
-ExternalId
field, as displayed in SLG1.<Abap>
-Program
field, as displayed in SLG1.
Example
You wish to retrieve the spool in PDF, CSV, and Text. You set the FL_SHOWSPOOL
parameter to PDF;CSV;Text
.
You wish to retrieve the application log in PDF and Text. You set the FL_SHOWAPPLOG
to PDF;Text
.
You wish to retrieve the application log entries in PDF and CSV format for External ID``12345678910
, Object
set to ZBO, Program
set to ZBO_VALPO
, furthermore, you want the entire application log in text. You set FL_SHOWAPPLOG
to PDF:ZBO,,12345678910,ZBO_VALPO;CSV:ZBO,,12345678910,ZBO_VALPO;Text
.
Additional Print Parameters
The additional print parameters can be generated when importing CCMS jobs by setting the parameter Generate Extra Print Parameters? ( EXTENDED_PRINT_PARAMETERS
) to Yes
.
It is also possible to duplicate any of the AbapRun process definition and add the parameters there. The following parameters are recognized:
EMAIL_ADDRESS
- The email address for the mail printerPAGE_FROM
/PAGE_TO
- page range, numeric valuesDRAFT_MODE
- draft mode. Valid values: Y (Yes) and N (No)PAGE_ORIENTATION
- page orientation. Valid values: L (Landscape) and P (Portrait)
note
Due to the limited size of the field in SAP, the max length of the email address is limited to 50 characters.
note
According to SAP Note 513352, printing with access method "M" (email printer) will not be developed further.
Retrieving Part of the Job Log
You can retrieve part of the job log by duplicating one of the AbapRun process definitions and specifying one of the following parameters:
JOBLOG_FIRST_LINES
- retrieve the first<n>
lines of the job logJOBLOG_LAST_LINES
- retrieve the last<n>
lines of the job log
When filled with a value > 0, only the given number of lines either from the beginning or from the end of the joblog is retrieved.
Temporary Variants
By duplicating the AbapRun process definitions and adding parameters, you can make use of temporary variants. A temporary variant is created for the job and deleted once the job has finished.
You specify the values and select options by creating parameters with names matching the technical name of the parameter or select option and setting Create Temporary Variant? or TEMPORARY_VARIANT
to Y. You can use the SAP Object Editor to inspect previously imported variants for the specific names, see Creating and Modifying Variants in Redwood Server for more information. These parameter names must be all upper case.
Variant Parameter Syntax
Variant parameters should be string parameters, with PAR_
or SEL_
prefixes, for parameter and select options, respectively. Their names must contain the name of the parameter/select option in SAP. Select options can either have a single value such as entry
or single value, multiple values, ranges, and/or exclusions enclosed in square brackets []
, such as [a,c-m,!d,!f,!g]
.
The following operators are available for select options, the mathematical syntax can only be used in RedwoodScript and is displayed here for clarity:
Syntax | Meaning | Mathematical Syntax |
---|---|---|
NOT | Not | ! |
EQ | Equals | = |
NE | Not Equals | != |
NE | Not Equals | <> |
GE | Greater than or equals | >= |
GT | Greater than | > |
LE | Less than or equals | <= |
LT | Less than | < |
note
When you specify date-ranges, make sure you put spaces between the dates and the hyphen (-), the range 21.02.2020 - 31.12.2020
is valid and this one is not valid:21.02.2020-31.12.2020
.
tip
If you want to specify two or more exact values, you can create a parameter for each select option.
Example
You have a process definition with the following parameters:
PAR_NOEX
- Without Extract, set toX
SEL_FLDATE
- Flight Date, set toBT
and21.02.2010 - 31.12.2010
Another example of a process definition with parameters:
PAR_NOEX
- Without Extract, set toX
SEL_CAR
- Airline, set toBT
and[AA-ZZ, !BC, !AF]
Alternate example of process definition with parameters:
PAR_NOEX
- Without Extract, set toX
SEL_FLDATE_01
- Flight Date, set toGE
and01.02.2010
SEL_FLDATE_02
- Flight Date, set toLE
and18.02.2010
Note the use of two FLDATE
select options with two exact values.
Waiting for Child Jobs
By duplicating the AbapRun process definitions and adding the following parameter, you can make the job not wait for child jobs:
Parameter | Description | Direction | Data Type | Values |
---|---|---|---|---|
WAIT_FOR_CHILD_JOBS | Wait for child jobs? | In | String | N No, I Ignore (jobs not shown in Redwood Server), Y Yes (default) |
Waiting on an SAP Event
By duplicating the AbapRun process definitions and adding the following two parameters, you can make the job wait for an event in SAP:
Parameter | Description | Direction | Data Type |
---|---|---|---|
STARTCOND_EVENTID | batch event ID | In | String |
STARTCOND_EVENTPARM | parameter of the event ID | In | String |
Note that you have to duplicate the process definition and modify the duplicate.
Showing Log/Spool of Children
By duplicating the AbapRun process definitions and adding the following parameters, you can show the spool or the log of child jobs in SAP:
Parameter | Description | Direction | Data Type |
---|---|---|---|
CHILD_SHOWLOG | Show log of child jobs? | In | String |
CHILD_SHOWSPOOL | Show spool of child jobs? | In | String |
Note that you have to duplicate the process definition and modify the duplicate.
Ignore Application Return Code
The return code can be ignored on four levels:
- process server-level - set the process server parameter SAP_IgnoreApplicationReturnCode to
true
- process definition-level - create a parameter named IGNORE_APPL_RC
- registry entry
/configuration/sap/<Partition>.<SAPSystem>/xbp/IgnoreApplicationReturnCode
, only valid for the specified SAP system - registry entry
/configuration/sap/xbp/IgnoreApplicationReturnCode
, valid for all SAPR3 processes across all SAP systems
The settings are processed in this order, the first setting found has precedence:
- Parameter
IGNORE_APPL_RC
, only valid for all processes of this process definition. - Process server parameter
SAP_IgnoreApplicationReturnCode
, only valid for all processes that run on the process server. - Registry entry
/configuration/sap/<Partition>.<SAPSystem>/xbp/IgnoreApplicationReturnCode
, only valid for the specified SAP system. - Registry entry
/configuration/sap/xbp/IgnoreApplicationReturnCode
, valid for all SAPR3 processes across all SAP systems.
SAP_AbapRun
This process definition is used to run ABAP's via the XBP interface in SAP Systems. This process definition works with every version of the XBP interface, yet it offers a limited set of print and archive parameters (only those that are available in XBP 1.0) if you do not load the Redwood Transport files.
note
If you need to use the optional Archive text information field parameter, known as Text in SAPGUI, you will have to use the process definition SAP_AbapRunPrint or SAP_AbapRunPrintExt.
SAP_AbapRunPrint
This process definition is used to run ABAP's via the XBP interface in SAP Systems. This process definition makes use of the extended capabilities of the XBP 2.0 interface, which provides an extended the set of print and archive parameters. This process definition works on every version of the XBP interface, yet on versions below 2.0 most of the print and archive parameters will be skipped.
SAP_AbapRunPrintExt
This process definition is used to run ABAP's via the XBP interface in SAP Systems. This process definition makes use of the extended capabilities of the XBP 3.0 interface to set the spool list recipient and retrieve application log and batch statistics of the SAP job. This process definition works on every version of the XBP interface, yet on versions below 3.0 the new functionality is disabled.
If you set Print/Archive mode to Archive only or Print and Archive, the following additional Archive parameters must be set:
- Archive SAP object - Referred to as Obj.type in SAPGUI
- Archive object - Referred to as Doc.type in SAPGUI
- Archive info - Referred to as Information in SAPGUI
- Archive text information field - Referred to as Text in SAPGUI
SAP_ClosingCockpit_AbapRun
This process definition is based on the SAP_AbapRunPrintExt process definition and contains additional parameters for Closing Cockpit. This process definition requires closing cockpit integration to be configured.
SAP_SolutionManager_AbapRun
This process definition is based on the SAP_AbapRunPrintExt process definition and contains additional parameters for Solution Manager. This process definition requires Solution Manager Integration to be configured.