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


0 comments: