on 04-11-2022 12:02 PM
Hi,
When using CAP to create odata services, the odata capability KeyAsSegment is available to follow the openapi specification.
Is this functionality available when using RAP as a framework as well? How can this be activated?
Best regards,
Geert-Jan
It works in RAP out of the box if you use a V4 service binding. ( and any OData V4 service based on the SAP Gateway framework provided you use the latest SP level of SAP_GWFND )
You can try it out with the V4 travel sample service.
https://<yourserverver.com>/sap/opu/odata4/dmo/ui_travel_proc_m_o4/srvd/dmo/ui_travel_processor_m/00...;
gives the following response:
{@odata.context: "../$metadata#Booking/$entity"
@odata.metadataEtag: "W/"20220330114430""
@odata.etag: "W/"SADL-202111191948080000000C~20211119194808.0000000""
TravelID: "1"
BookingID: "2"
BookingDate: "2021-12-02"
CustomerID: "660"
CustomerName: "Sisko"
CarrierID: "UA"
CarrierName: "United Airlines, Inc."
ConnectionID: "1537"
FlightDate: "2021-12-04"
FlightPrice: 438
CurrencyCode: "USD"
BookingStatus: "N"
BookingStatusText: "New"
LastChangedAt: "2021-11-19T19:48:08Z"
- __CreateByAssociationControl: {
}
- __EntityControl: {
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andre,
Thanks for the feedback! Couldn't try it myself until now (didn't have access to the system for which I was doing the research).
The key-as-segment functionality does seem to work, but the capability is not present in entity container of the OData metadata.
Which means that external programs don't pick-up the capability. E.g. converting the OData metadata to to OpenAPI specifications without the capability present now doesn't pick up the ability to use the key-as-segment functionality.
When I manually add this capability like this:
The capability is picked up by the OASIS OData to OpenAPI specification converter.
Do you have the same missing capability in your metadata? If so, this seems like a bug to me. (I'm using a S/4HANA On-prem 2021 FPS 01)
Regards,
Geert-Jan
Hi Andre,
Thanks for addressing this with product owner! Hope this is something that can be solved.
Any chance you can address following metadata documentation issue with them as well? Seems to be an issue / missing functionality in OData V4 compared to OData V2 in all releases I've tested. (S/4HANA 2020 FPS00 & S/4HANA 2021 FPS01).
Best regards,
Geert-Jan
See also my new blog post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.