Exception handling in outbound ABAP proxy

Hi All,
i need to catch exception in outbound abap proxy in two cases:
1. if RFC dest in R3 which is pinging to XI goes down.
2. IF xi server is down.
in both the cases i need to catch the exceptions.
now i written the code in this way:
DATA: v_exceptions TYPE REF TO cx_ai_system_fault.
TRY.
CALL METHOD zirco_o_msg_if_as_req_details=>execute_asynchronous
EXPORTING
output = s_reference.
COMMIT WORK.
CATCH cx_ai_system_fault INTO v_exceptions.
WRITE: 'Exception CX_AI_SYSTEM_FAULT caught'.
WRITE: / v_exceptions->errortext.
WRITE: / v_exceptions->code.
but this code is not working.
can anybody tell me how can i acheive this?

Hi All,
I need to log the error when receiver syatem is down.
Its like this:
Outbound proxy >>>XI>>>File adapter..
Now if xi goes down....means message is succussefully sent from ISD and get stuck in XI then i need to catch this exception in ISD.
Is it possible?? if yes then how??
Kunaal

Similar Messages

  • User-exit/BADI during outbound ABAP proxy call

    Hello,
    I want to introduce certain check during outbound ABAP proxy calls to PI. This is a generic check, failure of which would stop the proxy call to proceed and raise an exception.
    I would like to place this at the generic place which is called for all the outbound ABAP proxy calls, rather than coding this in each and every outbound proxy class as the check is generic.
    Is there some user-exit/BADI where i can introduce this? Maybe within class CL_PROXY_OUTBOUND or somewhere else where i can introduce this check.
    Any help in this regard would be appreciated.
    Best Regards,
    Gajendra.

    Dear Gajendra ,
    i agree with sabrish, you must be having a z report on the application system that must be calling that outbound proxy...may be if the check is generic it may not be related to a proxy so you can code a FM and then call it before you call that proxy in the z report
    Giving points is another way to say thanks

  • Error Handling in Inbound ABAP Proxy with EOIO

    Hi,
    The scenario
    I have a File to ABAP Proxy scenario and since the requirement is that the messages have to be processed in a single queue in the SAP system (i.e. EOIO), the sender file channel was configured to be EOIO. This ensures that all messages that enters the SAP system are put in a single queue and then processed one after the other.
    The Issue
    Now if one of the messages that enter SAP system fails during the processing in the ABAP program, the queue gets stuck and all messages after that go into a scheduled state. And one has to manually clear the errored message in order to continue processing the other waiting messages.
    The Question
    I know this is a default behavior in an EOIO scenario, however is there any way in which if a message fails in the ABAP program then one can automatically push it out of the queue and keep processing the other messages after it ?
    Thanks
    Bharath

    As a general rule I only use EOIO when there is a possibility of dependancy between messages (message 1 must be first and finsihed before message 2 starts). Assuming your just moving the errored message asside, I would assume that EOIO should be just EO.
    Alternatively, change the ABAP proxy to handle the error and return a clean status. Exception handling (try/catch) should be used were ever dangerous code is being used.
    If alerting in the proxy end point is to much trouble - change your proxy to a sync scenario return the error to PI and fire alerts from there <- I think this should be avoided but it will work.
    The main point is the exception handling so that the proxy fails "gracefully".

  • CX_BGRFC_INVALID_DESTINATION during outbound abap proxy call on 7.1

    Hi guys,
    I'm trying to set up a scenario with outbound abap proxy call using the new WS adapter and when I execute the report with the proxy call I'm getting the CX_BGRFC_INVALID_DESTINATION exception.
    I've generated proxy w/o problems, I've set up everything in SOAMANAGER.
    Have you experienced this issue?
    Thanks for your help,
    Olian

    Hi guys,
    so my connection to SLD works fine now and I'm still getting the error. Any other ideas?
    Just in case:  this is my proxy code. Is this correct for using with 7.1 and WS adapter?
    REPORT  Z_PI_PROXYTEST.
    data sender_object type ref to ZCO_PROXYTEST_OUT.
    data out type ZMT_PROXYTEST_OUT.
    data lo_sys_exception  TYPE REF TO cx_ai_system_fault.
    data err_result type string.
    out-ZMT_PROXYTEST_OUT-data = 'sample'.
    try.
        create object sender_object
          EXPORTING
            logical_port_name = 'PROXYTEST'.
        call method sender_object->PROXYTEST_OUT
          EXPORTING
            output = out.
        commit work.
      catch cx_ai_system_fault into lo_sys_exception.
        call method lo_sys_exception->IF_MESSAGE~GET_TEXT
          RECEIVING
            result = err_result.
        write err_result.
    endtry.
    write 'Data has been sent to PI'.
    Thanks for your help, Olian

  • Can we edit SOAP Header for an Outbound ABAP Proxy message?

    Hi,
    Can we add some information such as dynamic configuration to the SOAP header for the outbound ABAP Proxy from ABAP report in SAP Application System?
    Regards,
    Praveen Gujjeti.

    Hi Praveen, have you found soulution for this? Can you share it with me?
    From here http://help.sap.com/saphelp_nw70/helpdata/EN/d6/49543b1e49bc1fe10000000a114084/content.htm
    The help described that:
    Set logging in the message header. This means that this message is logged even if logging is deactivated explicitly in the configuration. The logging information is part of the message header:
    ¡        <SAP:Logging>1</SAP:Logging>
    Activates logging explicitly.
    ¡        <SAP:Logging>0</SAP:Logging>
    Deactivates logging explicitly.
    So it means that we can edit SOAP header for outbound ABAP proxy. But i haven't find the correct method to do that.

  • Exception Handling in webdynpro abap

    Hi
    I have a function call which raises an exception. How do i handle it?

    hi,
    In WD4A, Exception handling in FM is same as We do in R/3. You can check sy-subrc after calling the function module.
    Also you can raise error message by using web dynpro code wizard(control + F7 ) button:
    Select Generate message radio button. You will find number of methods in F4. You can use them as per your requirement
    Example :
    Suppose you call a FM like this in WD ABAP :
    CALL FUNCTION 'F4UT_RESULTS_MAP'
        TABLES
          shlp_tab          = t_shlp_tab
          record_tab        = t_record
          source_tab        = t_HCP
        CHANGING
          shlp              = p_shlp_descr
          callcontrol       = icallcontrol
        EXCEPTIONS
          illegal_structure = 1
          OTHERS            = 2.
    Now after this FM, check the sy-subrc value Like this:
    if sy-subrc = 1.
    <Report message for exception 1>.
    elseif sy-subrc = 2.
    <Report message for exception 2>
    endif.
    Edited by: Saurav Mago on Oct 16, 2009 10:22 AM

  • Handle attachements   in abap proxy

    the like lets about sending the message as an attachment, can u help me out, after receiving an attachment in abap proxy, what are steps need to be done in abap proxy.
    is there necessary that the receiver transport protocol should be HTTPS 1.0

    Hi,
    [SAP Help Proxy Programming: Attachments|http://help.sap.com/saphelp_nw2004s/helpdata/en/a7/3b2a2d45a34a23b75e3b18745c63bc/content.htm]
    Regards,
    Udo

  • How to trigger Outbound ABAP proxy from PI

    Hi Guru's,
    We have one scenario in which we want interface to be run at 5 minute interval in PI but it has to get data from R/3 via RFC or ABAP Proxy (No file interface). Is there any way to trigger PI interface to get data from R/3 and after mapping send it via AS2.
    Thanks in Advance.

    Hi Gyaneshwar,
    What Phani said is correct. Better you go with ABAP proxy, where you can validate the data with the condition, if fails you can raise an alert mail.
    The code something looks like:
    CALL FUNCTION 'Z_UTL_SENDMAIL'
            EXPORTING
              i_email       = gv_sender
              i_toemail     = ''
              i_subject     = gv_subject
            IMPORTING
              e_return_code = gv_subrc
            TABLES
              it_text       = git_text
              it_emails     = git_emails.
        ENDIF.
      ENDIF.
    There is no option to do it from PI.
    Thanks,
    Edited by: Hareenkumar on Feb 24, 2011 10:08 AM

  • Exception handling in synchronous client proxy

    Hi, I have a synchronous outbound proxy-web service scenario. If our Post request (unknown data in the receiver) fails, the receiver system returns a 404 error that results in application error in PI. Now, I want know how to handle CX_AI_APPLICATION_FAULT using the standard fault message type (ExchangeFaultData). I couldn't find any reference for synchronous client proxies using this. I hope you can help me out. Thank you.

    Hi Mark,
    You have a link here How to handle CX_AI_SYSTEM_FAULT in RFC - Code Gallery - SCN Wiki or here https://help.sap.com/saphelp_nw04/helpdata/en/75/a55c3cff8ca92be10000000a114084/content.htm
    I dont know what is your exact problem, you can retrieve certain information in the ABAP code but i usually set a generic message like "Connection unsuccessful" because if you debbug the object the information is so technical to be showed to a client.
    Hope this helps.
    Regards.

  • Outbound ABAP proxy stops working

    Hello experts,
    We have an interface, which sends data from SAP to PI via outbound proxy. It worked before and at some point it stopped working in dev. But it still works in QA and production. I tried to make sure that the related objects in IR and the ABAP sender program are the same between DEV and QA and regenerated the proxy in SPROXY. However it did not work. No message could be found in SXMB_MONI and in the debugging mode, the exception of CX_INVALID_TRANSFORMATION raised when calling EXECUTE_ASYNCHRONOUS.
    The attribute INTERNAL_SOURCE_POS showed red in variable L_TRANSFORMATION_ERROR, which references to cx_transformation_error.
    Some of the called methods are listed below.
    outbound_handler_execut -> CALL_EXECUTE_OUT -> xi_call_outbound( ) -> xi_process_payload( ) -> CALL METHOD cl_ws_payload_handler=>data_render
    It is appreciated if you could shed some lights on this.
    Thanks in advance for your help,
    Shawn

    Hi.
    When you execute Proxy program check in ECC any message created in SXMB_MONI in ECC, of messages were found then shcek the status.
    if no messages then problem with Proxy program , take help from Abaper.
    Regards,
    Raj

  • Error/Exception handling in PI (Inbound Proxy)

    Dear All,
    I need some help in PI Error handling.
    If PI sends data to an ABAP inbound proxy and an error occurs in PI because of type mismatch (e.g. Unable to convert date).
    This error is persistent in the PI monitor, but how do I let the Sender know that an error has occured?
    regards,
    Piyush

    Hi,
    I understand that you have a doubt, if PI sends data to ABAP inbound proxy and an alert reaised due to type mismatch. Now, you would like to know how to acknowledge that sender to know about the alert?
    First of all, get the payload and test in the message mapping, you will get know where exactly you got the error or check in the trace in Moni. You need to identify the issue and let the user know why exactly it failed.

  • Outbound ABAP Proxy Problem

    Hello Friends,
    I am trying to do with that a program abap sends data for SAP XI. I got to create the proxy of the type OUTBOUND in my R/3. When I execute the report abap, doesn’t see a Message in SXMB_MONI.<b>Why?</b>
    REPORT  ZSW_XI_CLIENT.
    data: lo_client_proxy type ref to ZZUCO_MI_HDB_INTMOD_OA,
          wa_ZZUDT_HDB_INTMOD type ZZUDT_HDB_INTMOD,
          wa_ZZUDT_HDB_INTMOD_ITEM type ZZUDT_HDB_INTMOD_ITEM ,
          wa_ZZUDT_HDB_INTMOD_ITEM_TAB type ZZUDT_HDB_INTMOD_ITEM,
          it_ZZUDT_HDB_INTMOD_ITEM_TAB type table of ZZUDT_HDB_INTMOD_ITEM,
          wa_ZZUMT_HDB_INTMOD  type ZZUMT_HDB_INTMOD.
    wa_ZZUDT_HDB_INTMOD_ITEM_TAB-object_index = 2.
    wa_ZZUDT_HDB_INTMOD_ITEM_TAB-fieldname = 'Susi'.
    wa_ZZUDT_HDB_INTMOD_ITEM_TAB-fieldvalue = 'hallo'.
    append wa_ZZUDT_HDB_INTMOD_ITEM_TAB to it_ZZUDT_HDB_INTMOD_ITEM_TAB.
    wa_ZZUDT_HDB_INTMOD-item = it_ZZUDT_HDB_INTMOD_ITEM_TAB.
    wa_ZZUMT_HDB_INTMOD-MT_HDB_INTMOD = wa_ZZUDT_HDB_INTMOD.
    create object lo_client_proxy.
                                      CALL METHOD lo_client_proxy->execute_asynchronous
                                        EXPORTING
                                          output = wa_ZZUMT_HDB_INTMOD.
    commit work.

    Hi Bhavesh
    I have tested it;
      <?xml version="1.0" encoding="utf-8" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
      <SUCCESS><b>Services Processed Without Error</b></SUCCESS>
      </asx:values>
      </asx:abap>
    and Payload was ;
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_HDB_INTMOD xmlns:ns1="http://ifbAG.com/xi/abap-proxy2rfc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <item>
      <object_index>1</object_index>
      <fieldname>This is a string 2</fieldname>
      <fieldvalue>This is a string 3</fieldvalue>
      </item>
    - <item>
      <object_index>4</object_index>
      <fieldname>This is a string 5</fieldname>
      <fieldvalue>This is a string 6</fieldvalue>
      </item>
      </ns1:MT_HDB_INTMOD>

  • Outbound abap proxy class

    Hi,
    I previously succeeded in importing a standard software component for e-recruitment into PI. I was then able to associate this with my own software component in the SLD and create datatype enhancements for the standard SWC in my SWC.
    After that I was able to re-generate a standard proxy class in the e-recruitment system to contain my datatype enhancements.
    I did this a while back and now I have some additional datatype enhancements I want to do and then re-generate the proxy class.
    Here the problem is: When I try to do this again, I get prompted for a SSCR key for the standard class.
    Any suggestions? I was previously able to do the datatype enhancements without any SSCR key needed.
    Thanks,
    Dan

    hi
    You might be trying to change some standard sap objects thats why sscr key is required.
    you can refer to SAP Note 33154 for sscr details.
    re: sap notes and sscr
    Re: how to get the access key
    regards,
    ujjwal kumar

  • Use EOIO on Sender RFC and outbound ABAP proxy calls

    In the comm channel of SOAP and FILE there is a simple flag to set for QOS = EOIO
    In Plain HTTP adapter a QOS parameter can be supplied.
    IDOC uses control record tricks or a Receiver adapter option.
    But what about the RFC and XI adapters.
    The docu states QOS of EOIO for RFC and XI adapters is possible.
    How is set for sender RFC and Sender XI adapters?
    regards
    Phil

    Phil,
    I was discussing with Michal about this.
    I suppose it is not fully EOIO, because you don't send directly from the outbound queue to the inbound queue. The AE service may not have a specific queue for that message, until the queue is associated in adapter module. Maybe (just maybe), if you get unexpected extra processing in the initial AE reception of the message (and hence, before the queue is set, in adapter module), you may have some inconsistencies with the processing order in sender system.
    But again, that is just a speculation.
    I'm not sure what is the behavior it'll have.
    And even if what I speculated is right, it is a really short amount of time.
    But again, EOIO would not be 100% guaranteed (maybe 99% hehe).
    But sometimes (most of the times) that is not enough.
    Regards,
    Henrique.

  • Fault message in asynchronous ABAP Proxy

    Hi,
    I have a question about fault messages in asynchronous ABAP proxy server.
    The configured scenario is SOAP – XI – ABAP Proxy. Between XI and the ABAP Proxy I have configured an inbound asynchronous interface with a fault message, and then I have generated all the classes and implemented some code for exception handling in the ABAP Proxy side successfully.
    When I tested negative cases, the exception raises and it is visible in the SXMB_MONI transaction in the R/3 side, but this exception is not displayed in the SXMB_MONI of XI it just displays a successful delivery to the ABAP Proxy message.
    According the XI documentation it says “<i>In the asynchronous case, you can see a fault message in the monitoring of the Exchange Infrastructure.</i>” But this is not working.
    Am I missing something?

    Hi,
    This parameters are form group RUNTIME.
    Please check it:
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/49543b1e49bc1fe10000000a114084/content.htm
    Regards,
    Wojciech

Maybe you are looking for

  • Problem in Sapscript , After creating a copy of Standard Script

    Hello friends,                    I have copied a standard script WASCHEIN into ZWASCHEIN, now all the data is coming from driver program SAPM07DR. Now there is one field which is not coming from the standard program,                   Is there any w

  • How do I increase memory for Lion install?

    When I try to install Lion, I get the following: "Mac OS X 10.7 requires at least 2 GB of memory." Any thoughts about what is going on?

  • Cursor fetch into

    I have a function, to which i pass a sql statement.In the function using the cursor i get the output of the sql statemnt into a output variable. This function works fine, but for one particular select statement it takes[u] over an hour to execute in

  • Using substring function in the dashboard prompt

    Hi, I want to use a function in the dashboard prompt. Example: Subject Area:Paint --> Products --> Color I want to take second letter of color, describe a label for it and use this label in prompt. The formula is below; CASE WHEN (SUBSTRING(Products.

  • Load Failures extracting from R/3 System. Failures in R/3.

    Hi, The BW job starts the R/3 job and this R/3 job keep failing with the dump.TSV_TNEW_PAGE_ALLOC_FAILED. the job is currently running with package size = 2.000 records. Thanks & regards, Anita