P 2 K_PU.GET_CHILD_ID
Back to current versionRestore this version

Retrieve the ID of a date-sensitive child record#

Functionality:#

This function retrieves the ID for a date sensitive record given a parent alias and ID (and optional as of date)

Parameters:#

TABLE_ALIAS The table alias (e.g. EID) of the parent table (not the child table)
PARENT ID The ID of the parent record
AS OF The ID of the record that you are seeking the data for

Returns: #

Varchar2 (regardless of the type of data being requested)

Errors: #

*err: bad table name* When there is no table found in IMTD with the name, or alias provided
*err: bad column name* When there is no column name found in IMCD with that name, for the table provided.
*err: invalid column length*When the column is a BLOB, or has a maximum length in excess of 4,000 characters
*err: ORA-xxx is issued when any other error occurs.

Example: #

P2K_PU.GC('EID','FIRST_NAME',~) - Using Identity ID as the third parameter (~)

Will return the First Name the employee from P2K_HR_IDENTITIES, identified by the ID in the third parameter

P2K_PU.GC('P2K_PR_PAY_RUNS','DISBURSED',~) - Using Pay Run ID as the third parameter (~)

Will return the DISBURSED flag, for the payrun identified by the ID in the third parameter

Note that DATE field types will return the date as a character in DD-MON-YYYY format, so if you want to reformat using a date format mask, then you will need to convert to a date type using the TO_DATE function.


Notes#

Click to create a new notes page