How to capture DB Errors and display as pop-up message

Hi All,
I am using Jdeveloper 11g Release 2 (11.1.2.3.0).
In my AppModuleImpl.java, I defined a class to call PL/SQL procedure and exposed the same as Client interface. Pulled this method from data control on to a page a Button. The functionality is working fine.
Can you suggest me, what is best way to achieve the below functionality.
1. If there is any DB errors during PL/SQL procedure, how to catch and display the Errors / Warning in Pop-up message.
2. How to display info message on successful completion in Pop-up.
regards

Hi,
+1. If there is any DB errors during PL/SQL procedure, how to catch and display the Errors / Warning in Pop-up message.+
Throw a custom exception that extends the JboException class.
See:
http://www.oracle.com/technetwork/issue-archive/2013/13-mar/o23adf-1897193.html
http://jobinesh.blogspot.de/2011/03/customizing-business-components-error.html
+2. How to display info message on successful completion in Pop-up.+
Option 1.
you can either return "true" or "false" from the method so that you can call
OperationBinding plsqlOperationBinding = .... get access to themethod binding to invoke the PLSQL method call ....
String result = plsqlOperationBinding.execute();
if(result.equlasIgnoreCase("true"){
RichPopup popup = ... get reference to popup defined on the page
RichPopup.PopupHints hints = new RichPopup.PopupHints ();
popup.show(hints);
Option 2
OperationBinding plsqlOperationBinding = .... get access to themethod binding to invoke the PLSQL method call ....
plsqlOperationBinding.execute();
if(plsqlOperationBinding.getErrors().size == 0){
RichPopup popup = ... get reference to popup defined on the page
RichPopup.PopupHints hints = new RichPopup.PopupHints ();
popup.show(hints);
Frank

Similar Messages

  • How to capture mapping error and able to send it..

    Hi Friends,
    We have a requirement, where in, if a mapping fails due to missing required element or improper formation of the source xml message, we need to capture this and need to create an error message, which contains the error description as one of the elemnets and send it to the concerned system back. Basically, it is to let the sending system know that, what went wrong.
    Is there any api available which can capture the mapping error and which could be used under java mapping used for exception handling? Any pointers in this regard would be of utmost helpful.
    Regards,
    Vijay

    Vijay,
    You can throw some exceptions like mentioned in the weblog:
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
    Once you see this message your support guys should check the message and let the sender system side know about this.
    ---Satish

  • How to validate VO result and display error message?

    Hi,
    I have created 2 pages:
    Page 1: User to enter employee number and click 'Go' button to search (redirect to Page 2)
    Page 2: To display employee details
    In situation where employee is suspended, employee detail will be display as blank in Page 2.
    At the same time, we would like to display error message which inform user to refer to HR Department for this scenario.
    Need guidance on how to perform the validation and display error message.
    Thanks and Regards,
    Shiau Chin

    Hi Shiau,
    In this case instead of redirecting to next page, throw an exception on the same page.
    If you want redirect it to next page then while redirecting it to next page pass some info that can indicate that employee is suspended, get this value in Process request if it has value then throw exception else query details.
    Regards,
    Reetesh Sharma

  • How to capture the date and time of  a background job

    Hi experts,
    How to capture the date and time of  a background job?
    How to find whether it is runned succesfully or not?
    If it is not successful how to put error message?
    ASAP
    Thanx in advance,
    Sudha

    To Display the STATUS of the JOB which is exectued in background
      CLEAR : wa_jobsteplist.
      REFRESH : i_jobsteplist.
      WRITE:/ 'DISPLAYING JOB STATUS'.
      CALL FUNCTION 'BP_JOB_READ'
        EXPORTING
          job_read_jobcount           = w_jobcount
          job_read_jobname            = w_jobname
          job_read_opcode             = '20'
        JOB_STEP_NUMBER             =
       IMPORTING
         job_read_jobhead            = wa_jobhead
       TABLES
         job_read_steplist           = i_jobsteplist
    CHANGING
       RET                         =
       EXCEPTIONS
         invalid_opcode              = 1
         job_doesnt_exist            = 2
         job_doesnt_have_steps       = 3
         OTHERS                      = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    To Display the status text as per the status type
      CASE wa_jobhead-status.
        WHEN 'S'. WRITE: / 'Scheduled'.
        WHEN 'R'. WRITE: / 'Released'.
        WHEN 'F'. WRITE: / 'Completed'.
        WHEN 'A'. WRITE: / 'Cancelled'.
        WHEN OTHERS.
      ENDCASE.

  • How to capture show layer and hide layer event in photoshop through a plugin???

    How to capture show layer and hide layer event in photoshop through a plugin???for mac

    Use the Listener plug-in found in the SDK to see how you can monitor the show/hide layer event. You can also use the Getter plug-in to show what information you can find out about the current state of Photoshop.

  • Download Helper, even with paid converter upgrade, gives "Invalid Capture File" errors and will not record audio, with "File Creation Error - Unable to rename/copy audio file" Error.

    Download Helper Screen Capture worked to capture video if the default "no audio" option is active. But, no audio. The "speakers" or "microphone" audio options are confusing....the audio to be captured is from the video, so what do you choose? With either "speakers" or "microphone" selected, the captured file has poor audio and no video. Re-capture efforts (speakers) get "Invalid capture file error" and "File Creation error- Unable to rename/copy audio file"
    The paid upgrade of "Converter" doesn't work.
    Instructive documentation - not very good.
    Suggestions - Need time delay between initiation of "Record" and starting the video to be recorded.
    Could use timer tracking of the record process.
    Are there operating system limitations? (Have Windows XP Pro)

    That is an issue for the developer of that Download Helper.

  • How to disable 'Enable JavaScript' and 'Display PDF in browser' in Adobe Reader 9.1 msi?

    I'd like to how to disable 'Enable JavaScript' and 'Display PDF in browser' in Adobe Reader 9.1 msi.
    Any help would be appreciated.

    NeoChang:
    You can modify the installation package using the Adobe Customization Wizard to toggle the "Display PDF in Browser" but I have not found a setting to disable JavaScript from the Wizard. I have created a script which makes the changes, but it has to be run for every user since that info is stored in the User hive of the Windows registry.
    Disable JavaScript:
    REG ADD "HKCU\SOFTWARE\Adobe\Acrobat Reader\9.0\JSPrefs" /v bEnableJS /d 0 /t REG_DWORD /f
    Disable Browser Integration:
    REG ADD "HKCU\Software\Adobe\Acrobat Reader\9.0\Originals" /v bBrowserIntegration /d 0 /t REG_DWORD /f
    Michael
    ~Simplicity of Character is a Natural Result of Profound Thought~

  • I have a problem in loading programs And display my me Hazh message (Plase contact itunes support to complete this transaction)

    I have a problem in loading programs
    And display my me Hazh message
    (Plase contact itunes support to complete this transaction)

    You need to contact iTunes Support. There is a "Contact Us" link at the bottom right of every page of the forums.
    Best of luck.

  • How to enable ws-addressing and set ws-Reply to & message-Id ??

    How to enable ws-addressing and set ws-Reply to & message-Id and all related properties. ???
    I looked at the documentation but not sure how to do this.
    Any Help is appreciated.

    No it is not possible to add the xml file to the already compiled war and not compiling again.
    There are only two ways to add the policy file to weblogic deployed web service.
    1: through the policy annotation in the web service java file.
    2: through the admin console if the web service is deployed as a separate war.
    thanks,
    sandeep

  • I tried to export an iMovie to quicktime and got this pop up message, "file is already open with write permission" How do I resolve this. thans

    I tried to export an iMovie to quicktime and got this pop up message, "file is already open with write permission" How do I resolve this. thans

    Turn off Time Machine before you open iMovie. It's a semi-known issue right now.
    https://discussions.apple.com/message/17032254#17032254

  • HT4534 no camera connected? FaceTime won't work and displays no camera connected message

    no camera connected? FaceTime won't work and displays no camera connected message.

    tomba1960 wrote:
    no camera connected? FaceTime won't work and displays no camera connected message.
    http://support.apple.com/kb/HT2090
    works for iSight as well as FaceTime cameras.
    Message was edited by: EZ Jim
    Mac OSX 10.7.4

  • How to capture System Error in XI?

    Hello All,
    1. Can any one tell me , How to capture the system error , Adapter Error and send the alert to make sure the guarenteed delivery from Source to Target via XI ?
    2.I have done the configuration for to capture the mapping error in transaction ALRTCATDEF .But still i am not able to see any messages in my Alert Inbox???
    I have checked with the two weblogs Alert step by step and Alert Trouble shooting guide.but still i am not getting any messages in Alert inbox .Any one can tell me how to fix this?
    Thanks!

    Hi,
      You wrote:
    <i>How to capture the system error , Adapter Error </i>
    Errors are captures in many ways and at different stages,
    like alert, sld errors or even sxmb_moni or even with visual administrator trace, I am not sure of your requirement but if you want a centrlished point to access all these error you may refer a good example as,
    /people/michal.krawczyk2/blog/2005/09/07/xi-why-dont-start-searching-for-all-errors-from-one-place
    <i>have checked with the two weblogs Alert step by step and Alert Trouble shooting guide.but still i am not getting any messages in Alert inbox .Any one can tell me how to fix this?</i>
    The two weblogs are my favourite and best resources but still if you are missing, please elaborate if you are getting any errors or other fesible traces as to why your alerts are not coming in inbox.
    Regards,
    Anirban.

  • How to capture Exception error message in Odata ?

    Hi,
      I am new to sap gateway. Currently i am creating a Odata Service through the transaction SEGW. In the query i have mapped a RFC. When i execute the service sometimes the RFC throws exception like 'No data Found'. But i dont know how to capture the exception returned from the RFC.
    I read some threads which says use
    RAISE EXCEPTION TYPE /IWBEP/CX_MGW_BUSI_EXCEPTION
          EXPORTING
            textid            = /iwbep/cx_mgw_busi_exception=>business_error
            message       =  lv_text
            message_container = io_message_container.
    My doubt is since i have not done any code in the DPC method. As said in many threads should i go to DPC_EXT method and redefine the method or how to capture the exception.
    Kindly advise. Thanks in advance

    Hello Velsankar,
    You need not to capture the error messages explicitly by writing custom code in you DPC_EXT if you are using service builder when the return error message table is of type BAPIRET2.
    GW itself will handle and return the error messages.
    If at all the return error message table is of different type , i mean to say if it is not of type BAPIRET2 then you need to capture explicitly.
    The below is the code you need to write in DPC_EXT to capture.
    DATA: LO_MECO TYPE REF TO /IWBEP/IF_MESSAGE_CONTAINER.
    DATA: LX_BUSI_EXC TYPE REF TO /IWBEP/CX_MGW_BUSI_EXCEPTION.
            LO_MECO = MO_CONTEXT->GET_MESSAGE_CONTAINER( ).
             LO_MECO->ADD_MESSAGES_FROM_BAPI( IT_BAPI_MESSAGES = LT_ERR_RET_TAB ).
             CREATE OBJECT LX_BUSI_EXC
               EXPORTING
                 MESSAGE_CONTAINER = LO_MECO.
             RAISE EXCEPTION LX_BUSI_EXC.
    Note : where LT_ERR_RET_TAB is your internal table where you would have captured all the error messages.
    That is it. You will be able to see the messages .
    Regards,
    Ashwin

  • How to capture the error messages from incorrect session?

    Hi SDNs.,
    i am using BDC Session method to update transaction FB01. So my job runs daily. here i want to capture the error messages and i want to send it to mail.  Can i capture the unprocessed records???
    i think FM <b>SO_NEW_DOCUMENT_ATT_SEND_API1</b> used for sending mail? but how to capture mes or records?
    or Is there any other way to Do it???
    Thankning you.,
    Ram

    Hi Ramakrishna,
       Once you create the session, Process the session using
    the report RSBDCSUB using submit statement.
    It would list out the erroneous records.
    Hence, while submitting, just say submit RSBDCSUB in background and export output list to memory.,
    Then you can retrieve the list from memory using the FM LIST_FROM_MEMORY into the internal table and finally send the email by the fm you have already mentioned.
    Regards,
    Ravi

  • How to capture the screen and send it to attachment for that mail

    hi sir ,
         how to capture the screen shot and attach with that e-mail , whether it is possible or not ..
    Regards,
    kumar

    hi sir,
        i am asking about while creating the support message from help menu in sap..
    while creating the support message we have to give component , priority and text also .. after that click the send icon in that support desk message .. while clicking the send button the entire screen ( what  we have entered in that creen na ) i have to capture the screen ( it may be save in local file also )  after that it will attach into attachment and then send it to ...
    Regards,
    kumar

Maybe you are looking for