cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to test RAP odata V4 custom action?

Jacky_Liu1
Product and Topic Expert
Product and Topic Expert
0 Kudos
5,189

Hi, Rap Expert,

I have created custom action in RAP for object .

Jacky_Liu_0-1711438096409.png

Jacky_Liu_1-1711438210338.png

I can find the action in API call .

Jacky_Liu_2-1711438310065.png

But  when I call the action in UI5, the RAP backend always says the resource uploadfile does not exist .

Jacky_Liu_3-1711438518827.png

Jacky_Liu_5-1711438685866.png

Jacky_Liu_6-1711438765940.png

But I tested of CAP odata V4  Action with this method, it works .

Jacky_Liu_7-1711438925615.png

Of course , I have tried the method of odata model . The error is the same .

Your help would be very appreciated !

Best regards!

Jacky Liu

Accepted Solutions (1)

Accepted Solutions (1)

Jacky_Liu1
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, Dear All,

The url is like the following:

/sap/opu/odata4/sap/zfreightorder_srv_bind/srvd/sap/zfreightorder_service/0001/ZC_FREIGHTORDER(b5cc25f0-1d29-1ede-bacf-dae292a79057)/com.sap.gateway.srvd.zfreightorder_service.v0001.uploadfile

Answers (1)

Answers (1)

Neil_Lee_057
Explorer
0 Kudos

Hi Jacky,
sorry for bother

I have an OData V4 RAP APP with custom action too, but it is static action.
Is possible trigger it by Postman?

Url as below

/sap/zgashui_curr_ex_r/0001/CEXR/com.sap.gateway.srvd.zgashui_curr_ex_r.v0001.update_rate

but I get 204 no content as result

LauroRib
Newcomer
0 Kudos
Hi Neil! You're fine - 204 actually means success but without any returning data. Your way of calling it is correct - when we're testing manually, we need to add the namespace.action to our endpoint. Check your action signature on the behaviour definition, you can refer to the input/output parameters here: https://help.sap.com/docs/abap-cloud/abap-rap/action-definition?q=actions