CORPACT_DATA_VW(SQL View) |
Index Back |
---|---|
Corporate Account BU Balances |
SELECT %Substring(t.setid,1,5) , t.tree_node , c.business_unit , c.cust_id , c.bal_amt , c.currency_cd FROM PSTREENODE t , ps_cust_data c , pstreeleaf l WHERE EXISTS ( SELECT 'x' FROM ps_set_cntrl_rec WHERE setid = t.setid AND setcntrlvalue = c.business_unit AND recname = 'CUSTOMER') AND c.cust_id BETWEEN l.range_from AND l.range_to AND t.tree_name = 'AR_CORPORATE_CUST' AND t.effdt = ( SELECT MAX(effdt) FROM PSTREENODE WHERE setid = t.setid AND tree_name=t.tree_name AND effdt <= %CurrentDateIn) AND t.tree_node_num > 1 AND l.setid = t.setid AND l.tree_name = t.tree_name AND l.effdt = t.effdt AND l.tree_node_num BETWEEN t.tree_node_num AND t.tree_node_num_end |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | SETID | Character(5) | VARCHAR2(5) NOT NULL | SetID |
2 | CORP_CUST | Character(20) | VARCHAR2(20) NOT NULL | Corporate Customer |
3 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
4 | 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. |
5 | BAL_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Item Balance |
6 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |