14 Replies Latest reply: Feb 14, 2013 8:36 AM by 892288 RSS

    Assignment Set

    sober_sandy
      We have a requirement to create an assignment set every time we do medical payment to employees.
      We do medical payments 2 times a week and its not necessary that every time we have same employees. Element entries of NON RECURRING nature are created through create element entry API.

      Is there any way we can create an assignment set based on the element entries created on a particular day.


      Thanks !!
        • 1. Re: Assignment Set
          989098
          There is no automated way for this. You need to write a script to achieve that and run it after the medical payments are made. Fetch all the distinct assignment records for whom the element entries have been created on that day and use the API to create the assignment set. Let me know if you need the API name. I can find it.
          • 2. Re: Assignment Set
            sober_sandy
            Yes, It would be really helpful if you can find the api to create an assignment set. I've tried on oracle support as well on this forum but didn't find one.
            • 3. Re: Assignment Set
              989098
              I was doing a bit of research myself today about this and realized there is no single API but instead we need to call the seeded procedures. Below is the info

              Either use HR_ASSIGNMENT_SETS_PKG.insert_row OR directly use the insert into table statement as below. It doesn't matter

              insert into HR_ASSIGNMENT_SETS
              ( ASSIGNMENT_SET_ID,
              BUSINESS_GROUP_ID,
              PAYROLL_ID,
              ASSIGNMENT_SET_NAME,
              FORMULA_ID)
              values
              ( p_assignment_set_id,
              p_business_group_id,
              p_payroll_id,
              p_assignment_set_name,
              p_formula_id);

              Obtain Assignment set_id from the sequence HR_ASSIGNMENT_SETS_S,
              then use HR_ASSIGNMENT_SET_AMDS_PKG.insert_row to update it with all the assignments. Below is the procedure & its in/out variables

              procedure insert_row(p_rowid in out varchar2,
                   p_assignment_id in number,
                   p_assignment_set_id in number,
                        p_include_or_exclude in varchar2);

              You need to use HR_ASSIGNMENT_SET_CRITERIA_PKG if you need to define any criteria but in most cases, the above would suffice.

              -Karthik
              • 4. Re: Assignment Set
                Sanjay Singh
                Hi Sandy,

                We had same kind of requirement at our cleint site too and below was an easy mechanism adopted which was one time solution and no recurring exercise was supposed to be done.

                In you case you have mentioned that you want to create an assignement set of peoples for whom an element entry is been created during a specifc time period, please follwo the below steps to implement the solution.
                1. Create your assignment set example - XX_MEDICAL_PAY_SET with some dummy criteria. Example - Database item - &PER_PERSON_TYPE = PERMANENT
                2. As soon as you create this assignment set with any criteria, system will automatically create a fast formula with the same name and type as "Assignment Set"
                3. Navigate to XX HRMS Manager -> Total Compensation -> Basic -> Write Formula and query for XX_MEDICAL_PAY_SET
                4. Now click on Edit and you will see that the FF code created will be as below


                IF PER_PERSON_TYPE = 'PERMANENT'
                THEN INCLUDE_FLAG = 'Y'
                ELSE INCLUDE_FLAG = 'N'


                RETURN INCLUDE_FLAG

                5. Now you can directly amend this Fast formula as per your requirement. Example in your case build a simple function which has assignment_id/number as input which wll check if element entry exists and make the INCLUDE_FLAG = Y else N, Example as below

                DEFAULT for ASG_NUMBER is 0

                IF XX_CHECK_ENTRY_EXISTS(ASG_NUMBER) = 'Y'
                THEN INCLUDE_FLAG = 'Y'
                ELSE INCLUDE_FLAG = 'N'

                RETURN INCLUDE_FLAG


                This will be a permanent solution and you need not repeat anything every month. Hope this helps, let me know if you face any issue.

                Thanks,
                Sanjay
                • 5. Re: Assignment Set
                  sober_sandy
                  Thanks Karthik
                  • 6. Re: Assignment Set
                    sober_sandy
                    Thanks Sanjay for your suggestion. I've tried your way to create Assignment set but no fast formula has been created with the same name. Is there any Profile option we need to set to create the fast formula of Type 'Assignment Set'.

                    I can see the formula in FF_FORMULAS_F.


                    Regards,
                    Sandy

                    Edited by: sober_sandy on Feb 6, 2013 5:30 PM
                    • 7. Re: Assignment Set
                      Sanjay Singh
                      Hi Sandy,

                      Have you added a criteria as mentioned in the previous post. A fast formula is only generated if you add a criteria to your assignment set and click on the Generate button. Please check this and let me know.

                      Thanks,
                      Sanjay
                      • 8. Re: Assignment Set
                        989098
                        Hi Sanjay - This FF seems to be a good idea. I have a question though. When does this FF evaluates the logic and updates the assignment set? Is it when the payroll runs?

                        Sandy - Is your requirement to create the assignment set after or before the payments are made?

                        -Karthik
                        • 9. Re: Assignment Set
                          Sanjay Singh
                          Hi Karthik,

                          Yes it gets evaluated when the payroll run is using the Assignment set, the beauty is that you can aad anything in the FF which you want as a criteria using FF. Example - Exculding employees from the payroll run who are leaving in this calendar month etc, we have used this extensively at our client implementation and it works fine.

                          Thanks,
                          Sanjay
                          • 10. Re: Assignment Set
                            sober_sandy
                            Hi Sanjay,

                            Yes I've followed all the steps mentioned by you. I can also see the formula in FF_FORMULAS_F as :-

                            ----------------------------------------------
                            IF PER_PERSON_TYPE = 'Employee'
                            THEN INCLUDE_FLAG = 'Y'
                            ELSE INCLUDE_FLAG = 'N'


                            RETURN INCLUDE_FLAG
                            --------------------------------------------------

                            But I can't see it in 'Write Formula' window from front end.
                            • 11. Re: Assignment Set
                              Sanjay Singh
                              Hi Sandy,

                              Can you please check your effective date on which you are trying to query in write formula window, set the effective date to sysdate and check.

                              Thanks,
                              Sanjay
                              • 12. Re: Assignment Set
                                Sanjay Singh
                                Hi Sandy,

                                Were you able to find the FF? Also, please share with the us the method adopted by you to fulfill your requirement.

                                Thanks,
                                Sanjay
                                • 13. Re: Assignment Set
                                  sober_sandy
                                  Hi Sanjay,

                                  Not yet. I've tried some options but not able to see the fast formula from front end.
                                  I can see it in ff_formulas_f
                                  • 14. Re: Assignment Set
                                    892288
                                    Hi Sanjay

                                    I just tested one very basic condition and has created fast formula and i have checked it in front end
                                    and created same.

                                    Thanks for the inputs