PO_APPR_MAP_VW

(SQL View)
Index Back

Approve PO User View


SELECT DISTINCT B.BUSINESS_UNIT , B.PO_ID , B.PO_DT , B.PO_STATUS , B.BUYER_ID , B.OPRID_ENTERED_BY , B.PO_REF , B.PO_TOTAL , B.CURRENCY_CD , B.VENDOR_SETID , B.VENDOR_ID , U.EOAWSTEP_STATUS ,U.OPRID ,U.EOAWORIG_OPRID ,%DatePart(U.EOAWDTTM_MODIFIED) ,S.EOAWTHREAD_ID ,X.EOAWTHREAD_STATUS ,U.EOAWDTTM_COMPLETE ,X.EOAWREQUESTOR_ID ,X.EOAWDTTM_MODIFIED ,S.EOAWPRCS_ID ,S.EOAWDEFN_ID ,S.EFFDT ,S.EOAWSTEP_NBR ,'2' FROM PS_PO_AW X , PS_PO_APPR_HDR_VW B , PS_EOAW_STEPINST S , PS_EOAW_USERINST U WHERE B.BUSINESS_UNIT = X.BUSINESS_UNIT AND B.PO_ID = X.PO_ID AND B.HOLD_STATUS = 'N' AND X.EOAWTHREAD_ID = S.EOAWTHREAD_ID AND X.EOAWPRCS_ID = S.EOAWPRCS_ID AND X.EOAWDEFN_ID = S.EOAWDEFN_ID AND S.EOAWSTEP_INSTANCE = U.EOAWSTEP_INSTANCE AND X.EOAWTHREAD_ID=( SELECT MIN(X1.EOAWTHREAD_ID) FROM PS_PO_AW X1 WHERE X1.BUSINESS_UNIT=X.BUSINESS_UNIT AND X1.PO_ID=X.PO_ID AND X1.LINE_NBR=X.LINE_NBR AND X1.EOAWTHREAD_STATUS <> 'T') AND S.EOAWTHREAD_ID = ( SELECT MIN(S2.EOAWTHREAD_ID) FROM PS_PO_AW X2 , PS_PO_APPR_HDR_VW B2 , PS_EOAW_STEPINST S2 , PS_EOAW_USERINST U2 WHERE B2.BUSINESS_UNIT = X.BUSINESS_UNIT AND B2.PO_ID = X.PO_ID AND B2.BUSINESS_UNIT = X2.BUSINESS_UNIT AND B2.PO_ID = X2.PO_ID AND B2.HOLD_STATUS = 'N' AND X2.EOAWTHREAD_ID = S2.EOAWTHREAD_ID AND X2.EOAWPRCS_ID = S2.EOAWPRCS_ID AND X2.EOAWDEFN_ID = S2.EOAWDEFN_ID AND S2.EOAWSTEP_INSTANCE = U2.EOAWSTEP_INSTANCE AND X2.EOAWTHREAD_ID=( SELECT MIN(X3.EOAWTHREAD_ID) FROM PS_PO_AW X3 WHERE X3.BUSINESS_UNIT=X2.BUSINESS_UNIT AND X3.PO_ID=X2.PO_ID AND X3.LINE_NBR=X2.LINE_NBR AND X3.EOAWTHREAD_STATUS <> 'T'))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
3 PO_DT Date(10) DATE Date
4 PO_STATUS Character(2) VARCHAR2(2) NOT NULL PO Status
A=Approved
C=Complete
D=Dispatched
DA=Denied
I=Initial
LD=Line Denied
O=Open
PA=Pending Approval/Approved
PX=Pending Cancel
X=Canceled
5 BUYER_ID Character(30) VARCHAR2(30) NOT NULL Buyer
6 OPRID_ENTERED_BY Character(30) VARCHAR2(30) NOT NULL Entered By 07/25/2011 MRAD 12383033 :Ensured that OPRID_ENTERED_BY is set with format type of MixedCase. 03/22/2013 GL 16482301: Switched OPRID_ENTERED_BY back to MixedCase again. Please don't change it to UpperCase!!! FYI - The alternatives to use a User ID as uppercase: 1) Create your own User ID, add comments in the Field Properties, and fill out the Owner ID 2) Use %Upper meta-SQL in SQL statements 3) Use Upper function in peoplecodes
7 PO_REF Character(30) VARCHAR2(30) NOT NULL Specifies the purchase order number associated with a receivables item.
8 PO_TOTAL Signed Number(28,3) DECIMAL(26,3) NOT NULL PO Total
9 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
10 VENDOR_SETID Character(5) VARCHAR2(5) NOT NULL Vendor SetID
11 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier

Prompt Table: VENDOR_VW

12 EOAWSTEP_STATUS Character(1) VARCHAR2(1) NOT NULL Step Instance Status
A=Approved
B=Pushed back
C=Auto Approved
D=Denied
E=Administrator denied
F=Deleted
G=Bypassed
H=On Hold
I=No Action Taken
K=Skipped
L=Terminated
M=Administrator approved
N=Not Active
P=Pending
R=No longer in role
T=Terminated
U=Auto approved
X=Deleted
Z=Pending Denial
13 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
14 EOAWORIG_OPRID Character(30) VARCHAR2(30) NOT NULL User ID
15 EOAWSTART_DT Date(10) DATE Start Date
16 EOAWTHREAD_ID Number(15,0) DECIMAL(15) NOT NULL Approval Framework Thread ID
17 EOAWTHREAD_STATUS Character(1) VARCHAR2(1) NOT NULL Thread Status
A=Approved
C=Complete
D=Denied
E=Pending Denial
H=Hard Deny
I=Initial
N=Not Active
P=Pending
S=Awaiting Further Approvals
T=Terminated
W=Canceled
X=Suspended/Pending Denial
18 EOAWDTTM_COMPLETE DateTime(26) TIMESTAMP Date/Time Completed
19 EOAWREQUESTOR_ID Character(30) VARCHAR2(30) NOT NULL Requestor id
20 EOAWDTTM_MODIFIED DateTime(26) TIMESTAMP Datetime modified
21 EOAWPRCS_ID Character(30) VARCHAR2(30) NOT NULL Approval Process ID
22 EOAWDEFN_ID Character(30) VARCHAR2(30) NOT NULL Approval Framework Definition ID
23 EFFDT Date(10) DATE NOT NULL Effective Date

Default Value: %date

24 EOAWSTEP_NBR Number(6,2) DECIMAL(5,2) NOT NULL Sequence number of step in its path
25 PRIORITY_FLG Character(1) VARCHAR2(1) NOT NULL Priority Flag
1=High
2=Medium
3=Low