IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Calling SAP BAPI from WebMethods

    Posted Thu July 03, 2003 12:17 AM

    Hi all.

    I am calling a BAPI directly from my service, e.g. BAPI_REQUISITION_GETDETAIL. I mapped both the input and output fields in the pipeline. When I test it using a valid requisition number, I get the values of REQUISITION_ITEMS table in the Result tab. If I put an invalid requisition number, the REQUISITION_ITEMS table is empty which is expected but I also expect to have something in the RETURN table unfortunately, even the RETURN table itself is not in the Result tab. Actually, regardless if it is valid or not, I don’t see the RETURN table in the Result tab. In SAP, when you try the BAPI, the RETURN table is empty if requisition is found otherwise it will give you the error message it encountered. This is what I’m after in the Result tab.

    I have a theory but not sure if this is true. I noticed that if a table in BAPI is marked as optional, it doesn’t get passed to webMethods. I tried it by inquiring a requisition with texts. It did not pass the ITEM_TEXT table even if I set the text indicator to X but as usual if I try it in SAP, I get the texts in ITEM_TEXT table. Did somebody experienced a similar problem before?

    Thanks in advance.
    Miles


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Calling SAP BAPI from WebMethods

    Posted Thu July 03, 2003 12:43 AM

    I have come across it quite frequently.
    You need to pass in an empty row as an input and then you get values back.
    Greg.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Calling SAP BAPI from WebMethods

    Posted Thu July 03, 2003 01:02 AM

    Hi Greg,

    Thanks for the reply. Not sure if I can pass an empty row to the BAPI since the RETURN table is not an Input parameter too? The BAPI might dumped due to inconsistent parameters passed.
    If I did not get your suggestion correctly, can you please explain further?

    Thanks.
    Miles


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: Calling SAP BAPI from WebMethods

    Posted Thu July 03, 2003 01:34 AM

    Miles,

    In my experience, the tables in SAP RFC function modules (BAPIs) are available as input and output parameters - you can specify INPUT and OUTPUT parameters that are not tables, but tables are effectively both.
    I just pipe in an empty row into RETURN as an input and that seems to take care of it.

    In SAP functions I have written that use tables I can actually see the empty row passed in and if it is going to be used for output then I clear the table out before adding the appropriate records.

    Greg.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: Calling SAP BAPI from WebMethods

    Posted Thu July 03, 2003 01:54 AM

    Hi Greg,

    I tried it and it worked! Thanks a lot.
    I am not familiar on how BAPIs work outside of SAP. I’m so used to just passing the input parameters and get the results as expected.
    But I really appreciate your help though it proved my theory wrong

    Thanks once again.
    Miles


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: Calling SAP BAPI from WebMethods

    Posted Thu March 11, 2004 05:14 PM

    Hi,

    one year later - and still somebody neede this hint.
    Thanks so much !

    Joe from Berlin


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Calling SAP BAPI from WebMethods

    Posted Fri July 23, 2010 11:22 AM

    Hello everybody outside there,

    6 years later i got the same problem, find the same thread and my OWN reply !! :slight_smile:

    Cheers Joe


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: Calling SAP BAPI from WebMethods

    Posted Thu August 24, 2017 08:14 AM

    Thanks All.

    This is still helping :slight_smile:

    Deepika


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB