Show TOC

Registering OData ServicesLocate this document in the navigation structure

In this step, you customize ABAP SMI's OData service registry for the relevant OData services.

Context

The ABAP Social Media Integration (ABAP SMI) provides an OData service registry as a reuse component for SAP applications. The registry allows you to define a subset of OData services that can be exposed in a specific application context to external or on-demand platforms.

You have to customize the service registry for business objects:

  • for which you want to send notifications and which you want to display in SAP Jam
  • for all objects you want to use with the Share feature
You can define the entries for the service registry as follows:
  • On a front-end server:

    The central definition on a front-end server is possible as long as no application-specific BAdI implementation is needed.

  • In the back-end system:

    A definition in the back-end system (such as SAP CRM) requires that the user interface add-on for SAP NetWeaver system is installed in the back end.

    You define entries in the back-end system if one of the following is true:
    • The collection of a service that corresponds to a specific business object type cannot be determined statically, but must be determined in the back-end system.
    • The annotation of a service needs to be determined dynamically in the back-end system.
    • For SAP Fiori apps: service mapping is used, and the default key mapping (1:1) is not sufficient.

When using the service mapping, all OData resources that you add will be treated like the OData resource of the corresponding root entry. The resource information from the root node will be used while sharing information with the external service provider. (See step 6 in the following procedure.)

Procedure

  1. For each application context, check if the service registry entries must be defined in the local system, or a remote system. Access the right system to set up the service registry.
  2. SAP delivers standard services in view cluster CLB2VC_GW_SRV_S (transaction SE54). Check whether these services cover your needs.
  3. If necessary, register your own OData services. In Customizing for SAP NetWeaver, choose Start of the navigation path UI Technologies Next navigation step SAP Jam Integration> Next navigation step Register OData Service End of the navigation path (or run transaction CLB2_GW_SRV_C).
  4. Choose New Entries, and complete the fields as follows:
    Field Value
    Bus. Object Type The Business Object Type is mandatory to determine your business context. Usually, the name of the corresponding BO type is used.
    Example BUS1006
    Appl. Context The application context is optional.
    Example SAP CRM uses the application context CRM.
    Ext. Srv. Name The external name of an OData service.

    The value must correspond to an entry in Customizing for the Gateway server (See Customizing for SAP NetWeaver under Start of the navigation path Gateway Service Enablement Next navigation step Service Development for Backend OData Channel> Next navigation step Maintain Services End of the navigation path).

    Service Version Version of the OData Service.
    Example 1
    Collection
    • Enter the collection name or the entity set.
      Example OpportunityCollection
    • If the collection must be determined dynamically, implement BAdI CLB2_REGISTRY (method DETERMINE_COLLECTION).

      You may have to implement the BAdI in a remote system. If this is the case, define the remote RFC destination in view CLB2V_CONTEXT.

    Resource URL Enter the service root URL of the OData service.
    Example

    OData services delivered by SAP have the following format:

    /sap/opu/odata/{NAMESPACE}/{SERVICE}/

    Example:

    /sap/opu/odata/CRMSWI01/CRMSMI_SRV/
    Annotation URL
    • Enter URL of the OData annotation resource that describes the specific entity set.
      Example /sap/opu/odata/CRMSWI01/CRMSMI_SRV/AnnotationCollection('x')/Content/$value
    • If the annotation must be determined dynamically, implement BAdI CLB2_REGISTRY (method DETERMINE_ANNOTATION).

      You may have to implement the BAdI in a remote system. If this is the case, define the remote RFC destination in view CLB2V_CONTEXT.

  5. In the dialog structure, under Service Providers, assign all service providers for which the service registration is to be valid, for example, Jam.
  6. [Optional]: In the dialog structure, under Related Services, define a service mapping.

    All OData resources that you add here are treated like the OData resource of the corresponding root entry. The resource information from the root node is used while sharing information with the external service provider.

    When using this service mapping, you may also need a key mapping. In this case, you need to implement BAdI CLB2_SERVICE_MAPPING. For this BAdI, a fallback class exists that does a 1:1 mapping; thus a special BAdI implementation is only needed if source and target service have a different key structure.

  7. Save your entries.
    Note Entries in the customer table overrule definitions in the SAP table.
  8. If a remote access is necessary for a specific application context (for example, CRM), enter an RFC destination for the same in view CLB2V_CONTEXT.
  9. In the remote system, apply the following authorizations to the RFC user:
    Authorization Object Field Value
    S_RFC

    Authentication Check for RFC Access

    RFC_TYPE FUGR

    This is the type of RFC object to which access is to be allowed.

      RFC_NAME

    CLB2_CUST_RFC

    This is the name (white list) of the RFC object to which access is allowed.

      ACTVT 16 (Execute)
    S_RFACL

    Authorization Check for RFC User (for example, Trusted System)

    RFC_SYSID Enter the RFC system ID for the trusted system connection.
      RFC_CLIENT Enter the RFC system client for the trusted system connection.
      ACTVT 16 (Execute)
    S_TABU_DIS

    Table Maintenance (via standard tools such as SM30)

    ACTVT 03 (Display)
      DICBERCLS CLB2 (Collaboration)

    This is the table authorization group.

Results

You have defined entries for the OData service registry.

This completes the configuration tasks for the SAP Jam integration. You can now use the SAP Jam collaboration features with your business application or REST services.