10 Replies Latest reply: Jun 20, 2013 4:20 PM by Ankur_Mig RSS

    Compensation Default and override - Component Id error

    1001876
      Hi,

      I am working on a fast formula of 'Compensation default and override type' .
      The logic within requires 'component id'. There is an input variable CMP_IV_COMPONENT_ID for this formula type .
      I am attaching the fast formula to a component specific column in the worksheet for a particular plan.
      I back the plan and start it.
      The formula is not getting executed at all.

      I also tried attaching this formula to a normal column (which is not specific to a component) .. But in this case the component id was not recognized and the start Batch process errored out.

      Please let me know how to attach this type of formula to a plan and run it .

      Edited by: 998873 on May 13, 2013 11:34 PM
        • 1. Re: Compensation Default and override - Component Id error
          -Micha
          Can you share your log file and the formula?

          Thanks

          Micha
          • 2. Re: Compensation Default and override - Component Id error
            1001876
            Hi Micha,

            Below is the Fast formula code


            DEFAULT FOR CMP_IV_PERIOD_ID is 0
            DEFAULT FOR CMP_IV_COMPONENT_ID is 0
            DEFAULT FOR PER_ASG_GRADE_NAME IS '000'
            INPUTS ARE CMP_IV_PERIOD_ID , CMP_IV_COMPONENT_ID
            L_DATA_TYPE = 'DATE'
            l_posting_date=GET_POSTING_DATE(CMP_IV_PERIOD_ID,CMP_IV_COMPONENT_ID,PER_ASG_GRADE_NAME)
            return L_DATA_TYPE, l_posting_date


            I am using a custom pl/sql function GET_POSTING_DATE which returns date type value.
            • 3. Re: Compensation Default and override - Component Id error
              -Micha
              You're using the wrong variable name for your return variable.
              Change l_posting_date to l_default_value.

              CMP_IV_COMPONENT_ID should definitely be a valid input value.

              also, there is a formula function that allows you to print debug messages into the ESS log file during execution.
              Try the function ESS_LOG_WRITE:

              L_TEMP = ESS_LOG_WRITE('Some custom debug text')


              This way you can verify that the formula is indeed executed. Also, you can check the values for your database items and your custom function this way.

              Micha
              • 4. Re: Compensation Default and override - Component Id error
                Ankur_Mig

                Hi,

                 

                i am also working on the same formula type and need a way to use custom plsql function. Can you please share, how did you register custom formula function ?

                 

                Thanks

                Ankur

                • 5. Re: Compensation Default and override - Component Id error
                  Pawankumar630817-Oracle

                  You cant create formula function using UI. Why do you want to use custom formula function? Cant you achieve it using existing DBIs?

                  • 6. Re: Compensation Default and override - Component Id error
                    Ankur_Mig

                    The compensation FF i am working on, does not allow DBI usage. Also, the requirement from client is to use an Element entry input value defined on employee element entry, and apply additional logic to get to Default value of the custom field in the worksheet.

                     

                    Please advice if there is any other way to get to Element entry values, without using Custom Formula Function OR Database items.

                     

                    Thanks

                    Ankur

                    • 7. Re: Compensation Default and override - Component Id error
                      Pawankumar630817-Oracle

                      I don't understand why you can't use DBI in this formula. The above formula provided by user 1001876 is also using PER_ASG_GRADE_NAME DBI. If you have element 'ABC_ELE' and input value 'XYZ_IV', you should be able to use ABC_ELE_XYZ_IV_ASG_ENTRY_VALUE DBI. This DBI uses PAYROLL_ASSIGNMENT_ID and EFFECTIVE_DATE contexts. Please make sure these contexts are set when you access this DBI. If needed, you can use CHANGE_CONTEXTS function to set context.

                      • 8. Re: Compensation Default and override - Component Id error
                        Ankur_Mig

                        Thanks for your guidance.

                         

                        The Compensation FF  documentation states that "Database items are not available to formulas of this type." that's why i thought we can't use them.

                         

                        Below is my code based on your comments, but still not getting the default value populated. Any help will be highly appreciated.

                         

                        DEFAULT FOR STOCK_OPTIONS_NUMBER_OF_SHARES_ASG_ENTRY_VALUE IS 0

                        DEFAULT FOR ASG_HR_ASG_ID IS 0

                         

                        L_INPUT_VALUE = 0

                        L_ASG_ID = 0

                         

                        L_ASG_ID = ASG_HR_ASG_ID

                         

                        L_TEMP = ESS_LOG_WRITE('VALUE OF ASG_HR_ASG_ID is   '|| to_char(L_ASG_ID  ))

                         

                        L_PL_START_DATE = TO_DATE('2013/06/19','YYYY/MM/DD')

                         

                        CHANGE_CONTEXTS(EFFECTIVE_DATE = L_PL_START_DATE , PAYROLL_ASSIGNMENT_ID = L_ASG_ID  )

                        (

                        L_INPUT_VALUE = STOCK_OPTIONS_NUMBER_OF_SHARES_ASG_ENTRY_VALUE

                        )

                         

                        L_TEMP = ESS_LOG_WRITE('Effective date is   '|| to_char(L_PL_START_DATE  ))

                         

                        L_TEMP = ESS_LOG_WRITE('element value  is  '|| to_char(L_INPUT_VALUE))

                         

                        L_DATA_TYPE = 'NUMBER'

                        L_DEFAULT_VALUE = to_char(L_INPUT_VALUE )

                         

                        RETURN L_DATA_TYPE, L_DEFAULT_VALUE

                         

                        Also, below is the values generated by the log file, which shows the assignment id of the person.

                         

                        VALUE OF ASG_HR_ASG_ID is 300000001207065

                        Effective date is 2013-06-19T00:00:00.000Z

                        element value is 0

                        • 9. Re: Compensation Default and override - Component Id error
                          Pawankumar630817-Oracle

                          Please note ASG_HR_ASG_ID and PAYROLL_ASSIGNMENT_ID are not same in Fusion. That's why it' not returning any value as element entries are created for payroll assignment id. Since you are able to get value for ASG_HR_ASG_ID, it must be setting value for PAYROLL_ASSIGNMENT_ID as well. Please check value for PAYROLL_ASSIGNMENT_ID and EFFECTIVE_DATE context using following code:-


                          L_EFFECTIVE_DATE_TEMP='0001/01/01 00:00:00' (Date)

                          L_PAY_ASG_ID = GET_CONTEXT( PAYROLL_ASSIGNMENT_ID, -1)

                          L_EFFECTIVE_DATE=GET_CONTEXT(EFFECTIVE_DATE,L_EFFECTIVE_DATE_TEMP)


                          If it's returning value, it means payroll assignment id and effective date contexts are already set and you don't need to set them explicitly. You can directly get value for STOCK_OPTIONS_NUMBER_OF_SHARES_ASG_ENTRY_VALUE.


                          Hope this help!



                          • 10. Re: Compensation Default and override - Component Id error
                            Ankur_Mig

                            Thanks for your help !!  The information on HR and Payroll assignment id was very helpful.

                             

                            I got the formula working now.

                             

                            Thanks again.

                            Ankur