Show TOC

Execute AgentLocate this document in the navigation structure

Use

You want to ensure that a relevant application is informed by agents immediately or at specified intervals as soon as a previously defined event occurs in another application. This guarantees that the receiving application can respond to the event with follow-up activities. The unscheduled repayment of a loan is an example in the banking area.

Example

As soon the repayment amount is posted to the borrower's loan account, the applications Collateral Management (FS-CMS), Business Analytics (FIN-BA), and Facilities (FS-MCM-FAC) need this information for their responses.

For a detailed example, see Agent Framework (FS-FND-AF) in the section Example.

You have the following options for executing an agent:

  • Scheduled execution

    If you want to schedule the execution of your agents (transaction Execute Agents) as a job in background processing, you can do so in the following ways:

    • Using the simplified scheduling opportunities in the Agent Framework

    • Conventionally, using the application component Background Processing (BC-CCM-BTC)

    • Using the application SAP Central Process Scheduling by Redwood

    The following events are available for scheduling execution:

    • Immediately, as soon as an event occurs

    • At specified intervals or according to other parameters you have set in Customizing for the Agent Framework, in background processing, or in the application SAP Central Process Scheduling by Redwood.

  • Execution from a dialog

Prerequisites

To enable the execution of agents, you must have programmed these in advance and you must have made all relevant Customizing settings. For more information, see Set Up Agents in Customizing.

Procedure

Scheduled execution

  • Simplified scheduling in the Agent Framework

    To do this, select all Customizing activities in SAP Customizing under Start of the navigation path Cross-Application Components Next navigation step General Application Functions Next navigation step Agent Framework Next navigation step Scheduling Agents End of the navigation path: Create Job Scheduling Template, Create Scheduling Group for Agents, Assign Agents to Scheduling Group. You can also find these Customizing activities on the SAP Easy Access screen under Start of the navigation path Cross-Application Components Next navigation step Agent Framework Next navigation step Scheduling and Descheduling Agents End of the navigation path. For more information about the mentioned activities, see the documentation there for each Customizing activities.

    The transaction Start of the navigation path Scheduling and Descheduling Agents Next navigation step Scheduling Execution of Agents End of the navigation path is also available on the SAP Easy Access Menu for short-term scheduling and descheduling of the execution of agents as well as for the generation of report variants. For more information, see the program documentation there under i.

  • Conventional scheduling of agents using the application component Background Processing (BC-CCM-BTC)

    To do this type of scheduling, use transaction codes SM36 and SM37 to execute the transactions. For more information, see Background Processing (BC-CCM-BTC).

  • Scheduling the Execution of Agents using the application SAP Central Process Scheduling by Redwood:

    For more information, see the SAP Developer Network (SDN) at https://www.sdn.sap.com/irj/sdn/nw-scheduling.Information published on SAP site.

  • Immediate execution, as soon as an event occurs:

    In Customizing, set the Execute Immediately indicator under Start of the navigation path Cross-Application Components Next navigation step General Application Functions Next navigation step Agent Framework End of the navigation path in the Customizing activity Configure Agents and save your entries.

    Note

    The Agent Framework executes agents for which you have set the Execute Immediately indicator only once. If processing errors (such as communication errors) occur during immediate execution, you use the transaction Display Change Pointer on the SAP Easy Access screen under Start of the navigation path Cross-Application Components Next navigation step Change Notification Service Next navigation step Display Change Pointers End of the navigation path to display them. Once you have corrected the errors, we recommend that you use the transaction Execute Agents to restart the incorrect agents. You will find the transaction on the SAP Easy Access screen under Start of the navigation path Cross-Application Components Next navigation step Agent Framework End of the navigation path. For more information about these transactions, see the system documentation.

  • Execution in specified intervals or according to other parameters:

    If you used simplified scheduling, enter your parameters in the SAP Customizing implementation guide under Start of the navigation path Cross-Application Components Next navigation step Agent Framework End of the navigation path in the Customizing activity Create Job Scheduling Template.

    If you use conventional scheduling to execute agents, make the relevant settings in the transactions for background processing.

    For more information about using the application SAP Central Process Scheduling by Redwood for scheduling, see the SAP Developer Network (SDN) at https://www.sdn.sap.com/irj/sdn/nw-scheduling.Information published on SAP site.

Execution from a dialog

Note

Regardless of whether you have set the Execute Immediately indicator in the Customizing activity Configure Agents, you can execute agents from the dialog at any time.

  1. To start agent execution from the dialog, call up the transaction Execute Agents on the SAP Easy Access screen under Start of the navigation path Cross-Application Components Next navigation step Agent Framework End of the navigation path.

  2. Choose the Agent Identification tab page and enter the Agent ID. You can also enter existing export object data as well as the application-specific criterion (such as the bank posting area).

    Note

    If you want to specify one or more export objects, you must select the Application ID and the Export Object Category, and also enter the Export Object Key(s). You need to do this because the system requires all three specifications to uniquely identify an export object.

  3. If you do not want to use the default values, change to the Technical Parameters tab page. There you can enter the parameters for the Number of Packages and the Number of Objects per package.

  4. Choose whether the report is to issue and application log and which messages it is to contain.

  5. If you want to start a mass run for agent processing, deselect the Simulation Run checkbox and choose Execute.

    Note

    The Simulation Run checkbox is selected in the SAP standard delivery. This prevents you from accidentally starting a mass run. If you do not deselect the checkbox, the system terminates processing.

For more information about the transaction Execute Agents, see the program documentation in the system under Start of the navigation path Cross-Application Components Next navigation step Agent Framework End of the navigation path.

Application Log

You will find the application log on the SAP Easy Access screen under Start of the navigation path Cross-Application Components Next navigation step Agent Framework Next navigation step Application Log: Execute Agent End of the navigation path. For more information about the transaction, see the program documentation under .

Result

Once you have set the Execute Immediately indicator for your agents, the Agent Framework starts these agents as soon as a triggering event occurs for the underlying export object category in the sending application.

If you schedule your agents, the Agent Framework starts these according to the selection criteria and scheduling parameters you have made based on the scheduling type (simplified, conventional, or Redwood).

If you execute your agents from a dialog, the Agent Framework starts their execution as soon as you select Execute.