天天看点

201210232AM-Fast Formula from T.Tagawa

Basically, no functional changes from EBS for formula area.

But from technical perspective, big change was done for formula area.

In EBS, formula was compiled into PL/SQL package, and was executed.

But in fusion, 2 compiled information exists:

One is the same as EBS, that is PL/SQL package. This is executed by Java layer,like archiver.

Another is new compilation information, FF_COMPILED_INFO.COMPILED_TEXT,

which is interpreted by C code, and executed without using PL/SQL package above.

This new feature tries to use "cache" as much as possible, and suppress

any select operation against DB to raise performance.

For formula, please refer to this.

http://review.us.oracle.com/review/reviewperf.do?reviewId=30233

===================================

Deduction Card

===================================

In fusion, to run payroll process, DIR card is mandatory.

PYUGEN tries to get CALC_BREAKDOWN_ID and TAX_UNIT_ID for payroll terms/assignments being processed in the payroll run, and stamp these 2 for each run result at term/assignment level (PAY_RUN_RESULTS.CALC_BREAKDOWN_ID/TAX_UNIT_ID).

TAX_UNIT_ID is derived from PAY_DIR_REP_CARDS_F.TAX_UNIT_ID.

CALC_BREAKDOWN_ID is either PAY_DIR_CARDS_F.DIR_CARD_ID or PAY_DIR_CARD_COMPONENTS_F.DIR_CARD_COMP_ID.

These are based on the following settings by the legislation.

    PAY_DIR_CARD_DEFINITIONS.BREAKDOWN_COMPONENT_FLAG

    PAY_DIR_CARD_DEFINITIONS.DEFAULTING_TRU_FLAG

    PAY_DIR_CARD_DEFINITIONS.ASSOCIABLE_TRU

    PAY_DIR_CARD_DEFINITIONS.ASSOCIABLE_TERM

    PAY_DIR_CARD_COMP_DEFS_F.BREAKDOWN_COMPONENT_FLAG

    PAY_DIR_CARD_COMP_DEFS_F.DEFAULTING_TRU_COMP_FLAG

    PAY_DIR_CARD_COMP_DEFS_F.ASSOCIABLE_TRU

    PAY_DIR_CARD_COMP_DEFS_F.ASSOCIABLE_TERM

pay_payroll_run.get_calc_breakdown_id/get_tax_unit_id are used by PYUGEN to derive these.

User needs to associate TRU with either DIR card or DIR component.

Additionally, user needs to associate payroll terms being processed by the run with above TRU.

If not found, error will be thrown.

Core pay is trying to introduce default DIR card creation routine in the future, but this does not exist at the moment, so each localization needs to implement this "default DIR card creation" using BLU on PAY_PAY_RELATIONSHIPS_DN EO.

===================================

DIR

===================================

All rates/amounts must be stored into Legislative DIR (Deduction Information Repository, This will be renamed to Calculation Information Repository (CIR)

in the future to support both earnings and deductions).

For example, tax rate must be stored into PAY_VALUE_DEFINITIONS_F and PAY_RANGE_ITEMS_F.

If this tax rate can be updated for each PREL/TRU/PSU individually, you can use "Overriding DIR" feature.

This feature allows user to override seeded range item values via PSU/TRU/PREL DIR card.

The DIR card UI allows user to override these seeded range items,

but the storage is still in PAY_VALUE_DEFINITIONS_F and PAY_RANGE_ITEMS_F.

CALC_DIR_VALUE function can return appropriate value taking these overridings into consideration.

Following functions are supported by core pay.

    CALC_DIR_EXISTS

    CALC_DIR_TEXT_VALUE

    CALC_DIR_VALUE

    CALC_DIR_VALUE_DETAIL

Please note these functions are callable from C code (at the moment, only PYUGEN supports this).

When you call these functions, e.g. via Java layer, error will be thrown.

For more details, please refer to the following docs.

http://review.us.oracle.com/review/reviewperf.do?reviewId=39505

http://myforums.oracle.com/jive3/thread.jspa?messageID=4493231

http://myforums.oracle.com/jive3/thread.jspa?messageID=4628867

Note:

When you want to enable contexts, define those contexts into PAY_DED_CONTEXT_USAGES with the corresponding DEDUCTION_TYPE_ID, and set this deduction_type_id to the element type (PAY_ELEMENT_TYPES_F.DEDUCTION_TYPE_ID) used in PAY_CALCULATION_UNITS_F.

===================================

Auto Indirect Formula

===================================

For term/assignment level entries, PAY_RUN_RESULTS.TAX_UNIT_ID and CALC_BREAKDOWN_ID are defaulted by PYUGEN as stated above.

But for Payroll Relationship level entries, these 2 columns are not defaulted automatically by PYUGEN. We have to set valid values to these columns using "Auto Indirect" formula. These 2 contexts are called "core contexts".

There are other contexts, called "user contexts", like AREA1, AREA2, DEDUCTION_CARD_ID, etc. To set these context values, and store these into PAY_RUN_RESULT_VALUES, we have to create input values associated with these contexts (PAY_INPUT_VALUES_F.CONTEXT_ID). "Auto Indirect" formula can set these contexts too in addition to above 2 core contexts.

But there's other ways to set these user contexts.

1) Use Direct/Indirect result rules (the context values are stored into result values)

2) Call CHANGE_CONTEXTS statement (the context values are NOT stored into result values)

继续阅读