Variant Substitution - UNIX
Variant Substitution - UNIX
This example demonstrates the use of variant substitution.
When Universal Connector is using pre-defined SAP jobs as template jobs (rather than USAP job definition files), it may be necessary or desirable to replace the variants specified in the template job with variants more appropriate for the current job run. In this case, Universal Connector's TARGET_VARIANT option can be used to accomplish the variant substitution.
This example is comprised of three steps:
- Step one modifies SAP variant SBT1.
- Step two modifies SAP variant SBT2.
- Step three runs a new SAP job that is created using a pre-existing SAP job as a template.
Variant substitution is performed on the newly created job. As a result, the newly created job will run using the variants that were modified in steps one and two.
Executing this example will:
- Modify variants SBT1 and SBT2 with values required for this job run.
- Submit a new job to the SAP system using a pre-existing SAP job as a template.
- Perform variant substitution on the newly created job. The newly created job will now use variants SBT1 and SBT2 for steps 1 and 2, respectively (regardless of what variants were defined in the template job).
- Wait for the job to complete.
- Return the job log.
- Return the spool list.
Note
This job assumes (and requires) that a job already exists on an the SAP system with:
- Job Name: VARSBST1
- Job ID: 12345678
Step One
This step modifies SAP variant SBT1.
The following figure illustrates the variant definition file for variant SBT1.
The following figure illustrates the command line to modify variant SBT1.
Step Two
This step modifies SAP variant SBT2.
The following figure illustrates the variant definition file for variant SBT2.
The following figure illustrates the command line to modify variant SBT2.
Step Three
This step submits, starts, and monitors a new job - using variant substitution.
Note
The pre-defined job must have ABAP program RSUSR002 defined in Step One and Step Two.
The following figure illustrates the variant definition file for variant SBT2.
Command Line Options
Command line options used in this example are:
Command Options |
Description |
Named set of connection parameters (destination) 'CF5'. These connection parameters are used for communications with the SAP system. The "destinations" are stored in file saprfc.ini, which must be in the current directory, or its full path must be specified in environment variable RFC_INI. | |
SAP client number that the Universal Connector will communicate with. | |
Remote user ID with which to execute the command. | |
Password for the user ID. | |
Specification that Universal Connector will issue the SUBMIT command. | |
Specification that Universal Connector will instruct the SAP system to start the submitted job. | |
Target server for the SAP job to run on. | |
Specification that Universal Connector will monitor the started job until it completes. | |
Specification that Universal Connector will return the SAP log for the started job. | |
Specification that Universal Connector will return any spool lists created by the started job. |