Show TOC

Procedure documentationConfiguring an OS Command Locate this document in the navigation structure

 

You can configure OS commands to be generated in the following cases:

  • An alert is triggered (opened, updated, or closed).

  • An alert is closed.

Prerequisites

  • You have created an MAI BAdI implementation providing the parameter values of your OS command, at runtime.

  • To refer to the MAI BAdI implementation, you have assigned a value to the ALERT_REACTION_OPTION BAdI filter.

  • You have ensured in transaction SICF that the MAI_OS_COMMAND_CONFIG service is active. For more information, see Active Services in SICF.

Procedure

  1. Call transaction SOLMAN_WORKCENTER.

  2. Append the expression: mai_os_command_config to the URL, using the following schema: http://<Solution Manager Host>:<port>/sap/bc/webdynpro/sap/mai_os_command_config.

  3. To assign the MAI BAdI implementation providing the parameter values to be passed by your OS command, under Create a Configuration, in the Filter Value to create field, enter the filter value according to the OS command type:

    • For the OS command to be generated when an alert is triggered, use the following schema: <filter value>_REACT.

    • For the OS command to be generated when an alert is closed, use the following schema: <filter value>_REACT_CLOSE.

  4. Choose Create.

    In the Generic Storage Entries list, two entries are generated, one related to the OS command options, the other related to the OS command parameters.

  5. To configure the options of the OS command, do the following:

    1. In the Extra Key Combination column, select a configuration of type Options.

      Under Configuration Details, two mandatory parameters are displayed:

      • 00;COMMAND_NAME

      • 01;OP_SYSTEM

    2. In the Parameter Value column, specify the external operating system and the command name. For more information about external OS commands configured for your SAP system, refer to transaction SM49.

    3. To add an option, choose the Add New Entry pushbutton.

    4. To arrange the OS Command options in the correct order, precede each option by an index number, separated by a semicolon:

      03;option1 / value1

      04;option2 / value2

      Example Example

      You want to create the following command: <SM49_COMMAND> -v -d ‘true’ -DIR /cfg/mydir/

      In the Parameter and Value columns, enter the following options and option values:

      Parameter

      Value

      00;COMMAND_NAME

      <SM49_COMMAND>

      01;OP_SYSTEM

      ANYOS

      02;-v

      03;-d

      ‘true’

      04;-DIR

      /cfg/mydir/

      End of the example.
    5. If you do not want to use one of the configurations (*_REACT or *_REACT_CLOSE), set the option 00:COMMAND_NAME = <SKIP>.

  6. To configure parameters whose values are passed at runtime, do the following:

    1. In the Extra Key Combination column, select a configuration of type Parameters.

      Under Configuration Details a default parameter -1;NO_PARAMETER is displayed.

    2. To add a parameter, choose the Add New Entry pushbutton.

    3. If you do not want to specify parameters, leave the default entry unchanged. Do not remove it, or the OS command configuration is deleted.

    4. To arrange the OS Command parameters in the correct order, precede each parameter by an index number, separated by a semicolon:

      01;parameter1 / value1

      02;parameter2 / value2

      Note Note

      You can append parameters to a maximum length of 1024 characters.

      End of the note.

      Example Example

      You want to create the following parameters and values to be appended to the OS command: alertID <MAI_alertID_value> alertDateTime ‘<MAI_alertDate_value> at <MAI_alertTime_value>’ description ‘<MAI_alertDescription_value>’ <MAI_alertRating_value>.

      Enter the following parameter and parameter values:

      Parameter

      Value

      01;alertID

      [MAI:ALERT:ID]

      02;alertDateTime

      `[MAI:ALERT:DATE] at [MAI:ALERT:TIME]’

      03;description

      `[MAI:ALERT:DESCRIPTION]’

      04;&&

      [MAI:ALERT:RATING]

      End of the example.
  7. Save your entries.