cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an Odata service to update value in SAP

Former Member
0 Kudos

I am an android developer , it is my first time use the sap netweaver gateway to create an android application.

I use the netweaver gateway sdk to create a List/details Application.

I can get our backend server data .

Now I need to another service to update the data.But I do not know how to get it.

There are some screen shoots.

this is our sap netweaver gateway backend , I can get the data from BasicQueryCustomer by the sdk that is auto-generated.

Now I want to get the BasicDeltaCustomers data.

In the BasicQueryCustomer I can get all the data .BasicDeltaCustomers i can get the changed data .

At the end of the BasicQueryCustomer  data there is a delta token . It is used to get the BasicDeltaCustomers  data

this is the BasicDeltaCustomers

Regards

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

You can try your Odata service in a rest client. You have to perform GET using the create url and save the token. Then you need to do a PUT along with token got from GET. Make sure this is working from a restClient and implement it in Android.

This might help you,

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f7/2d3ae91315428fa64e899f051ed230/content.htm?frame...

In Create: CSRF token validation failed | SCN

- Midhun VP

Former Member
0 Kudos

These are very useful . I have fixed my problem.

Thanks a lot.

Answers (2)

Answers (2)

midhun_vp
Active Contributor
0 Kudos

You need to create Odata service manually in the NW gateway based on your requirement, that involves ABAP coding. Then you will be able to consume it in the device. When you are doing a POST from your code you need to pass the CSRF token also also with the request then only the data will be updated in SAP.

Helpful links,

L13 Build SAP Netweaver Gateway Service HelloWorld odata channel - YouTube

- Midhun VP

Former Member
0 Kudos

Many thanks.

Former Member
0 Kudos

Hi

I get the token from first url is null.

I just want to use backend another service .Is there other way ?

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi ,

Please go through this document

Rgrds,

Jitendra

Former Member
0 Kudos

Hi

I have done this document and I can get data from one service .

I want to know how to get another one.

Regards

Thanks in advance