P6_PARNT_OBJ_VW

(SQL View)
Index Back

P6 Parent ObjectID View

P6 Parent ObjectID View - used to derive relative objectIDs for child and parent activities in a project-activity structure (relative objectID is defined as the activity record's assigned sequence number, ROW_NUMBER_5) Maintenance Note: to simplify logic in client AE programs, top-level activities (level num = 1) in this view will have (a) their Parent ActivityID set to blank, and (b) their Parent ObjectID value set to 0

SELECT A.BUSINESS_UNIT , A.PROJECT_ID , A.ACTIVITY_ID , A.LEVEL_NUM , A.ROW_NUMBER_5 AS ACTIVITY_OBJECTID , CASE WHEN A.LEVEL_NUM = 1 THEN ' ' ELSE B.PARENT_ACTIVITY_ID END , CASE WHEN A.LEVEL_NUM = 1 THEN 0 ELSE C.ROW_NUMBER_5 END AS PARENT_OBJECTID FROM PS_PROJ_ACTIVITY A , PS_PC_GETPARNT_ACT B , PS_PROJ_ACTIVITY C WHERE B.BUSINESS_UNIT = A.BUSINESS_UNIT AND B.PROJECT_ID = A.PROJECT_ID AND B.ACTIVITY_ID = A.ACTIVITY_ID AND C.BUSINESS_UNIT = B.BUSINESS_UNIT AND C.PROJECT_ID = B.PROJECT_ID AND C.ACTIVITY_ID = B.PARENT_ACTIVITY_ID AND (C.LEVEL_NUM = (A.LEVEL_NUM - 1) OR A.LEVEL_NUM = 1)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 PROJECT_ID Character(15) VARCHAR2(15) NOT NULL Project Id ChartField
3 ACTIVITY_ID Character(15) VARCHAR2(15) NOT NULL Activity ID
4 LEVEL_NUM Number(3,0) SMALLINT NOT NULL Level
5 ACTIVITY_OBJECTID Number(10,0) DECIMAL(10) NOT NULL A unique ID that is the Activity key to a corresponding table in an external system such as Primavera.
6 PARENT_ACTIVITY_ID Character(15) VARCHAR2(15) NOT NULL An Activity that is the parent of another Activity within a WBS tree structure.
7 PARENT_OBJECTID Number(10,0) DECIMAL(10) NOT NULL A unique ID that is the Activity key to a corresponding table in an external system such as Primavera.