Skip to Content

Hi All,

With current 1705 release now cloud application studio user can extends PSM released OData services with extension fields.

Use case : As a business requirement you have extended standard BO with fields, and now other party/system who is consuming OData service of that standard BO wants extended fields in OData Service.

Below is the step by step guide to extend Odata service in cloud studio.

  1. Extend standard BO, for example I have extended SericeRequest BO with fields shown in image

 

2. New content OData Extension can be created from ‘Add New Item’, click on Add New Item -> a new icon with name “OData Extension” will be available under SAP.

give a name to Odata extension and click on ‘OK’

 

3. A new dialog will appear to select available Odata service, Only PSM enable Odata services will be shown in drop-down, select relevant service which is based on enhanced standard BO and click on ‘OK’

 

4. It will navigate you to the browser and opening “Odata Editor” key user tool. If you are not already logged on to the SAP cloud solution, you will be prompted to log on (Use your SDK user for log-in)

5.OData Editor has two part, on the right side it has OData Service here all the nodes are listed of that services, Whatever node you have extended in BO, select it here (it should show mark as selected), on Left side it shows all element of that node.

 

6. From the right side under the Business Object, you can see PDI extension field as editable field, you can select and deselect it.

After selecting this field click on button Save and then Activate.

 

 

7. After successful activation status get changed to Active and Service URL will be generated.

8. Come back to PDI and On Refresh of solution, you will see a new content with. xodata extension in solution explorer

Other Way for Activation is from PDI, if you left inactivate from the browser then it will appear in SDK with inactivate flag, Right click on  .xodata content and Activate

 

9. To verify that extended field in BO is added or not you can check service metadata, Open Service URL in a browser and search the field recently added ( you can find metadata link in Odata editor)

 

 

 

Now Odata service is ready to use with extension fields.

Note: It does not support custom node extension and its fields to extends OData services.

 

For further usage how to consume C4C Odata you can follow this blog 

 

Regards

Sunil

 

 

 

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Harshad Patel

    Hello Sunil,

     

    Thanks for the post. Can we add additional fields in Odata service ‘pcmportal’ using SDK? This is because pcmportal odata service does not have all SAP standard fields and SAP provided apps using this odata service.

    Odata service ‘c4codata’ have all fields but then we need to change the SAP provided apps which just missing 2/3 fields.

     

    Regards,

    Harshad Patel

     

    (0) 
  2. Johannes Schneider

    Hi Sunil,

     

    i added an oData extension to a patch solution and added an element from a customer.xbo into the c4codata (BusinessPartner).

     

    Everything looks fine and the metadata from the odata shows, that the field is implemented into the odata. But now I want to assemble and download the patch solution, but i get an error to check-in all files and activate them. When I try to activate my oData extension, this error / warning pops up.

    When i go to the session administrator and delete my current session, log off and log in again and retry to activate the oData extension the same error shows again. The status of the oData extension in the WebUI is active and so is the status of the xodata object (no red dot on it).

     

    Is there a way to check in the xodata object and activate it?

     

     

    Kind Regards,

    Johannes

    (0) 

Leave a Reply