2022 Sep 06 4:36 PM
Dear All,
I have recently started using OData V4 to provide REST services for SAP-external systems.
The service should provide the call to a validation function with a given set of input parameters and should return the input structure plus a 'VALIDE' parameter and a table with potential messages.
I have chosen use to the ‚action import‘ mechanism and created a navigation property to the message structure in the model definition.
How do I enforce the expanded view of the result? Unfortunately, an explicit ‚expand‘ in the URI is not permitted for POST methods.
Any help is highly appreciated!
2022 Oct 11 11:02 AM
How have you built your OData V4 services ? Have you used a V4 Service Binding and the ABAP RESTful Application Programming Model ?
Or are you using a code based implementation using the SAP Gateway OData V4 framework API's?
What is the release you are working on ?
NW 7.5<x> SP <YY> , SAP S/4HANA 20<xx> FSP<Y>
2022 Oct 11 1:50 PM
I am using the code based implementention.
Basis-Release is 7.50 SP 13.
Thank you for your support!
2022 Oct 11 3:32 PM
This feature is available as of SAP NetWeaver AS ABAP 7.55 SP00.
According to the following note it is also available in SAP NetWeaver AS ABAP 7.52 SP09, but has unfortunately not been downported to 750.
2512479 - SAP Gateway Foundation Support Package Stack Definition - SAP ONE Support Launchpad
You can test this in a system with the appropriate release by using a POST request on the following URL
/sap/opu/odata4/iwbep/tea/default/iwbep/tea_busi/0001/ChangeTeamBudgetByID?$expand=TEAM_2_EMPLOYEES
and using the following payload:
{
"TeamID" : "TEAM_01",
"Budget" : 700.00
}
2022 Oct 12 9:24 AM
Since the feature is not available in your release you could try to use a $batch request where the POST request to your action import and a subsequent read request to the entity are combined in one POST request.