This page (revision-44) was last changed on 26-Nov-2021 10:22 by khiggs

This page was created on 26-Nov-2021 10:22 by JEscott

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
44 26-Nov-2021 10:22 13 KB khiggs to previous
43 26-Nov-2021 10:22 13 KB khiggs to previous | to last
42 26-Nov-2021 10:22 14 KB RForbes to previous | to last DERIVATION EXPRESSIONS ==> DERIVATION_EXPRESSION_USAGE
41 26-Nov-2021 10:22 14 KB JMyers to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 3 changed one line
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the Personality database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the Personality specifications.
At line 7 changed one line
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
Inbound interfaces provide the ability to load a source file into Personality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
At line 14 changed one line
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
Define Interface Formats ([IDIF]) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
At line 22 added one line
*[UPDISBV] - Disburse Vendor Payments (A/P File Interface)
At line 26 removed 3 lines
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
At line 30 changed 2 lines
The following are examples of what derivation expressions can be used for:
\\
The [Callable Functions|CALLABLE FUNCTION] page contains the list of available functions that may be called within a Derivation Expression that may be used in an interface. The list contains functions from Oracle and those created as part of the application.
At line 33 removed 92 lines
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in [IDIF]. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display 0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie: TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in [IMLN], the saved value is the value defined in the source file and the displayed value is the eP translation, in this example the
time code.
;: {{P2K_SMGLX('GWRS_PC_TRANSLT',~)}}[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
At line 126 removed 15 lines
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
At line 144 removed one line
\\
At line 147 removed 3 lines
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
At line 151 removed 109 lines
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display 0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie: TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in [IMLN], the saved value is the value defined in the source file and the displayed value is the eP translation, in this example the
time code.
;: {{P2K_SMGLX('GWRS_PC_TRANSLT',~)}}[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
At line 261 changed 2 lines
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;: DECODE(~, '01', 'M', '02', 'F')
At line 264 removed 3 lines
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
At line 268 removed 109 lines
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display 0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in [IMLN], the saved value is the value defined in the source file and the displayed value is the eP translation, in this example the
time code.
;: {{P2K_SMGLX('GWRS_PC_TRANSLT',~)}}[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
At line 378 changed 2 lines
;:{{REPLACE(~, '-','')}}
\\
;:REPLACE(~, '-','')
At line 381 removed 3 lines
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
At line 385 removed 109 lines
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display 0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in IMLN, the saved value is the value defined in the source file and the displayed value is the eP translation, in this example the
time code.
;: {{P2K_SMGLX('GWRS_PC_TRANSLT',~)}}[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
At line 495 changed 2 lines
;: {{P2K_SMGCD(~,'DDP')}}
\\
;: P2K_SMGCD(~,'DDP')
At line 498 removed 3 lines
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
At line 502 removed 110 lines
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in IMLN, the saved value is the value defined in the source file and the displayed value is the eP translation, in this example the
time code.
;: {{P2K_SMGLX('GWRS_PC_TRANSLT',~)}}[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
At line 613 changed 2 lines
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;: DECODE(~,'ABC','1234','BYPASS')
At line 616 removed 7 lines
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
At line 624 removed 106 lines
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in IMLN, the saved value is the value defined in the source file and the displayed value is the eP translation, in this example the
time code.
;: {{P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
At line 731 changed 6 lines
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;: NVL(RTRIM(~),'01-JAN-0001')
At line 738 removed 109 lines
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in IMLN, the saved value is the value defined in the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
At line 849 changed 2 lines
;: {{upper(~) or initcap(~)}}
\\
;: upper(~) or initcap(~)
At line 852 removed 3 lines
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
At line 856 removed 111 lines
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
At line 968 changed 2 lines
;: {{substr(~,1,5)}}
\\
;: substr(~,1,5)
At line 971 removed 3 lines
;To remove whitespace
;: {{trim(~)}}
\\
At line 975 removed 112 lines
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
\\
Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
At line 1,088 changed 2 lines
;: {{trim(~)}}
\\
;: trim(~)
At line 1,091 removed 2 lines
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
At line 1,094 removed 111 lines
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;: {{concat(substr(~,1,2),substr(~,4,5))}}
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
At line 1,206 changed one line
;: {{LTRIM(~,'0')}}
;: LTRIM(~,'0')
At line 1,208 removed 4 lines
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
At line 1,213 removed 110 lines
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
;:concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
At line 1,324 changed 2 lines
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
;: TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')
At line 1,327 removed 3 lines
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
At line 1,331 removed 110 lines
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
; To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
At line 1,442 changed 2 lines
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
;: Substr(~,5,2) would give you "07", begin in position 5 for 2 characters
At line 1,445 removed 3 lines
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
At line 1,449 removed 110 lines
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}}
\\
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
At line 1,560 changed 2 lines
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
;: Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters
At line 1,563 removed 2 lines
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
At line 1,566 removed 109 lines
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')}
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
At line 1,676 changed one line
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
;: Substr(~,14,4) will display "0976", you must take the "-"'s into account when coding this string.
At line 1,678 removed one line
\\
At line 1,680 removed 3 lines
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
At line 1,684 changed 4 lines
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
;This is an example of populating a distribution segment using the value from another field defined in [IDIF]. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translationlexicon.
;: '?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'
At line 1,689 removed 4 lines
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
At line 1,694 removed 104 lines
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-}
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
At line 1,799 changed 2 lines
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
;: Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display 0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
At line 1,802 removed 4 lines
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
At line 1,807 removed 109 lines
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: {{NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
At line 1,917 changed 2 lines
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
;: Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
At line 1,920 removed 2 lines
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
At line 1,923 removed 110 lines
\\
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
At line 2,034 changed one line
;: {{ROUND(~,2) }}
;: ROUND(~,2)
At line 2,036 removed 14 lines
\\
;This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
At line 2,052 changed 2 lines
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
;This is an example of providing a Start Date for a field. This example will use the Beginning of Time date if there is a null value provided
;: NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-0001')
At line 2,055 removed one line
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
At line 2,057 removed 18 lines
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
At line 2,076 changed 2 lines
The following are examples of what derivation expressions can be used for:
\\
; To removing a colon from time field in an inbound interface (ie TTX.START_TIME)
;: concat(substr(~,1,2),substr(~,4,5))
At line 2,080 removed 3 lines
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
At line 2,084 changed 3 lines
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;Translate an incoming value to a defined Time Code in the system using a translation lexicon. The lexicon is defined in [IMLN], the saved value is the value defined in the source file and the displayed value is the translation, in this example the time code.
;: P2K_SMGLX('GWRS_PC_TRANSLT',~)
At line 2,088 removed 84 lines
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
At line 2,173 changed 16 lines
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
!!Derivation Expression Examples for [UPPHF] and [UEEF]
! Multiple Field Processing
On the [IDIF] derivation expression, you can specify multiple variable names processing by indicating the lexicon value of the X_INF_VARIABLE_NAME inside the bracket [[ ], e.g. [[320001]. Lexicon values available from [IMLN] for X_INF_VARIABLE_NAME are: 32nnnn,
35nnnn.
At line 2,190 changed 2 lines
The following are examples of what derivation expressions can be used for:
\\
A full list of INF variables interchangeable for [UPPHF] and [UEEF] are provided as long as the Database tables are being loaded according to the Interface Level parameter of the run.
At line 128 added one line
Please see example below:
At line 2,194 changed 3 lines
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
Example: Record # 50, Field # 20 Requirement for Employee Row id or Unit id:
*If the Pay Header Group user-defined field (UDF) 'PROJECT HOURS BY PERSON' is 'Y', this means that the employee is an 'ADMIN' employee and if the journal entry is reporting for 'Hours', then use the Identity eid.id on the Interface File field. Otherwise, use the Unit dun.id on the field for all other situations.
*From above IDIF set up, you should specify the variable name using 'UDF (DGD)' and enter the name in the Constant Value field, then the value of UDF will be returned and represented as ~ in the derivation expression.
*In the derivation expression, enter:
;: decode(~,'Y',decode([[320803],'02',[[320009],[[350400]),[[350400])
;:where:
;:[[320803] Journal Type (DGA), 01 - Financial Journal, 02 - Statistical Journal
;:[[320009] Identity eid_id
;:[[350400] Unit dun_id (DUN)
* This derivation expression means decode the value of ~ from UDF. If the value is 'Y', then decode the value from [[320803] Journal Type. If the journal type is '02' Statistical Journal, then return [[320009] Identify eid.id. Otherwise, return [[350400] Unit dun_id.
At line 2,198 changed 3 lines
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
Example: Record # 50, Field # 10 Requirement: Work Date or Pay Period
*If the Pay Header Group user-defined field (UDF) 'PROJECT HOURS BY PERSON' is 'Y', this means that the employee is an 'ADMIN' employee. In this case use the pay period on the interface file field, otherwise use the GL Effective date on the Interface File field.
*From above [IDIF] set up, you should specify the Variable Name using 'UDF (DGD)' and enter the UDF name in Constant Value field, then the value of UDF will be returned and represented as ~ in the derivation expression.
*In the derivation expression, enter: \\
;:decode(~,'Y',[320102],to_char(to_date([[320756]),'DD/MM/YYYY'))
;: where:
;:[[320102] Pay Period
;:[[320756] GL Eff Date (PJD)
*This derivation expression means decode the value of ~ from UDF. If the value is 'Y', then return the value from [[320102] pay period. Otherwise, return the value from [[320756] GL Effective date with the date format of 'DD/MM/YYYY'.
At line 2,202 changed 3 lines
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
!Internal Functions
You have the ability to call some Personality internal functions in the derivation expression under the guidance of a consultant.
At line 2,206 changed 3 lines
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
One example of doing this is for the [UPPHF] Payroll History interface. In this example, the Hours Comp Time Amount field is defined with the Variable Name 'Pay Header pph_id' and with a derivation Expression of:
At line 2,210 changed 7 lines
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;: P2K_PPAMTS.SPELPAY(~,P2K.PPAMTS.SPGETPEL('HOURS COMP TIME'))
At line 2,218 changed 3 lines
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
The derivation expression will return the Element value of 'HOURS COMP TIME'.
At line 2,222 changed 3 lines
;To remove whitespace
;: {{trim(~)}}
\\
The above example can also be achieved by setting up a variable name of 'Element pph
Value' with the element code specified in the Constant Value field.
!Internal Functions with Parameters
You have the ability to call some Personality internal functions in the derivation expression under the guidance of a consultant and pass the following internal parameters in order to perform some internal calculation:
;#PPH_ID#
;:This value must be in capital letters; this #PPH_ID# will be replaced by the current pay header's pph.id.
;#EEM_ID#
;:This value must be in capital letters; this #EEM_ID# will be replaced by the current employment's eem.id.
;#EID_ID#
;:This value must be in capital letters; this #EID_ID# will be replaced by the current identity's eid.id e.g. the Element PC value of 'HOURS O/T' will be retrieved first and is represented as ~ in derivation expression. The derivation expression will return the Element value of 'HOURS COMP TIME' for #PPH_ID# and add it to the value of ~.
;:Example:
;:The OT Hours field name is defined with the Variable Element PC Value with a Constant Value of HOURS O/T and has a derivation expression of:
;:P2K_PPAMTS.SPELPAY(#PPH_ID#,P2K_PPAMTS.SPGETPEL('HOURS COMP TIME')),~
At line 2,226 removed 2 lines
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
At line 2,229 changed 4 lines
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
;:You may perform some internal arithmetic calculation in the derivation expression to return some prorated amount.
At line 2,234 removed 3 lines
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
At line 2,238 changed 3 lines
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
;:Example:
;:The 'Prorate Element' Field Name is defined with the Varibale Name of elemnt PC Value with a Derivation Expression of:
;:~/P2K_PPAMTS.SPELPAY(#PPH_ID#,P2K-PPAMTS.SPGETPEL('HOURS O/T'))*P2K_PPAMTS.SPELPAY(#PPH_ID#,P2K_PPAMTS.SPGETPEL('HOURS COMPE TIME'))
!Call UserCalc Function
You can call the [UserCalc|USERCALC] function at each Record Number and each Field Number. You should set up the variable name to be 'User Calc', and specify the [UserCalc|USERCALC] name in the Constant Value field.
At line 2,242 changed 2 lines
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
The field type must be defined with a Char, Number or Date type. The Return Value [UserCalc|USERCALC] function on [IMUC] screen must match the values (Char, Number or Date) with the [IMUC] RET command to return the corresponding Char, Number or Date.
At line 2,245 changed one line
\\
The data base tables available for UserCalc are:
;:at company level: DEN / DLN / DDP / DDD / DUN / DGR / DGD / DGV
;:at employee level: EID / EPS / EEM / EAS / EASD / PPRU / PPRC
At line 2,247 changed 3 lines
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
!BYPASS Capability
*On [IDIF] Derivation expression, you may decode the Variable Name using the ~ character and return the word 'BYPASS' to bypass the Detail record entry that is with certain criteria.
* The 'BYPASS' criteria can be set up for Record Type = 'Qualify Record', 'Detail Record', and should not be used for Header and Trailer records.
* If the return value of any [IDIF] Record Number/Field Number = 'BYPASS', then this Detail record will be bypassed and will not be written to the Interface file.
;:Example:
*to include only Departments start with 'P' on interface file: decode(rtrim(substr(~,1,1)),'P',~,'BYPASS')
* to include only Departments ends with 'C' on interface file: decode(substr(~,length(rtrim(~)),1),'C','BYPASS',~)
* to bypass Cost Centers that has '????' in second segments: decode(SUBSTR(~,5,4),'????','BYPASS',SUBSTR(~,5,4))
* to include Journal Entries with Account Numbers over 40000 in segment 5: decode(greatest('40000',substr(~,16,5)),'40000','BYPASS',substr(~,16,5))
At line 2,251 changed 4 lines
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
! GOTO#nn#nnn
* when processing [IDIF] records of the same Record Type (e.g. Detail Record), you may want to skip some Record # Field # based on certain criteria and resume processing of the same Record Type at a later Record# Field# onward
* the following GOTO capabilities are available for all Record Types in Derivation Expression:
;:GOTO#nn#nnn where the 1st nn is the Record #, the 2nd nnn is the Field #
* since the [IDIF] entries are processed in chronological order, GOTO#nn#nnn must be for a Record# Field# that is after the current Record# Field#
* if an incorrect GOTO#nn#nnn is specified, or the #nn#nnn is NOT for the same Record Type, or if it is for a previous Rec# Field#, an exception message will be issued, the GOTO statement cannot be executed after skipping the records, you must verify the Interface File from this point onward
* multiple GOTO#nn#nnn can be used within the same Record Type
* if an Invalid GOTO is encountered in [IDIF] definition, the Trial mode parameter is set to 'Y' in order to prevent the Updating of the user-defined fields from the Record Type '92-Update Record'
* for XML File Format, the GOTO#nn#nnn can be used to skip certain XML Tags and carry on the processing
*for Fixed File Format, if the GOTO#nn#nnn is for the current Record#, it will GOTO the specified #nn#nnn, the current Record# information will be written
* for Fixed File Format, if the GOTO#nn#nnn is for a different Record#, it will GOTO the specified #nn#nnn of the different Record#, the current Record# information will NOT be written
* e.g. [UEEF] [IDIF] Record# 30 Field # 45, decode Plan_Code, if it equals to 'HL GROUP LIFE', GOTO#35#10
** this will skip the entire Record# 30 and carry on from Record# 35 Field#10 for the fixed file format
At line 2,256 removed 4 lines
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
At line 2,261 removed 25 lines
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
;This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
At line 2,287 changed 2,829 lines
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
\\
This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2) }}
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
;: {{ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
; To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
\\
To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ') }}
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;: {{Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
;Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
\\
; To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
; To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or "+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16)}} will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
;: {{Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for $2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
;Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
\\
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'}}
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED', :PLPL.TIME_CODE) || '-?????'
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
;: {{'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED',
:PLPL.TIME_CODE) || '-?????'
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from another field defined in IDIF. In this example, the 6th segment will be populated based on the value in the time code field after it has been translated using a translation
lexicon.
'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED',
:PLPL.TIME_CODE) || '-?????'
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
;This is an example of populating a distribution segment using the value from
another field defined in IDIF. In this example, the 6th segment will be populated
based on the value in the time code field after it has been translated using a translation
lexicon.
'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED',
:PLPL.TIME_CODE) || '-?????'
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
\\
This is an example of populating a distribution segment using the value from
another field defined in IDIF. In this example, the 6th segment will be populated
based on the value in the time code field after it has been translated using a translation
lexicon.
'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED',
:PLPL.TIME_CODE) || '-?????'
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
This is an example of populating a distribution segment using the value from
another field defined in IDIF. In this example, the 6th segment will be populated
based on the value in the time code field after it has been translated using a translation
lexicon.
'?-????-?????-???????-?-' || p2k_smglx('PL_LABOR_CD_KEYED',
:PLPL.TIME_CODE) || '-?????'
􀁘 Format a GL amount to display the leading zeros and display a decimal point for
$2263.13:
Substr(TO_CHAR(ABS(~),'0000000000009.99'),2,16) will display
0000000002263.13, will begin at the 2nd character ignoring the leading "-" or
"+" sign.
􀁘 To decode specific areas of the string:
Decode(substr(~,117,2),'05',substr(~,55,5),'02',substr(~,51,3),' ')
􀁘 To round information coming in from four to two decimal places:
ROUND(~,2)
􀁘 This is an example of providing a Start Date for a field. This example will use the
Beginning of Time date if there is a null value provided
NVL2(~,(to_char(to_date(rtrim(~),'YYYYMMDD'),'DD-Mon-YYYY')),'01-Jan-
0001')
􀁘 To removing a colon from time field in an inbound interface (ie:TTX.START_TIME)
concat(substr(~,1,2),substr(~,4,5))
􀁘 Translate an incoming value to a defined Time Code in the system using a translation
lexicon. The lexicon is defined in IMLN, the saved value is the value defined in
the source file and the displayed value is the eP translation, in this example the
time code.
P2K_SMGLX('GWRS_PC_TRANSLT',~)[{TableOfContents }]
\\
Derivation expressions provide the ability to translate values or to retrieve information otherwise not accessible in an interface format in [IDIF]. Data from within the [{$applicationname}] database may need to be translated to match the requirements from a receiving third party system. Also, data within a source file may need to be translated to match the [{$applicationname}] specifications.
!!Derivation Expression Logic for Inbound Interfaces
Inbound interfaces provide the ability to load a source file into ePersonality; this is done by running [LMTD]. The [LMTD] allows you to apply derivation expressions to variables within the record that is being loaded.
The [LMTD] respects most of the same derivation expressions that are used with SQL Loader. One exception that the [LMTD] does not respect is the BYPASS function. Instead you should define a qualifier record, this can be done using an existing column within the table or by defining a foreign field. The derivation expression in this situation would contain an IF statement or a Case When clause and the constant field would contain the result (i.e. True or False). For more information on this please review the chapter on loading with interfaces.
[LMTD] can handle multiple fields being referenced in a derivation expression, however, for [LMTD] purposes the syntax is slightly different. The multiple fields must be specified in brackets with a colon prefacing the field name, for example: (:PLPL.TIME_CODE).
----
!!Calling Functions in [IDIF] for Outbound Interfaces
Define Interface Formats (IDIF) is the screen used within the system to define export interface definitions for processing by the various interface programs. Many of these interface programs support the use of derivation expressions, but not all. As at June 1, 2008, the following interface programs have this support:
*[UEEF] - Employee / Assignment Interface
*[UPPHF] - Pay History Interface
*[UBEF] - Employee / Benefits Interface
*[UPGLF] - General Ledger File Interface
*[UPDIF] - Disbursement File Interface
*[UENH] - New Hire Interface
*[UPVEND] - AP (Vendors) Interface
*[UPDTB] - Deposits to Bank Interface
*[UPROEF] - Canadian Record of Employment file interface
----
!!Derivation Expressions Calling Database Functions
[{InsertPage page = 'CALLABLE FUNCTION'}]
----
!!Example Derivation Expressions
The following are examples of what derivation expressions can be used for:
\\
; To translate Gender to M/F
;: {{DECODE(~, '01', 'M', '02', 'F')}}
\\
;To manipulate data prior to interfacing,e.g. to remove hyphens from Government ID
;:{{REPLACE(~, '-','')}}
\\
;To get data that is not otherwise available, e.g. to get the Department Code when you only have the ID available
;: {{P2K_SMGCD(~,'DDP')}}
\\
;To filter the data and "throw out" a record,e.g. if employee is not in department ABC, disregard otherwise put in "1234"
;: {{DECODE(~,'ABC','1234','BYPASS')}}
\\
;To populate an effective date
;: {{NVL(RTRIM(~),'01-JAN-0001')}}
\\
;To change the case of supplied data
;: {{upper(~) or initcap(~)}}
\\
;To extract a portion of the supplied data, e.g. the source data is a 30 character distribution code but we are only interested in loading some of it to our field):
;: {{substr(~,1,5)}}
\\
;To remove whitespace
;: {{trim(~)}}
\\
; To remove leading zeros off of a Person Code
;: {{LTRIM(~,'0')}}
\\
; To reformat a date value, e.g. date is coming in as YYYYMMDD and needs to be reformatted for the data base to accept it
;: {{TO_CHAR(TO_DATE(RTRIM(:HIRE_DATE),'YYYYMMDD'),'DD-Mon-YYYY')}}
\\
; To shorten a fiscal period of 200307 for just the period:
;: {{Substr(~,5,2) would give you "07", begin in position 5 for 2 characters}}
\\
; To shorten a fiscal period of 200307 for just the year:
;: {{Substr(~,1,4) would give you "2003", begin in position 1 for 4 characters}}
\\
; Distribution code (001-643-8824-0976), only see the last four positions of the distribution string:
;: {{Substr(~,14,4) will display "0976"}}, you must take the "-"'s into account when coding this string.
![Notes|Edit:Internal.DERIVATION+EXPRESSIONS]
[{InsertPage page='Internal.DERIVATION+EXPRESSIONS' default='Click to create a new notes page'}]