Configuring Destination System Calls with Response Processing
Use
The following graphic gives an example of how the SAP standard enhancement Destination System Calls with Response Processing is included in enhanced notification processing and which objects are to be configured:
Procedure
To use the standard enhancement, do the following:
-
Open the PCo Management Console and create a destination system, for example, of the type Web Service Destination system. Configure the Web service as required. (See also: Server Settings Tab (WS Destination System) and Operation Configuration Tab (WS Destination System).)
-
Create an agent instance based on a source system that supports the notification process.
-
Choose the Notification Processing tab of your agent instance. Select the Destination System Calls with Response Processing option.
Then create a destination system for the notification enhancement by choosing the Create Destination System function key. (See also: Enhanced Notification Processing.)
-
On the Subscription Items tab, create the subscription items for all source system tags that you need to populate the input parameters of the destination system call. (See also: Agent Instance: Subscription Items Tab.) Create a subscription item for the source system tag that is to be used later as a trigger tag in the trigger expression.
-
Create a notification and create output expressions on the Output tab. These output expressions define the enhancement variables simultaneously.
First create output expressions for the enhancement variables that you need for populating the input parameters of the destination system call. As a rule, these output expressions use subscription items or constant values. Moreover, you need output expressions for the enhancement variables in which you want to temporarily store the results or interim results of destination system calls before writing the values back to the data sources. To do so, create empty output expressions that only consist of a name. For all output expressions, choose the appropriate data types that match the input and output parameters of the destination systems. For Web services, you can also use the calculated variables as output parameters.
-
On the Notification tab, define a trigger expression so that the destination system is only called if a specific source system tag (trigger tag) changes. The corresponding source system tag must be of the data type Integer and must be able to have the following values:
-
0: The trigger is in the initial setting
-
1: The notification process is to be triggered
-
3: The parsing of the notification message has failed
For that reason, define a trigger expression that triggers the notification as soon as the trigger tag has the value 1, for example, '[subscription item of the trigger tag]' == 1 and also choose the trigger type OnTrue.
-
-
On the Destinations tab, choose the entry Enhanced Notification Processing as the destination and make the module and variable assignment.
-
Now make the following settings in the screen area Agent and Destination System Call Modules:
-
Assign the agent instances - at whose data source you want to change the data tags after processing the notification message - to the modules Agent, Agent_2, and Agent_3. If you want to automatically reset the trigger tag after processing the notification message, you need to assign at least the agent instance of the trigger tag to a module here. If you do not assign any agent instance to a module, this module is not taken into account by the SAP standard enhancement.
-
Assign your destination systems of the supported types to the modules WS_Call, WS_Call_2, and WS_Call_3. At the runtime of the agent instance, the destination systems are called up in exactly this order. You can also define exception handling for the destination system call modules. If you do not assign any destination system to a module, this module is not taken into account by the SAP standard enhancement.
-
In the Assignment of Enhancement Variables screen area, on the Destination System Variables tab, you link the request and response variables of the destination system with the enhancement variables. In the case of a Web service, the calculated variables can also be linked here. Choose the Propose Assignment pushbutton if you want the system to automatically suggest the variable assignment. The prerequisite for this is that the enhancement variables have the same name as a destination system variable and the variable type is also compatible with the variable type of the Web service variables.
-
In the table on the Source System Tags tab, link the source system tags to the enhancement variables. In the selection list for the enhancement variables, you see the output expressions that match the data type of the source system tags and some special variables. These special variables are preceded and followed by exclamation marks:
-
!Trigger!
Assign the trigger tag to these enhancement variables. The trigger tag is set to the initial value 0 before the first destination system is called. If there is an error, if parsing of the notification message has failed, it is set to the value 3.
-
!Response!
At the end of Destination System Calls with Response Processing, this enhancement variable is set to the value 1. It shows the follow-on processes that the processing of a notification message is completed by the SAP standard enhancement.
-
!ERROR!
This enhancement variable shows whether the destination system calls were successful (value is 0) or contained errors (value is 1) after the processing of a notification message by the SAP standard enhancement.
-
!STATUS_MSG!
This enhancement variable contains a possible error message after the SAP standard enhancement has run.
(See also: Assignment of Modules and Variables (ENP).)
-
-
-
Start the agent instance.
A value change to the trigger tag at the source system from 0 to 1 calls up the destination system. You can see the results of the destination system calls at the source system in the relevant tags that you assigned to the response variables and special enhancement variables. The trigger tag is set to the initial value 0 after successful execution or, if there are errors, to the value 3.