Assigning External Objects

Use

You can assign external objects to map objects from remote systems to the SAP CRM product. You define external objects in custom-built handler implementations before you add assignments to a generic storage in Cross-Catalog Mapping (CCM). By adding conditions to these assignments, you can influence the activation of the external objects during contract replication. However, most functions are controlled by custom handler implementations for each external object type.

These are responsible for object selection during product modeling and for the required notification of external systems during contract activation. Using external objects is a flexible, fast and easy way of adding external objects to CCM whilst avoiding the additional effort of using customized set types and the corresponding user interfaces.

Prerequisites

Product Maintenance

You have defined a product category that contains all set types required to use CCM and have added the set types CRM_ISX_EOASSI and CRM_ISX_EOPARA for the assignment of external objects and their parameters. This triggers the display of the assignment block External Objects in the CCM version overview.

You have created an external object handler class that implements the interface IF_CRM_ISX_EXTOBJ_HANDLER. This handler is used as a proxy between product maintenance in SAP CRM and the external system, providing access to the list of available objects and their details. It is called to search for external objects and to retrieve object details to populate the product tables.

You have defined external object types in Customizing for Customer Relationship Management under Start of the navigation pathCross-Industry Functions Next navigation step Master Data Next navigation step Products Next navigation step Define External Object Types for Cross-Catalog MappingEnd of the navigation path. Each external object type defines an ID and description together with a handler implementation to be used during product maintenance. Every customized external object type appears as a submenu item for the Add button in the assignment block External Objects.

Evaluation of contract

You have implemented an evaluation module using the evaluation class CL_CRM_ISX_CCM_EXTOBJ_MAP.

Features

The functionality provided for external objects in the context of Provider Sales and Order Management consists of two parts:

  1. The assignment of generic external objects in CCM during maintenance of SAP CRM products

  2. The evaluation of external object assignments and the corresponding settings during the distribution of a contract including this type of product

Due to the different technical contexts of both features, the corresponding prerequisites are not only totally independent of each other but also require different set up approaches. Therefore, the chapters Prerequisites, Features and Activities are structured to cover both features in different sub-chapters with the titles Product Maintenance and Evaluation of Contract.

Product Maintenance

You can choose to add any customized external object type to the CCM version using the Add button in the assignment block for external object assignments. This is not possible if the corresponding handler class implemented the method IS_RELEVANT for the interface IF_CRM_ISX_EXTOBJ_HANDLER. By using this method, you can decide to show or hide external object types according to product data, such as product type, added categories, and so on. Choosing Add for an external object type in the assignment block for external object assignments displays a search dialog box with the following search criteria fields:

  • External Object Type

    This field contains the technical key of the external object type selected and cannot be changed.

  • External Object ID

    This field contains a search string for external object IDs.

  • External Object Description

    This field contains a search string for external object descriptions

These three search parameters are the same for all external object types. When executing the search, these three search parameters and their values are passed to the method GET_QUERY_RESULT in the corresponding handler class. This method is responsible for starting the corresponding query in the remote system and returning the result list to the caller. The result list is then offered to the user for selection. Once an external object is selected by the user, the detailed data for the selected external object is requested from the handler by calling the method GET_OBJECT_DETAILS. The returned information including the list of parameters is added to CCM and can now be changed.

External Object Assignments

All assigned external objects are displayed in the External Object Assignments assignment block on the cross-catalog mapping version detail screen. The following attributes describe the assignment:

  • Assignment ID

    Since you can assign the same product to a single external object several times, every assignment needs a unique ID. By default, this ID consists of the external object ID plus a numeric suffix concatenated with an underscore. The assignment ID can be changed without restriction but must be unique within a mapping version.

  • Description

    A language-independent descriptive text that can be used to describe the assignment, but is also available using the evaluation helper class during contract distribution. If you are using the same external object several times, it is helpful to define the context.

  • External Object Type

    This is the external object type according to the Customizing settings.

  • External Object

    This is the identification of the external object taken from the data returned by the handler class method GET_OBJECT_DETAILS. The ID cannot be changed. You can use the ID as a link to navigate to the external object assignment details.

  • External Object Description

    The external object description is taken from the data returned by the handler class method GET_OBJECT_DETAILS and cannot be changed.

  • Activate

    When you evaluate the current CCM version to replicate a contract, every external object assignment from the version is reported as active by the evaluation helper class CL_CRM_ISX_CCM_EXTOBJ_MAP, unless you enter a condition for this activation. Select whether and what type of activation condition has to be met in the Activate column. Choose Always if the selected object is always to be taken into account when a contract is replicated. Choose Dependent on Attribute to enter a condition that has to be fulfilled in product configuration before the external object is activated. Choose Dependent on BRF Event to enter a condition that has to be fulfilled by evaluating the BRF event before the external object is activated.

  • BRF Event

    If you have chosen Dependent on BRF Event in the Activate column, this field contains the name of the BRF Event that is evaluated by the evaluation helper class CL_CRM_ISX_CCM_EXTOBJ_MAP to determine whether the external object is active. The event must return a Boolean result value for this. If it returns True, the external object is activated.

  • Characteristic/Attribute and Characteristic/Attribute Value

    If you have chosen to activate the object using the Dependent On attribute option, these fields contain the configuration attribute and the value defined in the product model which is checked during order distribution before the external object is activated. If it contains the value chosen in the Attribute Value field, the object is activated.

