Show TOC

  Creation of Triggers

Meaning of a Trigger

A trigger represents facts that require processing of one or more objects.

A trigger can have differing levels of complexity. For example, a simple trigger would be just to call a claim. An example of a more complex trigger would be in care insurance, for determining care review visits.

The different facts on trigger types are mapped. To make the required settings for a trigger type, call transaction IMP_CUST.

A trigger type comprises the following objects:

  • Runtime class that implements the selection of the objects

    Note Note

    SAP provides the class CL_MASS_PROCESSING_BASE_IMP. If you implement a customer-specific runtime class, you must ensure that this class inherits from CL_MASS_PROCESSING_BASE_IMP.

    End of the note.
  • Set of parameters in the form of fields (IMP_PARAMETERS_1)

    Alternatively, you can specify a set of fields in the form of an XML structure (IMP_PARAMETERS_XML).

    Ensure that the XML structure contains XML-coded ABAP data (see ABAP instruction CALL TRANSFORMATION in the ABAP key word documentation) .

Creation of a Trigger

You use function module IMP_ADD_TRIGGER to create a trigger.

Optionally, you can specify a specific IMP run in the function module. If you do not specify any IMP run, the system uses the IMP run with the status Open (see Run Administration , section 'Status'.

Function module IMP_ADD_TRIGGER creates a unique counter for each trigger that is created. Use number range object IMP001 and number range interval 01. If you use a different function module to create a trigger, the calling function module must provide the unique counter.

Example

A trigger maps the facts 'Call Claims' and the trigger type is 0TOUCH. This trigger type has only one parameter field CLAIM, in which you store the claim number. To create this trigger, you can use the sample program RIMP_ADD_TRIGGERS.

In this sample program the system should process all own claims. Define the claim number as a parameter. The system also creates a hash value from the parameter. This hash value controls processing during selection of the objects.