How to show custom error message in WebADI Excel template?

Hi,
I've  created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
WebADI Interface API Returns is set to  "Error Message".
I'm using  raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL  is not populated on the excel template.
Instead it is showing "SQL exception occurred during PL/SQL upload".
Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
TIA
Narasimha

The custom API errors are visible in the BNE log but not on the Excel.
BNE Log=>
12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API.  Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
ORA-06512: at line 1
12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
ORA-06512: at line 1
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
  at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
  at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
  at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
  at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
  at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
  at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
  at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
  at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
  at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
  at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
  at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
  at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
  at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
  at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
  at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
  at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
  at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
  at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
  at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
  at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
  at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING        BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR          BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection.  There may be transaction problems.
How to show the same error in the excel template?
Here is the package:
CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
AS
   PROCEDURE upload_data (
                          P_CONTAINER_ID IN VARCHAR2
                        , P_SAIL_DATE IN DATE
                        , P_PO_NO IN VARCHAR2                     
                         ) IS
    --declare
    lv_err_msg      VARCHAR2(240);
    lf_err_flag     NUMBER := 0;
    ln_temp         NUMBER;
    BEGIN
    --------------------- checking for mandatory parameters---------------------------
      IF (P_CONTAINER_ID IS NULL) THEN
         lf_err_flag := 1;
         lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
      END IF;
      -------------Validation for Sail Date Format----------------------
      IF (P_SAIL_DATE IS NULL) THEN
         lf_err_flag := 1;
         lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
      ELSE
         BEGIN
            SELECT 1
              INTO ln_temp
              FROM DUAL
             WHERE P_SAIL_DATE =  TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
         EXCEPTION
            WHEN NO_DATA_FOUND THEN
               lf_err_flag := 1;
               lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
            WHEN OTHERS THEN
               lf_err_flag := 1;
               lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
         END;
      END IF;
      -------------Validation for PO_Number----------------------
      IF (P_PO_NO IS NULL) THEN
         lf_err_flag := 1;
         lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
      ELSE
         BEGIN
            SELECT count(1)
              INTO ln_temp
              FROM PO_HEADERS
             WHERE Attribute4 =  P_PO_NO;
         EXCEPTION
            WHEN NO_DATA_FOUND THEN
               lf_err_flag := 1;
               lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
            WHEN OTHERS THEN
               lf_err_flag := 1;
               lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
         END;
      END IF;
     -----------------------Insert Record----------------------------
     IF lv_err_msg is NULL THEN
     BEGIN
         INSERT
          INTO XXP2P_HW_COST_FACTORS_STG
                 CONTAINER_ID
                ,SAIL_DATE
                ,PO_NO
                , ERROR_FLAG
                , ERROR_MSG
               ,CREATED_BY
                ,CREATION_DATE
                ,LAST_UPDATED_BY
                ,LAST_UPDATE_DATE
                ,LAST_UPDATE_LOGIN              
            VALUES
                 P_CONTAINER_ID
                ,P_SAIL_DATE
                ,P_PO_NO              
                ,lf_err_flag
                ,lv_err_msg
              ,FND_GLOBAL.USER_ID
                , trunc (sysdate)
                ,FND_GLOBAL.USER_ID
                , trunc (sysdate)
                ,FND_GLOBAL.LOGIN_ID              
              --  commit;
              DBMS_OUTPUT.put_line
                '-' || 'After ap_invoices_interface'
        EXCEPTION
        WHEN OTHERS THEN
          ROLLBACK;
          lf_err_flag := 1;
          lv_err_msg  := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
          raise_application_error(-20001, lv_err_msg);
        END;
    ELSE
          raise_application_error(-20001, lv_err_msg);
    END IF;
  END upload_data;                        
END XXPO_COSTFACTS_WEBADI_PKG;

