Multiple BAPI calls in RFC Adapter

Hi, Dear Friends!
I have asynchronous scenario File to RFC(BAPI).
File contains raws. For each raw I need to execute BAPI.
With the help of each raw I need to construct one document in R/3 database with the help of BAPI.
But now my scenario provide only one document (only one BAPI is executed).
I read file to xml structure. This structure contains elements. The elements represent raws of file. But BAPI is executed only for the first element.
How to explain to XI that I want it impement BAPI <b>N times</b> - as number of raws in file (or elements in xml structure).
So how to implement multiple BAPI calls. Have you any idea?
Thank you in advance.
Natalia Maslova.

Hi Natalia
have a look on these links
http://help.sap.com/saphelp_nw04/helpdata/en/43/b46c4253c111d395fa00a0c94260a5/frameset.htm
Best Design : for a SOAP -XI - BAPI ( Multiple )
Re: RFC adapter...How it handles multiple calls...
Re: Multiple BAPIs and COMMIT in BPM
Re: Is it possible to compose XML in BPM from responses of multiple BAPI calls?
Multiple BAPI calls in RFC Adapter
may be helpful
Thanks !!!

Similar Messages

  • Is it possible to compose XML in BPM from responses of multiple BAPI calls?

    Hi guys!
    I want to send into BPM an XML document, which will be parsed and it will call some BAPIs more times. And I need to get response. Is it possible, to compose an XML document from these BAPI return codes to be sent back as response? Concretely I will use SOAP->XI->SAP and response SAP->XI->SOAP...  I will use it as asynchronous call..
    Thanx, Peter
    Message was edited by: Peter Jarsunek

    Hi Peter,
    It depends:
    - what kind of bapi is it? (does it have some sort of number?) like delivery number or something else?
    if not you'll have to add something
    so you can correlate your bapi with bapi response
    if you want to know which response corresponds to which bapi call
    but you can do it with a bapi wrapper
    >>>>Is it possible, to compose an XML document from these BAPI return codes to be sent back as response?
    you you can collect message in a BPM - standard pattern
    (but remember about the "correlation")
    Regards,
    michal

  • Designing the scenario of multiple BAPI call in a loop in BPM

    All,
    I need some help in designing this scenario. I do not have the luxury to write a custom BAPI. Here is my scenario. A typical async>sync>async with little modification
    1. Async call to BPM with input payload
    2. BPM calla BAPI_SALESORDER_GETLIST with customer number and sales organization from input payload and returns a list sales order items (Sync)
    3. I need to call the BAPI_SALESORDER_GETSTATUS for each sales order number that I got from the first call (Sync?). Not sure how this has to be designed
    4. Transfer the  data through HTTP adapter (Async)
    I am able to perform step 1, 2 and 4 (of course only line item data). I need some pointer help on how to incorporate it in step 3 of BPM.

    3. I need to call the BAPI_SALESORDER_GETSTATUS for each sales order number that I got from the first call (Sync?). Not sure how this has to be designed
    for this the BPM should have a block after the Sync send.......in the block have your send step....the mode of the block will be ForEach....
    Check this blog for more info: /people/milan.thaker/blog/2008/08/05/modes-in-block-step-of-bpm
    Check this similar example from help: http://help.sap.com/saphelp_nw70/helpdata/en/11/13283fd0ca8443e10000000a114084/content.htm
    Edited by: abhishek salvi on Jul 1, 2009 10:57 AM

  • Error while calling RFC adapter(FILE-XI-RFC scenario)

    Hi,
    I am trying for FILE-XI-RFC scenario. I am getting the following error. I have checked in message monitoring. The error is coming while calling the RFC adapter. Can any body tell what problem is this?
    Regards,
    Dhana
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
      <SAP:P1>af.f23.sofd00001530a</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>2: Unable to find URL for Adapter Engine af.u7a.us4296</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error while reading access data (URL, user, password) for the Adapter Engine af.f23.sofd00001530a</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

    Hi,
    I did SLD check.
    The status says 'Summary: Connection to SLD works correctly'.
    But it fails while checking the access to XI profile.
    Here is the status
    Summary: Connection to SLD works correctly
    Now checking access to the XI Profile
    Properties of RFC destination LCRSAPRFC
      RFC host:
    %%RFCSERVER%%
      program id:      LCRSAPRFC_DZ1
      gateway host:
      gateway service:
    Testing the RFC connection to the SLD java client...
    RFC ping returned exception with message:
    / CPIC-CALL: 'ThSAPOCMINIT' : cmRc=2 thRc=679#Transaction program not registere

  • RFC Adapter not Call

    Hello Friends,
    I am working on XI 2.0
    My Scenario is
    IDOC --> XI --> RFC Adapter --> R/3 System
    I am configuring the RFC adapter for the SAP system.
    But when I am able to try to call using the Integration Engine it’s not call the RFC adapter.
    I define the end point as
    RFC Adapter
    (X) Load Balancing Deactivated
           Application Server -- <host name>
           System Number      -- 00
    When I run the scenario it show me in the <b>sm58</b> transaction as
    <b>Connection Close (no Data)</b>
    And in the SXMB_MONI Transaction it shows
    <b>A. Status</b> as <b>Green Flag</b> means <b>Message schedule on outbound side</b>.
    So can you please identify and suggest me the solution or what else configuration is required.
    Thanks & Regards,
    Gaurav Jain

    try to register all queues in SXMB_ADM -> Manage queues.
    I think that should help you solve the issue.

  • Problem with mutiple BAPI calls during the commit

    Hi all,
    I am trying to create accounts for a given partner i the transaction F9K1 using the BAPI BAPI_BKK_ACCNT_CREATE. After calling the BAPI I am committing it too.
    The problem is if I try to create multiple accounts like RCA, ACA, MCA, IOE and so on, the first time the BAPI is called to create RCA account it is successful an it is even committing. When I call the BAPI to create the the ACA account the return table from the BAPI shows success message but the commit fails. If I restart the program and try creation of accounts now the RCA will throw a error msg saying account already exist, ACA account will be created and then the MCA account creation fails in the same manner explained above.
    I see the issue is with multiple BAPI calls and I tried using all sort of methods like clearing buffers, start new task in local and wait command and all.  But none of them seems to be working for me.
    Can anyone please guide me on how I can overcome this problem.
    Thanks.

    BAPI :
    BAPI BAPI_BKK_ACCNT_CREATE
    Functionality
    Use this method to create an account in Bank Customer Accounts. This method returns the following values:
    Identification details for the newly created account such as the internal and the external account number, and the bank area details
    A table containing error messages
    To create an account by using this method, you must specify values for the import parameters Bank Area (BANKAREA) and Product (PRODUCTNAME).
    Note: You must also specify a value in the External Account Number (EXTERNALACCOUNTNR) parameter if you have defined an external number range for the bank .
    REgards,
    Jayan.

  • RFC adapter...How it handles multiple calls...

    Hi folks
    Basic doc'tation on RFC adapter states...qRFC is not supported..Agreed..
    I have a scenario where I need to dump lot of transactions from a flat file to an RFC.
    I have split the single structure by 1:n mapping(multi) and pushed each message using a Loop(For-each/Par-For-each) to RFC function..
    Now question here..Is this a good approach to invoking RFC's(I find response times to be pretty slow on my server upto 20 secs for each RFC call). Cant I parallely execute all the messages by calling the RFC on SRM systems.(PAR for each loop has a limit of 999 loops)..Is there any other option you can  suggest for this scene.?

    chk this link
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    there is a recommendation on when to use parForEach. From what i understand , parForEach is helpful if u intend to send "One" Message to multiple receiver systems and intend to handle the responses in different context.I beleive it won't help if u send "different" messages to the same receiver system.
    One more approach , i can think of is to make a Jco call from your "Message Mapping" itself using User defined functions instead of "configuring an RFC adapter" and "calling it in ccBPM". The below link should help on this.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/how to perform sap data lookups within xi mappings.
    Good Luck
    cheers
    Saravana

  • RFC adapter Call BAPI error

    Hi XIer,
    I am using RFC receiver to make a BAPI call, I used a BAPI wrapper due to this BAPI don't have a RETURN structure in the Export Tab which is XI expected.
    but after I made a wrapper, the same error occurs, just like I directly call the BAPI without wrapper function. the error as following:
    com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.af.rfc.util.bapi.BapiException: Parameter with name RETURN not found.
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:456)
         at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:131)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:848)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    the BAPI name is :QIRF_GET_USAGE_DECISION2
    the wrapper name is :ZZQIRF_GET_USAGE_DECISION2
    and I added a RETURN structure, type is BAPIRET2.
    Please give me some ideas, thank you for your time~~

    I still am not sure why you need a Wrapper RFC? If SP 14 or above on XI, RFC adapter have the option of BAPI commit and this will make things easy for you.
    You can call the BAPI directly.
    regards
    Bhavesh

  • FILE to multiple BAPI/RFC calls

    Hi,
    I have one input source (CSV with about 100 rows) and I wish to call a custom rfc for each row in my spreadsheet. (The custom RFC has a single flat import structure as opposed to a table or anything complex).
    I am struggling to do this in XI.
    I assumed I needed to assign one source to multiple targets in the Message interfaces, but this errors on activation due to the RFC occurrence being set to 1.
    Do I need to do the same trick as with IDOCS or am I missing the point somewhere?
    I have read several threads and one in particular seems to indicate it is possible, but so far this has evaded me.
    Re: BOM CREATION
    Please could you point me in the right direction.
    Thanks
    Andrew

    Andrew,
    You could read the CSV file into an Integration Process
    Save the message in a multiline container (in your case 100 rows)
    Create a block
    Create another container to hold the single row defined within this block
    Set the following for the block
    <b>Step Name</b>          eg SplitForRFC
    <b>Mode</b>               ParForEach
    <b>Multiline Element</b>     Multiline container defined above
    <b>Current Line</b>          Single line container defined above
    The <b>Mode</b> 'ParForEach' acts like a loop
    Then within the block create a synchronous Send step which calls your RFC
    <b>Design</b>
    I would question having to make 100 RFC calls
    If possible change the design so that the RFC interface can accept multiple messages and the RFC logic to loop through them and process the messages one at a time
    Regards,
    Mike

  • RFC adapter in XI 3.0 not working properly with BAPI in R/3 4.6C

    Here is the scenario.
    An XML file is received from our customer. This file contains purchase order information that is used to create a sales order in our SAP 4.6C system. Once the sales order is created an acknowledgement is generated and this is returned back to our customer in an XML format.  This scenario is working perfectly fine in our XI 2.0 system but is not working properly in our XI 3.0 test environment. Our custom function module in R/3 is a wrapper function that uses a standard SAP BAPI to create the sales order. Part of the function module does use the statement
    call function 'BAPI_TRANSACTION_COMMIT'
    The last thing the BAPI does is call another function module that using an RFC destination that will return and order acknowledgement.
    Here is what happens within XI and our SAP system.
    The XML file is received and mapped to our imported RFC. The RFC adapter is called and the information is passed onto SAP where our customer function module executed. The sales order is created within SAP without any problems and the second function module is called which references an RFC destination assigned to our XI 3.0 system. The information is sent back to XI and an appropriate file is created for our customer.  All seems to be working properly except that when the original RFC is sent from XI to SAP,  SAP creates a short dump stating
    "call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryException:" Then it is put back into the que where 5 minutes later it executes again and trys to recreate the sales order in SAP. (again, this same function module executing from XI 2.0 works fine)
    I believe I have everything configured properly because the SAP side is being executed and I am successfully passing information back from SAP to XI. However the original function module in SAP is failing with the above error message. It appears that the original function module cannot communicate back with XI. I have had SAP looking at this issue and they have not been successful yet in solving this problem.
    Any ideas.
    Thanks,
    Jim d'Hulst

    Hi,
    I think the problem is with the send back of acknowledgement to XI. Does the DeliveryException state something about the sender agreement? I guess you are using a statement like below:
    CALL FUNCTION 'ZABCD'
    destination <tcp/ip destination>
    exporting
    input = ack.
    In that case, check whether the TCP/IP destination is working fine. Also, to be able to exchange message, the structure of the Function Module ZABCD needs to be identified as the sender in XI Configuration (Integration Directory).
    Also, check your config with the blog mentioned below:
    <a href="/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit">/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit</a>
    Regards,
    Amitabha

  • RFC Adapter and BAPI Commit

    Hi everybody!
    In my scenario I post an RFC call to a BAPI (BAPI_GOODSMVT_CREATE). The call succeeds (empty RETURN parameter, material document numer is returned). However, the resulting material document is not available in MB03 - I assume this is due to a missing COMMIT after the RFC call.
    However, our system has SP 18 - and I have read that the RFC adapter is able to add a COMMIT after a successful call automatically starting from SP 14. What confuses me is the fact that the descriptions in the online sources state that I should check the "Extended Mode" checkbox in the RFC adapter config screen and then I should check the "Commit..." option. However, when I set the checkbox for extended parameters, I only get a simple table where I can enter property/value pairs.
    Has something gone wrong with the upgrade and my RFC adapter doesn't have SP 18 yet? Or am I doing something wrong?
    Regards, Joerg

    Hi Joerg,
    Check in your Repository if you imported the newest adapter metadata.
    Check Software Component SAP BASIS - > SAP BASIS 6.40 -> http://sap.com/xi/XI/System
    There Adapterobjects -> Adaptermetadata -> RFC
    search after the attribute  ..<b>singelBapiCommit</b>
    Because you dont see a SP version there.
    Maybe its better to search afer the label:
    <b>Commit handling for singel BAPI-calls</b>
    When you dont find the attribute .. try to reimport your BASIS 6.40 Software Componenent.
    Regards,
    Robin

  • Calling RFC Adapter fails - convert error

    Hi,
    I have a problem with calling RFC Adapter. I'm using JDBC->XI->RFC scenario. JDBC does just "select 'W' from dual". In the destination SAP system RFC function is created for test purposes. This function has one parameter - string type. After calling it, it should write a sysdate into the SAP Z_ table. The XI should call the function with the 'W' parameter. But this fails. Everything is ok, but calling the RFC returns following error (copied from the Runtime Workbench -> Message Monitoring :
    Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'W', in "u
    (Yes, this is thw whole error message. I don't know what u should be...)
    Did someone get this error?
    Thanx 4 answers, Peter

    Hello all,
    Let me reopen the topic of my colleague. I'm facing the same error though with bit different symptoms. Here it is.
    ERROR msg:
         Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'Z', in "T
    The XML message (MainDocument):
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Z_BAPI_ACCESSIBILITY_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
      <BAPI1008 />
      <PARAM>Z_XID_500_ACC</PARAM>
      <ZTTOTH_BAPI1008 />
    - <b><ZTTOTH_STRUCT>
      <PARAM1></b>Z_XID_500_ACC</PARAM1>
      </ZTTOTH_STRUCT>
      </ns0:Z_BAPI_ACCESSIBILITY_TEST_XI>
    According to the error message the parser expects behind string ...<ZTTOTH_STRUCT><PARAM1> another tag, but the question is why.
    To make all this more funny here I paste another XML message of BAPI calling which works fine (without the error described above):
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Z_BAPI_PARAMETERS_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
      <PARAM>Z_XID_500</PARAM>
    - <ZTTOTH_STRUCT>
      <PARAM1>Z_XID_500</PARAM1>
      </ZTTOTH_STRUCT>
      </ns0:Z_BAPI_PARAMETERS_TEST_XI>
    The BAPI functions are absolutely the same except those other two import-pramater structures (BAPI1008 and ZTTOTH_BAPI1008). I'm gonna to try to add those import-parameter structures into Z_BAPI_PARAMETERS_TEST_XI, but anyway - this is weird.
    Does anybody have an idea, what should be wrong ?
    Thx. Tom
    Message was edited by: Tomas Toth

  • RFC adapter for two BAPIs

    Hello,
    I need help to call two BAPIs in RFC Adapter. My scenario is I am getting message from third party system. By default I call a BapiX to create a deal, Then I have to call another BapiZ for commision.The thing is first I have to create it by calling BapiX and BapiZ from one message which I am getting to XI.
    What is best way to do it. In XI is there any way to do this.
    I am not sure do i need to use DB lookup in the mapping.
    Or do i need to use RFC wrapper to put these two BAPIs.
    Thanks,
    Srinivas

    Hello Amit,
    I am just confused. I am using RFC adpter on reciever side.
    You mean You want to use BAPI message type for the interface and create ABAP Server Proxy.
    Now how can i define other RFC message type OR you want me to call other BAPI (Pasting the BAPI code)in the Server Proxy Code.
    By the way i am using synchrnous call.
    Thanks,
    Srinivas

  • Multiline BAPI return structure  and RFC Adapter

    Since SP14 RFC Adapter check return structure of RFC function.
    But how it works if BAPI returns multiline BAPIRET2?
    Will adapter loop all elements and perfom commit only if <b>all</b> alements don't have errors.

    I'am about this:
    <i>As of SP 14 support for commit handling for single BAPI calls was added to the RfcAdapter receiver channel. If activated in the receiver channel setting, the received XI message will be executed as synchronous RFC (sRFC) in the receiving system. This is also true for asynchronous (QoS EO) XI messages to receive and analyze the execution result by the RfcAdapter.
                   The received response is parsed by the RfcAdapter to get the BAPI return parameter with name "RETURN". This return parameter can be of BAPIRETURN, BAPIRET1 or BAPIRET2 types. The "RETURN" parameter is checked for the response status (field TYPE) which can take following values:
                  1. 'S' : Success
                  2. 'I' : Information
                  3. 'W' : Warning
                  4. ''  : Empty String
                  5. 'A' : Abort
                  6. 'E' : Error
                   If the response contains one amongst the first four response status then it implies that the BAPI was successful. If the response contains one amongst the last two response then the BAPI failed. If the BAPI "RETURN" parameter is of not of type ABAP structure rather of type ABAP table, a empty table is also considered as successful execution result.
                   In case of a successful execution the BAPI function module "BAPI_TRANSACTION_COMMIT" is called within the same context to trigger the commit of the BAPI. In case of a failure the BAPI function module "BAPI_TRANSACTION_ROLLBACK" is executed by RFC Adapter which rolls back the changes.</i>

  • Call a RFC or BAPI in SAP R/3

    Hi,
    Please give your replies.
    I written a RFC function module in SAPR/3 , my requirement is that RFC to be called from SAPXI.
    This RFC will update some SAP transactions and return back the document number back
    Whether it is possible?
    aRs

    Hai,
    <i>my requirement is that RFC to be called from SAPXI.</i>
    at design time you have to import RFC module into imported bjects
    Select Message Interface as Synchronous Type
    and do rest of the things like mapping...
    At configuration
    Under communication channel select adapter type as RFC adapter and receiver.
    and pass the SAP R/3 details
    thanks & regards
    harsha
    *********Reward points if found useful*********

Maybe you are looking for