Previous Topic

Next Topic

Book Contents

Book Index

Control-M for SAP Event Watcher - best practice

This topic describes the Control-M for SAP Event Watcher best practice. The SAP Event based scheduling utility is a Control-M for SAP capability that enables jobs to be triggered in a specific order and conditions to be raised or deleted, based on events within the SAP System.

This best practice procedure describes how to activate Event Management, define an event rule with order job and conditions actions associated with it, run the extractor and view the ordered job and view conditions that are added to Control-M/Server.

Ensure you have installed the following:

Setting up Event Watcher Management:

You need to set up managing events to watch and execute Control-M jobs in a specific order, and add or remove active conditions based on events within the SAP system. This enables the integration of Control-M managed batch processes and flow events occurring with the SAP system.

  1. Before using the SAP Event Based Scheduling feature, you should go into your SAP system and ensure that all events in the event history have a status of Confirmed. This ensures that action items are not triggered by previous events when you use Event Watcher Management. SAP events that have a status of Confirmed do not trigger Control-M for SAP actions when using Event Watcher Management.
  2. You must configure the event history in your SAP system prior to using the SAP Event Watcher Management, to ensure that events are displayed in the Event History. Use SAP transaction sm62 to add appropriate entries in the Criteria and Reorganization tabs. This specifies which events are included in the Event History.

To activate the Event Watcher for a specified connection profile:

  1. From the Control-M Configuration Manager (CCM), right-click Control-M for SAP and select Event Watcher Management.

    S_BEST_SAPEV_CCM

    The following window appears:

    S_BEST_SAPEV_EW

  2. In the Activate Event Watcher field, select On.
  3. In the SAP Connection Profile field, select the connection profile whose events must be watched.
  4. To erase previously specified events for the specified connection profile, click Clear Events.

    This ensures that when the Event Watcher is activated, no old existing events are watched.

    The Clear Events action changes the status of any new event that occurred previously, to Confirmed. This ensures that when the Event Watcher is activated, no old existing events are watched.

    The Event Watcher is now activated to watch for events for a specified connection profile.

To add an event:

  1. In the Watch for the following events area, Click Add .

    The Add Event dialog box appears.

  2. In the Event ID field, click Load, which loads the name of the SAP background processing event.
  3. In the Parameter field, type the event parameter, for example, entering the * wildcard watches for all events of the type specified. This field can also be left blank, since this parameter value is optional in SAP.

    NOTE: * catches any SAP_Test events with any parameter value.

    See the screenshot below for an example of the Event ID and Parameter:

    S_BEST_SAPEV_event

  4. Click OK.

To order a job for event confirmation:

  1. In the Define Control-M actions to execute after event confirmation area, in the Order Jobs tab, click Add.

    The Add Control-M Job to Order dialog box appears.

  2. In the Job Name field, type the name of the job that you want to add that must begin with a letter and without any blanks or special characters.

    NOTE: The job name and folder name should already have been defined in Control-M before running the Event Watcher.

  3. In the Folder Name field, type the name of the folder that you want to add that must begin with a letter and without any blanks or special characters.

    In the case of a sub-table, use "/" to separate between table names.

    See the screenshot below for an example of a Control-M Job to order.

    S_BEST_SAPEV_jobo

  4. Click Advanced to add specifications that are required to identify the job.

    The expanded Add Control-M Job to Order dialog box appears.

  5. In the Control-M Variables area, click Addto add variables to the job.

    The Add Variables window appears.

    See the screenshot below for an example of a variable.

    S_BEST_SAPEV_var

    NOTE: Structure: %%<variable name> <variable value>

  6. Click OK to save the variable.
  7. Click OK to save the job definition.

This procedure describes how to add conditions to events so that Control-M for SAP can perform the required procedure when the specified condition has occurred.

To add conditions to event confirmations:

  1. In the Define Control-M actions to execute after event confirmation area, click Add.

    The Add Control-M Condition window appears.

  2. In the Name field, type the unique name of the condition that you want to add that must begin with a letter and without any blanks or special characters.

    If the Name parameter is left empty, the condition created in Control-M is named in the following way:

    sap_<Event_ID>_<Event_Param>

    If the Event ID parameter value is SAP_END_OF_JOB, the SAP event parameter value is truncated, and the job count number is omitted from the condition.

    See the screenshot below for adding a condition:

    S_BEST_SAPEV_con

  3. Click OK.
  4. Click Apply.

    You can now close the CCM.

Raising a SAP event

This procedure describes how to enable a specific SAP background processing event to be raised (triggered).

Before you begin

Do one of the following:

To raise a SAP event:

  1. Type one of the following commands:

    Example: Windows

    ctmr3req -SAPR3-ACTION raise_event -SAPR3-ACCOUNT PI4 -SAPR3-

    EVENT_ID SAP_TEST -SAPR3-EVENT_PARAM this is test value

    Event raised successfully.

Starting the Extractor service

You need to ensure that the Extractor Management service (Windows) or process (UNIX) is running to use the Event Watcher. Only one Extractor Management service (Windows) or process (UNIX) can be running at the same time for each SAP system.

To start the Extractor service:

To Monitor the Control-M for SAP job ordered as a result of the SAP Event confirmation:

  1. From Control-M Monitoring domain, click All jobs.
  2. Double click the job you want to view:

    S_BEST_SAPEX_CTMWA

    The Job properties appear.

    In the General tab, the folder name and job name is the same as specified in the event rule.

    In the Variables area, you can see the variables that are automatically created together with the variable defined in the Event Watcher CCM.

To view the condition that was added to Control-M/Server:

  1. Do one of the following:
  2. Type ctmcontb -List <conditionName> <ConditionDate>

    Example: Type the following:

    ctmcontb -list * 0715

    Output:

    Date: 15 February 2016. Page: 1

    Conditions list

    ---------------------------------------------------------------------

    CONDNAME CONDATE

    ---------------------------------------------------------------------

    sap_ER1_my 0715

    Result: Success

    Since we defined the condition without a condition name, the default name was created:

    sap_<EVENT ID value>_<EVENT Parameter value>

Parent Topic

Best Practices