cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to expose via PI an ECC web service

0 Kudos

Hi.

A client is asking to expose, via SAP PI, a web service developed in their ECC with tcode SE80.

I want to know what could be the best way to do it from the design perspective, I mean, how should the receiver side looks like if I did everything correctly.

I'm thinking on 2 options:

  1. Import ECC web service WSDL into PI's ESR and use it as definition for a service interface like a typical integration scenario with a third party system.
  2. Generate a consumer Proxy in ECC for the web service and configure the scenario using the ABAP-Proxy Runtime. What I don't know in this case is what to use receiver side if its not an ESR object. What definition to set for the receiver service interface.

I read a lot of threads inside SCN but could find a definitive answer. I don't know, maybe my search criteria was not good enough.

I really appreciate your insights, links, tips, advices or anything you'd like to share on this topic.

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hello guys and thank you all for your replies.

I apologize for the late reply.

I'm replying to the post since I wanted to ask you all a few more questions.

In response to your own questions and doubts: I think the ECC services were developed with function modules and they are already exposed via SOAMANAGER. The whole idea is to avoid external calls directly to ECC, everything have to be through PI. I consider this is not about redesigning, just exposing some existing ECC web services via PI.

Here are my final questions:

1. Can you please refer me to some guide on proxy generation? I'm no expert on ABAP development.

2. Do I generate the proxy for the service interface referring the function module or for the function module itself?

3. If it's for the function module, does it refer the function module automatically after generation or do I have to code the referral? This is to decide if I'm going to need some help form ABAP side or not.

Thanks again. I look forward to read your replies.

bhavesh_kantilal
Active Contributor
0 Kudos

Juan,

If the intent is to expose a SAP FM as a Webservice and this has to be mediated via PI, then this is what I would recommend,

2. Do I generate the proxy for the service interface referring the function module or for the function module itself?

Generate a Service Interface which uses the RFC Request and Response Structures as its input and output. You cannot generate a Proxy for a RFC directly.


3. If it's for the function module, does it refer the function module automatically after generation or do I have to code the referral? This is to decide if I'm going to need some help form ABAP side or not.

In the implementation logic, of the ABAP Proxy, you would just map the request data to the FM import data and vice versa.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

  1. Generate a consumer Proxy in ECC for the web service and configure the scenario using the ABAP-Proxy Runtime. What I don't know in this case is what to use receiver side if its not an ESR object. What definition to set for the receiver service interface.

If the Webservice definition was not built using the Service Interface, then this is what you  would need to do,

  • Import the ECC WSDL into PI.
  • Define a Service Interface with the WSDL request and response structures.
  • Generate the Implementation Proxy for this Service Interface and thereafter replicate the logic of  the Webservice here.

My challenge with this design approach though is :

  • You would have the same code in 2 different places?
  • Is this Webservice going to be called always via PI? If yes, then this switch makes sense.
  • Is the Webservice going to be also available externally without PI, If yes,
    • Then you might need to do above steps.
    • Also expose this new implementation as a Webservice via SOAMANAGER.

The easiest approach is the Option 1 you have listed where PI makes the direct Webservice call but the better approach is Option 2 and what I have described. The final answer thought lies in terms of time and redesign effort

Regards

Bhavesh

former_member182412
Active Contributor
0 Kudos

Hi Juan,

  • The best option is second one using ABAP proxy runtime because of better monitoring in ECC.
  • If ECC service is created from function module then import the function module in ESR and create a new service interface and refer function module in the service interface, finally generate the proxy in ECC.
  • With in the inbound proxy call the actual function module which is used to create the web service to update ECC.

Regards,

Praveen.

engswee
Active Contributor
0 Kudos

Juan

I agree with Praveen. I personally prefer using the proxy runtime compared to the Web Service Runtime (WSRT) in ECC.

Additionally, below are some further reading on approaches for web service development.

http://help.sap.com/saphelp_nw74/helpdata/en/60/00623c4f69b712e10000000a114084/frameset.htm

By the way, do you know how the web service was developed in ECC, i.e. is it an existing RFC exposed as a web service?

Regards

Eng Swee