How to show the message text for constraint violations

Hi all,
In a batch procedure a primary key is violated (ORA-00001). For the primary key, a message is recorded in the TAPI and the message table.
How to show the enduser a proper message text instead of the ORA-00001.
We are using Designer 6 with Headstart 2.1.2.
Thanks in advance,
Joep

Joep,
If you try to insert the record by calling the ins procedure of the Table API, you will see that it will result in an ORA-20998 message, which means that the error message details reside in the CG$ERRORS plsql message table. These messages can be extracted e.g. with the messages.sql script, shipped with headstart.
If you do not want to rewrite your direct DML (insert into [table name] ...) in the complexer calls to the TAPI services, you might want to user VAPI's for it. In fact, this is one of the major advantages of using VAPI's.
The CDM guidelines volume, chapter 6 states that:
<I>The front end no longer needs to trap declarative constraint
errors (Primary Key, Unique Key, Not Null and Check
Constraint violations) and replace them with a user-friendly
error. The View API issues DML statements through the TAPI
and the TAPI traps all declarative constraint errors, and puts
user-friendly message on the stack, in the preferred language of
the user! Fore more information, see the section, Completeness
of Rule Violations Reported in Front End, in this chapter.</I>
So the only thing you need to do is generate VAPI's, and trap the ORA-20998 message (qms$errors.qms$exception) in an exception handler, where you retrieve the user friendly messages from the message stack!!
Regards, Marc

