[Home] [Help] [Dependency Information]
Object Name: | OKC_ANCESTRYS_V |
---|---|
Object Type: | VIEW |
Owner: | APPS |
FND Design Data: | OKC.OKC_ANCESTRYS_V |
Subobject Name: | |
Status: | VALID |
A public view which may be useful for custom reporting or other data
requirements.
This relationship (intersection table) is intended to hold the complete list of all ancestor LINE for a LINE.
This allows a simple (!?) query (non tree walk - because I understand there are limitations for a tree walk query) which could return all T&C flowing down from ancestor LINE
(NB. need to include T&C flowing down from CONTRACT as well)
eg. something like this
select * from T&C
where
(exists relationship T&C to LINE)
or
(exists ASCENDANT.LINE related DESCENDENT.LINE
and exists relationship T&C to ASCENDANT.LINE
and T&C flowsdown)
or
(exists ASCENDANT.LINE related DESCENDENT.LINE
and exists relationship CONTRACT to ASCENDANT.LINE
and exists relationship T&C to CONTRACT)
and T&C flowsdown)
The form should allow toggle between T&C explicitly attached to the LINE and the total of all T&C applicable to the LINE (explicit and flowing down from CONTRACT and ancestor LINE)
On insert of a LINE, insert into ANCESTRY the parent of the LINE and all ancestor LINE of the parent LINE.
----------------------------------------------------------------
actual example code
c is the ancestry table
a is the contract
b is the lines
----------------------------------------------------------------
SMACHIN
CREATE_ANCESTRY
AFTER EACH ROW
INSERT
SMACHIN
B
REFERENCING NEW AS NEW OLD AS OLD
ENABLED
CREATE_ANCESTRY
AFTER INSERT
ON B
FOR EACH ROW
BEGIN
insert into C
(
A_AA
,B_BB
,B_BB_FOR
)
SELECT
C2.A_AA
,C2.B_BB
,:NEW.BB
FROM
C C2
WHERE
(
C2.B_BB_FOR = :NEW.B_BB
);
insert into C
(
B_BB
,B_BB_FOR
)
SELECT
:NEW.B_BB
,:NEW.BB
FROM
dual
WHERE
(
:NEW.B_BB IS NOT NULL
);
insert into C
(
A_AA
,B_BB_FOR
)
SELECT
:NEW.A_AA
,:NEW.BB
FROM
DUAL
WHERE
(
:NEW.A_AA IS NOT NULL
);
END;
----------------------------------------------------------------
Name | Datatype | Length | Mandatory | Comments |
---|---|---|---|---|
ROW_ID | ROWID | (10) | The address of the row in the database | |
CLE_ID | NUMBER | Yes | Foreign key to OKC_K_LINES_B. | |
CLE_ID_ASCENDANT | NUMBER | Yes | Surrogate key used for primary unique identifiers. | |
OBJECT_VERSION_NUMBER | NUMBER | (9) | Yes | Sequential number set at 1 on insert and incremented on update. Used by APIs to ensure current record is passed. |
LEVEL_SEQUENCE | NUMBER | Yes | Level sequence number. | |
CREATED_BY | NUMBER | (15) | Yes | Standard Who column. |
CREATION_DATE | DATE | Yes | Standard Who column. | |
LAST_UPDATED_BY | NUMBER | (15) | Yes | Standard Who column. |
LAST_UPDATE_DATE | DATE | Yes | Standard Who column. | |
LAST_UPDATE_LOGIN | NUMBER | (15) | Standard Who column. |
Cut, paste (and edit) the following text to query this object:
SELECT ROW_ID
, CLE_ID
, CLE_ID_ASCENDANT
, OBJECT_VERSION_NUMBER
, LEVEL_SEQUENCE
, CREATED_BY
, CREATION_DATE
, LAST_UPDATED_BY
, LAST_UPDATE_DATE
, LAST_UPDATE_LOGIN
FROM APPS.OKC_ANCESTRYS_V;
|
|
|