SAP Process Definition Generation User Guide
Introduction
Redwood software uses process definitions to execute processes in remote ERP systems. This documentation explains how to identify the correct process definitions for use with SAP systems as well as the methods for creating new process definitions, if needed.
Identifying the process requirements
To use a process definition for an automated process, the entire context of the process must be analysed. This is an activity which needs to be started during the functional design and requires cooperation of the functional consultant and the technical engineer.
ABAP Analysis
Each process definition can only reflect a single transaction / ABAP in SAP. Therefore, the first check that needs to be done is whether the specific process step reflects a single transaction or several transactions which need to be split up.
Remark: the described tooling in this document is only intended for customer transactions, usually starting with Z_ or Y_.
Analysis: Identify the Program
Note: The user needs to provide the transaction code, not a screenshot of his SAP navigation bar and a highlighted item, as this SAP navigation bar can be customized at the customer. This is an important piece of information which is part of the mandatory information required to identify and generate a process definition.
After entering the transaction name, SAP will load the transaction. Next, check and record the related ABAP name as the Redwood library uses ABAP names and not transaction names.
For this, navigate to System > Status. The field "Program" in the SAP data section contains the ABAP program name.
Note that this should be performed for each follow up screen resulting from the transaction, as following screens can be related to different programs in SAP. A common example is cockpit transactions which need to split into several process definitions to cover the actual ABAP executions.
Check the Transaction for Background Execution
For all transaction types except 'standard', the execution in background is possible. So, only for non-classified standard ABAP, a check must first be made if the ABAP can be executed in the background:
Start the transaction.
If it has a menu "Program>Execute in Background", it can be generated with the process definition generation tool.
Other criteria can be a parameter called "Background Processing" or similar:
Execute the transaction and check the results with SM37.
If the result is not clear, you can use the ABAP /JCS/BC_Transactions to determine the real execution type.
Analyze a Transaction with /JCS/BC_TRANSACTIONS
With this report users can analyze what is executed at the base of the transaction. This is based on information that SE93 provides.
To run the report, navigate to SA38 and execute the program /JCS/BC_TRANSACTIONS.
Example:
Note that this also shows related reports, which may be eligible for background execution as well as provide an indication of the ABAP type as supported by the process definition generation tool.
Validate Background Execution in SE38 / SA38
Once the program has been identified, one final confirmation should be performed to make sure it can be generated with the process definition generator:
Start the transaction SA38 and enter the transaction name:
If you click on "Execute" and get a program screen, the process definition generator can be used.
Dynamic and Custom Selections
The last part of the pre-generation analysis are dynamic and custom selections.
Transactions like FBL3N, have a specific icon for defining the selections
With active selections, the button will change like this:
When selecting the button, you get a screen like this
If this is a dynamic or custom selection cannot be determined at this point.
Transaction FAGL_FCV has the same button in several places
To determine if it is a dynamic or custom selection, you can use the variant where the selection is activated in. If it is a dynamic selection, then the variant display has an addition screen section.
If it is a custom selection, then you will see at the end of the variant parameter list parameters without value but with a button.
You can use the button to see the details of the structure.
With Redwood Finance Automation 4.2 the generator also supports both selections and can be used to generate the correct process definitions.
/JCS/BC_DYNAMIC_SELECTIONS
With this report it is possible to determine the parameter names of dynamic selections.
Example: RFITEMAR
Note that the description on the folder view can be different from what is visible in RFITEMAR.
The fields that have been selected are then shown as a result
note
An easy alternative way to obtain the correct parameters in your process definition is to specify them in a variant and then use the process definition generator. It will add this parameter automatically.
As the variant is important for the generator, this report should only be used to investigate if the creation based on the variant does not work.
ABAP Process Definition Generator - FCA_SAP_Utils_Create_Robot
With this process definition generator, you can create a process definition that contains all the parameters of an ABAP that are required for execution in the background.
The definition is geared to create temporary variants for the following types of ABAP:
- ABAP Program (SA38, SE38)
- ABAP Query (SQ00)
- Report Writer (GR55)
- Report Painter (GRR3)
- Drill Down Reports
- Table Content (SE16)
Step 1: Execute Program from SA38 and Create a Variant
To identify the fields required for the process definition and add default values, a variant must be created in SAP for that program. Please note that both variants and layouts need to be created based on the ABAP, not the transaction.
This step does not apply for all ABAP types, and any exceptions will be explained in the relevant sections for those types.
The variant is essential for a building a process definition. It ensures that the process definition comes with the according defaults for the parameters. Also, the variant is required to reduce the risk of handling the custom and/or dynamic selections correctly wrong.
Call the transaction SA38 in SAP and enter the program name:
Click on execute to start the program. Note that the screen already may look a bit different from the original transaction.
Populate all fields as required. Make sure to include fields that may not be required for this specific execution, but which should be available in general for this transaction.
If the transaction contains custom and/or dynamic selections, set these as well (see 2.1.5).
Once everything is set, select Goto > Variants > Save as Variant.
Enter a variant name to save. As the fields have been set on the screen already, further adjustments here are usually not required.
In some cases, it may be required to hide fields if they are not needed.
Step 2: ABAP Process Definition Generator
In Redwood, submit the process definition FCA_SAP_Utils_Create_Robot.
Source Parameters
The source parameters define what to use to generate a new process definition.
Mandatory Parameters
- Report Type - Can be ABAP (ABAP Run), AQ (ABAP Query), DDR (DrillDown Reporting), RP (Report Painter), RW (Report Writer) or TAB (Table content). Depending on the value selected here, the according parameter tab must be filled, and the others ignored.
- SAP System - SAP System to generate ABAP process definition from
- SAP Client - SAP Client to generate ABAP process definition from
Optional Parameters
- Source Variant - If a variant has been generated, it can be specified here. This is highly recommended. If empty, all standard fields without description will be added to the process definition.
Target Parameters
The source parameters define the name and the location of the new process definition.
Mandatory Parameters
- Template to use for adding parameters - This parameter is locked by default and should not be changed. It reflects the standard process definition template for SAP process definitions.
- Transaction definition to create - Name of the new process definition. Cannot contain blanks or special characters.
- Action before creation of new transaction definition - D(elete) will delete an existing process definition if it has the same name. R(ename) will rename the previous process definition to keep it.
- Application of the Transaction definition - Application folder where the new process definition is stored. It should always be CUS_FCA. If a locked application (for example FCA) is used, the process definition will fail
Optional Parameters
- Description of Transaction definition - This can contain a more detailed description for the process definition which also allows blanks and other special characters
ABAP Parameters
ABAP parameters will only be considered if the type is set to "ABAP" on the Source tab.
Optional Parameters
- ABAP Program - Name of the ABAP program to generate a process definition for. The variant is defined on the source tab.
For the ABAP process definition generation, no dependencies need to be considered. All parameters available will be added to the process definition, but for custom and dynamic selections only those filled in the variant will be made available as parameters.
ReportWriter Parameters
ReportWriter parameters will only be considered if the type is set to "ABAP" on the Source tab.
Optional Parameters
- ReportWriter Group - Name of the report writer group to generate the process definition for. The variant is defined on the source tab.
The ReportWriter program SAPMGRWJ cannot be executed in SE38. In order to maintain the variant, this needs to be done separately.
Navigate to the transaction GR55 and enter the report writer group to automate:
The easiest way to generate the variant is to execute the report group by clicking the execute button or pressing F8. The variant for the generator can then be created and saved as described in section 3.1. Please note that the specific report writer group ABAP can then be found in the system info in the bottom right corner.
Alternatively, this way can be used:
Select Utilities > Maintain Variants > Execute
In the following screen, enter the variant name you want and click on create:
You can now edit the variant as you like and define that also as a variant in the "Source" tab.
Also, this screen contains the actual ABAP program used for that report writer group, and this program ID can also be used in SA38 for execution.
To create a report writer process definition, the process definition FCA_SAP_ReportWriterReports_Synchronize needs to be executed first to synchronize the data required for generating the process definition from SAP.
Report Painter Parameters
Optional Parameters
- ReportPainter Library - Report Painter library to generate the process definition for
- ReportPainter Report - Related report painter report of the library
To generate the variant, first call the transaction GRR3.
The library equals the folder containing the report, and the item refers to the report.
Example: The highlighted fields would result in the values 0F1 for the ReportPainter Library and 0F-PER for the period breakdown report.
Double click the report for the process definition generation and click on the execute button or press F8 to run the report.
The report painter report will now be executed, and the variant for the process definition generator can be created according to section 3.1.
To create a report painter process definition, the process definition FCA_SAP_ReportWriterReports_Synchronize needs to be executed first to synchronize the data required for generating the process definition from SAP.
Drill Down Reporting Parameters
Optional Parameters
- DDR: Application - Can be looked up in table FCA_SAP_DrillDownReporting_Report or using /JCS/BC_TRANSACTIONS (2.1.3)
- DDR: Sub Class - Can be looked up in table FCA_SAP_DrillDownReporting_Report or using /JCS/BC_TRANSACTIONS (2.1.3)
- DDR: Table Name - Can be looked up in table FCA_SAP_DrillDownReporting_Report or using /JCS/BC_TRANSACTIONS (2.1.3)
- DDR: Report ID - Can be looked up in table FCA_SAP_DrillDownReporting_Report or using /JCS/BC_TRANSACTIONS (2.1.3)
To create a drill down reporting process definition, the process definition FCA_SAP_DrillDownReports_Synchronize needs to be executed first to synchronize the data required for generating the process definition from SAP.
This process definition will generate the tables FCA_SAP_DrillDownReporting_Transactions and FCA_SAP_DrillDownReporting_Report. Those tables may be required to analyse the parameters required for the drilldown report process definition generation.
There are two scenarios to evaluate the according parameters.
Analysis with /JCS/BC_TRANSACTIONS
If there is a specific transaction for a single drilldown report, the data can be evaluated using the ABAP /JCS/BC_TRANSACTIONS.
Example: The transaction S_ALR_870133326 is a drilldown report transaction that can easily be analysed using /JCS/BC_TRANSACTIONS.
Navigate to SA38 and execute /JCS/BC_TRANSACTIONS:
Enter the drilldown report transaction name into the field. Note that this does not work if you only have the ABAP name of the specific drilldown report.
Execute:
Note that it will show "Drill Down Report" on the type.
All the necessary parameters for the drilldown report process definition generation will be listed. You can generate a variant on the transaction ABAP as well (see 3.1)
Analysis using Redwood tables
Some drilldown reports are nested in transactions like for example FSI0:
In this case, the process definition generator parameters can be looked up in the table FCA_SAP_DrillDownReporting_Report in Redwood:
In this example, when we want to create a process definition for 0SAPBLNCE-01, look it up in the table.
The resulting parameters and values would be:
- DDR: Application - FBR
- **DDR: Sub Class - 01
- **DDR: Table Name - RFRRS01
- **DDR: Report ID - 0SAPBLNCE-01
The is normally the report ID. If you have the same report ID multiple times, you need to cross-match the report ID based on the starting transaction and application / sub class in the table FCA_SAP_DrillDownReporting_Transactions:
Then, execute the report and create the variant to finish the preparation for the process definition generation (see 3.1).
Table Content Parameters
Optional Parameters
- Table name - Table to create process definition for. All fields available to select on the table will be included in the process definition.
Alternatively, the SE16 standard process definition SAP_TableContent_List can be used.
If you want to create the process definition based on a variant to pull the field names, go to SA38:
The ABAP to create the initial variant is /1BCDWB/DB
Fill the selection screen for the values you want to check:
Then save the variant (see 3.1 for details on variant creation for an ABAP).
ABAP Query Parameters
Optional Parameters
- Query Workspace - G for global or blank for client specific
- Query UserGroup - Selected from Environment > User groups
- Query - Query selected based on the user group
ABAP queries are started from the transaction SQ00:
The user group is pre-selected for the user, but it can be changed by selecting Environment > User Groups:
In the user groups screen, you can select a different user group and then click back:
Note that the available queries change depending on the user group selected.
In order to create a variant for the process definition generation (optional), select the query and click on execute or press F8. (see 3.1)
To create an ABAP query process definition, the process definition FCA_SAP_ABAPQuery_Synchronize needs to be executed first to synchronize the data required for generating the process definition from SAP.
Step 3: BW Query generator - FCA_SAP_Utils_Create_Robot_BW_Query
With this generator a process definition can be created for a BW Query to retrieve its data. It contains all parameters that are also available when executing the Query using RSRT1.
Source Parameters
Target Parameters
Mandatory Parameters
- Template to use for adding parameters - This parameter is locked by default and should not be changed. It reflects the standard process definition template for SAP BW query process definitions.
- Transaction definition to create - Name of the new process definition. Cannot contain blanks or special characters.
- Action before creation of new transaction definition - D(elete) will delete an existing process definition if it has the same name. R(ename) will rename the previous process definition to keep it.
- Application of the Transaction definition - Application folder where the new process definition is stored
Optional Parameters
- Description of Transaction Definition - This can contain a more detailed description for the process definition which also allows blanks and other special characters
BW Query Parameters
Mandatory Parameters
- Query - The BW query to generate the process definition for
Optional Parameters
- Query View - Only applicable if the query allows views to set
- Query Variant - Not all queries have a variant. Needs to be checked.
You can evaluate query view and query variant on the query monitor:
For the views, you can just use the F4 help in the view field to check available view.
The query variant is available using "Query Variants" in the menu or you can create on during the execution if the query supports variants.
BW queries can have a lot of factors which makes the automated process definition generation difficult. In case of issues it is recommended to place a request at Redwood support if there are issues with the automated generation.
Add ALV Layout Parameter
A common requirement is to use an ALV layout if the transaction supports it. In order to use a layout, there are several steps to be done as just adding an according parameter is not enough.
Identify the Required Layout
In the layout selection, you can the technical layout name which is usually preceded by a / :
Identify the Correct Program and Default Layout Group
Navigate to SE16N and search for the layout you identified in the table LTDX on the field Layout (VARIANT):
Identify the line with your required layout:
Viewing the details, you get the Program name, the Handle (if applicable) and the Logical group:
Add the Layout Parameters to the Process Definition
First, the parameter ALV_LAYOUT in the Variant group. It is an IN parameter of type String. Also add the description default layout.
Next, enter the following default value for RULE_PRERUNNING and the name for the process definition specific layout:
RULE_PRERUNNING <=> ALVDefaultLayout(Handle,Logical Group, Program name)
ALV_LAYOUT <=> NAME of the process definition specific Layout
Please note that for custom process definitions, only a default layout can be selected. The freely selectable Layout field from process definitions delivered in the SAP content package is not available.
Review Process Definition
Once the process definition has been generated, it needs to be reviewed. Open the process definition and go to the tab parameters:
Hide Unneeded Template Parameters
The process definition template for SAP process definition offers a lot of parameters which usually are not required.
Review all parameters assigned to the group names Target, BatchInput, Infrastructure, Print Parameters, Archive Parameters, Recipient Parameters and Job Output Parameters.
You can hide a parameter by clicking on the parameter line, and unchecking "Display" in the lower part of the screen:
Mandatory parameters (field "Optional") should not be hidden unless they contain a default expression.
It is recommended to hide all parameters not required to be set for the process definition.
Check Variant Parameter Descriptions
Next,check the parameters generated for the process definition. They are assigned either to the Group Name Variant (in which case they will be checked for "Display" by default) or Variant (Invisible). Parameters in the latter group are hidden by default as they reflect fields which are usually not selected.
The process definition generator tries to retrieve a description for a parameter, but sometimes SAP does not return a sensible text, so it is advisable to change the description to the on-screen description.
In order to do that, locate the field reflecting the technical field name by checking fields:
- Select the field which matches that input field.
- Press F1:
- Click on the tools icon
- The value in the "Screen Field" field represents the technical name of the field on the form.
Note that the parameter names on the process definition are headed by
Rename to make it match the screen description in the SAP transaction.
Hide or Remove Unneeded Parameters
Often, the process definition will only need a few of the fields retrieved for that transaction. Check all parameters assigned to Variant / Variant (Invisible) and check/uncheck Display as needed. Hiding a parameter is done when the parameter is not required now but may be eligible for a process definition expansion in the future.
If a parameter is not required for the process definition, it can also be deleted. It won't impact the process definition and the parameter will be center on SAP default when running the process definition.
Group Parameters
It is often the case that even after hiding/removing unneeded parameters a lot of parameters are left. Change the group name to the remaining parameters to reflect the areas on the screen:
This puts the parameters in grouped tabs and makes it much easier to assign on a process definition.
As a best practice, the number of visible parameters should be as low as possible for a Process definition and they should be grouped.
Appendix
This documentation is based on Redwood Finance Automation version 4.2
financeTopic