Error Message
DECLARE
    errm VARCHAR2(800);
     errcode NUMBER      := ERROR_CODE;
     errtxt VARCHAR2(800)  := ERROR_TEXT;
      errtyp VARCHAR2(3)   := ERROR_TYPE;
 
    -- dbmserrcode NUMBER;  --:= DBMS_ERROR_CODE;
     dbmserrtext VARCHAR2(200) := DBMS_ERROR_TEXT;
     v_alert_bttn NUMBER;
BEGIN
        --FRM-40202: Field must be entered.
        --FRM-40400: Transaction complete: %d records applied and saved.
        --FRM-40401: No changes to save.
        --FRM-40405: No changes to apply.       
        --FRM-40501: ORACLE error: unable to reserve record for update or delete.    
        --FRM-40508: ORACLE error: unable to INSERT record.       
        --FRM-40509: ORACLE error: unable to UPDATE record.
        --FRM-40600: Record has already been inserted.
        --FRM-40654: Record has been updated by another user. Re-query to see change.
        --FRM-40656: Update cannot be made due to prior rollback. Clear the record.
        --FRM-40700: No such trigger: %s.
        --FRM-40800: User exit %s does not exist.
        --FRM-41050: You cannot update this record.
        --FRM-41830: List of Values contains no entries.
        --FRM-50016:Legal character are 0-9- +E.
        Set_Alert_Property ('ALERT2', TITLE, 'Error');
    -- Error Insert and Update
     IF errcode IN (40501, 40508, 40509, 40600, 40656) THEN
            Set_Alert_Property ('ALERT2', Alert_Message_Text,
            errtyp ||'-'||TO_CHAR(errcode)||': '||errtxt || CHR(10) ||
            DBMS_ERROR_TEXT);
            v_alert_bttn := Show_Alert ('ALERT2');
    ELSIF errcode IN (40654, 40700,40800,40401,41050,40202,40405,40400) THEN
        -- ignore fnd user exit n invalid trigger message
            null;   
     ELSIF errcode IN (41830) THEN
            Set_Alert_Property ('ALERT2', Alert_Message_Text,
            'List of Values contains no entries.');
        v_alert_bttn := Show_Alert ('ALERT2');   
     ELSE
          APP_STANDARD.EVENT('ON-ERROR');
     END IF;
END;
 







 
 
0 Response to "Error Message"
Post a Comment