Similar Messages

  • How to change the menu text for menu exit in Version 3.1i

    Hi,
    I am working on an enhancment in CJ02 transaction in 3.1i version. I have implimented menu exit for it , but I am unable to change the menu text for it.Please let me know how to change the menu text for that menu.
    Thanks
    Suman

    Hi Shree,
    Thanks for the response. Please find the Enhancement name here "CNEX0006".
    Thanks
    Suman

  • How to remove the note text for column (portal)

    Hi to All,
    Just i wanted to know how to remove the note (text) which is coming infrond the column in the appraisal template in portal view.
    My client doest want the text "note" (which i highlighted in the yellow) comming infrond the coulum. Pls can anyone tell me how can i remove only the  "note" text from the template?
    Kind regards,
    Saritha

    Hi Saritha,
    In SE80, Choose Web Dynpro Component HAP_DOCUMENT_BODY and you will find the component controller node, double click it and goto methods tab. Here you can find the method CONVERT_CONTEXT_TO_UI, this method will be triggered twice. Search for the code "CALL METHOD lo_nd_t_cells->get_static_attributes_table", this is the method which defaults the "Note" based on the row and column iid. You can overwrite the code by writing the implicit enhancement.
    Hope it will help you and revert back in case of queries.
    With Regards,
    Giriesh M

  • How to retrieve the header texts for a contract

    HI,
      i think we need to use the FM read_text to get the header texts for a contract but dont know how to use the FM like what all the parameters are passed to that to get the header texts of a contract(va43).
    any help is appreciated with points.
    thanks
    prasad

    Hi,
      Pls refer this code,    
        CALL FUNCTION 'READ_TEXT'
                  EXPORTING
                    client                  = sy-mandt
                    id                      = '0001'
                    language                = sy-langu
                    name                    = v_textid
                    object                  = 'KNMT'
                  IMPORTING
                    header                  = t_header
                  TABLES
                    lines                   = t_lines
                  EXCEPTIONS
                    id                      = 1
                    language                = 2
                    name                    = 3
                    not_found               = 4
                    object                  = 5
                    reference_check         = 6
                    wrong_access_to_archive = 7
                    OTHERS                  = 8.
                IF sy-subrc EQ 0.
                  LOOP AT t_lines.
                    CONCATENATE w_arktx t_lines-tdline INTO w_arktx
                                       SEPARATED BY space.
                  ENDLOOP.
                ENDIF.
                IF w_arktx NE space.
                  MOVE w_arktx+1(1583) TO t_lips-arktx.
                ELSEIF w_arktx EQ space.
                  CLEAR w_text_name.
                  CLEAR v_textid.
                  wa_lips-matnr = t_lips-matnr.
                  wa_lips-vkorg = t_likp-vkorg.
                  wa_lips-vtweg = t_lips-vtweg.
                  w_text_name = wa_lips.
                  CLEAR w_arktx.
    Retrieval of Sales Text
                  CALL FUNCTION 'READ_TEXT'
                    EXPORTING
                      client                  = sy-mandt
                      id                      = '0001'
                      language                = sy-langu
                      name                    = w_text_name
                      object                  = 'MVKE'
                    IMPORTING
                      header                  = t_header
                    TABLES
                      lines                   = t_lines
                    EXCEPTIONS
                      id                      = 1
                      language                = 2
                      name                    = 3
                      not_found               = 4
                      object                  = 5
                      reference_check         = 6
                      wrong_access_to_archive = 7
                      OTHERS                  = 8.
                  IF sy-subrc EQ 0.
                    LOOP AT t_lines.
                      CONCATENATE w_arktx t_lines-tdline INTO w_arktx
                                         SEPARATED BY space.
                    ENDLOOP.
                  ENDIF.
                  IF w_arktx NE space.
                    MOVE w_arktx+1(1583) TO t_lips-arktx.
                  ELSE.
    REgards
    srinivas

  • How to show the message BAPI call delievers

    Hi, Experts,
    I have called some back end FM via BAPI. Also the message that FM generates will be sent back to WD context. How can I show them on the top of the screen.
    Best regards,
    Fan

    Hi Fan,
    First of all,You need to use UI component message area that you can place on the top of the VIEW like any other webDynpro UI Element in design mode. Next you need to create instance of the message manager.
    You have to set the value of parameter message_text, the message that you recieve from the BAPI.
       get message manager
       DATA: l_current_controller TYPE REF TO if_wd_controller,
             l_message_manager    TYPE REF TO if_wd_message_manager.
       l_current_controller ?= wd_this->wd_get_api( ).
       CALL METHOD l_current_controller->get_message_manager
         RECEIVING
           message_manager = l_message_manager
      LOOP AT lt_return INTO ls_return .
          IF ls_return-type = 'E'.
      report error message
            CALL METHOD lo_message_manager->report_error_message
              EXPORTING
                message_text = ls_return-message.
          ELSEIF ls_return-type = 'S'.
      report success message
            CALL METHOD lo_message_manager->report_success
              EXPORTING
                message_text = ls_return-message.
          ELSEIF ls_return-type = 'W'.
      report warning message
            CALL METHOD lo_message_manager->report_warning
              EXPORTING
                message_text = ls_return-message.
          ENDIF.
          CLEAR ls_return.
        ENDLOOP.
    Regards
    Manoj Kumar

  • How to mofidy the selection text for a report

    Dears,
    Do you know how to modify a selection text in the selection screen of a standard report, such as changing "Storage Location" in the selection screen of report MB5B to "storage Loc"?
    one of a way to realize it is to modify the text of relevant data element.
    except modifying the data element directly, It seems that use SE63 could do it, but I forgot how to use it.
    Thanks all for your reply.
    Zhongkai

    Hi Liu,
    Check this link for translations thru SE63:
    http://help.sap.com/saphelp_sm310/helpdata/en/b4/54601d77f38e429ffad9e3e11c1b25/content.htm
    Hope this helps you.
    Regards,
    Chandra Sekhar

  • How to find the message type for application

    Hi Guys,
    while postnig the data through idocs,we use message types
    the issue is how can we find the massage type for application?
    plzz help

    You can find these in transaction WE82.
    You can find in WE57, this basis type, which fm is attached (BAPI_IDOC_INPUT1).
    Then check out transactions WE41 and WE42.
    You can use the table EDIMSG, in SE16 to list all the msg types making use of the same IDoc.
    or
    If you want to get all the message types, you can use WE81.
    If you want to see which message types are attched to a particular Idoc type, use WE82
    check it in BD60 and WE57..

  • How to configure the message control for DESADV

    dear friends .
    my requiremnet is i have to write the outbound for DESADV message type for extended IDOC  : ZDESADV01.
    pls tell me solution briefly

    Hi...
    How do we use IDoc to create Outbound delivery document using the transaction VL01N.
    Do following steps..
    Go to NACE and select V2 and click output type from menu.
    Give following value.
    Condition component Value
    Access sequence 0005 (sales organization/customer)
    Condition 0 (no condition)
    “Exclusive” select
    Output type LAVA (shipping notification outbound)
    Procedure V10000 (shipping output)
    Application V2 (shipping)
    Processing subroutine Program RSNASTED,
    form routine EDI-PROCESSING
    General data Select Condition access and Multiple sending of output, otherwise
    leave the fields blank
    Time e.g. 4 (immediately, IDocs are generated immediately after
    posting)
    Transmission medium 6
    Partner function WE
    Language DE (German)
    You must maintain following values for outbound partner profile.
    Output category : Desadv
    Partner type : Ku
    Partner function : WE
    Port : Subsystem
    Output mode: Collect idoc
    Basic type : Delvry01
    Packet size: 1
    Application: V2
    Output type : LAVA
    Process code: DELV.
    You can post the delivery by selecting Shipping, Delivery>Sales and Distribution >Logistics
    -->Create (transaction VL01N). Output control is used to find the condition record and the shipping
    notification is sent to the customer via EDI (IDoc Interface). The shipping time in the condition
    record determines when the corresponding outbound IDoc is generated.
    <b>Reward if Helpful.</b>

  • Iphone: How to show the right text with the right encoding?

    Hello,
    I still have a problem with the encoding. In fact, I'm trying to reuse the Sample Code for iphone here [SeismicXML |http://developer.apple.com/iphone/library/samplecode/SeismicXML/index.html] to parse a XML document.
    I have a problem with it when using the encoding ISO-8859-1 for the XML Document.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    The text showing isn't correct.
    Do you guys have any idea about it?
    Thank you,
    HeoU

    Anybody can help me at this point, please?
    Thanks
    HeoU

  • How to show the layout option for double-sided printing on Acrobat Pro X on Mac?

    Adobe Acrobat Pro X version 10.0.0 print dialog does not show the option to select Layout for two-sided (double-sided) printing. How to fix it?
    System: Mac OS X 10.6.6 on Mactel
    Thanks.

    David,
    Wow, it worked. Many thanks. This is what I did, following your directions to print PDF files as double-sided:
    01-Command P & Click "Printer button".
    02-Click Yes.
    03-Click the Popup Arrow to display contents.
    04-Select Two-sided "Long-Edge binding" or whatever needed and Click Print.
    05-Click OK to Print.
    What fooled me is that from Word (.doc) files the screen on step 3 and 4 show directly selecting a popup menu on the initial print window, whereas when printing PDF files it is required to go through steps 1-2-3 above.
    Again, many thanks. You made my day!!!

  • How to verify the message id for call transaction ?

    Hi all,
    After calling transaction, I collect the message into a message table msgtab. There is an entry in msgtab with message type (MSGTYP) and message id (MSGID).
    How to know that the message type and message id is correct / relevant to my transaction?

    Hi macy,
    1. How to know that the message type and message id is correct / relevant to my transaction?
      I don't think thats requried,
      bcos,
      these message are ISSUED from the
      TRANSACTION itself.
      The message id, which is used in the transaction,
      (it can be more than one message id used in the transaction)
      , the same is collected in  the table.
    regards,
    amit m.

  • How to create the embeded text for snippets?

    I would like to use a snippet do embed flash video into my website. I could manage to program a page with golive containing only the video. But where can I get the generated code to embed like I would get from youtube?
    Just to prevent questions: the video is so long that it is rejected by youtube. So I have to program a workaround.
    Thanks for any suggestions.

    i would actually not use golive to create a weirdo page - just use html to directly add the movie directly into iweb, using the snippet thing.
    if you already have your flash movie made, then just upload to your server or to your idisk (if you use .mac)
    then open iweb and add a html snippet. then paste the following text:
    +<object width="X" height="Y">+
    +<param name="movie" value="http://path/to/flash.swf">+
    +<embed src="http://path/to/flash.swf" width="X" height="X">+
    </embed>
    </object>
    replace X and Y with your width and height in pixels. then enter the path to your flash file.
    max

  • How to change the wortem text for Task TS00008267 in workflow

    Hi,
    Can you please help me in changing wortem text for Task TS00008267 in workflow.
    This is task is standard for User decision.I want to add my own text and insert my own variables.
    Thanks in advance.
    Chetan

    Hi
    PFTC - display
    PFT_CHG - change
    PFTC_INS - create task
    PFTC_COP - Copy the task
    Regards
    Muthu

  • How to change the lable text for a search parameter in af:query

    Hello.
    I have a db table with a column "Date Requested". I have created a search functionality using the ViewCriteria with bind variables to filter the results in a given date range based on the Date Requested Column. I have used it as the af:query with table as results on the screen.
    I want to change the label on the screen for that search attribute as "From Date" and "To Date". Right now I see the Date Requested as the label name in the af:query component
    Please let me know if you have any suggestions.
    Thanks,
    Vinay Polisetti

    Vinay,
    Not Sure. As per the below threads there is a bug (bug 12806987) raised for this sometime back. Not sure about the status of it.
    View Criteria: I can´t change the labels to bind variable
    Label of bind variables with Criteria inside ViewCriteria
    You could probably try the follow the below link and try to change it programatically.
    Binaries: Customizing the <af:query> component display by overriding CriteriaItemAttributeHints
    Cheers
    AJ

  • How to get the sms history for iphone 4S

    Hello,
    I would like some help to find out how to ressurect the message history for messages that I have received on my phone and never backed up anywhere. The messages have dissapeared by themselves, without having me deleting them or changing any default settings. Please help me to get the message history back.
    With regards,
    Caroline

    Apple does not sell parts. You may be able to find something out there, but what you will get is either something stripped from a damaged phone, a knockoff, or marginal parts that failed factory inspection and are now being illegaly sold.

