ARRE_DMHIST_VW

(SQL View)
Index Back

Draft Activities

Excluding Unpost and its post groups. It is used to determine draft status for an item activity.

SELECT A.BUSINESS_UNIT , A.CUST_ID , A.ITEM , A.ITEM_LINE , A.ITEM_SEQ_NUM , C.CC_DM_TRAN_TYPE , D.CC_DM_TRAN_TYPE , A.ENTRY_USE_ID , A.ENTRY_TYPE , A.ENTRY_REASON , A.ACCOUNTING_DT , A.DRAFT_BU , A.DRAFT_ID , A.GROUP_BU , A.GROUP_ID , A.GROUP_SEQ_NUM , A.GROUP_TYPE FROM PS_ITEM_ACTIVITY A , PS_ITEM_ACTIVITY B , PS_ENTRY_USE_TBL C , PS_ENTRY_USE_TBL D WHERE A.ENTRY_USE_ID = C.ENTRY_USE_ID AND C.SYS_TRAN_TYPE = 'A' AND C.CC_DM_TRAN_TYPE IN ('R','C','D','V') AND B.ENTRY_USE_ID = D.ENTRY_USE_ID AND D.SYS_TRAN_TYPE = 'A' AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.CUST_ID = B.CUST_ID AND A.ITEM = B.ITEM AND A.ITEM_LINE = B.ITEM_LINE AND A.DRAFT_BU = B.DRAFT_BU AND A.DRAFT_ID = B.DRAFT_ID AND A.GROUP_SEQ_NUM = B.GROUP_SEQ_NUM AND B.ITEM_SEQ_NUM < A.ITEM_SEQ_NUM AND B.GROUP_TYPE <> 'U' AND B.ITEM_SEQ_NUM = ( SELECT MAX(X.ITEM_SEQ_NUM) FROM PS_ITEM_ACTIVITY X , PS_ENTRY_USE_TBL Y WHERE X.ENTRY_USE_ID = Y.ENTRY_USE_ID AND Y.SYS_TRAN_TYPE = 'A' AND X.BUSINESS_UNIT = A.BUSINESS_UNIT AND X.CUST_ID = A.CUST_ID AND X.ITEM = A.ITEM AND X.ITEM_LINE = A.ITEM_LINE AND X.DRAFT_BU = A.DRAFT_BU AND X.DRAFT_ID = A.DRAFT_ID AND X.GROUP_SEQ_NUM = A.GROUP_SEQ_NUM AND X.ITEM_SEQ_NUM < A.ITEM_SEQ_NUM AND X.GROUP_TYPE <> 'U' AND NOT EXISTS ( SELECT 'X' FROM PS_GROUP_CONTROL G , PS_ITEM_ACTIVITY I WHERE G.GROUP_TYPE = 'U' AND G.GROUP_BU = X.GROUP_BU AND G.GROUP_ID_ORIG = X.GROUP_ID AND I.GROUP_BU = G.GROUP_BU AND I.GROUP_ID = G.GROUP_ID AND I.BUSINESS_UNIT = X.BUSINESS_UNIT AND I.CUST_ID = X.CUST_ID AND I.ITEM = X.ITEM AND I.ITEM_LINE = X.ITEM_LINE AND I.DRAFT_BU = X.DRAFT_BU AND I.DRAFT_ID = X.DRAFT_ID AND I.GROUP_SEQ_NUM = X.GROUP_SEQ_NUM AND I.ITEM_SEQ_NUM <= A.ITEM_SEQ_NUM ) )

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Prompt Table: BUS_UNIT_TBL_FS

2 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_BI_A2_VW

3 ITEM Character(30) VARCHAR2(30) NOT NULL Uniquely identifies an invoice credit memo or debit memo. The item ID is also called the invoice number.
4 ITEM_LINE Number(6,0) INTEGER NOT NULL Item Line
5 ITEM_SEQ_NUM Number(3,0) SMALLINT NOT NULL Item Sequence Number
6 CC_DM_TRAN_TYPE Character(1) VARCHAR2(1) NOT NULL Draft Management Tran Type
C=Cancel Draft
D=Dishonor Draft
G=Generate Trans
N=No Effect
R=Recognize Cash
V=Void Draft
7 CC_DM_TRAN_TYPE_PR Character(1) VARCHAR2(1) NOT NULL Draft Management Tran Type
C=Cancel Draft
D=Dishonor Draft
G=Generate Trans
N=No Effect
R=Recognize Cash
V=Void Draft
8 ENTRY_USE_ID Character(5) VARCHAR2(5) NOT NULL Specifies the System Function or type of processing associated with an entry type.
9 ENTRY_TYPE Character(5) VARCHAR2(5) NOT NULL Specifies the type of transaction associated with a pending item. The entry type remains with the item after it is posted and affects many areas of Receivables processing. Some examples of entry types are Invoices Credit Memo Prepayment and Deduction.

Prompt Table: ENTRY_TYPE_TBL

10 ENTRY_REASON Character(5) VARCHAR2(5) NOT NULL "Specifies an entry reason that further qualifies the entry type associated with a pending item. For example an entry reason for a credit memo might be ""Pricing Error"" or ""Shipping Error""."

Prompt Table: ENTRY_REASN_TBL

11 ACCOUNTING_DT Date(10) DATE NOT NULL The accounting entry construction date for a given transaction (a generic field that crosses multiple
12 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.
13 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.
14 GROUP_BU Character(5) VARCHAR2(5) NOT NULL Represents the high level grouping of multiple general ledger business units.
15 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.
16 GROUP_SEQ_NUM Number(6,0) INTEGER NOT NULL Specifies the system-assigned sequence number of a pending item within a group. A group is a postable entity that may be entered online or created by the system. In either case the group sequence number is automatically generated.
17 GROUP_TYPE Character(1) VARCHAR2(1) NOT NULL Specifies a category of transactions included in a group of receivables pending items. The group type affects processing of the transactions and is useful for as a sort/selection option for reports and inquiries. Examples of group type are Billing (for invoices) Payments and Transfers.