Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Avoiding namespace in action call on ABAP RAP

friendlycoder
Participant
0 Kudos
1,216

Dear all,

To call an action in ABAP RAP the namespace has to be provided, for example:

/StatisticalKeyFigureHead('29999')/com.sap.gateway.srvd_a2x.ycust_api_skf.v0001.reverse
This is an action that calls the reverse action on StatisticalKeyFigureHead entity. Is there a way to get rid of namespace com.sap.gateway.srvd_a2x.ycust_api_skf.v0001 in the URL?

Best regards,
3 REPLIES 3
Read only

junwu
SAP Champion
SAP Champion
0 Kudos
1,138

I don't think you can do that.

Read only

0 Kudos
1,045

Dear @Andre_Fischer,
Could you please confirm?
 

Read only

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
1,036

The name of the action / function can't be changed as such because those names are specified in the OData spec. 

It is however possible to use the alias "SAP__self" that has been set by the SAP Gateway framework for you.

When you check the $metadata document of your OData service you will find something like this:

<edmx:DataServices>   

<Schema
 Namespace="com.sap.gateway.srvd.dmo.ui_travel_d_d.v0001" Alias="SAP__self">

But you can't influence the name of that alias.

Kind regards, 

Andre

 

 

ceterum censeo RAP esse utendam