Search Results get_payslip_sort_order3
Overview
PAY_DK_RULES is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that encapsulates Danish (DK) country-specific payroll rule logic. The package header is declared with AUTHID CURRENT_USER, and the header revision string (pydkrule.pkh 120.3.12010000.1 2008/07/27) confirms it has been part of the EBS codebase since at least the 11i era and remains shipped under 12.1.1 and 12.2.2. In the ETRM classification it is registered as API classification OTHER, indicating it is not a public, supported business API but an internal rules engine consumed by Oracle Payroll processes and, in some cases, country-extension code.
Its principal business role is to assemble the data required for the Danish payslip (lønsseddel) and statutory reporting, resolving balance and element information from the payroll action context and returning a deterministic sort key so that payslip lines are printed in the legally and functionally correct order. The embedded cursor csr_balance_info illustrates the core pattern: it reads up to nineteen action-information columns plus effective dates from PAY_ACTION_INFORMATION (self-joined as pai and pai1) and concatenates a secondary description into the primary one, producing a composite label for each balance line.
Key Procedures and Functions
Seven callable units are documented in ETRM for this package:
- GET_PAYSLIP_SORT_ORDER1 / GET_PAYSLIP_SORT_ORDER2 / GET_PAYSLIP_SORT_ORDER3 — A three-tier sorting family. Each routine returns an ordering value used to sequence entries on the Danish payslip. The layered numbering allows progressive refinement: a primary grouping (for example, earnings, deductions, employer contributions, statutory accumulators), a secondary ordering within the group, and a tertiary tie-breaker derived from element classification or action-information content. GET_PAYSLIP_SORT_ORDER3 is the finest-grained of the three and is the variant most often referenced by custom payslip reports and XML templates.
- GET_THIRD_PARTY_ORG_CONTEXT — Resolves organization context for third-party payments and related Danish statutory transfers, supplying the organization identifier used by downstream payroll processing.
- FLEX_SEG_ENABLED — Determines whether a given key flexfield segment is enabled, guarding logic that depends on optional descriptive-flexfield or key-flexfield configuration.
- LOAD_XML — Parses or materializes the XML representation of payslip and balance data, typically the payload consumed by the Danish payslip template or an external reporting interface.
- ADD_CUSTOM_XML — Appends customer-defined XML fragments to that payload, providing the supported extension point for site-specific payslip content without modifying Oracle source.
Tables Accessed
Through APPS synonyms the package reads and, where applicable, writes the following:
- PAY_ACTION_INFORMATION — Carries the per-action descriptive columns (action_information1 through action_information19) plus effective dates that drive the balance cursor and the sort-order derivation.
- PAY_ASSIGNMENT_ACTIONS and PAY_PAYROLL_ACTIONS — Identify the assignment-level and payroll-level action being processed, supplying the action context identifier.
- PAY_ELEMENT_TYPES_F, PAY_INPUT_VALUES_F, PAY_ELEMENT_ENTRY_VALUES_F — Provide element classification, input value definitions, and the actual entry values used to compute balance amounts and to classify lines for sorting.
- PER_TIME_PERIODS — Supplies payroll period dates for effective-dated filtering.
- DUAL, DBMS_SQL, and PLITBLM — Utility usage: singleton selection, dynamic SQL for flexfield or configuration-dependent statements, and the PL/SQL table/index-by utility package for in-memory collections.
Usage Notes
PAY_DK_RULES is invoked indirectly. Oracle Payroll's Danish legislative code and the payslip/XML generation routines call GET_PAYSLIP_SORT_ORDER1/2/3 while assembling payslip output, and LOAD_XML together with ADD_CUSTOM_XML is exercised when the payslip template or an electronic reporting interface requests the XML payload. GET_THIRD_PARTY_ORG_CONTEXT and FLEX_SEG_ENABLED are supporting utilities consumed during the same processing window.
Because ETRM records no inbound references from other packages, direct calls are limited to Oracle-internal code and customer extensions. Custom payslip reports, BI Publisher templates, and third-party integrations may call the GET_PAYSLIP_SORT_ORDER3 function to reproduce Oracle's line ordering, but since the package is classified as OTHER rather than a supported API, customers should wrap such calls defensively and re-validate them after any patch or upgrade to 12.1.1 or 12.2.2, as the sort logic is subject to change without a documented interface commitment.
-
PACKAGE: APPS.PAY_DK_RULES
12.2.2
-
PACKAGE: APPS.PAY_US_RULES
12.2.2
-
PACKAGE: APPS.PAY_DK_RULES
12.1.1
-
PACKAGE: APPS.PAY_CA_RULES
12.2.2
-
PACKAGE: APPS.PAY_NO_RULES
12.1.1
-
PACKAGE: APPS.PAY_NO_RULES
12.2.2
-
PACKAGE BODY: APPS.PAY_DK_RULES
12.1.1
-
PACKAGE BODY: APPS.PAY_DK_RULES
12.2.2
-
PACKAGE BODY: APPS.PAY_CA_RULES
12.2.2
-
APPS.PAY_US_RULES SQL Statements
12.2.2
-
PACKAGE BODY: APPS.PAY_NO_RULES
12.1.1
-
PACKAGE BODY: APPS.PAY_NO_RULES
12.2.2
-
APPS.PAY_CA_RULES dependencies on PAY_CA_RULES
12.2.2
-
PACKAGE BODY: APPS.PAY_US_RULES
12.2.2
-
APPS.PAY_DK_RULES dependencies on PAY_DK_RULES
12.1.1
-
APPS.PAY_NO_RULES dependencies on PAY_NO_RULES
12.2.2
-
APPS.PAY_NO_RULES dependencies on PAY_NO_RULES
12.1.1