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>

Similar Messages

  • How to create a log file for bapi return structure

    Hi ppl,
         I am using BAPI_PO_CHANGE to mark the delivery of POs as complete after many validations through a classic report now my concern is i have been asked to create a log file which details the errors in the POs which is in the bapi return structure.
       I don't know how to do can any one help at the earliest.
    Regards,
    Bharathy.

    hi
    pls see this thread...
    it may help you...
    /people/kamalkumar.ramakrishnan/blog/2007/01/10/a-primer-on-using-and-creating-sap-application-log
    thx
    pavan
    *pls mark for helpful answers

  • Soap Sender and RFC Adapter receiver getting APPLICATION_ERROR

    Hi, all,
    I have a webservice soap sender and RFC Adapter receiver scenario, it works fine with RFC "RFC_SYSTEM_INFO", When i tried the RFC "RFC_READ_TABLE", getting the following error message,  <SAP:Code area="RFC_ADAPTER">APPLICATION_ERROR</SAP:Code> in
    SXI_MONITOR, in webservice client, i am getting error message like this:
    <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <rfc:ZZTEST_RFC_READ_TABLE.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
                   <Name>TABLE_NOT_AVAILABLE</Name>
                   <Text>QUERY_TABLE not active in Dictionary</Text>
                </rfc:ZZTEST_RFC_READ_TABLE.Exception>
    Thanks a lot!

    Hi
    Its not compulsory but its good to wrap it as Z object.
    Well if you are facing problem with SOAP data. Then try to do one thing. Check with the data you received from SOAP message. If this works
    Then try to check in mapping is it passing the data correctly or not. With this check with the user authorization PIAPPLUSER. if its having less authorizations to execute this BAPI in ECC
    Thanks
    Gaurav

  • RFC Sender problem  between 46D and RFC adapter

    Hi,
    I have this simple integration scenario where I want to send data to a archiving system;
    SAP -> (tRFC) -> XI -> (MQ) -> BizTalk -> (MQ) Arch.syst.
    SAP side ***
    A Z-program using a Z func. like;
        CALL FUNCTION 'ZSD_DCF_SEND_TAG'
          IN BACKGROUND TASK
          DESTINATION 'XISYSTEM_TRFC_DCF'
          EXPORTING
            pt_filing_info = gt_filing.
        COMMIT WORK AND WAIT.
    XI side ***
    Both IR and ID is configured correctly, in the development environment everything works just great. I have created a test program where I can define how many calls I will do, looping over the func. call with a commit inside the loop - 500 or more msgs are ok.
    The integration scenario is transported to quality enviroment using CMS, and the RFC sender comm.ch. is configured accordingly.
    The problem in quality ***
    When sending just 1 msg, everything is just fine, message received and delivered to MQ.
    When sending >= 2 msgs, the 1 msg is always ok, BUT all others fails due to the following from Adapter monitor;
    RFC_HISTORY
    - Error: 2006-01-19 10:55:18 CET: com.sap.aii.af.rfc.afcommunication.RfcAFWException: lookup of alternativeServiceIdentifier via CPA-cache failed for channel 'RFCSender_XI0002' (02d4d30de3593874942ed0659add0827, party '', schema 'TechnicalSystem', identifier 'Q93#120')
    - OK: 2006-01-19 10:55:17 CET: Message processed for interface ZSD_DCF_SEND_TAG
    My sending system is Q93 CLI 505 so I can understand the error, BUT I cannot understand why the RFC adapter is saying the TechnicalSystem is Q93#120 - it should be Q93#505. My Q XI has client 120...
    It seems to me that the RFC adapter is kind of confused about the sender..
    I have created a OSS message and SAP has looged on and looked into it with both a XI expert and RFC expert without being able to answer - all is configured correctly.
    - The SLD config. for bus.system Q93 is ok -
    - The bus.system in ID is showing correct vaues for
    Adapter Specific Identifiers (SID Q93, client 505)
    - Both Dev. and Qual. environment are running on XI 3.0 SP 14 latest patch, RFC component version on the SAP side is identical between dev. and qual. SAP systems
    - It doesn't matter which gw I use (Q93 gw or XI gw), the error is persistent
    - It doesn't matter if I increase initial conn, max conn.
    I have also tried to use qRFC instead, but with the same result.
    Anyone using tRFC for asynch. communication from SAP to XI seeing something similar?
    Meanwhile, I will do RFC trace on GW and RFC Adapter on AE....
    Please, do not say SP15, oss msg for FAQ RFC adapter or links to RFCAdapter config....
    best regards
    Torstein

    Hi,
    SAP Note 730870 FAQ: XI 3.0 RfcAdapter Q.no 15
    <i>Q 15: Whats wrong when the error message "lookup of alternativeServiceIdentifier via CPA-cache failed" shows up while sending a RFC call to the RfcAdapter?
    A: A RFC sender channel is located beneath a service within the Integration Directory. Within this service choose "Service" -> "Adapter-Specific Identifiers". The values in the fields "R/3 System ID" and "Client" has to be maintained with the correct values of the system, that sends the RFC call to the RfcAdapter. It normaly only makes sense to have these values filled for services of type "Business System". If maintained in SLD, this fields will be filled automaticaly for services of type "Business System" and can be updated with the button "Compare with System Landscape Directory".</i>
    - Give correct appserver and gateway service details in XI.
    - Open the service holding the RFC adapter you are trying to use. On the top menu, goto Service -> Adapter Specific Identifiers..
    Regards,
    Prateek

  • How to use IDOC and RFC adapter in 1 scenario?

    We have AAA field and BBB field and we want to send AAA field to receiver sap system using IDOC adapter and BBB field to receiver sap system using RFC adapter. But how to use IDOC and RFC adapter in 1 scenario and how to map and  what are the design and configuration objects we require to create?

    To achieve this you have to use
    Two Interface Determinations
    Two Communication Channels (IDOC & RFC)
    & Two Receiver Aggrements.
    Use the Enhanced Interface determination and give your conditions there. Based on you condition your interface mapping will be triggered and data will be sent to IDOC & RFC respectively.

  • HTTP and RFC Adapter are not Required Sender

    Hi All,
    I have one dought....
    Why Plain HTTP and RFC Adapter are not Required Sender Communication Channel and Sender Agreements...
    I Know this two Adapter are in ABAP Stack....
    Please clarify my dought...
    Regards

    Idoc Adapters do NOT require Sender Communication Channel.
    The Sender System identifies itself at the Integration Server, with the fields SNDPOR and Client of the Control Record.
    Sender Communication channels are used for communication betweeen the Application System and the Integration Server.
    In the case of Idocs, all idocs are tranferred to the Integration Server pipeline and NOT to the regular EDI/IDOC interface.
    The RECEVIER DETERMINATION is based on the values in the Control Record.
    If you are doing ALE, then you have to maintain the idoc types which are NOT to be transferred to the Integration server by executing report IDX_SELECT_IDOCTYP_WITHOUT_IS.
    By maintaining the Idoc Types using this report, only these idoc types are sent to the regular EDI/IDOC interface.

  • XI and RFC adapter

    Hi
    The RFC Adapter configuration has been done successfully and the adapter starts up successfully.
    In our scenario, we attempt to receive an xml message from my local machine through a file adapter, and pass this along to the RFC Outbound adapter to execute a RFC on the CRM box. 
    The following error message is encountered in the XI monitoring tool.
    ==============================================================================================================
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Inbound Message
      -->
    - <SAP:ErrorHeader xmlns:SAP="http://sap.com/exchange/MessageFormat">
      <SAP:Context />
      <SAP:Code p1="connection closed (no data)" p2="" p3="" p4="">RFC_ADAPTER.SYSTEM_FAILURE_OUTBOUND</SAP:Code>
      <SAP:Text language="EN">System error when calling the outbound RFC adapter (connection closed (no data))</SAP:Text>
      </SAP:ErrorHeader>
    ===================================================================================================
    I then stop the RFC adapter and attempt the scenario again.  I get the following error message in XI monitoring tool.
    ================================================================================================================
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Inbound Message
      -->
    - <SAP:ErrorHeader xmlns:SAP="http://sap.com/exchange/MessageFormat">
      <SAP:Context />
      <SAP:Code p1="Exception in handleRequest of server Xmb2RfcService: java.lang.Exception: Bean n" p2="" p3="" p4="">RFC_ADAPTER.SYSTEM_FAILURE_OUTBOUND</SAP:Code>
      <SAP:Text language="EN">System error when calling the outbound RFC adapter (Exception in handleRequest of server Xmb2RfcService: java.lang.Exception: Bean n)</SAP:Text>
      </SAP:ErrorHeader>
    ==================================================================================================================

    Hi Eduardo ,
    Please check wether the following steps are done in BPM:
    1.Async Recieve
    A.Properties :
    Please set the following
    Message:Message 1
    Mode:asynchronous
    B.Container Data :
    Declare Message 1 as asynchronous abstract interface with message type of outbound interface(File Structure).
    2.Sync Send
    Pre-Requisite:
    Copy the inbound Syncronous Interface to Sync_interface_abstract by changing the direction in the message interface of Interface object in the Integration Repository.
    A.Properties
    Mode:Synchronous
    Request:Message 1
    Response:Message 2
    Syncronous Interface:Sync_interface_abstract
    Recievers From :Send Context
    B.Container Data:
    Message 2 should be declared as the asynchronous message interface with Response message type in inbound interface(Rec Syst Interface).
    3.Async send
    A.Properties:
    Mode:Asynchronous
    Message:Message 2
    Acknowledgment:None
    Recievers From :Send Context
    Integration directory has to be configured to send data forth and back to BPM.
    1.Send MESSAGE From Outbound interface to BPM.
    OutBound and Abstract Interface needs to be mapped in the interface determination and Abstract interface has to be binded to Business Process Name in the repository.
    Outbound->Your OutBound Interface(File Interface)
    Abstract->Message 1
    Reciever Service-> Your Business Process Name
    2.Send MESSAGE From  BPM to Inbound interface.
    Abstract and Inbound interface needs to be mapped in the interface determination and Abstract Interface has to be binded to the Receiver Service/Business System.
    Abstract->Message 1
    Inbound->Your Inbound Interface(RFC)
    Reciever Service-> RFC SYSTEM(SAP)
    These are the general steps to follow for Async/sync pattern.
    Please let me know if all the steps are configured.

  • URGENT--Converting the BAPI return structure to XML

    Hi,
    I need to convert the return structure(export parameter) from a BAPI call to XML but not able to make out how to do that.
    Before this I was required to convert the BAPI return table(export table) to XML and I did that by first converting it to the AdoDataTable, added it to a dataset and then used the builtin function to return the dataset in XML format. But here I am not able to make out how can I do the same with the Export structure.
    Any help would be appreciated.
    You may also mail on [email protected]
    regards,
    Ankit Bhansali

    If the XML schema that you find as Xml attributes on the fields of the structure is good for you, you can just use the XML serializer to serialize it out:
    XmlSerializer ser = new XmlSerializer(typeof(BRFCKNA1));
    ser.Serialize(...);

  • JDBC to File and RFC adapter

    Hi All,
    In my scenario, i am sending file from a database system to SAP system. Here I am using JDBC/ webserveices adapter at outbound side  to query the database and FILE and RFC at inbound side to send file and workflow notification.
    my requirement is to send file as batch to SAP system(after business hours), send workflow notiication to the responsible person, and when the file is stored on application server then only i should send the notification to the person.
    I know this can be acheived by BPM by using wait step but I am  not sure how to do it only for RFC adapter to kick the notification once the file has stored and confirmed.
    Can anyone help me in this issue.
    Reg
    Sre.

    >
    sre wrote:
    > Hi All,
    >
    > In my scenario, i am sending file from a database system to SAP system. Here I am using JDBC/ webserveices adapter at outbound side  to query the database and FILE and RFC at inbound side to send file and workflow notification.
    > my requirement is to send file as batch to SAP system(after business hours), send workflow notiication to the responsible person, and when the file is stored on application server then only i should send the notification to the person.
    >
    > I know this can be acheived by BPM by using wait step but I am  not sure how to do it only for RFC adapter to kick the notification once the file has stored and confirmed.
    >
    > Can anyone help me in this issue.
    >
    > Reg
    > Sre.
    There are two options,
    1. With BPM you can have the send step for file request an acknowledgment and then have the send step for the RFC call after the previous file send  step.
    2. Without BPM, use the same Business system (single receiver det.) and have multiple interface determination (file&RFC). Use the option maintain order at runtime and have the file interface above the RFC. This will act like an EOIO.

  • IDOC Adapter and RFC Adapter

    Hi experts,
    Q1. What are the configurations steps (Transaction codes) required at R/3 and XI while sending the IDOC to XI? Please provide the list of TCodes required at both sides. if any weblog is exists which provides detail explanation on IDOC scenarios plz provide the path.
    Q2. While sending the IDOC we need to generate partner profile and port. How many types of port exist and wht each port represents?
    Q3. In RFC Sender Adapter we need to create RFC port in R/3 and there we specify Connection type as ‘T’ which TCP/IP……why we use connection type T instead of 3 (which represents connection type as R/3). While communicating with SAP systems we need to specify the connection type as 3.
    Q4. How many types of partner profiles exist and wht each type represents?
    Q5. How to transport design, configuration objects and SLD objects from Development system to Quality system. Please provide me the steps to transport the objects?
    Q6. Once the objects are transported a .tpz file is created wht is the purpose of the file and where it will generated? Suppose if I’ve transported the namespace from Dev to Quality system then at quality side to which SWC this transported namespace is assigned. Do we need to create any SWC at quality system side?
    Cheers
    Faisal

    Hi Abdul,
    for the first one u need to create a logical system and assign that logical system and need to create a port and partner profile and distribute the system,, for that follow this blog
    Steps
    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2)
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    In SLD – System Landscape Directory
    TS for R/3 (Logical system):-Assign the client name created in R/3 as Logical system Name.
    Ts for Third Party (Logical system):-
    BS for SAP R/3 (Logical system):- Assign the client name created in R/3 as Logical system Name.
    BS for Third Party (Logical system):-Enter the XI logical system name.
    In Transaction SALE
    Define and Assign the logical system name.
    2.& 3 ) for the 2nd question the answer was in above u need to create the partner profile and port.
    port can be created as HTTP Port and RFC port which are used to communicate with the R/3 server and depends on the requirement we need to choose the port..
    4. partner profile creation depends on ur scenario, it is a custmized one it purely depends on the customer requirement, there is no specific partner profiles exists in R/3.
    5. For transportation u may choose File level transport or CMS, if u trnasfer through File level it is very easy to maintain and reimport in the production server,, just while exporting from the development server a .TPZ file was created and import this .TPZ file in the production server this gives the entire objects of IR and ID, but when u deal with SLD instead of .tpz there u will be creating .zip file, so u neeed to reimport the file in the production server..
    6. The .TPZ file will be created when u export the objects either in IR and ID..., so as i explained in the above point it will go top the export directory of development server and import in production server with IMPORT directory..
    regards,
    Kishore

  • Offline backup and RFC adapter

    Hello,
    I have a scenario where sap ECC 6.0 send data to XI via RFC adapter. Because we are on SP12 I set Maximum Reconection Delay parameter of sender agreement to make sure that adapter will work when the system is up again. Unfortunatly when in CC-monitoring I get a green light, but in sm59 on ECC 6.0 I get error. Data are not send to XI. Could anyone help me?
    Many thanks,
    Milan

    Hi you are doing RFC----Xi-----scenario....
    now first you have to make t type rfc destination .......you will define program is here and you will be used same program id in sender communication channel(program id is case sensetive)...
    define gateway host and gateway service of your r3 system not xi.....
    you can get the gateway service from SMGW transaction.......it will be like this....sapgw..you have to put the two digit system no of ur r3 system on dots ....like this sapgw02.
    go to tcode smgw >>>>goto>>>>  Logged on clients  and seeyour connection is active or not.....
    then test ur connection sm59....
    thanks
    kunaal

  • What bapi return structure consists

    Hi experts,
        can anybody clarify my doubt regarding bapi's used for data transfer.
    when we r using bapi for data transfer how error transactions will be handled.
    what exactly return structure consists. can we get error transactions log in the return structure.
    plz reply me.
    Regards
    Trinadh.

    Moderator message - Please search before asking
    Please do not spam the forum with this sort of question
    post locked

  • BAPI return

    Hi all,
    I am working on an SOAP to RFC scenario:
    I am able to execute the scenario. I am testing it using SOAP test tool.But i am facing a problem. when we give valid inputs to the BAPi, the BAPI return structure returns correct values, which is mapped to the response msg and the response is also fine, in the testing tool.
    But when i give non-valid values to the BAPI, the BAPI returns an error msg like "partner does not exist" and for some reason i am not able to see this msg in my response msg, instead i get an "XI Exception error in my
    testing tool display. How can i achieve, the BAPI return value to be displayed in my response msg for invalid values?
    Thanks in advance

    Hi,
    I had also faced the same problem in one of my scenarios. What you can do is, you can check the length of the parameter returned by BAPI. If it is zero, it means that non valid value has been passed to BAPI. In this case you have to map some constant to the target field during mapping.
    If the length is not zero, you can map it as it is.
    For finding the length of the field, you can use the standard text function: length. Hope this helps.
    Regards,
    Divija.

  • RFC Adapter - JCO Exception - Please Urgent

    I am developing a scenario from File--RFC integration.  I am using File and RFC adapter to perform this transaction.
    The File Adapter is picking the file properly and the trnaformation (Mapping Program) is also happening properly.  But the RFC is throwing the following error.  I got this error info from the Runtime Workbench.
    Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZPS_XI_ACTIVITY_CREATE in remote system (RfcClient[BAPI_CreateActivity_Receiver]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR
    Error Delivery of the message to the application using connection AFW failed, due to: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZPS_XI_ACTIVITY_CREATE in remote system (RfcClient[BAPI_CreateActivity_Receiver]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR.
    The RFC is executing without any problem when I execute this from the transaction SE37.
    I have created communication channel in Integration Directory in appropriate manner. 
    I also created RFC destination in the XI system (TCODE SM59) and the same is using in the "Receiver Determiiation - Service".
    I have not done any configuration at SAP R/3 side.  Is any config required at R/3 end for this scenario - please let me know.
    Please throw some light on this.  I will greatly appreciate your help.

    Friends,
      Please suggest on this vague problem that I am facing.  Your help would be greatly appreciated.
    1. I am using SAP-PS (Projects & Systems) BAPI 'BAPI_BUS2002_ACT_CREATE_MULTI' to create the activities for a project.  According to this BAPI documentation,
    - First call 'BAPI_PS_INITIALIZATION' before make this BAPI call
    - After BAPI call, we should use 'BAPI_PS_PRECOMMIT' and 'BAPI_TRANSACTION_COMMIT'.
    2. Hence, I have developed Z-Func Module with Initialize, BAPI call - then Pre Commit and Commit.
    3. This is executing from SE37 without any issues.  Other parameters to make a remote call is also set properly.
    4. To make sure that, I made a JCO call from Java Program using PDK for Java.  This is also working fine.
    5. But when I used this in the XI scenario (File-XI-RFC) this is showing ABAP dump and this is invoking from Pre-Commit module.
    I couldn't figure it out why it's happening like this.
    I did lot of troubleshooting and the details are as follows for your reference.
    1. The mapping program is working fine without any issues.  I confirmed this by writing these input values to the file (ofcourse lot of pain) inside the function module.  All the values have been parsed by XI and coming to Func Module as expected.
    2. No issues with logical destinations (SM59).
    3. I have tried other options such as clearing the Cache...etc.
    Hence, please throw up some light.  If any body tried with these kind of BAPI (needs initialize, pre-commit and commit) I really appreciate your effort.
    <b>Can we enable the debugging of func module when the XI makes a call...?</b>  - I tried with Standard options that seems doesn't work.

  • Regarding BAPI Return Table

    Hi all,
    I am having an issues, when the user enters the correct value into an input field then i am getting the output properly. But if he enters any wrong value a message is populated into the BAPI return table. So how do I check if the BAPI return table is empty or not. If it is empty then it has to open the output table and if it is not empty it has to show the error message as an pop-up or table format.
    Please reply, points will be rewarded.
    Thanks & Regards,
    M.Ramana Murthy

    Hi Ramana,
    If you want to capture the message returning from the BAPI which you are using then do the following:
    1.> Drag the line from the BAPI return port and link it to a form or to a table.
    2.> Then go to the form/table click the UIelement and in properties of that assign the default value which you want to display. It may be a message coming out of the BAPI.Through this way you can capture the values coming out of the BAPI
    Regards,
    Nutan

Maybe you are looking for