About Me

London, United Kingdom
My name is Muhammad Faizan Karim and my aim is to spread the knowledge to everyone who want to learn oracle HRMS. I will try to write the video blogs for beginners so they can understand e-business suits from HRMS perspective, and if you have any difficulty in oracle applications HRMS , please feel free to contact with me at this email : faizan.kareem.ocp@gmail.com
Powered by Blogger.
Tuesday, February 4, 2014

HRMS Oracle Applications R12 - Change Start Date of a person

Oracle provides an API to change start dates of a person, the interesting fact is that this API even
shifts the first assignment start dates. The API allows to shift the start dates within the range of 
first date track changes done at person & assignment level, if the new start date falls beyond 
the first date track change records effective end date then there is a error which pops up and 
does not allow changing the start date, this is logical and relevant.

APP-PAY-06841: Person changes exist between the old date and the new date
ORA-20001: Person changes exist between the old date and the new date.
ORA-06512: at "APPS.HR_CHANGE_START_DATE_API", line 3068

If you still want to change the start date, then all person and assignment changes should be
removed from the system before trying to change the start date.

Below is the API which helps updating the start date

   DECLARE
      l_warn_ee   VARCHAR2 (100);
   BEGIN
      hr_change_start_date_api.update_start_date (p_validate            => FALSE,
                            p_person_id           => 8424,
                             p_old_start_date      => TO_DATE ('01-01-2000','MM-DD-YYYY'),
                            p_new_start_date      => TO_DATE ('01-01-2001','MM-DD-YYYY'),
                               p_update_type         => 'E',
                             p_warn_ee             => l_warn_ee
                                );
      DBMS_OUTPUT.put_line (l_warn_ee);
   END;
Tuesday, January 28, 2014
Prerequisites:

Step1 : Create the Element and Element links
Step2: write the fast formula
Step3: Attach the fast formula in Formula Results

Package used to call the fast formula from the backed : ff_exec

Simple Code Snippet below: 

      l_formula_id        NUMBER;
      l_element_inputs    ff_exec.inputs_t;
      l_element_outputs   ff_exec.outputs_t;
      l_in_count          NUMBER;
      l_out_count         NUMBER;
      l_pay_value         NUMBER;

   BEGIN

      BEGIN
         SELECT formula_id
           INTO l_formula_id
           FROM ff_formulas_f
          WHERE formula_name = 'XX_PAYROLL_FORMULA'
          AND p_effective_date BETWEEN effective_start_date  
             AND effective_end_date;
      EXCEPTION 
      WHEN OTHERS 
      THEN
      DBMS_OUTPUT.put_line ('NO formula exists');
      END;

      IF l_formula_id IS NOT NULL

      THEN

-- Insert FND_SESSIONS row ( Optional )

  INSERT INTO fnd_sessions
             ( session_id, 
               effective_date
             )
        VALUES 
            ( USERENV ('sessionid'), 
              p_effective_date
             );

--
-- Initialize the formula.
--

ff_exec.init_formula (l_formula_id,
                      p_effective_date,
                      l_element_inputs,
                      l_element_outputs
                      );

--
-- Loop through the Input Values
--
FOR l_in_count IN l_element_inputs.FIRST .. l_element_inputs.LAST
    LOOP

    --
    -- Pass The each Input value name and its Value : Eg: START_DATE and p_start_date
    --    
       IF (l_element_inputs (l_in_count).NAME = 'START_DATE')
        THEN
           l_element_inputs (l_in_count).VALUE :=
                fnd_date.date_to_canonical (p_start_date);
        END IF;

END LOOP;

--
--Run The formula
--

ff_exec.run_formula (l_element_inputs, l_element_outputs);

--
-- Get the Out Put Values
--
FOR l_out_count IN l_element_outputs.FIRST .. l_element_outputs.LAST

    LOOP
      --
      -- Get all the Out Put Values Here L_PAY_VALUE is the out put value
      --
      IF (l_element_outputs (l_out_count).NAME = 'L_PAY_VALUE')
        THEN
           l_pay_value := l_element_outputs (l_out_count).VALUE;
      END IF;

    END LOOP;

RETURN (l_pay_value);

END;
Wednesday, January 22, 2014
Absence Management through Calendar OR Fast Formula:

There is a system profile called HR: Schedule Based Absence Calculation which controls whether the schedule information takes priority over the BG_ABSENCE_DURATION FF. Set the profile value to YES and it will use the schedule information. Set it to NO and it will use the FF.

A) 1 - Open and understand the structure of the seeded fast formula
TEMPLATE_ABSENCE_DURATION
2 - Create a new fast formula with name BG_ABSENCE_DURATION of same type as
TEMPLATE_ABSENCE_DURATION for custom absence calculations considering the work
schedules. Use the function GET_WORKING_DAYS instead of DAYS_BETWEEN.
That should exclude the week-ends from the absence duration calculation.

B) HR Dev has provided a Work Scheduling Component, which is available starting HR.PF.K, please review note 
330021.1

The functionality is delivered in patch that you need to apply on top of HR.PF.K, or it is already included in HR.PF.K.1

Users will need to setup in HRMS Manager > Work Structures > Work Schedules 
Users must ensure ensure the profile option HR: Schedule Based Absence Calculation is set to 
‘Yes’.
===========================================================================
Setup Step 1 :


Setup Step 2 :


Tuesday, January 21, 2014
A Similar Solution,
Doc ID: 429990.1 How to Submit a Concurrent Request Using a Self-Service Page

------Add function FNDCPSRSSSWA ( Schedule Requests ) to menu.
A Similar Solution, Directly Calling the report from 11i Self Service Menu

Doc ID: 334847.1 How to add a report to a 11i Self Service Menu
------Create a custom function using FNDCPPROGRAMPAGE
One More Way, To Submit Active Users using a button,

We can add a button(Create a New Item) to a any page using personalization and call FNDCPPROGRAMPAGE,

Destination URI: OA.jsp?akRegionCode=FNDCPPROGRAMPAGE&akRegionApplicationId=0&programApplName=FND&programName=FNDSCURS

Prompt: Active Users Report
Target Frame: _blank


If you want to hide schedule, print, notify pages, then add below to url
&parameterRegion=Hide
&programRegion=Hide
&scheduleRegion=Hide
&notifyRegion=Hide
&printRegion=Hide

Furthur it can be elaborated using,
744832.1 Oracle Application Framework Developer’s Guide Release 12.1.1

Page 283, Adding Request Monitoring to Your Product
---
OA.jsp?akRegionCode=FNDCPPROGRAMPAGE&akRegionApplicationId=0&programApplName=FND&programName=FNDSCURS&scheduleRegion=Hide&notifyRegion=Hide&printRegion=Hide&programRegion=Hide
Monday, January 20, 2014
Runtime Duration Calculation on SIT (HRMS Keyflexfield)

Recently we have a requirement to calculate two dates field and save months between in third segment.

For example :  (segment1 * segment2 ) =  Segment3

To achieve this we have to create 3 segments.

Segment1 for  Start Date
Segment 2 for End Date
And segment3 is for total calculated value.

To calculation the duration of months you have to create a value set with “NO Validation Type” and segment default  type will be “SQL”

The SQL statement will be base on start date value set and end date value set.
select NVL(XX_GENERAL_FUNCTIONS.GET_MONTHS_BETWEEN((:$FLEX$.SIT_DATE_VALUESET1) , (:$FLEX$.SIT_DATE_VALUESET2 ) ),'0') from dual