SPF_E_WOAPR_VW

(SQL View)
Index Back

Work Order approval view

View for retrieving a user's Work Orders needing approval

SELECT U.OPRID , X.BUSINESS_UNIT , X.WORK_ORDER_ID , P.NAME , W.DURATION , W.POAMOUNT , W.CURRENCY_CD FROM PS_SPF_WO_APR_XREF X , PS_EOAW_STEPINST S , PS_EOAW_USERINST U , PS_SPF_WORDERREC W , PS_SPB_PERSON_TBL P WHERE S.EOAWSTEP_INSTANCE = U.EOAWSTEP_INSTANCE AND S.EOAWPRCS_ID = 'SP_WORKORDER' AND (S.EOAWTHREAD_ID = X.EOAWPARENT_THREAD OR S.EOAWTHREAD_ID = X.EOAWTHREAD_ID) AND X.EOAWPRCS_ID = S.EOAWPRCS_ID AND X.EOAWDEFN_ID = S.EOAWDEFN_ID AND W.WORK_ORDER_ID = X.WORK_ORDER_ID AND W.BUSINESS_UNIT = X.BUSINESS_UNIT AND W.WO_CONID = P.PERSON_ID AND S.EOAWSTEP_NBR = ( SELECT MIN(S_S.EOAWSTEP_NBR) FROM PS_EOAW_STEPINST S_S WHERE S_S.EOAWSTEP_INSTANCE = S.EOAWSTEP_INSTANCE AND S_S.EOAWDEFN_ID = S.EOAWDEFN_ID AND S_S.EOAWPRCS_ID = S.EOAWPRCS_ID AND S_S.EOAWSTEP_STATUS = 'P')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 USERID Character(30) VARCHAR2(30) NOT NULL A user's ID
2 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Default Value: OPR_DEF_TBL_FS.BUSINESS_UNIT

3 WORK_ORDER_ID Character(15) VARCHAR2(15) NOT NULL Work Order ID
4 NAME Character(50) VARCHAR2(50) NOT NULL Name
5 DURATION Number(5,0) INTEGER NOT NULL Recurrence Duration
6 POAMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Purchase Order / Work Order Amount
7 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code