10 Replies Latest reply: Feb 18, 2013 4:59 AM by Vigneswar Battu RSS

    FORM ERROR Message

    user12879396
      How I can display the my message which is use in my PL/SQL on form not on self service page.
      I used the following code

      hr_utility.set_message(800,'XX_SAL_ADV');
      hr_utility.raise_error;

      but on form only show XX_SAL_ADV not which I define in application Developer message(Description) I want error message with full description
      when I used full description in this hr_utility.set_message(800,'this is not applicable for current user') it give error FRM-40735 ON-UPDATE trigger raise Unhand-led exception ORA-06502

      Edited by: user12879396 on Feb 11, 2013 5:33 AM
        • 1. Re: FORM Message
          Sanjay Singh
          Hi,

          You will have to riase application error or raise exception to display your custom message on Forms. below is the sample code you can try n test:

          l_error_msg := l_mgr_name || ' who is currently assigned as your reporting manager is not active. Please reach HR to get a valid reporting manager assigned.';
          FND_MESSAGE.set_token('ERRMSG', l_error_msg, FALSE);
          fnd_message.raise_error;

          Thanks,
          Sanjay
          • 2. Re: FORM Message
            user12879396
            Sanjay I did it but it did not display error message window nothing happen, and this is not exception it is the error on validation check.
            • 3. Re: FORM Message
              user-Keen
              did you defined this message name "XX_SAL_ADV" under the applcation menu in Application Developer Responsibility.
              • 4. Re: FORM Message
                user12879396
                yes I have define this message in application Developer-->application---> message
                as I mention above
                • 5. Re: FORM Message
                  user12879396
                  I am using User Hook so I used this code in my PL/SQL Package not in form
                  l_error_msg := l_mgr_name || ' who is currently assigned as your reporting manager is not active. Please reach HR to get a valid reporting manager assigned.';
                  FND_MESSAGE.set_token('ERRMSG', l_error_msg, FALSE);
                  fnd_message.raise_error;
                  • 6. Re: FORM Message
                    user12879396
                    Please guide me
                    • 7. Re: FORM Message
                      user12879396
                      Please What Can I do
                      • 8. Re: FORM Message
                        Vigneswar Battu
                        Try this -
                        FND_MESSAGE.SET_NAME('PER', 'XXDRI_HR_US_ABS_DT_RNG_VAL');
                        FND_MESSAGE.SET_TOKEN('START_DATE', TO_CHAR(c_pay_period_dates.start_date,'DD-MON-RRRR')); -- only if you have token, else ignore this
                        APP_EXCEPTION.RAISE_EXCEPTION;      
                        Use 'PER' instead of 800

                        Also make sure you have bounced your server after the message was created.
                        If it still doesn't work, try using a seeded message and check if it works.
                        If the seeded one works, then there is some issue with your message creation.

                        Cheers,
                        Vignesh
                        • 9. Re: FORM Message
                          user12879396
                          FND_MESSAGE.SET_NAME('PER','XX_SAL_ADV');
                          FND_MESSAGE.SET_TOKEN('c_balance', c_balance);
                          APP_EXCEPTION.RAISE_EXCEPTION;

                          I used the above code and define message in application Developer-->application-->message as below

                          Name----------------: XX_SAL_ADV
                          Language------------: US
                          Application---------: Human Resources
                          Type----------------: 30% Exception Prompt
                          Maximum Lengthe-----: Blank
                          Description---------: Blank
                          Alert Category------: Blank
                          Alert Severity------: Blank
                          Log Severity--------: Blank
                          Current Message Text : You can not Processed for further information contact to HR Department

                          whil it display message like below

                          XX_SAL_ADV(C_BALANCE=90)

                          here token C_Balance get perfect Value in my pl/SQL while Current Message Text did not display.
                          further when I save message I also run the following concurrent program

                          Generate Messages with this parameter
                          Language-----------------------:US
                          Application--------------------:Human Resources
                          Mode---------------------------:DB_TO_RUNTIME
                          File Application Shortname-----:Blank
                          Filename-----------------------:Blank

                          while I used the seeded message it work fine like below

                          FND_MESSAGE.SET_NAME('PER','HR_449741_EMP_FPD_ATD');
                          FND_MESSAGE.SET_TOKEN('c_balance', c_balance);

                          it display as below

                          APP-PER-449741 :You cannot set the Final Process date to be earlier than or equal to the Last Standard Process
                          date or the Actual Termination date..(C_BALANCE=90)

                          while I Change in seeded no effect display after changes
                          • 10. Re: FORM Message
                            Vigneswar Battu
                            Clearly some issue with your message.
                            Did you bounce the server after message creation ?
                            Also make sure there are no other messages with the same Message Name or number.

                            You should also have the token name in the message if you're using a token.
                            Eg : Time off request must be entered separately for each bi weekly pay period *&START_DATE* and *&END_DATE*

                            FND_MESSAGE.SET_NAME('PER', 'XXDRI_HR_US_ABS_DT_RNG_VAL');
                            FND_MESSAGE.SET_TOKEN('START_DATE', l_start_date);
                            FND_MESSAGE.SET_TOKEN('END_DATE', l_end_date);
                            APP_EXCEPTION.RAISE_EXCEPTION;

                            Plesae close the thread if your question is answered.

                            Thanks,
                            Vignesh