3 Replies Latest reply: Dec 25, 2012 11:01 PM by 978565 RSS

    Explain the code!!

    978565
      Hi


      1) throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");

      2) setWhereClause("EMPLOYEE_ID = :1");
      setWhereClauseParams(null);
      setWhereClauseParam(0, empNum)

      3) if (vo == null)
      {
      MessageToken[] errTokens = { new MessageToken("OBJECT_NAME", "EmployeeFullVO1")};
      throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
      }


      Thanks & Regards
      Varun
        • 1. Re: Explain the code!!
          978565
          Hi everyone

          Can anybody explain these lines??

          Thanks & Regards
          • 2. Re: Explain the code!!
            Sushant Sharma
            Hi,

            1) throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
            - There will be a message store in fnd_new_messages with name FWK_TBX_INVALID_EMP_NUMBER under AK application. So this line of code throws error message having text corresponding to FWK_TBX_INVALID_EMP_NUMBER.

            2) setWhereClause("EMPLOYEE_ID = :1");
            setWhereClauseParams(null);
            setWhereClauseParam(0, empNum);
            - here, where clause is set dynamically for employee_id and variable empNum is set as parameter to the bind variable.
            2nd line is written just to remove if there are any parameter already set.

            3) Here also, the text is taken from FWK_TBX_OBJECT_NOT_FOUND message defined in apps.

            --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
            • 3. Re: Explain the code!!
              978565
              Hi

              Thanks for the explaination.
              What does Message token indicate and what does binding mean?


              Thanks & Regards