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.

To be able to import Mass Activities, you need to load the ISU transport files, which are available in the "Configuration > Software" section of the user interface.

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.

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:

Copy
[[<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.

Copy
[[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:

Copy
[[HOST=&#8216;app_srv1&#8217;,JOBNO=&#8216;20&#8217;][HOST=&#8216;app_srv2&#8217;,JOBNO=&#8216;10&#8217;]]

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:

Copy
<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:

Copy
='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:

Copy
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 table FKKOP.
  • T_FIELDS defines two fields OPBEL and BURKS to be the preselected fields.
  • T_EXPR defines OPBEL value 12 to be excluded from selection
Copy
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']]']]

Prerequisites

Procedure

Importing a Mass Activity

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition SAP_MA_ImportMassActivity.
  3. Fill in the fields and choose Submit.

Importing All Mass Activities

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition SAP_MA_ImportMassActivities.
  3. Fill in the fields and choose Submit.

Copy a Parameter record

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition SAP_MA_CopyParameters.
  3. Fill in the fields and choose Submit.
  4. Specify the parameter set.

Copy a Parameter record from a previous run of a mass activity and run another with that parameter record

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition SAP_MA_CopyParameters.
  3. 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.
  4. Choose Submit.
  5. Choose Submit from the context menu of the Process Definition SAP_MA_MassActivityTemplateRun.
  6. Fill in the fields and choose Submit.

Create a parameter set

  1. Navigate to "Environment > SAP".
  2. Choose Maintain Objects from the context menu of the SAP System.
  3. Expand Mass Activities and choose New Parameter Set from the context menu of a Mass Activity.
  4. Choose New Table or New Field and select a value.
  5. Repeat previous task for all choose Save & Close.