Importing and Running Mass Activities
Mass activities can be started and monitored from within Redwood Server like any other Chain. You can specify parameters to override the current parameter set inside your SAP System. You can copy a parameter record, which is a subset of the parameter set in SAP, and override certain parameters. Parameter sets cannot be imported into Redwood Server. Before you run a Mass Activity, a parameter set must be activated for it.
Note: Scheduling and Monitoring of Mass Activities requires the ProcessServerService.SAP.MassActivities license key.
The following default Process Definitions are available for interacting with Mass Activities:
Process Definition | Description |
---|---|
SAP_MA_CopyParameters | Copy mass activity parameters. |
SAP_MA_CreateParameters (Deprecated) | Create a new mass activity parameter record. |
SAP_MA_DeleteDunningProposal | Delete dunning proposal of a new mass activity. |
SAP_MA_ImportMassActivities | Import SAP mass activity definitions. |
SAP_MA_ImportMassActivity | Import an SAP mass activity definition. |
SAP_MA_MassActivityRun (Deprecated) | Create a parameter record and start a mass activity run. |
SAP_MA_MassActivityTemplateRun | Start a mass activity run using an existing parameter record. |
SAP_MA_ResumeMassActivity | Resume processing of an interrupted SAP mass activity run. |
SAP_MA_ShowMassActivity | Show SAP mass activity definition. |
SAP_MA_StopMassActivity | Stop an SAP mass activity run. |
Note: Although the LAUFD
parameter has a date with time zone data type, only the date part of the value is used.
Setting a User
You can run the Mass Activity as a different user than the RFC user by filling the SAP_USER_NAME
parameter. When this parameter is filled, the Mass Activity is started from a batch job which will have the SAP_USER_NAME
as a step user. You need to install the transport files for this functionality.
Killing Mass Activity Runs
When you kill the process of a Mass Activity run, any started child processes in status Running will continue until they reach a final state.
Setting Mass Activity Parameters using Process Definitions
You duplicate SAP_MA_CopyParameters and add the parameters of the source parameter record you wish to change in the target.
Parameters are set using the technical name; SAPGui uses the display name of the parameter. In the Help on a specific field, accessible with key F1
or Help from the context menu, SAPGui provides the description of the field that can be used to look up the technical name of the corresponding parameter. You use the description to locate the parameter in the output of SAP_MA_ShowMassActivity.
The following Mass Activity layout structures are supported:
- Parameters
- Table Parameters
- Ranges Table Parameters
- Free Selections
Parameters
You add the CHILD_DELETEJOB
to a duplicate of SAP_MA_MassActivityTemplateRun (recommended) or SAP_MA_MassActivityTemplateRun to control automatic deletion of child SAP jobs in the remote SAP system once they have completed.
Layout Parameters
These parameters are direct descendants of a Structure in the Mass Activity layout.
Parameters with data type Date ( DATS
) must be set with Process Definition parameters of type DateTimeZone
, you use String
for the other data types.
You make the Process Definition parameter Optional and leave it empty to clear the corresponding Mass Activity parameter.
Table Parameters
Table parameters are displayed as a table in SAPGui. To specify the values of Table Parameters, you use a Process Definition parameter of type String
; the syntax is as follows:
[[<row>]+]
<row>
- comma-separated list of column/value pairs. The value must always be quoted, for example,colA='myVal',colB='myOtherVal'
Note that [
and ]
are literal characters used to specify the table and delimit the rows, here, not markers for optional syntax elements.
[[col1='myValueInRow1',col2='myValueInRow1',...colN='MyValueInRow1']...[col1='myValueInRowN',col2='myValueInRowN',...colN='MyValueInRowN']]
Example: PROCESSES
Table Parameter in Mass Activity MAHN
( FPVA ), Technical Settings > Load Distribution field.
The Table contains two columns, TgtComputr ( HOST
) and No. Jobs ( JobNo
). You want to assign 20
SAP jobs to application server app_srv1
and 10
to application server app_srv2
:
The Process Definition parameter PROCESSES
has the following value:
[[HOST=‘app_srv1’,JOBNO=‘20’][HOST=‘app_srv2’,JOBNO=‘10’]]
Ranges Table Parameters
Ranges Table parameters are displayed in a similar fashion in SAPGui as select options. They have a SIGN
([I]nclude, [E]xclude), OPTION
(select option operator, for example EQ
), LOW
and HIGH
. Note that both LOW
and HIGH
must always be specified. The syntax follows standard Ranges Table syntax; the IncludeSIGN
is implied:
<OPTION> <LOW>-<HIGH>
Note that when you want to set LOW
and HIGH
to a same date using RedwoodExpressionLanguage, you can set both with one function; you set the default expression of the parameter as follows:
='BT ' + Time.format(Time.now('Europe/Paris'),'yyyyMMdd-yyyyMMdd')
Example
R_MAHNV
Ranges Table Parameter in Mass Activity MAHN
( FPVA ), Dunning Parameters > Dunning Procedure
You want to set Dunning Procedure to 01
:
You create Process Definition parameter R_MAHNV
with the following value:
EQ 01-01
Free Selections
You specify free selections by duplicating SAP_MA_CopyParameters and adding the following three parameters:
SEL_TABLE
- defines the SAP table the free selections are based upon. The actual value is specific to the mass activity.T_FIELDS
- defines the preselected field in the SAPGUI free selection dialog.T_EXPR
- defines the actual values of the free selections.
The syntax follows the standard syntax for complex selection criteria with nested tables in mass activity parameters. These parameter names must be all upper case.
Example:
In the following example:
SEL_TABLE
defines that the selection is based on tableFKKOP
.T_FIELDS
defines two fieldsOPBEL
andBURKS
to be the preselected fields.T_EXPR
definesOPBEL
value12
to be excluded from selection
SEL_TABLE = FKKOP
T_FIELDS = [[T_FIELDS[]-TABLE_LINE='OPBEL'],[T_FIELDS[]-TABLE_LINE='BUKRS']]
T_EXPR = [[TABLENAME='FKKOP',EXPR_TAB='[[LOGOP='NOT',ARITY='1'],[FIELDNAME='OPBEL',OPTION='EQ',LOW='12']]']]
Procedure
Importing a Mass Activity
- Navigate to Definitions > Processes.
- Choose Submit from the context menu of the Process Definition SAP_MA_ImportMassActivity.
- Fill in the fields and choose Submit.
Importing All Mass Activities
- Navigate to Definitions > Processes.
- Choose Submit from the context menu of the Process Definition SAP_MA_ImportMassActivities.
- Fill in the fields and choose Submit.
Copy a Parameter record
- Navigate to Definitions > Processes.
- Choose Submit from the context menu of the Process Definition SAP_MA_CopyParameters.
- Fill in the fields and choose Submit.
- Specify the parameter set.
Copy a Parameter record from a previous run of a mass activity and run another with that parameter record
- Navigate to Definitions > Processes.
- Choose Submit from the context menu of the Process Definition SAP_MA_CopyParameters.
- Fill in the fields, the source information is used to retrieve the parameter record, the target ID will be used when submitting SAP_MA_MassActivityTemplateRun.
- Choose Submit.
- Choose Submit from the context menu of the Process Definition SAP_MA_MassActivityTemplateRun.
- Fill in the fields and choose Submit.
Create a parameter set
- Navigate to "Environment > SAP".
- Choose Maintain Objects from the context menu of the SAP System.
- Expand Mass Activities and choose New Parameter Set from the context menu of a Mass Activity.
- Choose New Table or New Field and select a value.
- Repeat previous task for all choose Save & Close.