Behavior and Restrictions

  • Value Help for Attributes and Values

    A value help is available to select attributes and values for a conditional activation. This value help reads the attributes and its values from the latest active configuration model for the current product. If the value help does not provide the attribute or value required, you can enter values manually.

  • Value Help for BRF Events

    A value help is available for the selection of BRF Events for a conditional activation. The value help reads all events that are available from the Customizing settings for the Business Rule Framework (BRF). Even if you can only use the Boolean result value, the system displays all entries. If an event with an invalid result type is selected, the system displays an error message.

  • Limitations of Dependent Activation

    Since the external object activation can be dependent on a single attribute and a single value (OR/AND combinations of attribute values are not possible), it may be necessary to define dependent attributes that have been derived from multiple attributes or multiple attribute values. For example, the “FREE_SMS” attribute has the values “100”, “200” and “500”. If you want an external object to become active when either “200” or “500” is chosen, you need a dependent attribute “200_or_500_SMS” with the values “YES” and “NO” to make object activation dependent on it. You can use the simplified configuration to define such attributes that have been derived from one or more other attributes in the model. You can hide these attributes from the configuration UI in the contract.

  • External Object Parameters

    Since the purpose of maintaining a CCM version with external object assignments is to provide the information required to ensure that contract replication is successful, the corresponding detail screen displays the requested parameters reported by the handler class. This also means that you can enter where the required information can be found in the contract to be distributed. The system offers three different sources to be used during evaluation of CCM. Navigate to the detail screen using the external object ID link. Three different kinds of parameters are supported: numerical (up to 6 decimals), strings and dates.

  • Consistency Checks

    The system automatically checks that the cross catalog mapping version is consistent when the product is saved. To improve performance, these checks are not executed automatically during CCM maintenance and any inconsistencies found are only analyzed subsequently. However, you can trigger the checks by choosing Check on the version overview page.

Parameter Attributes

  • Parameter ID and Description

    These are the identifier and the description of a parameter taken from the corresponding handler and cannot be changed.

  • Use Value

    The field Use Value defines where the value of the corresponding parameter is taken from during contract replication. The following options are available:

    • Default Value (not available for mandatory parameters)

      The value returned as a default value by the handler class is used.

    • Redefined Value

      A constant value is entered in CCM. Every contract that contains this product uses the same value for this parameter.

    • Characteristic/Attribute

      This value is taken from a product configuration attribute and is therefore specific to each contract (depending on the value range of the attribute)

    • BRF Event

      This value is determined by raising a BRF Event. The event triggers the execution of an applied expression for the provider contract item during distribution. The value is taken from the result returned.

  • Default Value

    This field shows the default value of this parameter defined by the external system and cannot be changed. This field is empty for mandatory parameters.

  • Redefined Value

    The system checks the input according to the data type for the parameter. A date picker is available for parameters of the Date type.

  • Characteristic/Attribute

    A value help is available to select from the list of attributes maintained in the product configuration model.

  • BRF Event

    A value help is available to select an event from the list of events in Customizing for the BRF.

Behavior and Restrictions

  • Value Help for Characteristic/Attribute

    A value help is available to select an attribute. The value help reads the attributes from the latest active configuration model for the current product. If the value help does not provide the necessary attributes, you can enter values manually.

  • Value Help for BRF Events

    A value help is available to select a BRF Event. The value help reads all available events from the Customizing settings for the BRF.

Evaluation of Contract

Since the distribution of the external object data to the corresponding system cannot be prepared generically, a CCM evaluation helper class is delivered to support the interpretation of the settings made in the product during contract distribution. The class CL_CRM_ISX_CCM_EXTOBJ_MAP can be instantiated for contract items to read the active external object and its parameters and the determined values. For more information, see the class documentation for CL_CRM_ISX_CCM_EXTOBJ_MAP.

Activities

Product Maintenance

Implement an external object handler class that implements the interfaces IF_CRM_ISX_EXTOBJ_HANDLER. We recommend implementing at least one class for each external system to be connected. However, the interface allows a single handler class to be implemented for several external object types.

Evaluation of Contract

Implement an evaluation module as an Order Distribution Infrastructure step (ODI step) that uses the evaluation class CL_CRM_ISX_CCM_EXTOBJ_MAP. We recommend implementing at least one ODI step for each external system to be connected.

Example

Evaluation of Contract

Find an example implementation for the evaluation of contracts in the class CL_CRM_ISX_MD_EXAMPLE_EXTOBJ.