Error Handling for ABAP Proxy sender

Hello Everyone,
I am trying out a scenario of SAP R/3 to Oracle database (ABAP Proxy to JDBC).
I have the following code and it works fine.
CALL METHOD prxy->execute_asynchronous
      EXPORTING
        output = it.
     commit work
  CATCH cx_ai_system_fault .
    DATA fault TYPE REF TO cx_ai_system_fault .
    CREATE OBJECT fault.
    WRITE :/ fault->errortext.
I know that the above Catch block would be used to handle system errors on the sender side.
Please tell me what kind of errors could these be and what I can do to test these errors. ie. I want to  create error situations explicitely and see how they are handled.
Thanks and Regards,
Ashwin

Thanks guys, this was useful.
My scenario is for Asynchronous communication.
I guess Fault messages are used in case of Synchronous communication for handling application errors. So if there was something wrong at the JDBC end then I could use the fault messages.
Have i got this right?
I also came across this piece on Acknowledgements. But is says that they can be used with the following Receivers:
The following receivers support acknowledgments:
ABAP and Java proxies (XI 3.0 SP1 for the latter)
Integration processes
IDocs (note that IDocs only return acknowledgments when they have been configured using the ALE audit)
Receiver adapters support system acknowledgments but not application acknowledgments
My Receiver is JDBC. So I guess I cannot use acknowledgements either.
Hence, I need to know what I can do to replicate the system errors eg. failed server etc...so that I can get catch these errors during sending.
I'll tell you abt what happened earlier.
My XI server was down. I executed the code for the sender ABAP Proxy and it did not catch the error. In SXMB_MONI in the R/3 system, I could see the messages queued up. When the XI server started, the messages were transferred to XI.
I need to handle such errors...ie. If  the server is down or message did not reach XI then my ABAP program that sends data via ABAP proxy needs to know that something went wrong.
Thanks and Regards,
Ashwin

