cancel
Showing results for 
Search instead for 
Did you mean: 

OData Services Consumption and Integration

CRVMANISH
Contributor
0 Kudos

Hello Experts,

My Gateway and Backend system are same , SP06. I am trying to run this TCode/IWBEP/OCI_SRV_GEN

provided in the URL  http://help.sap.com/saphelp_gateway20sp06/helpdata/en/ab/7a40346993423e98044350e41a21d8/content.htm

Please provide navigation to this T-Code.

Regards

Manish

Accepted Solutions (0)

Answers (2)

Answers (2)

kammaje_cis
Active Contributor
0 Kudos

Hi Manish,

Can you explain us the usecase for using this tool? Or are you just experimenting with it?

It is also accessible from SEGW, when you right click on Data Model ->Redefine ->OData service

Thanks

Krishna

CRVMANISH
Contributor
0 Kudos

Consumption of External web service using oData.

Regards

Manish

CRVMANISH
Contributor
0 Kudos

Hello Experts

Below is my method

What information should i populate below for Post method

Regards

Manish

kammaje_cis
Active Contributor
0 Kudos

Manish,

The tool you are using is not for consuming and external OData service. It will consume and create a new OData service for you. (like a reverse proxy).

So what do you want to do after  consuming the external OData service?

Thanks

Krishna

CRVMANISH
Contributor
0 Kudos

POST the data using external oData Service.

Regards

MAnish

CRVMANISH
Contributor
0 Kudos

No its not an experiment , i was told by some of the SAP Gateway folks to use this transaction to consume external webservice . I want to push data from SAP to my another backend . I cannot use Push Notification because it needs listener 'ON' every time and i cannot one instance always running to wait for data to come from SAP.

Regards

Manish

kammaje_cis
Active Contributor
0 Kudos

Manish,

This is like you want to cut a tomato and you ask everyone on how to use a screw driver.

So everyone guides on using a screw driver but your purpose is never met because you are on a wrong path.

I can say that you are using a wrong tool.

I would suggest you to open a new thread and patiently document your usecase and ask for suggestions.

Some questions to answer may be

Both backends are SAP?

Amount of data you are looking to pass/update

If both are SAP, have you considered RFC?

If not, do we have an OData service already in target system?

Thanks

Krishna

CRVMANISH
Contributor
0 Kudos

Well Krishna,  I guess it is the same tool for using external oData services.

1. Both backends are not SAP, only one is SAP.

2. Probably around 12-15 fields

3. Yes target system has oData service.

I guess you have not understood the requirement properly.

if you are aware about using SOAP webservices logical ports in ABAP , proxy and host , this will clear you my requirements.

Regards

Manish

CRVMANISH
Contributor
0 Kudos

Hello Atanu,

I am receiving response for my external webservice , check the meta data.

How can i call my MPC and DPC .

Please Suggest

Regards

Manish

former_member184867
Active Contributor
0 Kudos

Hi Manish,

As I mentioned before OData Consumption and Integration (in short OSCI ) is something by which you can consume external OData in Gateway.

For example if you have an External OData service A , then using transaction '

/n//IWBEP/OCI_SRV_GEN ' you can generate an Gateway Service B.

Now you can call service B from any browser/ client , and you will get the response back in the browser/client. Gateway will internally call service A and transfer the data to service B, when ever B is called. 

The DPC/MPC of B will be called just like the DPC/MPC of any other Gateway Odata service.

Regards,

Atanu


'

CRVMANISH
Contributor
0 Kudos

Hello Atanu,

B will internally call A and i see the expected results as you mentioned.

I want to POST the data , so do i need to query stream service B with parameters in my ABAP code as http request say BADI /Exit or i need to do something with DPC and MPC of service B .

Regards

Manish

former_member184867
Active Contributor
0 Kudos

Hi Manish,

As you see, B is internally calling A and you are able to get the expected results in case of GET, the same holds good for POST as well. In your browser tryout  POST on B with correct HTTP settings and body. If everything is correct then POST on A would be called. If CREATE has been implemented in A then you will be able to get the successful creation of entity in B.

Are you sure about your approach 1. that you want to call an OData service from ABAP code 2. When you already has an OData service(A) , and you are creating one more(B)

Regards,

Atanu

CRVMANISH
Contributor
0 Kudos

Hello Atanu,

I am not sure how to call it, i want to push the data from my BADI to service B, this should internally

call service A.

Now the question is do i need to post http request from my BADI or calling DPC , MPC call will do.

If i call DPC & MPC then i will like to know what methods should i call in sequence and what data i need to pass.

Regards

Manish

former_member184867
Active Contributor
0 Kudos

You can not call DPC/MPC, these will be called by Gayeway Runtime.If You only need to call OData Service, in that case why you need to call B, why don't u call A ?

Former Member
0 Kudos

Why aren't you using SOAP then?

CRVMANISH
Contributor
0 Kudos

Ron : oData is more lighter as compared to SOAP and there are lot of other advantages of oData over SOAP .

Atanu : Their is an option to consume external SOAP service in ABAP workbench , which also generates the code , so i was looking something like that in Gateway, anyways i will directly consume service A , i thought using service B will make more secure as data is getting posted in outside world.

Regards

Manish

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Manish,

please have a look at my most recent post:



How to consume an OData service using OData Services Consumption and Integration (OSCI)

in SAP NetWeaver Gateway

Andre Fischer

I hope you "Like" it .

Best Regards,

Andre

CRVMANISH
Contributor
0 Kudos

Thank you very much Andre, Yes, I liked it.

Regards

Manish

former_member184867
Active Contributor
0 Kudos

Hi Manish,

This transaction is not available in SPRO.

You can try /n//IWBEP/OCI_SRV_GEN in your system.

Do you mean something else by 'navigation' ?

Regards,

Atanu

CRVMANISH
Contributor
0 Kudos

Thanks Atanu,

Now its working.

Regards

Manish

former_member184867
Active Contributor
0 Kudos

Hi Manish,

I would request you to close the thread if it is working.

Regards,

Atanu

CRVMANISH
Contributor
0 Kudos

Hello Aatnu,

I tried with my oData service and also example oData service.

http://services.odata.org/Northwind/Northwind.svc/

I checked the response in browser it works, but when i try to generate it gives me error as 'Error while fetching source meta data'

Here is screen shot of Gateway Service Generator

Regards

Manish

former_member184867
Active Contributor
0 Kudos

Hi Manish,

Is your RFC configured correctly? Is it giving 200 in connection test ?

Regards,

Atanu

CRVMANISH
Contributor
0 Kudos

Hello Aatnu,

Problem is resolved, it was URL issue , Now my oData service has post method.

What should i do to post the data.

Regards

Manish

former_member184867
Active Contributor
0 Kudos

Hi Manish,

This will be similar to Gateway OData post.

Regards,

Atanu

CRVMANISH
Contributor
0 Kudos

Hello Aatnu,

In DPC there are CREATE_ENTITY & UPDATE_ENTITY method.

Do i need to call this methods, do i need to specify POST anywhere in http call.

Regards

Manish

SyambabuAllu
Contributor
0 Kudos

Hi Manish,

If you wants create new record in DB you should implement the code under DPC class method CREATE_ENTITY.

Thanks,
Syam

0 Kudos

Hi Manish,

Iam getting the same error.can you please help in solving this issue.

looking forward for your help.

Best regards,

Siva.