Skip to Content

Part 6 of Blog Series: An in depth look at enterprise SOA  Consuming Services with ABAP

Continuing in the second week of the An in depth look at enterprise SOA blog series, we will focus today on the ABAP capabilities to discover and create an application from ESR and Registry.

This video starts off with the process to create a Service Consumer object (former called a client proxy) in NetWeaver 7.1.  We will then perform the same process in NetWeaver 7.0 so that you can study the differences and improvements that have been made. The main area of differences is in the new tool – SOAMANAGER – you use in NetWeaver 7.1 to create  the Logical Port. We will also discuss some of the new capabilities of ABAP 7.1 to work with Asynchronous services and Reliable Messaging. The video will close out with some sample applications that use this Service Consumer object to call the service from within different types of ABAP programs.  Special focus will be paid to using Web Dynpro ABAP and its Service Call Wizard.

Consuming Services with ABAP

To report this post you need to login first.

51 Comments

You must be Logged on to comment or reply to a post.

  1. John Patterson
    Hi Thomas,

    Another great blog, I cant wait to get on a Netweaver 7.1 project and start using some of the concepts you have shown. I know that this blog was a primer but I have a few ABAP related questions which i would like answering.

    1/ Reliable Messaging – I have seen many different ways of providing QoS and reliable messaging for asynchronous messaging, incorporating proprietary methods like using named queues, ccBPM, Ack/Nacks etc. 

    I see in PI 7.1 there is a WS adapter, new interface settings and various mechanisms available in the ABAP Proxy.

    In short how does this change the way we code our proxies?

    How does this change recovery on both the consuming and providing systems if there is an application error?  given the new mechanisms are there any new tracking/status/audit reporting functionality available in SXMB_MONI etc?

    2/ Method Chaining –  one of the nice features in java webdynpro previously not available in ABAP webdynpro was method chaining when address context attributes – i noticed you were doing this in your blog

    eg. lo_element = wd_context->get_child_node(
                name = wd_this->wdctxt_n_node)->get_child_node(
                name = wd_this->wdctxt_nplus1_node)->get_child_node(            ..
                name = wd_this->wdctxt_nplusz_node)->get_element( ).

    this is very cool and can think of lots of places i could use it, how does it work? is this going to be part of the autocomplete? will it be retrofitted?

    Cheers
    JSP

    (0) 
    1. Thomas Jung Post author
      This was a just a very first peak at functionality that is still very much in Ramp-Up.  There will be more details that will answer many of your detailed questions in the comming months as NetWeaver PI 7.1 approaches its general availability. 

      There will be some changes to the way that you handle client proxies for Asynchronous services that require reliable messaging.  I showed a little of that in the video.  We also have functionality called TUCC that will see more about soon.  However for synchronous proxies, the coding against the proxy really hasn’t changed much. 

      2. Now method chaining I am in a much better position to discuss. 🙂  Yes we have this functionality through out the ABAP environment – not just in Web Dynpro.  It basically works very much like Java – you can imbed functional method calls and arithmetic expressions inside of other statements.  This saves on the cluttering of intermediate variables and makes ABAP code leaner.  Here are some examples:
      IF a + b > meth( c – d ).

      DO strlen( txt ) – 1 TIMES.

      READ TABLE itab INDEX lines( itab ) …

      FIND REGEX oref->get_regex( … )
           IN txt.

      txt = condense( txt1 && txt2 ).

      c2=>m2( )->m1( ).

      Notice that the && replaces the keyword CONCATENATE as well.  Lots of things were done to really streamline the ABAP syntax.

      And yes this works just fine with the autocomplete.  I used the autocomplete on the chained methods in my video.

      Will it be retrofitted: Honestly I don’t know.  Many things are obviously being brought back to 7.0 from 7.1.  However both the chaining and the autocompletion required changes at the Kernel level and in the ABAP Compiler and would be quite extensive to bring back to 7.0.  Only time will tell.

      (0) 
      1. John Patterson
        Thanks for the prompt response, I like the idea of cherry picking from other languages and frameworks and incorporating them into ABAP.

        I got a copy of the 7.1 Composition Environment from tech-ed, I see you can now add the ES Repository, will the ABAP stack be made available too.

        Cheers
        jsp

        (0) 
        1. Thomas Jung Post author
          CE 7.1 and Java/ABAP core 7.1 are on different release cycles.  CE 7.1 is now GA whereas the rest of 7.1 is just entering ramp-up. You might see an ABAP 7.1 preview on SDN later in the year, but remember that NetWeaver 7.0 remains the core release for the Business Suite so I image the focus on the ABAP trial editions will probably remain with 7.0.
          (0) 
          1. Jeff Lien
            Dear Thomas:

              Our SAP ECC 6.0 are netweaver7.0(2004s) and we have ABAP only.
            Can we call web service using ABAP program?
            Or, You can give me some link about my question.
            Thank you.

            (0) 
      2. Ravi R Kumar
        Hi Thomas,

        Consuming Services with ABAP is a excellent e-learning but i am am going through this learning i could only see half of this learning  rest of the vedio is not seen could you please put the correct one till the end, please check the link which i was going through”https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/20eb3174-41ab-2a10-a383-907faf60eed3” i could see only half of the elearning,

        please post the correct.

        many thanks.

        (0) 
      3. Ravi R Kumar
        Hi Thomas,

        Consuming Services with ABAP is a excellent e-learning but i am am going through this learning i could only see half of this learning  rest of the vedio is not seen could you please put the correct one till the end, please check the link which i was going through”https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/20eb3174-41ab-2a10-a383-907faf60eed3” i could see only half of the elearning,

        please post the correct.

        many thanks.

        (0) 
        1. Thomas Jung Post author
          The video that is posted is already correct. I checked my local copy of the video and it plays fine all the way through. I then watched the video online via the link and it also played all the way through.  I therefore do not think the problem is with the video itself.

          Perhaps the problem is on your side or it is some transitory problem with SDN’s hosting of the content itself. I don’t have any control over the hosting of the content.  If you feel that the problem is on the SDN side, please report the problem to SDN’s Technical Support via the Contact Us link on the main SDN page.

          (0) 
      1. Thomas Jung Post author
        First a few questions.  What language was the Web Service provider generated with.  Also what release and SP level are you running on for the proxy generation. 
        (0) 
        1. Anton Wenzelhuemer
          During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
          (0) 
      2. Anton Wenzelhuemer
        Gabriele,

        your service is with very high probability ‘RPC style’. The proxy wizard on the other hand let’s you only  create consumers for ‘document style’ WSDLs (at least for the earlier releases of the WAS ABAP). google the two keyphrases here or try to search the (SOA) forums here on SDN.

        hope it helps,
        anton

        BTW, if someone in the context of SOA tells you to find out the implementation details (e.g. the programming language this service is implemented in)of any service you want to consume just to resolve consumer wizard troubles, …umm…er…ya… forgot what i wanted to write.
        if you know what i mean.

        (0) 
        1. Thomas Jung Post author
          >BTW, if someone in the context of SOA tells you to find out the implementation details …

          I don’t really appreciate the insinuation that there is something inappropriate with the information I asked for. In a perfect world all languages and platforms would produce perfect WSDLs and they would all be perfectly interoperable.

          However we don’t live in a perfect world and there are quirks in our products and other vendors as well.  When troubleshooting problems it never hurts to have as much information as possible. I actually saw that the service message name began with a Z so I was somewhat suspecious that maybe ABAP was the Consumer Provider as well.

          (0) 
          1. Anton Wenzelhuemer
            sorry Thomas that my answer was rude but this question is one which does harm to the whole SOA story because people rightfully start to ask, why did they sell us SOA to overcome, amongst other things, integration problems due to implementation specifics of one or another language and than on the other hand as a first shot ask for implementation details of a service when a problem occurs trying to consume such a service.

            actually, one should validate the WSDL with an appropriate tool and when it is valid and the consumer wizard fails one should consult the manual of the consuming platform to find out what limitations the consuming platforms SOAP implementation has and accept those or ask the vendor of the consuming platform to kindly complete the SOA toolkit or at least implement it far enough to support the state-of-the-art.

            my 2 cents,
            anton

            (0) 
  2. David Knittle
    not sure if this is the correct place to ask this, but my web service is non-sap. when you go to the admin in the video, you put in the service name, and it is there, because you created it with SAP. how do i go about registering a service from another system. i have the wsdl and url.
    (0) 
    1. Thomas Jung Post author
      In this video I show the process if you are consuming a service that is logged in the SAP Registry.  However if you wanted to consume an external service, in the wizard you would just choose the URL or File option and load the WSDL directly.  This one different radio button value in the wizard at this step will send you down a different path that allows you to either input the URL for the WSDL or to upload the WSDL file directly from your workstation.
      (0) 
      1. David Knittle
        yeah, i guessed that. i should have been clearer about my issue. the trouble i am having, is that every time i try to use a wsdl i get an error stating “Library error” and “not implemented”. it doesnt say WHAT is not implemented, it just dumps me out and does nothing. i have tried various WSDLs beyond the actual ones i wanted to use. i have checked all of the various blogs that tell me things to strip from my wsdls because they are not supported by SAP, and i have done that.

        still, i get nowhere.

        i need to be able to figure out what is “not implemented”.

        i am not totally convinced i have the system set up correctly, to be honest, but i dont know who could look at this and tell me.

        (0) 
        1. Thomas Jung Post author
          I’m not sure I can be of much more help without being able to study the WSDLs myself. 

          In general if you are sure that everything is configured correctly and you receive such generic errors on a very broad range of WSDLs, you might consider opening a support ticket and let them inspect your system for problems.

          Also OSS Note 944029 lists all the XML shema types that are supported by the ABAP Proxy Generation. It is pretty detailed, comprehensive and kept up to date. It should be the definative source of what would produce the not implemented error.

          (0) 
          1. David Knittle
            that note will help a TON. i was finally able to generate a proxy from a small “helloworld” wsdl i found on the internet… which means my setup is ok. i will check the note. thanks again.
            (0) 
    2. Gabriele Montori
      I think you should use the external url WSDL to create the sap proxy. I did it following this tutorial and works great. Remember to update the white list with visual admin if you want to test the external service with web service navigator
      (0) 
  3. Gabriele Montori
    Hi
    I follow your tutorial and thanks because it’s really easy to follow and understand. I have a little problem with my system (SAP NetWeaver 2004s sp17): when I create a Web Service I cannot see endpoints in wsdl. If I search with SOAMANAGER the service I can see it but the WSDL address is different; the se80 say wsdl is (with no endpoints) at
    http://server:8000/sap/bc/srt/wsdl/sdef_ZWS_SUM/wsdl11/ws_policy/document?sap-client=800
    SOAMANAGER say it’s at:
    http://server:8000/sap/bc/srt/wsdl/bndg_DE3BD87804C7D9F190090015C5F253E2/wsdl11/allinone/ws_policy/document?sap-client=800
    here the endpoint is present and the service works correctly. Why there are these difference?
    Is some setting wrong in system?
    thanks
    (0) 
    1. Thomas Jung Post author
      Nothing wrong with your system. It is just that you must use SOAMANGER to generate the WSDLs that contain the endpoints since you can create multiple endpoints with different configurations for each service definition.

      You should use the WSDLs that come from SOAMANGER.

      (0) 
  4. Sagar Patel
    Hi Thomas,

    Very very helpful blog.
    I tried to create consumer proxy same way as you have shown, but I created with LOCAL WSDL File. It got created successfully.

    But when I tried to create Logical Port for the same, I got folllowing error.

    *Error: Uninstantiated object “subject sidl service” in method IF_SRT_WSP_CONFIG_SIDL~CREATE_CLNT_CFG_FROM_WSDL_D of class CL_SRT_WSP_CONFIG_SIDL*

    I could understand, what this error is?
    Kindly help to resolve it…

    Regards,
    Sagar



    (0) 
    1. Thomas Jung Post author
      I’m not familiar with this error either. I would suggest that you post it in the forums to see if you can someone else who has encountered.  Also consider opening a support ticket.
      (0) 
      1. Sagar Patel
        Thanks Thomas,

        I’ll do that, still It’ll be very kind of you, if you come across any such error than please let me know… Thanks for quick reply.

        Regrads,
        Sagar

        (0) 
  5. Richard Koziol
    Hi Thomas,

    I am following this blog word by word and its great. So far I have been able to do each and every step. But in the middle of Step 3 Proxy Class the audio/visual is stopping. Am I doing something wrong in the playback?

    Cheers!

    Rich

    (0) 
  6. Mayukh Chatterjee
    Hi Thomas,

    I have consumed an external web service in ABAP taking help of your Video. But my requirement is to consume a web service of an external system say ‘ABC’ and send SAP Purchase Order Information to the external system (‘ABC’ ). The external system will provide the suitable WSDL which would be capable of transfering Purchase Order data when I’ll consume it. Could you please give me the details of achieving this objective.

    Thank you,
    Mayukh

    (0) 
    1. Thomas Jung Post author
      >Could you please give me the details of achieving this objective
      You seem to have described the typic serivce consumption scenario.  I don’t know what is different about your situation that isn’t already covered by this tutorial.
      (0) 
      1. Mayukh Chatterjee
        My requirement is to consume a web service of Aprimo system and through that web service I have to send Purchase Order data to Aprimo. Aprimo will use the SAP PO data for it’s own purpose. I can consume a Web service following your instructions in the video. But how will I send SAP PO data to Aprimo through the consumed web service?
        (0) 
        1. Thomas Jung Post author
          I’m still not clear on your question.  If they are exposing a service to you, they define the interface – operations and their parameters.  This interface gets generated into your proxy class. 
          (0) 
          1. Mayukh Chatterjee
            I am supposed to call the web service in the Purchase Order workflow ( In some method of a business object). I am consuming a web service which will create a proxy class. I will call the proxy class method from workflow and also pass all the required PO data to the input parameter of the proxy class method. My question is what else I need to do to transfer those PO data to the non SAP system ?
            (0) 
            1. Thomas Jung Post author
              I guess I am still missing some aspect of your question.  You ask what else you need to do to transfer PO data.  You are already passing all data the input parameters of the proxy class method. The parameters of the proxy class method is exactly how data goes into and out of a Web Service call. 
              (0) 
              1. Mayukh Chatterjee
                Do you mean if I pass all the PO data through the input parameters and inside the proxy class method fill the output parameter, I do not have to do anything ? That would be the final step and Aprimo user will be able to view the PO data ? I am pretty new in web service so am not aware much of the technical details. Sorry to bother you again and again.
                (0) 
                1. Thomas Jung Post author
                  As show in this video, you call the proxy class and behind the scenes it takes care of the actual web service call. That is the benefit of proxy class generation.
                  (0) 
  7. Nitesh Jain
    Dear Thomas,

    Great Blog as always!!

    I have successfully created and tested the Consumer proxy in our development server.

    [Scenario background: A Java Web Service has been developed and deployed on the Portal server which i am consuming in ECC6.0 in ABAP.]

    We would soon need to move it through the system landscape concerning which i have the following queries:
    1. The Consumer Proxy was created with the WSDL URL of the Development Portal server. I checked the Consumer proxy and did not find any signature of the WSDL URL in the Consumer proxy class generated. Can we therefore transport this consumer proxy to QA/Production without any issues?
    2. The Logical port configuration – What’s the standard used in its maintenance across the landscape? Will we need to manually do it in every system? Can this also be made generic and transported across the landscape?

    regards
    Nitesh

    (0) 
      1. Nitesh Jain
        I’ll do the needful.. However thought having this important information on this blog would be helpful for people trying to implement this new technology.

        (0) 
  8. Joni Coble
    Hello Thomas,

    This is the exact process we are looking for but there may be a problem with the presentation.

    Not sure how this works on SDN, but if someone can investigate and resolve, that would be most helpful.

    Regards.

    (0) 
    1. Thomas Jung Post author
      The video plays perfectly fine for me – both from the SAP network and from my home pc. There doesn’t appear to be anything wrong with the video stream.  If you don’t have sufficient bandwidth, the video may pause while it buffers ahead. 
      (0) 
  9. Naveen Kumar J
    Hi Thomas,

    I follow your tutorial and it’s really easy to understand. When i am consuming the web services using ABAP program. I am getting an error like “RCVR_DETERMINATION.NO_RECEIVER_CASE_BE No receiver could be determined” in the output. Kindly help me to resolve it.

    Thanks in advance,
    Naveen

    (0) 
    1. Thomas Jung Post author
      Well your error would seem to be around Receiver Determination – which isn’t functionality that was demoed or discussed in this video.
      (0) 
  10. Juan Miguel Hernández Marqués
    Firstable, thank you very much for your blog.

    I’m Trying to create a consumer with ECC6, but at the end of the wizard, the system asks me for a key, as if I was modifying an SAP standard Object

    ¿Is it normal?

    Thank you very much in advance.

    (0) 
    1. Thomas Jung Post author
      Short answer: no it isn’t normal.  Make sure that you are chosing to generate the proxy objects into a package in your customer namespace.
      (0) 
  11. Pedro Restrepo
    Could you clarify me difference between NW 7.0 and NW 7.1 ?

    Changing from NW 7.0 to NW 7.1 is like an upgrade ? Does it affect applications, or previous “Z” ABAP code ?

    I ask this because, from your eclass, NW 7.1 has many improvements in web service management and those improvements are highly desirable 🙂

    Thanks,

    Pedro Restrepo

    (0) 
    1. Thomas Jung Post author
      What application software are you talking. ERP for example has no upgrade path to 7.1.  Instead many of the new features that were in 7.1 came out via NetWeaver 7.01.  This is NetWeaver 7.0 Enhancement Package 1.  You get this on your ERP system when you apply ERP Enhancement Package 4.

      So you would really only upgrade PI systems or standalone NetWeaver Application Servers 7.1 or beyond. Anything on the Business Suite stays on the 7.0x codeline and gets new features via the Enhancement Packaes. You can read up on the Enhancement Package concept further here on SDN.

      (0) 
  12. Narayani Krishnamoorthy
    Thanks for the excellent blog.I created a Service Consumer doing exactly as shown but I also got the same error: Uninstantiated object “subject sidl service” in method IF_SRT_WSP_CONFIG_SIDL~CREATE_CLNT_CFG_FROM_WSDL_D of class CL_SRT_WSP_CONFIG_SIDL as someone had mentioned.
    Just wanted to share how I solved this error: because like me there would be others who would have come across this error and also looked through your blog hoping for an answer.
    In your eclass you have clearly mentioned to COPY THE WSDL FROM the SOAMANAGER which I didnot..I copied it from the service definition in SE80 thinking that both are same which they are not.

    Regards,
    Narayani

    (0) 

Leave a Reply