AR_CABIREV_VW(SQL View) |
Index Back |
---|---|
Contracts to GL viewView used to determine if revenue lines exist in feeder systems (i.e. contracts, billing). |
SELECT DISTINCT A.BUSINESS_UNIT , A.CUST_ID , A.ITEM , A.ITEM_LINE FROM PS_ITEM_ACTIVITY A , PS_BI_HDR H , PS_BI_LINE B , PS_CA_DETAIL C WHERE A.ENTRY_USE_ID IN ('IT-01', 'IT-02') AND A.ORIGIN_ID = ( SELECT O.ORIGIN_ID_BILLING FROM PS_BUS_UNIT_OPT_BI O , PS_SET_CNTRL_REC S WHERE O.SETID = S.SETID AND S.SETCNTRLVALUE = A.BUSINESS_UNIT_BI AND S.RECNAME = 'BUS_UNIT_OPT_BI') AND A.BUSINESS_UNIT = H.BUSINESS_UNIT AND A.CUST_ID = H.BILL_TO_CUST_ID AND A.ITEM = H.INVOICE AND H.BUSINESS_UNIT = B.BUSINESS_UNIT AND H.INVOICE = B.INVOICE AND H.GL_LVL = 'B' AND B.CONTRACT_NUM = C.CONTRACT_NUM AND B.CONTRACT_LINE_NUM = C.CONTRACT_LINE_NUM AND NOT EXISTS ( SELECT 'X' FROM PS_BI_ACCT_ENTRY E WHERE A.BUSINESS_UNIT = E.BUSINESS_UNIT AND A.ITEM = E.INVOICE AND (A.ITEM_LINE = B.LINE_SEQ_NUM OR (A.ITEM_LINE = 0 AND H.AR_LVL = 'H')) AND E.ACCT_ENTRY_TYPE = 'RR' AND C.PRICING_STRUCTURE <> 'RATE' AND C.REV_RECOG_METHOD = '5') AND NOT EXISTS ( SELECT 'X' FROM PS_CA_ACCTG_LINE L WHERE B.BUSINESS_UNIT = L.BUSINESS_UNIT AND B.CONTRACT_NUM = L.CONTRACT_NUM AND B.CONTRACT_LINE_NUM = L.CONTRACT_LINE_NUM AND L.DST_USE = 'REV' AND C.PRICING_STRUCTURE <> 'RATE' AND C.REV_RECOG_METHOD <> '5') |
# | 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 |