BPM - RFC exception handling

Hi,
I have a Syn-RFC call in my BPM. I would appreciate help regarding the exception handling on the RFC.
Ideally the RETURN parameter in RFC will be populated if theres an error. The BPM needs to check if there are entries in RETURN, if so then stall the message in MONI as error and mail support with contents of RETURN. only if RETURN is empty (success), it should go ahead with next step.
Thanks.

What ERP version are you working with?
If 4.7+, consider using ABAP Proxy instead of RFC.
There, you can define a fault message in the interface and it will be triggered if there is an exception at server application.
Regards,
Henrique.

Similar Messages

  • BPM Process - Exception handling or timeout issues?

    Hi Guys,
    I have a BPM process as below.
    1. Receive step: Receive the file with multiple transactions.
    2. Transformation step: Split the file into individual transactions
    3  Block step which includes  -- par for each mode
    1. Send Step (Synchronus): Each individual transaction needs to contact the 3rd party system and get the response. --  Do i need to handle any exceptions here  ?
    2. Container : Collect all the responses 
    Block ends
    4. Transformation: combine all the responses in to a single file
    5. Send Step: synchronus -- send the above single file and get the response back
    6. Transformation : Transform the above response into the target structure.
    7.  Send: send the message asynchronusly to the target system
    I need suggestion regarding the exceptional handling or any time out issues, i need to take care of.
    any suggestions would be really appreciated
    Thanks,
    Raj
    Edited by: raj reddy on Feb 12, 2009 10:12 PM

    Hi,
    I) For the Block holding the Sync Send, create an Exception Block. (right click on Sync Send -> Insert   -> Exception Branch)
    II) Name the Exception block (ex: exceptionHandler).
    III) in the Sync Send step ->Properties -> Exceptions -> in System Error - add exceptionHandler.
    IV) Now within the Exception handler block you can create containers to hold values from payload, throw exception as email etc).
    This will cover your sync send step incase there is an error while sending the request of a timeout during receiving the response.
    You can also do the same for the Step 7) Asycn send - if required.
    Another suggestion in your question Step 6) can be done outside the bpm, when you do the interface determination for that Asycn Send you can add the Interface mapping that will map the responses to the target structure.
    Doing this will reduce one step in your BPM. For further information in how more you can fine tune your bpm, read this blog - https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5113. [original link is broken] [original link is broken] [original link is broken]
    All the best.
    Regards,
    Balaji.M

  • RFC: Exception handling

    Hi there,
    after playing a bit with external xml files provided by my
    application i'm ready to go to the next topic on my ToDo-List.
    How could one implement a good and stable technique for
    exception handling? I'm talking about the interaction from spry to
    our Web Framework which throws an error sometimes.
    My current idea is that the server side framework could
    return some kind of Error XML format which contains the exception
    message and so on. This would require functions on client side to
    precheck the server output.
    Imho the best place for this is inside the XMLDataSet
    constructor. When catching some bad XML file internal error
    messages could be send using the already existing techniques OR by
    providing an public function which then should be overriden by an
    selfwritten one, e.g. to put it into my own `error box`.
    Also, some kind of internal statemachine in XMLDataSet may
    help a lot. That way each access to functions which aren't working
    at the moment could be loggend and catched by an selfwritten
    function.
    I hope you get the idea,
    what do you think?
    Best regards,
    Sebastian

    Better error handling and error handling hooks is on the list
    of things to do.
    The way I see it, there are several types of errors that can
    occur:
    1. Server returns valid XML, but it's XML that describes an
    error instead of the data requested.
    - I believe this is what Sebastian was mentioning. I was
    actually thinking of allowing a hook for developers to catch and
    handle this case and perhaps leverage the states mechanism to let
    them change the dynamic region markup used to display the error
    since the data references in this error XML would be different.
    2. The server returns an error. (Invalid URL or Server Error)
    - This could be handled with states, but we need to expose
    some data references, or set the data set to contain a known data
    set schema that would allow the designer to show more info about
    the error.
    3. The server returns XML but uses a mime-type that is not
    understood by Spy or the XML parsing code built-into the browser.
    - I believe it was Doug [?] that had a patch that *always*
    forced the data set to try and parse the XML string in the response
    if the response didn't contain an XML DOM. My one paranoia about
    that is that the server could actually be returning something that
    is not XML, in which we would still fail and perhaps choke
    somewhere else. I need to do some testing in that area.
    I was thinking perhaps we should add something to the
    XMLDataSet constructor that allowed a user to specify mime-types
    for formats they knew were XML, but didn't use one of the standard
    XML formats.
    4. The browser chokes on "not-well-formed" XML.
    - This is an interesting problem. IE silently fails when the
    parser chokes, but Mozilla creates an XML DOM tree that reports the
    error which does *not* match the XML string from the request
    response. I had to add code to spry to detect when this happens.
    5. An exception is thrown during Spry processing of XML data.
    - This will require more programming on our part to handle
    more cases.
    --== Kin ==--

  • RFC Exception handling in BPM

    Hi All,
    I currently have a scenario where I receive an IDoc, then need to make an RFC call to another R/3 system to get some additional data, and then transform and send the resulting message out to another system.  There is a possible case where the R/3 system will send back a fault message with some meaningful text which we would like to map to a Status IDoc to send back to the source system.  The problem is, I can't seem to find a way to be able to use the fault message in a map in the BPM.
    Is this a limitation of XI, or is there some way to get this fault message into the BPM?

    Fault message propagation still functions the same for BPM....now instead of populating it as a Fault message can you ask the end system to populate the error (if any) as a response....may be the response RFC will be required to have the error structure.
    Now in BPM decide whether this is an error....if yes then create the IDOC....if not then discard the message.
    In one of my project requirements we had a similar req wherein there was proxy at receiving end....we updated the proxy (ASYNC) and if any error then another proxy would be populated giving error details (in case there was an error)....both the flows ASYNC....once we got the details we would do further processing.
    Regards,
    Abhishek.

  • Asynchronus RFC  exception handling

    Hi,
    I have scenario File-XI-RFC.I have created an RFC enabled FM in R/3 and raising an exception if some errors occurs.I want that exception should be visible in sxmb_moni when RFC raises that exception.I am not using
    BPM.How can I use Fault message for this in my scenario.
    Any help will be appericiated.
    Thanx
    Rekha

    Hi Michal,
    I have seen that thread.It seems similar to my scenario except I dont have to send the response back.I want to have that fault message in SXMB_moni for monitoring.
    How I will achive the step3 in my case.
    This is my scenario.
    Outboundinterface-FILEMI   "To pick data from file
    Inboundinterface - ZRFC_TST.
    >>Step3: In interface mapping with target interface as ZRFC_Tst you will have to do three mappings
    >>3.1 Request
    This is ok I will map my FILEMI - ZRFC_tst.
    >>3.2 Response : map result
    What will be my source and target interface?
    >>3.3 Fault
    >>map zrfc_tst.Exception to FaultMessage
    What will be my source and target interface?
    How will I handle these three interface mapping in Interface determination in configuration?I dont have to send back  response and exception back to any system.Instead  I will keep them in monitoring.
    I can see this in sap help for fault message type but how we will achieve it.
    The fault message of the application for an asynchronous inbound interface is persisted for monitoring.
    Thanx for the reply and hope to hear from you on this.
    Rekha.

  • How to implement Exception Handling error in IDoc to File and RFC to File

    Hi,
    We are implementing the two below scenarios :
    1. IDOC to File
    2. RFC to File
    We have to implement the Exception Handling for the above two cases. Kindly could you provide the inputs to implement the Exception Handling for the above two cases.
    Please provide the precious inputs to implement this.
    Thanks,
    Ramesh

    Hi Ramesh,
    The exception handling for idocs
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7f1543d711d1893e0000e8323c4f/frameset.htm
    Exception handling in File to IDoc Scenario
    For RFCs
    Re: Passing SAP Exceptions to a sync SOAP Call
    Error Handling when using RFC
    Exception Handling while Calling RFC - BPM
    handle exceptions in remote function modules
    Regards,
    Prateek

  • Synchronous RFC exception BPM

    Anybody has successfully getting the RFC.exception in a synchronous call via BPM? What i mean, is to get the RFC.exception then use it inside BPM.
    I have already searched the forum, and i think nobody have done it before. Any clue guys??? Thank you very much in advanced....

    Sorry, i still dont get it. Here i will illustrate my problem.
    I got an abstract sync message interface (lets call it: MIAS_RFC) with structure like this:
    1. Output Msg: From RFC
    2. Response Msg: From RFC.response
    3. Fault Message: From RFC.exception
    I use MIAS_RFC in a SEND node in my BPM inside a block with exception handler branch for my RFC exception handling.
    My purpose is to map the RFC.exception to other message interface abstract async inside the exception handler.
    How can i do this? You said earlier that i should create another sync abstract message interface (MIAS) then use it in a mapping...Am i correct? Could you please describe to me more detail (sorry about this ) Thank you so much....

  • Exception handling of Transport acknowledgement in asynchronous send in BPM

    HI,
    A silly question, but your help would be greatly appreciated..
    - I have a asynch send step in a BPM for sending data to the target system through RFC
    - It has acknoweledgement property of this send step is set to transport acknowledgement
    - The exception property of this send step is set to throw a 'RFCException'
    - This send step is inside a block
    - This block also has an Exception branch which catches this 'RFCException'
    - now my RFC channel failed for some known reason, but the flow never went into the Exception branch
    IS this behaviour of the 'transport acknowledgement' property of an asynch send step in BPM expected ?
    What should I take care so that if my RFC receiver channel throws an exception, the flow of my BPM goes to the exception branch ??

    - now my RFC channel failed for some known reason, but the flow never went into the Exception branch
    IS this behaviour of the 'transport acknowledgement' property of an asynch send step in BPM expected ?
    What should I take care so that if my RFC receiver channel throws an exception, the flow of my BPM goes to the exception
    branch ??
    When an exception is caught by the Transport Acknowledgement it will trigger the Exception branch (if the send step is defined inside a Block with an Exception Branch)
    I think you have not defined (and then assigned) a proper Exception Handler for the Block.
    Click on the Block and define an Exception Handler......click on the Exception Branch and then select the Exception Handler from the dropdown......if this is not done then the Exception Branch wont be executed.....perform a check on your BPM in IR (using F7) you may get some warnings.
    Regards,
    Abhishek.

  • Problem with RFC exception in BPM

    Hi,'
    I have created control step for RFC exception. Assigned the alert catagory and given alert message.
    i have below steps:
    Transformation-control-send RFC-cancel process.
    while trying to test i changed ip address of rfc channel and tested but i am not receiving any alert but messages are getting stucked in BPM with error -
    permanent error in message proccessing
    could you please suggest how to trigger rfc execption

    Suggestions..
    refer  BPMPatternReqRespTimeout for triggering exception.
    Basically you might change the sequence of steps as follow
    Create Block with deadline branch where you use control step to trigger exception and have another branch exception handler  and in that branch you have transformation and senderror.  This will help.

  • BPM Exception Handling control step

    Hi,
    Does anybody have any idea, whats the variable we need to pass in the control step of exception handling  in BPM? and how to map the error message back to the RFC Response.
    I had Transformation step, in that mapping is also there.
    Is there any ideas??.
    Thanks,
    Raj.

    Hi,
    The requirement was to send the exception that occured to a target (say file).
    <i>insert a block for the exception</i>
    You cannot place an exception step without a block right... thats what i mean by the above statement.
    Now, just after the exception has taken place, if i put a transformation step, and a send step, you will be taking care of sending the exception message to the target.
    <i>how to build the exception message ? It should map from what?</i>
    You could build a data type for the exception.
    In the mapping, you could map it to constants. For ex:
    if you build your DT as
    <excep>
    <code/>
    <desc/>
    </excep>
    You could map the description to a constant string "timeout".
    After this, the send step will send the message to the file, through the abstract interface that you create.
    Regards,
    Smitha.

  • Exception Handling Problem In BPM

    All
    I am facing an exception handling problem I am using BPM and , I have caught exception in the transformation step but when there is any data problem in that mapping(mentioned in the transformation)
    it is not throwing the exception . is there any option to collect these type of system exception in  the bpm and give a alert thru mail
    is there any way to collect these type of exception happened in the BPE and raise alert thru generic alert
    Thanks
    Jayaraman

    Hi Jayaraman,
        When you say there is any data problem, does that fail the message mapping that you have defined?
    If the message mapping used in the tranformation fails, it should raise an exception in the BPM.
    Did you test the message mapping using the payload and see if it really fails or not?
    Regards,
    Ravi Kanth Talagana

  • How to handle RFC exception in XI

    We have developed a proxy-> RFC scenario. But its not able to handle the RFC exception. In case of an exception the response payload is as below
    <rfc:Y_BAPI_GET_POSTING_PERIOD.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>Screen output without connection to user.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>044</Number></Message><Attributes><V1>DYNPRO_SEND_IN_BACKGROUND</V1></Attributes></rfc:Y_BAPI_GET_POSTING_PERIOD.Exception>
    Is it correct way to get exception from RFC in such a way or the error/exception text should come in RETURN part of the RFC response? 
    What is the best approach or solution to handle the sync. RFC call exception in XI?

    Hi,
    You can create a Fault Message Type and map the RFC exception text to this.
    In the interface mapping in addition to Request and response
    mapping you will get an additional fault message mapping.
    This will handle your exception properly.
    Regards,
    V.Ramya

  • Exception handling in rfcs and bapis

    exception handling in rfcs and bapis

    Hi Jayakrishna,
    In General , there are non execptions in BAPIs, because of the reason, that the exception raised in a SAP envoronment may not mean anything for a non SAP initiator. All the exception situations would only fill the return table(TYpe BAPIRET2 or something like that). If you read that table after the call to the bapi, you can understand what has gone wrong.
    Regards,
    Ravi

  • Exception handling without BPM

    Hello,
    I have done exception handling with BPM.
    i.e. when there exception comes in mapping I have use Block  Exception Handler.
    Can this be done without BPM.
    Please snd me blog for it.
    Regards

    Hi,
    As explained by Michal it is correct, but in message mapping , we can raise an alert .
    See the below links
    Alerts with variables from the messages payload (XI) - UPDATED - /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    Triggering XI Alerts from a User Defined Function - /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Regards
    Chilla

  • Exception handling branch not executing in BPM

    Hi all,
    We have a problem with exception handling in BPMs.
    We have created an exception branch in a block and a transformation step in it.  However, the branch doesn't get executed in case of exceptions.
    Any ideas?  Is this a known problem?
    Many thanks,
    Aldo

    Hi VJ,
    The exception name can only be selected from a list.  There is no chance of mistaking/misspelling in there.
    That is fine as it is.  I am quite sure about it.
    Any other ideas?
    I found SAP note 1039330 but we are already on patch 12 and that correction was released on patch 12.
    Thanks, regards,
    Aldo

