Skip to Content

Best way to expose via PI an ECC web service

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Apr 13, 2016 at 01:38 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2016 at 07:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 15, 2016 at 05:15 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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