cancel
Showing results for 
Search instead for 
Did you mean: 

RAP Unmanaged: S4 On-premise - How to call RAP service URL for multiple records from SAP BTP

milusai
Participant
0 Kudos

Hello All,

We are on S4 Hana Onpremise release 2021 SP 02.

The UI screens will be designed using CAPM model in SP BTP and for GET/POST CRUD operations our backend S4 HANA RAP API's will be called. I have a requirement that on UI screen user can select multiple records and send it to RAP API for update to DB. The records displayed on the screen are from standard table DPR_TASK which also have few extended fields. The save will update those additional fields. I was able to achieve single record update at a time using RAP unmanaged scenario.

How to update multiple records at a time? may be using actions ? I tried to define action and use batch input file but had no luck, got error as below:

Invalid Function Import Parameter 'Guid' ......... (Guid being the key field in CDS)

URL - https://abc.net/sap/opu/odata/sap/YRD4_COCKPITTASK_SRV_V1/a_UpdateDprTaskDB

define behavior for YRD4_R_COCKPITTASKDETAILS alias CockpitTasksBehav lock master authorization master ( instance ) { action a_UpdateDprTaskDB result [1] entity YRD4_R_COCKPITTASKDETAILS; }


--batchcontent-type: application/httpcontent-transfer-encoding: binary
PUT CockpitTaskDetails(Guid=guid'00505684-74e9-1edd-b6a5-988faa258c6c') HTTP/1.1content-type:application/json{ "Guid": "00505684-74e9-1edd-b6a5-980faa258c6c", "ManagerCode": "2", "DevResponsibleCode": "2", "GroupingKey": "GROUP-KEY2", "DeveloperGroupingKey": "DEV-GRP2"}
--batch--

Thanks..

Accepted Solutions (0)

Answers (0)