Similar Messages

  • Error handling in abap proxy

    Hi,
    In my scenario, I have written code in the execute_synchronous method of the abap proxy in ECC. I want to capture all possible errors that might occur here and for all of them i want to capture the message id and the text and send it out. what kind of possible errors/exceptions can occur and how to handle them. My proxy class simply selects data from multiple tables in ECC and returns the same.
    thks

    Hi,
    for outbound proxies the error handling should be done within R3 itself and there is no need to send errors to XI or receiving system for that matter. You would want someone from R3 side to take a note of it.
    For Inbound proxies, you will have to implement the Fault messages
    Fault message types are designed for application-specific errors that occur on the inbound side and that are reported back to the sender or persisted in monitoring.
    ·        In the synchronous case, when an application-specific error occurs on the inbound side, instead of sending a response message back to the sender, the application can send a fault message to handle the error.
    ·        The fault message of the application for an asynchronous ABAP server proxy is persisted for monitoring. In the case asynchronous of Java server proxies, the fault message is part of a negative application acknowledgement (see Acknowledgments).
    Application-specific means that the application on the inbound side triggers the error itself because, for example, the request message did not contain sufficient information.
    For more information on the same.
    http://help.sap.com/saphelp_nw04s/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    In your case, since you said that you are selecting data from some tables, the possibility is that an entry is not found in the DB tables you will have to simply populate the fault message data and raise an expection CX_FM. It also depends on what error handling requirements from the Business .
    regards,
    Advait.

  • [MESSAGE.GENERAL] How can take the actual error text for ABAP proxy error?

    Hi...
    I'm a ABAPer.
    I got to create outbound abap proxy for synchronous server proxy and described below.
    My problem is program can not catch the actual error message when occurred error during send data to XI.
    The return message is just 'MESSAGE.GENERAL'.
    But according to the XI part, 'Key error' is actual reason.
    So... how can i take the actual error text like 'Key error'?
    <b>* Only MESSAGE.GENERAL is return message for all kind of errors.</b>
    Thanks.
    Below----
      TRY.
          CREATE OBJECT abap_proxy.
          CALL METHOD abap_proxy->execute_synchronous
            EXPORTING
              output = gs_out
            IMPORTING
              input  = gs_in.
      Exception Handling
    <b>    CATCH cx_ai_system_fault  INTO  go_sys_exception.
          g_sys_result = go_sys_exception->get_text( ).</b>
        CATCH cx_ai_application_fault INTO go_app_exception.
          g_app_result = go_app_exception->get_text( ).
      ENDTRY.
      COMMIT WORK.
    Return status 'D' is succeeded.
      if  gs_in-sales_group_rer_sap-xstat <> 'D'. 
         WRITE:/ 'System Error Message      :', g_sys_result.
         WRITE:/ 'Application Error Message :', g_app_result.
      endif.
    *--Result--
    System Error Message      : MESSAGE.GENERAL
    Application Error Message :
    Message was edited by: Miju cho
    Message was edited by: Miju cho

    Thanks guys, this was useful.
    My scenario is for Asynchronous communication.
    I guess Fault messages are used in case of Synchronous communication for handling application errors. So if there was something wrong at the JDBC end then I could use the fault messages.
    Have i got this right?
    I also came across this piece on Acknowledgements. But is says that they can be used with the following Receivers:
    The following receivers support acknowledgments:
    ABAP and Java proxies (XI 3.0 SP1 for the latter)
    Integration processes
    IDocs (note that IDocs only return acknowledgments when they have been configured using the ALE audit)
    Receiver adapters support system acknowledgments but not application acknowledgments
    My Receiver is JDBC. So I guess I cannot use acknowledgements either.
    Hence, I need to know what I can do to replicate the system errors eg. failed server etc...so that I can get catch these errors during sending.
    I'll tell you abt what happened earlier.
    My XI server was down. I executed the code for the sender ABAP Proxy and it did not catch the error. In SXMB_MONI in the R/3 system, I could see the messages queued up. When the XI server started, the messages were transferred to XI.
    I need to handle such errors...ie. If  the server is down or message did not reach XI then my ABAP program that sends data via ABAP proxy needs to know that something went wrong.
    Thanks and Regards,
    Ashwin

  • Cfg Error Handling For E-mail Sending in B1iSN

    Dear All,
    i would like to configure E-mail in B1iSN for any error in processing. I tried alot but didnt get any working solutions.
    Please let me know if any one have configure the working of Email Sending on Error in B1iSN.
    Regards,
    Amit Kumar

    Hi Marc,
    I am sending message using Business Workplace transaction SBWP and the type of address is "Internet Address".
    Regards Pulkit

  • Prerequisites to configuration for ABAP Proxy -???

    My scenario is file->XI->R/3(abap server proxy).
    Xi and R/3 are 2 seperate business systems
    -Abap server proxy created on R/3 business system. R/3 client 550
    -Xi client 400.
    -SLD is common for both XI and R/3
    <b>My question is in reference to the below message thread:</b>
    <b>1.I  understand all the below configuartaion has to be done on R/3 business system, tell me am I correct</b>
    <b>2. are these configuartion needed for <u>client proxy as well as server proxy</u> also?</b>
    HTTP_RESP_STATUS_CODE_NOT_OK
    The prerequisites to configuration for ABAP Proxy include: (landscape dependent)
    1. The business systems should be based on SAP Web AS 6.20 and SAP Web AS 6.20 kernel patch level above 1253
    2. You have installed the XI Add-On in each of these business systems as described in the Installation Guide SAP Exchange Infrastructure 3.0
    3. The business systems and your central Integration Server are maintained in the System Landscape Directory (SLD).
    Configuration required on the Business System:
    1. Create HTTP connection in the business system.
    Configuration Details:
    Technical Setting:
    1. Following Inputs are required for technical setting
    1 Connection Type: H
    2 Target Host: System name
    3 Service Number: HTTP Port name
    4 Path Prefix: /sap/XI/engine/?type=entry
    Logon Security
    On the Logon/Security tab page, enter the following logon data:
    1 User: XIAPPLUSER (for example); this user should represent the sending business system (see also the SAP XI Security Guide under Service Users for Message Exchange).
    2 Password: the password you have specified for this user
    3 Client: SAP XI Integration server
    4 Language: Language required
    2. Configuration Business system as local Integration Engine.
    1. Goto Transaction SXMB_ADM
    2. Choose Edit --> Change Global Configuration Data.
    3. Select Role of Business System: Application system
    4. Corresponding Integration server: dest://<HTTPDESTINATION>. Here <HTTPDESTINATION> SAPISU_XID created in step 1. Dest://SAPISU_XID.
    5. Under Specific Configuration Data you can specify additional configuration data
    1.Select the relevant category under Specific Configuration Data.
    2.Choose Change Specific Configuration Data.
    For ABAP Proxies, Add the following configuration:
    1.Category RUNTIME
    2.Parameters: IS_URL
    3.Current Value: dest://SAPISU_XID
    Configuration of the Integration Engine
    3. Connection between Business System and System Landscape Directory
    1. Create RFC destination (TCP/IP) LCRSAPRFC and SAPSLDAPI for the SLD connection.
    1.Execute transaction SM59 in the business system.
    2.Choose Create.
    3.Enter at least the following:
    1.RFC Destination: LCRSAPRFC
    2.Connection Type: T
    3.Description: <your description>
    4.Choose ENTER.
    5.Choose the Technical settings tab page and do the following:
    6.In the Program ID field under Registered Server Program, enter LCRSAPRFC
    7.This program ID must correspond to a program ID specified in the RFC engine settings of the SAP J2EE Engine on the Integration Server host.
    RFC Destination
    2. Maintaining the SAP J2EE Connection Parameters for LCRSAPRFC and SAPSLDAPI in SAP J2EE engine
    1. Goto J2EE Engine
    2. Choose Cluster --> Server --> Services. JCo RFC provider
    3. Under RFC destination specify the following:
    Program ID: LCRSAPRFC
    Gateway Host: <Integration Server host>
    Gateway Service: <Integration Server gateway service>
    Number of process: 3
    4. Under Repository specify the following:
    Application Server: <Integration Server host>
    5. Choose Set.
    3. Maintain SLD access details in Transaction SLDAPICUST
    1. You can reuse this program ID for all Business systems
    2. If there is HTTP error during connection, first run transaction SLDCHECK in the Business system. Also check that HTTP connection is working fine.
    3. In XI Adapter use HTTP connection rather then giving R/3 input details as this is easier to transport and maintenance
    4. One receiver adapter can be used for all Interfaces connecting to a Business system.
    <b>Thanks for your reply in adavnce.</b>
    KK

    2. are these configuartion needed for client proxy as well as server proxy also?
    >>>>
    the configuration is one time thing and your R3 will act as a server or client according to the data being sent or received.
    In R3 a point to be noted is that in SXMB_ADM -> Intg. Engine Confg. -> Role of Business System sud be as a Application System.
    Ref: /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    Message was edited by: Shabarish Vijayakumar

  • Error handling for work item

    Dear All,
         When I trigger my workflow from SWUE,the workflow containers must be populated with agent name.But it is populated only with 'US'.Please suggest.
         On the other hand, when I trigger my workflow from ME21N,the workflow goes into error.The error statement is "Exception occurred - Error handling for work item 000000954797".What is the problem?
        Please suggest the solution for which I will be grateful.
    Thanks and regards,
    S.Suresh

    Dear ,
    I use bus2012 as BOR and event as created.
    When I create purchase order from ME21N,bus2012 is not triggering.Instead FREBUS2012 gets triggered which is a subtype of bus2012.
    At SWETYPV,event linkage is activated only for BUS2012 and there is no entry at SWETYPV for FREBUS2012.
    Though I configured the workflow with start events:BUS2012->created,why FREBUS2012 should trigger my workflow which is not seen in SWETYPV?How to override it?Please suggest.
    There is no start conditions for my workflow.Whenever purchase order is created,this workflow should trigger.
    So,the parameters passed between even to workflow are 
    &_EVT_OBJECT&    ->        &BUS2012&
    &_EVT_CREATOR&   ->     & WFINITIATOR&
    Thanks and regards,
    S.Suresh

  • How to configure systems for ABAP Proxy use

    Can somebody please point me to the documentation regarding the configuration settings for the use of ABAP proxies, on both the XI and client sides? I have performed readiness checks as specified by SAP, the ABAP Proxy tests all pass, yet when I write a program with a proxy, the message does not appear in the integration engine monitor.
    I think I have missed something in configuration settings, but don't know for sure. hence the request.
    Kind Regards,
    Tony.

    Hi,
    Please follow the below configuration steps for ABAP proxy:
    ABAP Proxy configuration:
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    Thnx
    Chirag

  • Creation of package structure for ABAP proxy scenario

    Hi All,
    I have a doubt on package structure used for ABAP proxy scenario. What is the specific reason to create a four level package structure? Can some one please explain? Thanks in advance.
    Regards,
    Sudheer.

    Hi Sudheer,
    Can you pls clarify what do you mean by 'four level package structure' ?
    Are you referring to the ABAP structures that get created during creating the proxy by SPROXY transaction ? These structures get automatically created. We simply have to write the code using these structures.
    Or do you mean the 'package' which is mandatory to create a transportable ABAP object ? i.e. transport from Development to Staging and then Production.
    Regards,

  • Error handling for a save button

    hi. how do i get error handling say in a button, and then to give an error to the user, without crashing the whole application. can any one point me to any articles, tried searching , and not finding wxactly what i am looking for. thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

    hi. maybe i did not make my self clear. okay, here's how this button works, you have a open dialog button, and a open dialog box, you click the file, and it loads in the data grid. now you click on the save button, and a message says file was saved, need
    try / catch code, to catch this, if the file was not saved, or other errors, then a error friendly message, any code for this. read the article, but need a specific error handler for the save button, like i had for the open dialog file dialog box. any suggestions,
    or links, to look at sample code. thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

  • Error handling for RGB values

    Hi
    I am having problems doing error handling for RGB values. I have a Java applet with 3 JTextFields whose values are parsed as int variables and stored as ints. If a value is entered that is not a value between 0 and 255 is entered, the appropriate field/s should be set to an empty string.
    The problem I am having is that I am using try/catch block to try to parse as an int but then it breaks out of execution completely.
    I hope this makes sense and that someone can help.
    Thanks!

    this is because your code is probably inside one giant try catch block, what you need to do is have small ones in places where you do the parsing.
    post code and i can show you how to modify it

  • Option for error handling for DTP, ' no updata, no reporting" and "deactiva

    Hello Gurus,
         option for error handling for DTP, ' no updata, no reporting" and "deactivated" , please give some explanation and instance for them?
    Many Thanks,

    On the Update tab page, specify how you want the system to respond to data records with errors:
                                a.      No update, no reporting (default)
    If errors occur, the system terminates the update of the entire data package. The request is not released for reporting. However, the system continues to check the records.
                                b.      Update valid records, no reporting (request red)
    This option allows you to update valid data. This data is only released for reporting after the administrator checks the incorrect records that have not been updated and manually releases the request by setting the overall status on the Status tab page in the monitor (QM action).
                                c.      Update valid records, reporting possible
    Valid records can be reported immediately. Automatic follow-up actions, such as adjusting the aggregates, are also carried out.
    http://help.sap.com/saphelp_smehp1/helpdata/en/42/fbd598481e1a61e10000000a422035/content.htm
    Hope it helps.
    rgds, Ghuru

  • Error Handling for Outbound IDOC - COSMAS (Cost Center Master)

    Hi,
    I need to trigger a mail to SAP inbox whenever a outbound idoc fails for any reason.
    I know how to do it for inbound or outbound transaction data, but not sure how to do error handling for outbound master data.
    Could one of you help me understand the same.
    Thanks in Advance,
    Vinoth

    Hey Vinoth,
    Do you want decide the recipient of the mail dynamically? am asking because if you give the USER NAME in the partner profile and when ever a IDOC fails a mail will automatically reach the user inbox automatically
    let me know if i answered ur question.
    Thanks,
    Santhosh

  • Latest Error Handling for Dynamic Actions

    Is there any documentation on the Latest Error Handling for Dynamic Actions?

    BillC,
    Interesting that I was looking around for the same thing after seeing a Foreign Key violation in my application.
    I found this article by Patrick Wolf:
    APEX 4.1 – Error Handling Improvements – Part 1
    http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    I believe you need to be on 4.1 or later though.
    Thanks,
    Joe

  • What are the pre-requisite for ABAP Proxy communication?

    What are the pre-requisite for ABAP Proxy communication?

    hi,
    How to create proxy.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
    How to Activate Proxy.
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    ABAP Server Proxies (Inbound Proxy)
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    OutBound Proxy (Client Proxy)
    /people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    File to R/3 via ABAP Proxy with good example
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    Debug your inbound ABAP Proxy implementation
    /people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
    Synchronous Proxies:
    Outbound Synchronous Proxy
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-%2bpurchase%2border%2bsend
    Inbound Synchronous Proxy
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2binbound%2bprogram%2b-%2bsales%2border%2bcreation
    regards
    srinivasreddy

  • 3.2 to 4.1 Upgrade - Error Handling for Unavailable Database Links

    Hi,
    I'm having a 3.2 -> 4.1 upgrade issue related to error handling for failed database links.
    I have a conditional Exists button on a page that has a SQL query to linked tables. However, for the 10 minutes every day where the target of the database link is getting a cold backup, the query fails. In the old 3.2 apex I simply got an error inside the region where the button is located but otherwise the page was still visible:
    "Invalid exists/not exists condition: ORA-02068: following severe error from MYDBLINK ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist"
    However, in apex 4.1.0.00.32 I get the following unhandled error, and clicking "OK" takes me to the edit page when logged in as developer.
    i.e., the page can't be run at all while the database links are failing in this one region.
    Error Error processing condition.
    ORA-12518: TNS:listener could not hand off client connection
    Technical Info (only visible for developers):
    is_internal_error: true
    apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
    ora_sqlcode: -12518
    ora_sqlerrm: ORA-12518: TNS:listener could not hand off client connection
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 4
    component.name: Current Alerts
    error_backtrace:
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 1041
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 687
    ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 272
    General users see this:
    Error Error processing condition.
    ORA-01034: ORACLE not available ORA-02063: preceding line from MYDBLINK
    clicking "OK" takes user to another page, not sure how apex decides which, but not a concern at the moment.
    I've done a search and read the page http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/ but the new apex error handling isn't clear to me, and I don't know if the apex_error_handling_example provided on that page would be applicable to this situation.

    Thanks Patrick.
    The PL/SQL Function Body returning boolean condition with:
    begin
        for l_check in (
          SELECT 1
           FROM myview@MYDBLINK
          WHERE ... ) loop
            return true;
        end loop;
        return false;
    exception when others then
        sys.htp.p('Invalid exists/not exists condition: ' || sys.htf.escape_sc(sqlerrm));
        return false;
    end; Resulted in a similar issue:
    Error Error processing condition.
    ORA-04052: error occurred when looking up remote object MYLINKUSER.myview@MYDBLINK
    ORA-00604: error occurred at recursive SQL level 3
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-02063: preceding line from MYDBLINK
      Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
    ora_sqlcode: -4052
    ora_sqlerrm: ORA-04052: error occurred when looking up remote object MYLINKUSER.myview@MYDBLINK
    ORA-00604: error occurred at recursive SQL level 3
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-02063: preceding line from MYDBLINK
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 4
    component.name: Current Alerts
    error_backtrace:
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 904
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 588
    ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 148However, I created a view with the same query:
    CREATE OR REPLACE VIEW v_localview (ALERT_1)
    AS
    SELECT 1
      FROM myview@MYDBLINK ...then change the condition to look at the local view:
    begin
        for l_check in (
          select alert_1 from v_localview ) loop
            return true;
        end loop;
        return false;
    exception when others then
        sys.htp.p('Invalid exists/not exists condition: ' || sys.htf.escape_sc(sqlerrm));
        return false;
    end;As a view is simply a query I'm surprised this should make any difference but it now looks similar to the 3.2 error, inside the region, when the linked database gets its morning cold backup, and this is fine:
    Invalid exists/not exists condition: ORA-12518: TNS:listener could not hand off client connection

Maybe you are looking for