Auto-Reaction Methods (Actions)

Calendar Icon

Posted

February 11, 2021

Last Edited icon

Updated

February 13, 2021

Auto-Reaction Methods (actions) help to react quickly to certain events. For each check, the administrator can define actions for the time when a check starts running, when an alert is created, and when an alert is approved or rejected.
To add an action, go to transaction /rem/admin, tab Auto-Reaction Methods. Add a check (select Use Case ID from the list), Order, Event, Action, Parameter, and Value (optional).

remQ auto-reaction method /REM/SEND_EMAIL:
This will send an email to a user with details of the alert and a text.
/REM/SEND_EMAIL has two parameters:
I_EMAIL: enter the email address of the recipient
I_TEXTNAME: enter the name of the SO10 text element that will be appended to the alert details.

Example: to add this action when a specific check creates an alert, add two lines in /N/REM/ADMIN, tab Auto-Reaction Methods:
1. Order=1 | Check name=<check_id> | Event=Alert Created | Action=/REM/SEND_EMAIL | Parameter=I_EMAIL | Value=<email address>
2. Order=1 | Check name=<check_id> | Event=Alert Created | Action=/REM/SEND_EMAIL | Parameter=I_TXTNAME | Value=<enter <check_id> to add the standard help text, e.g. “GL_AP”, omitting the /REM/ namespace>

Order defines the sequence in which several actions for one alert are executed.

remQ auto-reaction method /REM/BLOCK_BP:
This will set a payment block in business partner master data (vendors or customers as defined in LFA1 and KNA1 respectively).
/REM/BLOCK_BP has two parameters:
I_BLOCK: set to ‘X’ to set the block, set to ” (empty) to release the block.
I_LIFNR or I_KUNNR: add the relevant parameter (only 1, either I_LIFNR for vendors, OR I_KUNNR for customers), and set value to ‚X‘.

remQ auto-reaction method /REM/BLOCK_VENDORDOC:
This will set a payment block in a vendor document (SAP document types KA, KG, KR, RE).
/REM/BLOCK_VENDORDOC has one parameter:
I_BLOCK: set to ‘X’ to set the block, set to ” (empty) to release the block.
The vendor document that will be blocked is automatically detected and linked via the field ACC_DOC in the alert data (in table /REM/TMDATA) for each alert.

remQ auto-reaction method /REM/BLOCK_SALESORDER:
This will set a payment block in a sales order.
/REM/BLOCK_SALESORDER has two parameters, you can maintain one or both depending on your business requirement (note: if the billing block is set, then consider setting the delivery block also because goods can still be delivered otherwise):
I_DELIVERY_BLOCK: set to value to set the block (see tables TVLS for valid values, e.g. ’01’), set to ” (empty) to release the block.
I_BILLING_BLOCK: set to value to set the block (see tables TVFS for valid values, e.g. ’99’), set to ” (empty) to release the block.
The sales order that will be blocked is automatically detected and linked via the field ACC_DOC in the alert data (in table /REM/TMDATA) for each alert.

remQ auto-reaction method /REM/MAP_STRUCTURED_FIELDS

This method will allow to use any field in the layout of the alert (PARAM1-PARAM15) and map it to one of the structured fields. Its main purpose is to be used for customer created checks (using the SOD or Single Action tool, or QV2CHECK), but it can also be used to populate custom fields FIELD1-3 in the /REM/TMDATA table.

The method has up to 15 parameters (PARAM1 – PARAM15) and the value should be a structured field that already exists in TMDATA. Example: an SOD check is created and in the layout we have the sales order (VBELN) but it is not yet mapped to the structured fields. In order to use the auto-reaction method, add PARAM1 (supposing is the one that holds the sales order value) and value = SALES_ORDER (name of the structured field in the /REM/TMDATA table). This way, when an alert is created the method will automatically map this field and then the structured field can be used to filter in the alerts transaction or for reporting purposes.

Additional and new auto-reaction methods can be added by creating a function module and adding it in /REM/ADMIN.
When you pass parameters to the action, add one line to the configuration for each parameter, and pass data from alert details in the form &tmdata-field&, e.g. &ACC_DOC&, &PARAM4&, or &USERNAME&. Any of the PARAM1-PARAM15 or structured fields in the alert details can be used as variable to pass to a defined action.