Similar Messages

  • How to show execution error message from a Process

    hi
    i have a requirement like to display the error messsage returned by the proceure.
    I have a process with point After Submit and validations, where i am calling a procedure which returns the execution status with SUCCESS or FAILURE;
    and if it FAILURE, it will return the error_message also, how can i show this message to the user just like how we are showing the process success message/validation message.
    And i need to stop the process execution there itself once its got failed;
    how can i achieve these two? anyone can give some inputs....
    thanks in advance
    renjish

    paul and denes, thanks for the quick reply...
    i tried the both option the message is coming properly. but the thing is i want to stop the execution there itself where i got the error from the procedure and the page should be remained in the same page.
    currently i have a page 10(customer search screen), from there i called page 102 (customer edit screen) and in the page 102 i attached the process which includes the procedure to update the customer details;
    Normally if update is success, the procedure will return SUCCESS and its navigating to the page 10(customer search screen.). so here if FAILURE is returning by procedure, i need to be in the same page i.e 102(customer edit) by showing the error message..just like a validation message...
    currently whatever the procedure returns either SUCCESS or FAILURE, it goes to previous screen, but i need the method just like how the validation works if it fails.
    hope you got....
    regards
    renjish

  • ICI - How to display custom error messages in SAP CRM

    Hello,
    we are working on a custom Contact Center which interfaces with SAP CRM Version 7 with Enhancement Package over ICI.
    The basic call functions like accepting, hanging up, holding and retrieving are fully implemented and are working already.
    Our goal is to display error messages in the CRM so that clients know there is something wrong, for example why he can't be log in successfully (e.g. the telephony server isn't reachable).
    We already found the ICI Documentation file which provides us the CRM SOAP error codes and tried to send SOAP Fault messages, but never got
    them to screen.
    Please find an attached example screenshot what we mean exactly, reproduced by trying to make a call with CRM user while BCM CDT isn't
    running in the background.
    Regarding to this topic we've the following questions:
    - Is it possible to display custom error messages on the CRM or is this functionality limited to SAP?
    - Could you provide us some further information on how to use this feature exactly (implementation details?) and how the SOAP XML should look like to get it work?
    Thank you in advance!
    Best regards
    René Holy

    NewUser7 wrote:
    Please correct me if I am wrong
    I need to create an entity adapter and attach an error handler with the adapter? or can i handle that in the event handler itself. I coulnt find any api for handling errorsYou can do it both ways but since we are talking about event handler now, then in 9.x you need to extend com.thortech.xl.client.events.tcBaseEvent class for creating a event handler. In tcBaseEvent class there are various flavors of handleError method. So use that as per my note earlier and you should be good.
    HTH

  • How to create Custom error message in SharePoint 2013

    Hi,
    I have created one document library.On uploading the same file SharePoint throws error as"server error.The same file exit".
    But my requirement is not to show the SharePoint default message.I wanted to create custom message and show the pop up for the same file upload.
    Is there any way to create any custom error page or can I manipulate SharePoint default error page?
    Any help?
    Thank you

    Hi,
    You can create an event receiver to set the validation error messages.  One such post to redirect the custom error page is as follows
    https://social.msdn.microsoft.com/Forums/office/en-US/2bc851f6-e04b-4550-b87f-9b874a290482/sharepoint-event-receivers-and-custom-error-messages?forum=sharepointdevelopmentlegacy
    Create custom error page for SharePoint event receiver
    Please mark it answered, if your problem resolved or helpful.

  • How to show a error message to user from report.

    I don´t wanna to go in a form builder to create a simple form for just two inputs.
    I have put two inputs into reports parameter screen, but I know that reports is not like forms, I cannot use SET_ITEM_PROPERTY to hide an element or put a runtime message to a label.
    How can I show an error message when I validate an input from user, when some input trigger raise?
    Thanks a lot!

    The SRW.message doesn't show me no alert on report 10g !!!
    is there any restriction that can be made to block the displaying of the alert on the web environnement?
    thanks..

  • Can we show custom error message if the user fail to log in MII system.

    Hi,
    Is it possible to show a custom error message when a log in is failed because of access restrictions?
    I am using xMII version 11.5
    Thanks
    Regards,
    Neha Maheshwari

    Since you are on 11.5, it is possible to make edits to some of the system jsp pages, etc. but it would NOT be my recommendation to do so.  Since the NetWeaver versions for MII 12.0 and beyond use UME for the login instead of the LHSecurity engine, this would be a very short term change.
    What specific changes would you like to make, the login page messages, query result messages, applet messages?

  • How to display custom error message if the Required field is not entered?

    Hi,
    I have made one input field as required field in a view.
    I want to display one custom error message ,if the required input field is not entered.
    Please help me regarding this.
    Thanks,
    Deepika

    hi deepika....
    First go to message pool under webdynpro components.
    Create a new message there..of type error.
    Enter your text.
    Now to avoid null pointer exception , in wdDoInit(), initialise the value
    wdContext.currentDateTimeElement().setDate("");
    now create an action for submission of data. If field is empty, then within the button write:
      msg = wdComponentAPI.getComponent().getMessageManager();
        if(wdContext.currentDateTimeElement().getDate().equals(""))
        msg.raiseMessage(IMessageCompTodatDateTime.ERROR,new Object[]{""},true)     ;
    between begin others put:
    regards,
    pinki
      IWDMessageManager msg = null;

  • IDOC_INPUT_ORDER - How manage the custom error message ?

    Hello,
    on EXIT_SAPLVEDA_002 and EXIT_SAPLVEDA_003 I done some custom check, (I would show some custom message as a result of these check).
    My question is: How to show these custom message on the standardc idoc spool (WE02) ??
    There's DERRTAB internal table to manage the error, but is not available on there exit ...(EXIT_SAPLVEDA_002 and 3)
    Any idea ??
    thank you

    Hello,
    question is if you want to raise an error, which makes sense only if the document is not posted or just an information message.
    Please consider that you can put messages into the idoc only connected with a status. If you set status 51 thge Idoc is reprocessible, if you set status 53 it is successfully processed.
    In error case you can raise exception USER_ERROR. in exit EXIT_SAPLVEDA_002. Set SY-MSGTY, SY-MSGID, SY-MSGNO, etc before. In exit EXIT_SAPLVEDA_003 you can set changing parameter ok to space. Then SAP will add an error message.
    /Michael

  • How to display custom error message in custom page

    Hi,
    I would like to show the exception details of custom component in my custom idoc page. Please let me know how to get the exception which is cached in Custom component in page.
    Thanks

    Hi,
    Do they get a 404 error? If it is the case, you can customize error pages : [Custom Error Pages|http://help.sap.com/saphelp_nw70/helpdata/en/ec/1273b2c413b2449e554eb7b910bce7/frameset.htm].
    Regards,
    Pierre

  • Show custom Error message in MB_CHECK_LINE_BADI

    Hi to all!
    I'm using MB_CHECK_LINE_BADI to make some validation before posting the document.
    The problem is this:
    When I try to show an E message from a Z message ID, te message isn't shown correctly.
    For example:
    if sy-subrc <> 0.
    v_txt = 'ERROR'.
        message E001 (Z_MSG) with v_txt.
    endif.
    Message ID Z_MSG, Message Number 001 = 'This is an example of an'.
    The message is show like this: S:Z_MSG: ERROR
    instade of This is an example of an ERROR.
    I realize that the only E messages that are shown correctly are those which Message ID and Message number are in the T159F table.
    Does any one knows if I have to update tihs standard table and how?
    Or how can I do to show my E messages correctly?
    Thanks a lot!
    Nico.-

    Hi,
    Yes, you can do that. You would need to create a page validation that loops through the records in the tabular form, checks the values entered and then returns an error message.
    Create a new validation. Set it to a Page level validation, select PL/SQL and then Function returning error text, then give it a name. The PL/SQL will be something like:
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
      IF TO_NUMBER(APEX_APPLICATION.G_F04(i)) > 100 THEN
       RETURN 'Item ' || TO_CHAR(i) || ' - DEPTSAL must not be greater than 100';
      END IF;
    END LOOP;
    RETURN NULL;
    END;This will loop through the records in column 4 and check the amount. If it is greater than 100, an error message is generated displaying the row with the error. This will stop the process on the first error. If there are no errors NULL is returned which indicates that the validation test has passed.
    You should replace G_F04 with the correct column for your page - do a View Source on the loaded page and check for the "name" attribute for the column. G_F04 is for "f04", G_F05 is for "f05" etc.
    Andy

  • How to display custom error message in Job log for batch processing

    Hi All,
    I am rexecuting one R/3 report in batch mode and i want to display all the custom error i have handled in job log when its executed from SM36,SM37. The custom error are like 'Delovery/Shipmet doe not exits' or others which we can display in online mode like message e100(ZFI) or any other way and accordingly we can handle the program control like come out of the program ro leave to transaction'Zxxx' or anything. But i want my program to be executed completely and accumulate all the error in job log of batch processing.
    Can anyone tell me how can i do so...
    Thanks,
    Amrita

    Hi,
    Thats what i have done from the begining. I have written message like this:
    Message i100(ZFI).
    I was hoping to see this message in the log. But i cant see. Can you help me pleae...

  • How to add custom error message in standard application log of change doc.

    Hi,
    While saving chnage document I need to add raise an error on specific condition. As Error messages is being shown in application log I added custom message in include LCRM_1O_UIF15 by using BAL_LOG_MSG_ADD FM however it is not showing in the screen. What could be the reason? Can anybody please explain?
    Rgds
    Sudhanshu

    Muhammed,
    Have you tried throwing a JboException in your AM code?
    John

  • How to throw Custom Error  message in Portal

    Hi Experts !
    I am working on CRM 5.0 and using BADI CRM_ORDER_STATUS for LEAD transaction.
    This BADI is checking the userid when user is trying to change the status of a lead. if userid is not correct than it is  throwing an Error Message  in GUI but this message is reflecting in  Portal as an Exception but what I need here is a custom Message similar to GUI.
    Pls suggest .
    With Thanks & Regards
    Navneet

    Hi Experts !
    I am working on CRM 5.0 and using BADI CRM_ORDER_STATUS for LEAD transaction.
    This BADI is checking the userid when user is trying to change the status of a lead. if userid is not correct than it is  throwing an Error Message  in GUI but this message is reflecting in  Portal as an Exception but what I need here is a custom Message similar to GUI.
    Pls suggest .
    With Thanks & Regards
    Navneet

  • Show Custom Error Message in Apex

    Hi,
    I have created a Master-Detail form on Dept and Emp tables. In Dept table, I have deptsal column which is updated by a trigger on EMP table.
    DEPT table has following trigger:
    create or replace trigger "TRG_DEP_SAL"
    BEFORE UPDATE on "DEPT"
    FOR EACH ROW
    BEGIN
    IF :NEW.deptsal > 100 THEN
    RAISE_APPLICATION_ERROR(-20001,'Dept Salary too high!');
    END IF;
    END;
    So, when I enter salary on Apex Form which increases the limit of deptsal e.g. 100, it gives the following error message:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: Dept Salary too high! ORA-06512: at "ZAHIDKHANUK.TRG_DEP_SAL", line 4 ORA-04088: error during execution of trigger 'ZAHIDKHANUK.TRG_DEP_SAL' ORA-06512: at "ZAHIDKHANUK.BIUD_EMP", line 11 ORA-04088: error during execution of trigger 'ZAHIDKHANUK.BIUD_EMP', update "ZAHIDKHANUK"."EMP" set "EMPNO" = :b1, "DEPTNO" = :b2, "ENAME" = :b3, "JOB" = :b4, "MGR" = :b5, "HIREDATE" = :b6, "SAL" = :b7, "COMM" = :b8, "ID" = :b9 where "EMPNO" = :p_pk_col
    Error Unable to process update.
    OK
    How can I display my own message?
    Thanks,
    Zahid

    Hi,
    Yes, you can do that. You would need to create a page validation that loops through the records in the tabular form, checks the values entered and then returns an error message.
    Create a new validation. Set it to a Page level validation, select PL/SQL and then Function returning error text, then give it a name. The PL/SQL will be something like:
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
      IF TO_NUMBER(APEX_APPLICATION.G_F04(i)) > 100 THEN
       RETURN 'Item ' || TO_CHAR(i) || ' - DEPTSAL must not be greater than 100';
      END IF;
    END LOOP;
    RETURN NULL;
    END;This will loop through the records in column 4 and check the amount. If it is greater than 100, an error message is generated displaying the row with the error. This will stop the process on the first error. If there are no errors NULL is returned which indicates that the validation test has passed.
    You should replace G_F04 with the correct column for your page - do a View Source on the loaded page and check for the "name" attribute for the column. G_F04 is for "f04", G_F05 is for "f05" etc.
    Andy

  • DSEE 6.3: how to show detailed error messages to ldap clients?

    Is there any possibilty in DSEE 6.3 to send to ldap clients detailed error messages about - for example - missing required attributes in ldap add operation?
    I don't have access to ldap server's logs, so I loose a lot of time trying to figure out "which of 40 attributes I sent to server is bad?"...

    Thank you for reply.
    I know that I can view schema, but I need the functionality which is available in relational databases. When I try to store bad field value in database table, I get descriptive error message: "field XYZ has bad value". In DSEE I get "schema violation" or other cryptic message.
    It's very hard to track the problem if you operate on 30 or more attributes. Which one causes error?
    I see that this functionality is available in DSEE backend (error logs are descriptive). How to turn on this for clients?
    If it is not possible, I will try to write special software module which will double DSEE functionality and check attributes before storing them in DSEE.

Maybe you are looking for

  • Cant make a list/combo box that enters a different value to what you chose

    Hi Any help will be very much apreciated, Iv been turning my timesheet into a P.D.F form for filling out it started as an excell spread sheet and iv bassicialy just put txt boxs over the fields that need filling in and if made the "total" box add up

  • Business Area should be defined

    Hi I proposed that each location (branches) of my client should be defined as an profit center (for getting trial balance at business area level). But my client is insisting for creating location as a business area and not profit center. But i think

  • Indesign 2014 Constantly feels like it is refreshing

    Hi, I have just updated to Indesign 2014 and it now seems to constantly flicker every few seconds as though it is trying to update or refresh, is there any thing to stop this?

  • Is it can grant an admin right for special application ?(No Runas as Administrator)

    Dear All Background: We have an application which run on users group in server 2000 SP4 is normal. We want upgrade the OS to Win7 , on the Win7 the application can not launch on normal users group. I was try the properties of compatibility to server

  • Creating dynamic Text in Flex with different attributes

    I am creating a Text field in Flex that looks like this: <mx:HBox id="lastInfo" styleName="InfoBar" width="100%" visible="false">             <mx:Text text="Your last question was:" styleName="underlined"/>             <mx:Text id="lastQuestion"  sty