Skip to Content

function z_e_rfc_ws_ext_backflush .


“Local interface:



*”       DEFAULT ‘CIM_KEA’











You can see how sending the data one logical record at a time was only compounding our

latency problem. So we quickly designed a new wrapper function that would accept an

array of input records. This wrapper function would then loop through this array and

call to the R/3 BAPI function once for each record. We could then return a status for

each record processed.

function z_e_rfc_ws_ext_backflush_v2.


“Local interface:






and the ASUG National Spring Conference .  If you didn’t like the weblog, you

can always come anyway and heckle. 

To report this post you need to login first.


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

  1. Former Member
    Thomas, your solution seems to be interesting. Let me ask you a question regarding other possibilities:

    Have you thought about using SAP XI as a bridge instead of directly calling the SAP WAS WebServices ?

    I think XI supports the “Exacly Once” and “in order” comunication into your target SAP instance.

    Thanks, Esteban

    1. Thomas Jung
      We have considered XI, but to tell you the truth it seemed a little bit like overkill.  We felt that it would add complexity to our infrastructure while adding only a minimum of features. 

      The webservice technology (and even many of the advanced features that I described here) were very easy and quick to code.  I have a hard time seeing how, with the interfaces we had, XI could have made them much easier to create.  I can see a point in the future where we might have complex mappings between source and destination interface where XI would be valuable.  But that value would have to be considerable in our eyes to overcome the additional cost of learning, maintaining and administering a new tool. 

        1. Former Member
          Hi Thomas,

          Your explanation for the secenario was very good and very useful. Did you consider using idoc technology(Async communcication) instead of BAPI(web service) sync communication.

          1. Thomas Jung
            We didn’t really consider that.  Originally we wanted to be able to pass status messages back to the original system and it seemed simpiler to do that via sync.  We only made a late change to queued RFC to fix the problems we saw after we went live.  Really by using queued RFC we are Async.  With the monitoring and reprocessing tools that we had already built specific to this particular solution, we really didn’t need some of those tools that SAP provides via IDocs (such as workflow for errors). 

            All this said, I can certainly see us using IDocs for other solutions in the future.  Our next set of services use 640 functionality (parts of XI) and likely IDocs in addition to BAPIs.  That’s beginning to sound like another weblog…

            1. Former Member
              Thanks Thomas.

              I had came across same at one of our clients and developed the interface using the idocs (using the same BAPI you used)by generating ALE interface for BAPI.

              Venkat Gaggenapalli

              1. Former Member
                   I have a web service that creates interactive pdf documents in SAP.The input parameters for the web service are pdf Template binary array (xdp format) and the pdf data (xml string)
                I have created a client proxy which calls this web service.This happens in three steps:
                1)I get the pdf data in xml form from a partner and the pdf template is read from the server using a bapi using a bapi which returns the template data in the form of rawstring.
                2)I need to convert the rawstring into binary array and pass to the web service along with the data xml string.
                3)the output of web service is a pdf in binary form which is then saved in the file cabinet using a bapi.

                I am getting a SOAP fault in second step (call to the web service).It’s Soap fault code 4 and it says an exception occured in the web service operation.Now I guess this this error could be due to improper conversion of rawstring into binary array.Could you please let me know how do i get this resolved or any other input.

                the bapi returns a table of rawstring (each line 255 char) which i need to pass to the binary array input parameter of the web service

                1. Thomas Jung
                  You might want to post this question in the ABAP forum.  You will get a wider audience to your question.

                  As to the conversion of Binary String to array or vise versa I tend to use the SAP function modules in Group SCMS_CONV.  If this doesn’t solve your problem you will probably want to trace your webservice call and provide more details on the error.

  2. Former Member
    Thanks for this interesting weblog.

    Do you use the SAP web dispatcher to call the web services with load balancing ?

    If yes, does it work OK ?

    Best Regards,

    1. Thomas Jung
      No we don’t – yet.  We currently only have one application server on our WebAS.  We have in our 4th quarter budget to buy an additional app server and then we will have the situation you describe.  This application server will also be our fallover server in a Microsoft Cluster.  I don’t really expect to have a problem however because each webservice call is stateless and independent. 

      We do have multiple R/3 application servers and we connect to R/3 via RFC through the message server.  Therefore we do have load balancing to the backend application system. This works fine, especially since we are using qRFC to assure proper processing order. 

        1. Thomas Jung
          I have an upgrade to 640 on a server this week, but I might try to squeeze in a web dispatcher setup on a development system.  I’m curious now as to what problems you might have encountered.  I would encourage you to write short weblog describing what you are trying to setup and what problems you have encountered.  I’m sure others will be interested and perhaps you will find someone who has solved the problem already.  You can always update the weblog later with the solution.
        2. Thomas Jung
          Have you had a look at OSS note 752034.  It talks about problems with WSDL Generation and reverse proxies (Web Dispatcher included).
  3. The log is quite intresting and I almost felt as if I had been part of your implementation.

    Keep it up.


  4. Former Member

    Without the custom wrapper, does the BAPI commit? We need a custom wrapper anyway in order to write the commit or BAPI_TRANSACTION_COMMIT to create the material docs. Can you let me know that if we were using middleware product and not a webservice call, we can get by without a wrapper?

  5. Former Member
    Hello Mr. Thomas

    Your solution seems to be quite interisting.
    I was searching for discussions on BAPI_REPMANCONF1_CREATE_MTS ´cause we have same necessities as yours.

    But Now i´m facing the following problem.

    We have to backflusing other components, that is not on bill of material, and the BAPI doesn´t allow this kind of behavior.

    Did you had the same problem ?

    Thanks in advance

    Best regard
    Jessé Borges

    1. Thomas Jung
      Post author
      >We have to backflusing other components, that
      >is not on bill of material, and the BAPI
      >doesn´t allow this kind of behavior.
      >Did you had the same problem ?

      No we always backflushed via the BOM structure.  If we had a special run we had to create a BOM variant to represetnt the changed component load.


Leave a Reply