Technical Articles
OData V4 Service Catalog
Recently there was a question in the Q&A section where to find the OData V4 service catalog.
Since it was Gregor Wolf who asked this question it was obvious that this information is not easy to spot and searching in Google only produced Gregor’s question at the time of writing of this blog though the catalog service is briefly mentioned in the documentation here: Service Catalog but this entry is not delivered by Google.
In order to get a list of all services you can use the following URI:
/sap/opu/odata4/iwfnd/config/default/iwfnd/catalog/0002/ServiceGroups?$expand=DefaultSystem($expand=Services)&$top=5
… but you might get the following error message if the V4 catalog service is not published yet.
{
-error: {
code: "/IWBEP/CM_V4_COS/014"
message: "Service group '/IWFND/CONFIG' not published"
@SAP__common.ExceptionCategory: "Configuration_Error"
-@SAP__common.Application: {
ServiceRepository: ""
ServiceId: ""
ServiceVersion: "0000"
}
}
}
In order to publish the OData V4 catalog service you have to use transaction /n/IWFND/V4_ADMIN which looks like follows if the service group /IWFND/CONFIG is already published.
If you don’t see it here then you have to use the Publish Service Groups button which will open the following screen where you have to provide LOCAL as the System Alias and search for the service group /IWFND/CONFIG.
The successful response of the OData V4 service catalog using the above mentioned URI looks like follows. (here I used the additional query parameter sap-ds-debug=true to get this nicely formatted response).
Possible problems:
- Today I encountered an error when following my own blog post. This was when trying to press the Publish Service Group button after having selected the service group /IWFND/CONFIG using the alias LOCAL.
The flag Local GW in the configuration of the system alias LOCAL was missing.
You can reach the configuration of system aliases using transaction /IWFND/V4_ADMIN by pressing the button Routing Configuration.
Hi Andre,
For S/4 HANA Cloud, is there any communication arrangement that contains the service catalog for Odata V4?
Thanks!
Check SAP_COM_0181
https://help.sap.com/viewer/0f69f8fb28ac4bf48d2b57b9637e81fa/2202.500/en-US/facdec3013fe4b8da6191b27d9d4bf9a.html?q=%22service%20catalog%22
Do I need to activate any scope item? The documentation doesn't mention it however I cannot find that communication arrangement.
Thanks,
i fallowed above steps to publish V4 service. it is not asking for TR, How to capture this in TR ?
i do not have the version 0002 of the catalog service. Do i need to update SAP_GWFND? Currently its 750 SP 22.
Hi Patrick Leininger,
I'm facing the same issue, did you find the reason for this?
Thanks in advance!
Facing this problem 2 years later.
If version 2 of the service does not exist in the system, it would only be a matter of accessing it through a different URL: /sap/opu/odata4/iwfnd/config/default/iwfnd/catalog/0001/ServiceGroups
However, the tools that need to access the catalog may always try to access to the version 2 of the service. For example, I have encountered this situation with the Fiori Tools application generator, and I don't know how to instruct the generator to access another URL, if it exists a way to do that.
In our case we have avoided the problem by registering version 2 of the /IWFND/CATALOG service with the same properties as version 1 through the transaction IWBEP/V4_ADMIN. The version 2 of the service is automatically added to the same service group as the version 1.
I will check with the colleagues that build the Fiori Tools
Hi Andre Fischer Jorge Gutierrez
We will look into this from SAP FIori tools side. Please give us sometime and I will get back to you.
REgards,
Sushant
Hi Andre,
I have access to only S4Hana versions ABAP1809 and ABAP1909
/n/IWFND/V4_ADMIN much discussed Tcode
was used to activate OData v4 in ABAP1909
But now I want to rollback this activation and have only Odata V2
Please suggest how to deActivate Odata V4
Regards
Jayanta
Hi Jayanta,
OData V4 services can be deactivated using transaction /IWFND/V4_ADMIN as well by simply deleting the respective service group.
I do see however a problem with your requirement.
Based on the releases that you have mentioned 1809 and 1909 I assume that all of your OData V4 Services are based on code based implementation using the SAP Gateway Framework.
The service implementation of such services is based on the SAP Gateway OData V4 framework API's which are not compatible with the SAP Gateway OData V2 framework API's.
That means you will not be able to publish your OData V4 service implementations as OData V2 services.
This will only become available with business objects based on the ABAP RESTful Application Programming Model (RAP) as of SAP S/4HANA 2021 FSP1. Because in RAP the service implementation does not depend on the Service Binding or described the other way round, a RAP BO can be published either as V2 or V4 service binding.
Kind regards,
Andre
Hi Andre
Thanks a lot for your very prompt and kind reply!
This is extremely helpful.
Regards
Jayanta