Previous Topic

Next Topic

Book Contents

Book Index

Control-M for SAP R3 - best practice

The Control-M for SAP R3 Application plugin has a direct integration to SAP NetWeaver and can extract and insert jobs into the NetWeaver schedule request tables. The Application plugin connection profile, enables access to SAP including the User ID, and password as well as the connection string to SAP, which is stored and encrypted in the Control-M database.

The following procedure describes how to create or modify a connection profile.

To create or modify a connection profile:

  1. Log in to the Control-M Configuration Manager (CCM).
  2. Select Control-M for SAP and then right click and select Connection Profile Management (see screen shot below).

    S_BEST_SAP_CCM

    The following window appears:

    S_BEST_SAP_CPM

    This window displays all the connection profiles, which enables you to add or delete profiles, copy profiles and validate the connection.

  3. Click Add to add a new profile or select one to display/modify.

    The following window appears:

    S_BEST_SAP_CP

    NOTE: Naming standards are important. Name the profile something indicative of its purpose to the SAP instance to which it connects. This will make it easier when selecting the profile you need to define a job.

    In this example we select PI4. This example is connected to an SAP r3 version. This connection profile requires the either a specific SAP application server and system number or an SAP group. In this example we are using a specific SAP App Server.

  4. Type the Application Server Hostname and System Number.
  5. Click the Connection details tab and type the connection details for the SAP Application Server including the client, login user name, password, default language SAP application version and XBP version.

    S_BEST_SAP_CPCD

  6. Click the Advanced Options tab and select the required options.

    S_BEST_SAP_Update

  7. Click Test to validate your credentials, which connects to SAP using the credentials you just provided and will report success or failure in a pop-up window.
  8. Click OK to close the Test window, and click OK again to save the Connection Profile.

    You may now exit the CCM.

To create a new job flow:

  1. In Control-M, from the Planning domain, select Blank Workspace.
  2. From the job palette, select SAP R3 and drop the job into the Workspace.

    The job palette enables you to select the types of jobs you may use. This list is controlled by role-based security and job type templates, some of which you can exclude

    S_BEST_SAP_Work3

    Control-M creates the job and place it in a folder:

    S_BEST_SAP_Work2

    Folders are logical groupings used to encapsulate workflows for various reasons. Customer-specific, function specific, geographically specific, application specific are some examples of reasons to group jobs. You may also wish to create an application and/or sub-application to further quantify your workflow.

  3. To change the properties of the folder, right click the folder and select Properties.

    The following folder appears:

    S_BEST_Folder

    The folder can now be renamed to something indicative of the flow’s function, like Customer_Payroll or some other appropriate name.

NOTE: SMART folders may have scheduling criteria, such as RUN DAILY, RUN FRIDAY, RUN WORKDAYS. Feel free to experiment with various options.

  1. In the Order Method field, select one of the following Order methods:
  2. Click OK when finished.

    This example has a single job SAP_SIMPLE

  3. Double click the job to edit.

    The Properties window appears. Below you see the job definition details:

    S_BEST_SAP_Jobprop

    We added the Connection Profile from the one created earlier.

  4. Add the options required, such as jobname, start conditions, job priority, action.
  5. To add steps, in the Steps field by clicking Add_Parameter .

    The Control-M for SAP connects to the SAP instance. You can change the program/command and load the list of jobs from SAP for this job. You may add variants, users and change the language.

    S_BEST_SAP_ABAP

  6. In the ABAP Program field click

    Control-M for SAP connects to SAP so you can select the option(s) appropriate for the field.

  7. Click the Add to return to the prior screen.
  8. In the Post-Job Actions section, select how to manage the job’s Spool and Joblog output.

    In the Job log field, if you select Copy to Sysout, Control-M appends these to STDERR/STDOUT and are viewable in Control-M’s Monitoring domain.

  9. If you select Job completion status will depend on application status checkbox, Control-M uses the status from SAP to determine job success.
  10. Select Detect Spawned job checkbox so Control-M for SAP can detect spawned jobs.
  11. These jobs are tracked and visible in the Control-M Monitoring domain.
  12. Select the option to Detect and Create by from the drop-down list. You may also filter jobname using mask/wildcard characters. You may also start Spawned Jobs by clicking that button.

    Click OK to save the job definition.

Monitoring jobs:

In this example we have clicked on the Monitoring Domain. We have used a customizable filter to eliminate all but the SAP jobs we are interested in from our display.

S_BEST_SAP_Monitor2

We see by the red lock I_BEST_SAP_Lock that the folder containing our SAP jobs is held. If we select the folder and click Free, so the jobs run. Since we are running each of these jobs manually to see what they do, we select the option to hold each of the jobs from the lest to the left and select the Free option to release the hold on the folder. After that we can run our jobs one at the time and observe their behavior as they run.

S_BEST_SAP_Monitor

We can observe the jobs executing in Control-M and Control-M will keep jobs alive as they spawn child processes until all those child processes complete successfully. If a child process fails and we’ve selected the Job completion status will depend on application status” selector then the job will fail if a child process fails. Below is an example of an SAP job’s output:

S_BEST_SAP_output

SAP Events

To monitor an SAP event:

  1. Open the CCM, right click Control-M for SAP, and select Event Watcher Management.

    S_BEST_SAP_CCM2

  2. The following window appears:

    S_BEST_SAP_Events

  3. In the SAP Events area, you set the event name and parameter
  4. In the Define Control-M actions area, set the jobs to order or the conditions to raise.

    For each event you define, you set jobs/conditions. You can set multiple jobs/conditions per event. The jobs/conditions are triggered on the specific event that is tied to them in the folder.

Parent Topic

Best Practices