Ansicht
Dokumentation

CRM_1O_IOBJECT_EH - BAdI: Event History for Objects

CRM_1O_IOBJECT_EH - BAdI: Event History for Objects

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

You can influence the update of the event history for objects from the CRM business transaction using this BAdI. Both methods of this BAdI are called in the function module CRM_IOBJECT_EH_ITEM_WRITE_OW.

The BAdI has the following methods:

  • Method EH_DETERMINE_EVENT influences the determination of the event type for the event history.
There are three possibilities:
  • An event type is found in the BAdI method.
    The system tries to write a history record with the event type found. A prerequisite for this, however, is that the corresponding Customizing is maintained for the event history (definition of the event type and assignment of event type to the object category), and for the Object Integration Framework (OITF).

  • An event type could not be determined, and an exception did not occur in the BAdI implementation.
    Processing of the CRM business transaction continues without the system trying to write an entry in the event history. The system assumes that no event type should be found for the case in question.

  • An event type could not be determined, and an exception occurred in the BAdI implementation.
    Processing of the CRM business transaction continues, but a message is created, as the attempt to write a history record in the event type determination failed.

The method has the following parameters:
  • IR_EVHIST_CTX: Provides information that can be useful during event type determination.

  • CV_EVENT: Is used during the return of the event type determined.

  • IV_CALLERID: This parameter provides the option to consider where the object is used within the CRM business transaction during event determination. This differentiation can be necessary if an object is used in different places in a CRM business transaction, and if several event types should be determined.

You can differentiate between the following options at the moment (See also fixed domain values for the domain CRM_EH_CALLERID):
1: Usage in the business object subject set
2: Usage in the object references
3: Usage in the CRM business transaction item
  • EH_UPDATE_EVHIST: Provides the event history with further data
  • Additional attributes
    You can enhance the event history with additional attributes by adding an append to structure COMT_EVHIST_DAT. The structure can be filled in this method.

  • Extract data
    You use extracts to store important data that has to be easily accessible. You can enter the data in the following formats: plain text, HTML or XML.

The method has the following parameter:
  • CR_EVHIST_CTX
    The parameter consists of attributes from the class CL_COM_IOITF_EDC. The attribute EHIO_STRUCTURE (component EVHIST_RECORD) contains data for the event history. Extract data has to be written in the HISTEXTRACT field.

  • EH_DETERMINE_EVENT
    This method has a default event type determination for several CRM business transaction categories. If you wish to determine event types for other business transaction categories, you need to implement this method.
  • EH_UPDATE_EVHIST
    Default coding is not required for this method. It is only required if additional data should be written in the event history.

After you have called the IMG activity, proceed as follows:

  1. In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
  1. In the corresponding field, enter a short text for implementation .
  2. In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
  3. Choose the tab Interface.
The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
  1. Save your entries and assign a package.
  2. Position the cursor on a method. Call up the Class Builder by double-clicking it.
  3. Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
  4. Save and activate your coding, and navigate back to the screen Change Implementation.
  5. Save on the screen Change Implementation.
Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
  1. Choose Activate.
When the application program is executed, the coding you have created will be run.






PERFORM Short Reference   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 6258 Date: 20240523 Time: 182302     sap01-206 ( 95 ms )