Maybe you are looking for

  • Error Installing Oracle SOA Suite 10.1.3.1

    Hi Gurus, I was in the process of installing Oracle SOA suite 10.1.3.1 on Windows 2003, the installer seemed to take a lot of time at the 92% point, a closer examination that was the point at which the opmnctl was starting the services. After that, t

  • Prob in po creation

    hi all, I am very thankful to all of u.I am able to create a single po using bapi_po_create1 having any no of item .Plz tell me how to get more then one po. My program works fine for one po and n items but It doesn't work when I consider more then on

  • External hard drive doesn't work on any other machine but my Mac since I connected it to the Mac

    My external hard drive used to work on any machine. I watched movies on my tv, putted the movies on the hard drive using my pc. Since I connected it to my new MacBook Air, it doesn't connect to anything else anymore! I hope it's something in settings

  • Streaming a downloaded movie onto Apple TV

    I downloaded a movie from the internet of which the files are in vob format. I can play the movie fine on my iMac through DVD player. How can I stream this this movie to my HDTV through Apple TV using Airplay? Home Sharing is turned for both the iMac

  • AP interface tables import

    dear all, when i was trying to import data from the interface tables of the AP (in my case only AP_INVOICES_INTERFACE and AP_IMVOICE_LINES_INTERFACE), i ran a request and request report said that the total invoices imported is zero and the total reje