cancel
Showing results for 
Search instead for 
Did you mean: 

Why OData when there's Webservice?

Former Member
0 Kudos

Ok, I have been trying to learn ODATA from past one week and I have understood that we can make use of Odata by RFC/BOR and DDIC Structures.

By making use of DDIC structures/tables we can code in the respective methods(by redifining) to perform CRUD operations and by RFC well I haven't learned it precisely, I followed the exact same steps mentioned by Mr Volker Drees but I'm getting error 500.

FYI the link is

There's not much data available other than that for working with RFC/BOR.. I mean there needs to be much simpler demonstration with a very simple RFC.

Which makes me think why odata and why not webservices.. What advantages Odata has over webservices.

Also, if it's not too much to ask please try to address my issue by giving a simpler Odata example using an single RFC, you know just give an input and get an output kinda example.

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Hari,

Below will help ->

SAP Netweaver Gateway 2.0 vs. Web Services | SCN

Other articles also available in the forum. I kindly request to search.

Regards,

Ashwin

Former Member
0 Kudos

I don't know how to put this, Ok, all the steps mentioned by Mr. Volker were commendable they work but for some reason URI link does not work.

In the blog the URI was given as such

/sap/opu/odata/sap/ZGW100_XX_SO_SRV/SalesOrderCollection('0500000001')

but for me that doesn't work, apparently this

/sap/opu/odata/sap/ZGW100_XX_SO_SRV/SalesOrderCollection?$filter=SoId eq '0500000001'

works instead.


Can you explain the reason why? Thanks

AshwinDutt
Active Contributor
0 Kudos

Hello Hari,

What is the error you are getting when you fire the URL /sap/opu/odata/sap/ZGW100_XX_SO_SRV/SalesOrderCollection('0500000001') ? 200 OK with no data in the response body ? or any specific error ?

This URL is to READ the data and response will always have single entry as past of GW response.

Here in this case if Get_Entity / READY is implemented then it should return the Header Details of the SO.

Regards,

Ashwin

Former Member
0 Kudos

No, I get error code 500.

AshwinDutt
Active Contributor
0 Kudos

What is the error description ?

Former Member
0 Kudos

Internal Server Error, please refer the screenshot

AshwinDutt
Active Contributor
0 Kudos

Can you share the error description for this status?

What is the error logged in /iwfnd/error_log ?

Former Member
0 Kudos

The error log is empty.

The error 500 comes occurs only in the gateway client when I enter the URL /sap/opu/odata/sap/ZGW100_XX_SO_SRV/SalesOrderCollection('0500000001')


It works fine wiht /sap/opu/odata/sap/ZGW100_XX_SO_SRV/SalesOrderCollection?$filter=SoId eq '0500000001'

AshwinDutt
Active Contributor
0 Kudos

Can u put a break-point in the Data Provider Class and debug once ?

Answers (0)