Quantcast
Channel: SCN : Blog List - SAP for Utilities
Viewing all articles
Browse latest Browse all 476

SAP Multichannel Foundation for Utilities: Add new Odata Entity

$
0
0

The OData Service model delivered in SAP Multichannel Foundation for Utilities and Public Sector is built via the SAP Gateway Service Builder (SEGW) tool. Depending on the business needs, the SAP Gateway service model can be extended on different levels:


     1. OData entity structure extension (adding append structure with custom fields)Extending the Interface of an OData Entity Using Custom Fields

      2.  Addition of new OData entities

      3.  OData entity logic extension (for example, adding additional validations)SAP Multichannel Foundation for Utilities: Implement Custom Logic for an Existing Entity


The common situation a customer faces is that the customer would like to add new entity to existing service model.

In this blog, we will illustrate how to add new entity “ExternalAccountIdentification” to show Account identification. You can also refer to other two blogs mentioned above.


1. Start SEGW in the SAP CRM system and create a new service model project Z_CRM_UTILITIES_UMC_NEW.

2. Right click on Data Model, select Redefine OData service (GW).

 

p1.png

3. Select CRM_UTILITIES_UMC as a service to be redefined.


4. Select all entities to be included in the new service


p2.png

p3.png

5.Create new entity (ExternalAccountIdentification) and entity set (ExternalAccountIdentifications).

p4.png

6. Add association and navigation property from Account entity so that ExternalAccountIdentifications can be accessed via navigation from Account Entity.

    Navigation Property: Identifications

    Association: Account_ExternalAccountIdentifications

p5.png

p6.png

7. Save and activate the model service.

8.Create implementation class for newly created entity. You have to inherit the abstract class CL_CRM_IU_UMC_ODATA_ABSTRACT

p7.png

9. Create new BAdI implementation using the implementation class created in the previous step and give the filter value “ExternalAccountIdentification”(Entity Name).

p11.png

10. In SAP Gateway system, add and activate backend service.

p8.png

11. You can use the advanced REST client to test your newly created entity. You can add your username and password in the Authorization header.

p9.png


p10.png


Viewing all articles
Browse latest Browse all 476

Trending Articles