SAP Variant JumpStart Guide
This guide is designed to get you familiar with SAP ABAP variant handling, without going through the different parts of the documentation. At the end of this walk through you will find links to relevant topics for each step, should you wish to customize the setup.
Prerequisites
- The FQDN of the SAP system or its IP address as well as the system number.
- An SAP username and password and client with the require SAP authorizations. See SAP RFC user privileges for more information.
Process Flow
- Create an SAP System connection to an SAP system
- Import the SAP ABAP programs to execute
- Import The SAP ABAP program variants to maintain
- Schedule the SAP ABAP program with variant
- Create a variant in Redwood Server
- Schedule the SAP ABAP program with temporary variant
- Store the variant in SAP
- Modify the variant in Redwood Server and schedule the SAP ABAP program in SAP with the modified variant
Connect to SAP
- Navigate to Environment > SAP
- Choose New SAP system from the context-menu.
- Specify the SAP SID in the Name field.
- Specify the connection string using FQDN hostname of the SAP system and system number (
ASHOST=... SYSNR=..
), for exampleASHOST=d00.example.com SYSNR=00
. - Select a time zone in the Default Job Time Zone field.
- On the XBP tab, choose Add, specify the desired SAP client in the Client Number field, for example
100
, the username and password in the relevant fields, check Default Client, and choose Check Connection Settings. - If the connection settings are valid, choose Save & Close.
- Navigate to Environment > Process Servers and choose Start. If the process server reaches status Running, the connection is established.
Import SAP ABAP Programs
- Navigate to Definitions > Processes, fill
SAP_Import
into the search field, choose Submit from the context-menu of SAP_ImportAbapPrograms. - In the SAP System field, select your SAP system, in the ABAP Program field, fill
RSPFPAR
and choose Submit and Submit.
Import SAP ABAP Variant for RSPFPAR
- Navigate to Definitions > Processes, fill
SAP_Import
into the search field, choose Submit from the context-menu of SAP_ImportVariant. - In the SAP System field, select your SAP system, in the ABAP Program field, select
RSPFPAR
, in the ABAP Variant field, selectSAP&_AUTH
Schedule the ABAP Program with Variant
- Navigate to Definitions > Processes.
- Fill
SAP_ABAP_RUN
into the search field, choose Submit from the context-menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fillGet profile parameters
in the SAP Job Name field, selectRSPFPAR
in the ABAP Program field, and select 'SAP&AUTH' in ABAP Variant. - On the Job Output Parameters tab, select Yes in the Delete job when finished field.
- Choose Submit, choose Monitor related processes from the context-menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.
Create the ABAP Variant in Redwood Server
- Navigate to Environment > SAP, choose Maintain Objects from the context-menu of your SAP System.
- In the Maintain Objects dialog, expand ABAP Programs, choose New Variant from the context-menu of RSPFPAR / Display Profile Parameter.
- Select your client in the Client Number field, fill
Redwood
into the Name field, choose Save. - Choose New Select Option from the context-menu, select
PNAME
in the Name field. - On the Values tab, choose Add, select
BT
in the Option field, filllogin/*
into the Low andoz*
in the High fields and choose Save & Close.
Schedule the SAP ABAP Program with Temporary Variant
- Navigate to Definitions > Processes.
- Fill
SAP_ABAP_RUN
into the search field, choose Submit from the context-menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fillGet profile parameters
in the SAP Job Name field, selectRSPFPAR
in the ABAP Program,Redwood
in the ABAP Variant, and selectYes
in the Create Temporary Variant? fields. - On the Job Output Parameters tab, select Yes in the Delete job when finished field.
- Choose Submit, choose Monitor related processes from the context-menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.
note
When the variant exists in Redwood server and not in the SAP system, you set the Create Temporary Variant? field to Yes
. This is also required when the variant exists in both, parameters or select options differ, and you want to use the values stored in Redwood Server.
Store the ABAP Variant in SAP
- Navigate to Definitions > Processes.
- Fill
SAP_ABAP_RUN
into the search field, choose Submit from the context-menu of SAP_StoreVariant, select your SAP system in the SAP System field, your client in the Client field, selectRSPFPAR
in the ABAP Program, andRedwood
in the ABAP Variant field; ensure If Variant Already Exists in the SAP System is set toFail
. - Choose Submit, choose Monitor related processes from the context-menu of SAP_StoreVariant, if the process status Completed, move on to the next step, if the status is Error, inspect stderr.log under Files, ensure that it states:
Variant REDWOOD of ABAP program RSPFPAR already exists. Failed.
- Open SAPGui, open transaction SE38, fill
RSPFPAR
into the Program field, select Variants and choose Display. - Fill
Redwood
in the Variant field and choose Display, you should see the variant information specified above.
Modify the variant in Redwood Server
- Navigate to Environment > SAP, choose Maintain Objects from the context-menu of your SAP System.
- In the Maintain Objects dialog, expand ABAP Programs, RSPFPAR / Display Profile Parameter, your client number, and RSPFPAR, select PNAME.
- On the Values tab, select
CP
in the Option field, replace the contents of the Low field withms/*
and delete the contents of the High field. - Navigate to Definitions > Processes.
- Fill
SAP_ABAP_RUN
into the search field, choose Submit from the context-menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fillGet profile parameters
in the SAP Job Name field, selectRSPFPAR
in the ABAP Program,Redwood
in the ABAP Variant, and selectYes
in the Create Temporary Variant? fields. - On the Job Output Parameters tab, select Yes in the Delete job when finished field.
- Choose Submit, choose Monitor related processes from the context-menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.
- Notice that we now have the message server-related and no longer the login-related profile parameters as we use the Redwood Server variant to create a temporary variant.
- Navigate to Definitions > Processes.
- Fill
SAP_ABAP_RUN
into the search field, choose Submit from the context-menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fillGet profile parameters
in the SAP Job Name field, selectRSPFPAR
in the ABAP Program,Redwood
in the ABAP Variant, and selectNo
in the Create Temporary Variant? fields. - On the Job Output Parameters tab, select Yes in the Delete job when finished field.
- Choose Submit, choose Monitor related processes from the context-menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.
- Notice that we now have the login-related and no longer the message server-related profile parameters as we use the variant in SAP and not the one stored in Redwood Server.
Further Reading
- Handling ABAP Programs
- Handling Variants
- Creating and Modifying Variants in Redwood Server
- Maintaining Variants Manually
- Maintaining Variants Automatically
- Maintaining Variants Automatically (Advanced)
- Using Temporary Variants
- The SAP Connector
- Default SAP Process Definitions
- Importing Objects from SAP Systems
- SAP RFC User Privileges
- Assigning SAP Authorizations to the RFC User