TD_PRO_CU_DE_VW

(SQL View)
Index Back

Promo Deductionsfor a customer

The following views should always have the same fields TD_PRO_CU_PD_VW TD_PRO_CU_OI_VW TD_PRO_CU_CR_VW TD_PRO_CU_DE_VW

SELECT C.SETID , A.SOLD_TO_CUST_ID , A.PPRC_PROMO_CD , A.MERCH_TYPE , B.ACCOUNTING_DT , '1' , ' ' , ' ' , ' ' , A.INVOICE , 0 , 0 , 0 , ' ' , A.ITEM , B.ITEM_LINE , %DecMult(B.ENTRY_AMT, -1) , B.CURRENCY_CD , A.CUST_ID , ' ' , ' ' , ' ' , 0 , ' ' , A.BUSINESS_UNIT_BI , ' ' , ' ' FROM PS_ITEM A , PS_ITEM_ACTIVITY B , PS_SET_CNTRL_REC C WHERE 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.DEDUCTION_STATUS <> ' ' AND B.ENTRY_USE_ID = 'MT-03' AND C.RECNAME = 'PPRC_PROMO_TBL' AND C.SETCNTRLVALUE = A.BUSINESS_UNIT AND A.ITEM_SEQ_NUM = B.ITEM_SEQ_NUM

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID

Prompt Table: SP_SETTD_NONVW

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: TD_CUST_OPRVW

3 PPRC_PROMO_CD Character(20) VARCHAR2(20) NOT NULL Price Promotion Code

Prompt Table: PPRC_PROMO_TBL

4 MERCH_TYPE Character(10) VARCHAR2(10) NOT NULL Merchandising Type

Prompt Table: TD_MERCH_TYP_VW
Set Control Field: SETID

5 ACCOUNTING_DT Date(10) DATE The accounting entry construction date for a given transaction (a generic field that crosses multiple
6 TD_PAYMENT_TYPE Character(1) VARCHAR2(1) NOT NULL Payment Type
1=Deduction
2=Check
3=Off-Invoice
4=Credit
7 CLAIM_ID Character(15) VARCHAR2(15) NOT NULL Claim ID

Prompt Table: TD_CLAIM_AUT_VW

8 VOUCHER_ID Character(8) VARCHAR2(8) NOT NULL Voucher ID

Prompt Table: TD_VCHR_AUT_VW

9 PYMNT_ID_REF Character(20) VARCHAR2(20) NOT NULL Payment Reference
10 INVOICE Character(22) VARCHAR2(22) NOT NULL Invoice
11 INVOICE_LINE Number(5,0) INTEGER NOT NULL Invoice Line
12 LINE_SEQ_NUM Number(5,0) INTEGER NOT NULL Sequence
13 DISC_SUR_LVL Number(2,0) SMALLINT NOT NULL Discount/Surcharge Level
14 DISC_SUR_ID Character(15) VARCHAR2(15) NOT NULL Identifier

Prompt Table: %EDITTABLE5

15 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.
16 ITEM_LINE Number(6,0) INTEGER NOT NULL Item Line
17 AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Amount
18 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code

Prompt Table: CURRENCY_CD_TBL

19 BILL_TO_CUST_ID Character(15) VARCHAR2(15) NOT NULL Customer

Prompt Table: TD_CUS_BILTO_VW

20 VENDOR_SETID Character(5) VARCHAR2(5) NOT NULL Vendor SetID
21 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier

Prompt Table: VNDR_ACTIVE_VW

22 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location

Prompt Table: VNDR_LOC_AP_VW

23 ADDRESS_SEQ_NUM Number(5,0) INTEGER NOT NULL Address Sequence Number

Prompt Table: VENDOR_ADDR_VW

24 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Prompt Table: SP_BU_TD_NONVW

25 BUSINESS_UNIT_BI Character(5) VARCHAR2(5) NOT NULL Billing Business Unit

Prompt Table: SP_BU_BI_NONVW

26 BUSINESS_UNIT_GL Character(5) VARCHAR2(5) NOT NULL GL Business Unit
27 BUSINESS_UNIT_AP Character(5) VARCHAR2(5) NOT NULL AP Business Unit

Prompt Table: SP_BU_AP_NONVW