cancel
Showing results for 
Search instead for 
Did you mean: 

OData service using PUT Method

Former Member
0 Kudos

Hi,

I am trying  to create an OData service in SEGW on Netweaver Gateway using PUT method which can update a single record.

Also, i want to know how can we write query in service to update record & how can we use import parameters of BAPI in OData service.

We tried to follow the steps mentioned here

but this doesn't mentions anything about the PUT method.

Please suggest


Thanks,


Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

We did updating but in debugger what i observed is when we udpate/read multiple tables (or from multiple BAPIs) then from Netweaver Gateway there used to be multiple calls happening for each of the table/BAPI in backend though the service gets called only once. Which i dont think is a optimized way.

Is there any optimized approach to restrict multiple calls from NW GW to backend for single service.

Thanks,

CRVMANISH
Contributor
0 Kudos

If you are using function imports , query stream your import parameters from your REST Client and debug it, it is the optimize way to do it.

I guess your BAPI is getting called in many places should be the reason for multiple calls.

Regards

Manish

CRVMANISH
Contributor
0 Kudos

Hi Shrikant,

Easiest way to do it : Use 'Function Imports' , map it with your input parameter of your BAPI.

Use execute_action method of your DPC to call your update BAPI.

Regards,

Manish

former_member184867
Active Contributor
0 Kudos

Hello Shrikant,

PUT operation always updates only one record ...

Now on


how can we write query in service to update record

If I understand you correctly, basically  you want to know how to update a record using OData service. For that you need to implement UPDATE_ENTITY method in the data provider ( extension ) class. Once it is done you need to fire a PUT request from your browser with the PAYLOAD. For your quick reference, you can do a READ on the entity and you can use response of the READ for your PUT operations. You can refer to for example..

For BAPI you can refer to http://wiki.scn.sap.com/wiki/display/EmTech/Development#Development-ServiceGeneration-RFCGenerator

Regards,

Atanu