Maybe you are looking for

  • PO Creation from Sales Order User Exit

    Hi, I have a business requirement where I need to  create a Stock Transport Order (STO) for a particular kind of sales order. I outlined different options for achieving this functionality. 1. Trigger a workflow for creating STO. 2. Configure it an ED

  • XML validation using DTD

    My XML file is as follows: <?xml version='1.0' encoding='us-ascii'?> <!-- Configuration file to hold authentication details --> <!DOCTYPE esv SYSTEM "authentication.dtd"> <esv> <authentication> <username>esv_dba</username> <password>esv_dba</password

  • Can't load 8.1.6 personal & can't run Enterprise

    Help! I'm a lowly student trying to load Oracle on my home PC so I can study. I downloaded a copy of 8.1.6 personal from my cable connection (on a Mac G3) and burned it to a CD so I could install on my PC (Pnetium III 900mhz w/ 128 Ram running Win98)

  • Dot1q tunneling and security

    Hi, I don't understand how to make to improve the security of dot1q tunneling. If the client makes some errors by example by disabling the spanning-tree on a vlan and he creates a loop between differents sites (L2VPN). What are the safety standards f

  • Site won't show up in Safari, fine in Firefox. . ?

    I do not have a .mac account. I publish to file and then upload. It's kind of annoying because each tiny change means i have to redo everything. But I have a huge free webspace so I need to do it that way. I made revisions, really minor, just text an