DR_UNPOST_SRCH

(SQL View)
Index Back

Unpost Draft Search View


SELECT D.DRAFT_BU , D.DRAFT_ID , A.GROUP_BU , A.GROUP_ID , D.CUST_ID , D.DRAFT_DOC_REF , D.DRAFT_STATUS , D.DRAFT_AMT , D.DRAFT_CURRENCY , A.DRAFT_BUSN_EVENT , A.DRAFT_POST_ACTION , A.DTTM_CREATED FROM PS_DRAFT_CONTROL D , PS_DRAFT_ACTIVITY A , PS_DR_BUS_EVNT_UNP B , PS_DRAFT_TYPE_TBL T , PS_SET_CNTRL_REC S WHERE S.RECNAME = 'DRAFT_TYPE_TBL' AND S.SETCNTRLVALUE=D.DRAFT_BU AND T.SETID = S.SETID AND T.DRAFT_TYPE = D.DRAFT_TYPE AND T.DRAFT_UNPOST_FLG = 'Y' AND D.CREATE_PEND_ITEMS = 'A' AND D.DRAFT_BU = A.DRAFT_BU AND D.DRAFT_ID = A.DRAFT_ID AND D.DRAFT_BUSN_EVENT = A.DRAFT_BUSN_EVENT AND D.DRAFT_POST_ACTION = A.DRAFT_POST_ACTION AND B.DRAFT_BUSN_EVENT = A.DRAFT_BUSN_EVENT AND B.DRAFT_POST_ACTION = A.DRAFT_POST_ACTION AND B.UNPOST_FLG = 'Y' AND A.POST_DT IS NOT NULL AND A.UNPOST_FLG = 'N' AND A.DTTM_CREATED = ( SELECT MAX(DTTM_CREATED) FROM PS_DRAFT_ACTIVITY A2 WHERE A.DRAFT_BU = A2.DRAFT_BU AND A.DRAFT_ID = A2.DRAFT_ID AND A.DRAFT_BUSN_EVENT = A2.DRAFT_BUSN_EVENT AND A.DRAFT_POST_ACTION = A2.DRAFT_POST_ACTION ) AND NOT EXISTS ( SELECT 'X' FROM PS_DRAFT_ACTIVITY DA WHERE DA.DRAFT_BU=D.DRAFT_BU AND DA.DRAFT_ID=D.DRAFT_ID AND DA.DTTM_CREATED = ( SELECT MAX(DTTM_CREATED) FROM PS_DRAFT_ACTIVITY DA2 WHERE DA2.DRAFT_BU = D.DRAFT_BU AND DA2.DRAFT_ID = D.DRAFT_ID AND DA2.UNPOST_FLG = 'Y' AND DA2.POST_DT IS NULL))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 DRAFT_BU Character(5) VARCHAR2(5) NOT NULL Identifies the Receivables business unit associated with a draft. This field is maintained by the Draft Creation process.

Default Value: OPR_DEF_TBL_AR.DEPOSIT_BU

Prompt Table: SP_BUARDR_NONVW

2 DRAFT_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies a payment draft. The Draft ID is system-generated during the Draft Creation process or manually entered.
3 GROUP_BU Character(5) VARCHAR2(5) NOT NULL Represents the high level grouping of multiple general ledger business units.
4 GROUP_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies a collection of pending items that are to be posted to accounts receivable. The identifier is manually entered or automatically generated by the system.
5 CUST_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies an organizational entity that purchases goods or services from the enterprise. Represents the sold-to customer which is the customer organization that places orders. The CUST_ID may or may not be the same as the identifiers for the bill-to and ship-to locations.

Prompt Table: CUST_SRCH_VW
Set Control Field: DRAFT_BU

6 DRAFT_DOC_REF Character(20) VARCHAR2(20) NOT NULL Draft Reference
7 DRAFT_STATUS Character(1) VARCHAR2(1) NOT NULL Draft Status
A=Accepted
C=Complete
D=Dishonored
E=Void
I=Identified
L=Collateral
M=Discounted
N=No Action
P=Pending
R=Remitted
T=Endorsed
8 DRAFT_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the amount of a draft payment. This field is maintained by the Draft Creation process.
9 DRAFT_CURRENCY Character(3) VARCHAR2(3) NOT NULL Specifies the currency of a draft payment. The draft currency may or may not be the same as the base currency of the business unit handling the draft.
10 DRAFT_BUSN_EVENT Character(2) VARCHAR2(2) NOT NULL Defines the Draft life cycle event. It represents one of the actions that the PeopleSoft system has provided for Draft processing. Examples are: Approving a Draft Remitting a Draft to the Bank Voiding the Draft.

Prompt Table: DR_BUS_EVNT_TBL

11 DRAFT_POST_ACTION Character(1) VARCHAR2(1) NOT NULL Draft Post Action
A=Actual
D=Dishonor
12 DTTM_CREATED DateTime(26) TIMESTAMP Datetime Created