There are fundamentally 3 ways to define Standard SAP Batch Jobs in IWS :
In this Blog , we would look at the third method of creating an SAP Job and also explore the return Codes Associated with this Job Type . A Dynamic SAP R/3 Batch Job is defined as follows : XA#TEST SCRIPTNAME "/ -job TEST_5 -sg SERVERGROUP -c a -s1 type=A -s1 program=XXXXXX -s1 variant=YYYYYY -s1 user=STEPUSER -s1 prnew -flag type=exec -flag disable_spoollist -nobdc -nobdcwait" STREAMLOGON maestro DESCRIPTION "Added by composer." TASKTYPE SAP RECOVERY STOP Where Parameter sg is called the Server Group which aids in Load Balancing incase the SAP System is load Balanced using a SAP Message Server . Where parameter -c a indicates this is a Class A Job. Where parameter type=A indicates it is an ABAP Program. Where Parameter program indicates the ABAP Program Name. Where parameter variant defines the SAP Variant Name. Parameter prnew indicates that this is a New Spool request. Parameter user represents the Step User. disable_spoollist disables Spool List . So, all of these parameters are defined on IWS Side and at runtime the submission of this Job to SAP Side creates an instance of the job on SAP Side and generates SAP Job ID at runtime. So, in a Dynamic Job , the SAP Job instance gets created only at runtime and is otherwise entirely managed from IWS End . Dynamic SAP Jobs with Printer Parameters : Printer Parameters are defined to describe the Printer options and Spool options while defining an SAP Job. A sample Job with Printer parameters would look as below : XA#TEST_1 SCRIPTNAME "-job TEST_1 -s1 type=A -s1 report=XXXXXX -s1 variant=YYYYY -s1 prnew -s1 user=STEPUSER -s1 lang=EN -s1 printer=LP01 -s1 prsap=X -s1 paart=X_65_255 -s1 prtxt=XXXXXXX' -s1 pexpi=8 -s1 prcop=001 -s1 primm -s1 armod=2 -s1 sap_object=XXXXX -s1 al_object=XXXXXX -s1 al_report='XXXXX' -s1 arctext='XXXXX' -s1 datum=yyyymmdd -s1 al_printer=XXXX -s1 formular=X_PAPER -flag type=exec" STREAMLOGON fta DESCRIPTION "XXXXXXXX" TASKTYPE SAP RECOVERY STOP Where , “prnew” is for creating a New Spool Request without appending to an existing request. “printer” represents the name of the Printer in use “prsap” denotes the SAP Cover Page “paart” represents Printer formatting “prtxt” represents Text for Cover Page “pexpi” is the Spool retention period “prcop” represents Number of Print out Copies “primm” represents Print Immediately option “al_object” is the Document type “al_report” is the Report Name “arctext” is the Archive Text “datum” is the Archiving Date “al_printer” is the Target printer “sap_object” is the Object Type of Business Object “formular” represents Output format Dynamic SAP Jobs with Archiving Parameters : Archiving Parameters describe the Archiving options for a Job Definition: XA#TEST SCRIPTNAME "-job SAPJOBNAME -s1 type=A -s1 report=Z_ABAP -s1 variant=var -s1 sap_object=XXX -s1 al_object=XXXX -s1 al_report=XXXXXX -s1 arctext=’XXXXX’ -s1 arcuser=XXXX -s1 armod=2 -s1 info=XXX -s1 prnew -s1 lang=XX -s1 user=XXXX -flag type=exec" STREAMLOGON fta DESCRIPTION "XXXXXXXXXXX" TASKTYPE SAP RECOVERY STOP “arcuser” is the Archiving user “arcmod” represents Archive Mode “al_object” is the Document type “al_report” is the Report Name “arctext” is the Archive Text “info” is the info field Advantages of an SAP Dynamic Batch Job :
SAP Return Codes typically returned during execution of an Dynamic SAP Batch Job : Return Codes returned by an Dynamic SAP Job can be easily used to track the error and troubleshoot incase of Abends so as to quickly fix/address an issue . The Typical Return Codes that come out of an Dynamic SAP Batch job would be as follows: 1. 124: RFC Connection Issues are typically captured by this return code , SAP tries to establish an RFC Connection in 5 attempts and if the number of attempts are exhausted then SAP Returns an error that R/3 Batch Connectivity could not be established with an Return Code of 124. 2. 121: Return Code of 121 indicates an issue with the connectivity to an SAP System post the execution of an SAP Job , indicating that the Step is executing in SAP Side but IWS has lost visibility on the job and such scenarios can be troubleshooted by checking the final Job Status on SAP Side and matching the same on IWS Side . 3. 139: In some cases the RFC Connection loss is also experienced post the connection establishment on SAP Side immediately before the launch of the Job on SAP Side , in such cases return Code of 139 is experienced. 4. 11 or 39: Return Code of 11 or 39 is encountered when a Dynamic SAP Job is defined with a wrong Syntax missing a hyphen in an option etc , in which case the same job can be corrected and rerun from the DB post correction . 5. 118: Return Code of 118 can represent many things , but in a Dynamic SAP Job , it is encountered in the below scenarios :
6. 40: Return Code 40 is encountered in cases when an SAP execution Target is not set on a SAP Process Chain Job, however this case is not applicable to a Standard SAP Job.
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
Archives
February 2025
Categories
All
|