EX_EXC4500_L_V2(SQL View) |
Index Back |
---|---|
Expense Sheet VW w/o Location |
SELECT A.SHEET_ID , B.LINE_NBR , E1.LANGUAGE_CD , A.EMPLID , A.CREATION_DT , A.SETID , A.REFERENCE_ID , A.RECEIPT_ID , A.ADVANCE_ID , A.ADVANCE_AMT , A.BUSINESS_PURPOSE , A.OPRID_ENTERED_BY , B.EXPENSE_TYPE , B.TRANS_DT , B.REIMBURSEMENT_CD , B.PERSONAL_EXPENSE , B.REIMB_ACTION , B.MONETARY_AMOUNT , B.CURRENCY_CD , B.TXN_AMOUNT , B.TXN_CURRENCY_CD , B.RATE_MULT , B.RATE_DIV , B.TXN_LOCATION , B.EXPEND_MTHD , B.MERCHANT , B.MERCHANT_CD , B.DESCR254 , B.AIRFARE_RCPT_NBR , B.DISTANCE , B.DISTANCE_TYPE , B.NBR_NIGHTS , B.NO_RECEIPT_FLG , C.NAME , C.COUNTRY_CODE , C.PHONE , D.DEPTID , E.EXPENSE_TYPE_EDIT , E1.DESCR , F.EXPEND_MTHD_EDIT , F1.DESCR , G1.DESCR , ' ' , ' ' FROM PS_EX_SHEET_HDR A , PS_EX_SHEET_LINE B , PS_PERSONAL_DATA C , PS_EX_AA_EE_ORG_VW D , PS_EX_TYPES_TBL E , PS_EX_TYPES_LNG E1 , PS_EX_EXP_MTHD_TBL F ,PS_EX_EXP_MTHD_LNG F1 , PS_EX_PURPOSE_TBL G ,PS_EX_PURPOSE_LNG G1 WHERE A.SHEET_ID = B.SHEET_ID AND A.EMPLID = C.EMPLID AND A.EMPLID = D.EMPLID AND E.SETID = A.SETID AND E1.SETID=A.SETID AND E1.EXPENSE_TYPE=E.EXPENSE_TYPE AND F.SETID = A.SETID AND F1.SETID=A.SETID AND F1.EXPEND_MTHD=F.EXPEND_MTHD AND G.SETID = A.SETID AND G1.SETID=A.SETID AND G1.BUSINESS_PURPOSE=G.BUSINESS_PURPOSE AND F.EXPEND_MTHD = B.EXPEND_MTHD AND G.BUSINESS_PURPOSE = A.BUSINESS_PURPOSE AND E.EXPENSE_TYPE = B.EXPENSE_TYPE AND B.TXN_LOCATION = ' ' AND B.MERCHANT_CD = ' ' AND E.EFFDT = ( SELECT MAX(EFFDT) FROM PS_EX_TYPES_TBL WHERE E.SETID = SETID AND E.EXPENSE_TYPE = EXPENSE_TYPE AND EFFDT <= B.TRANS_DT) AND E.EFF_STATUS = 'A' AND F.EFFDT = ( SELECT MAX(EFFDT) FROM PS_EX_EXP_MTHD_TBL WHERE F.SETID = SETID AND F.EXPEND_MTHD = EXPEND_MTHD AND EFFDT <= B.TRANS_DT) AND F.EFF_STATUS = 'A' AND G.EFFDT = ( SELECT MAX(EFFDT) FROM PS_EX_PURPOSE_TBL WHERE G.SETID = SETID AND G.BUSINESS_PURPOSE = BUSINESS_PURPOSE AND EFFDT <= %CurrentDateIn) AND G.EFF_STATUS = 'A' |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | SHEET_ID | Character(10) | VARCHAR2(10) NOT NULL | Report ID |
2 | LINE_NBR | Number(5,0) | INTEGER NOT NULL | Line Number: 11/24/08 - Added TARGET label [PC product] |
3 | LANGUAGE_CD | Character(3) | VARCHAR2(3) NOT NULL | Language Code |
4 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL | Employee ID |
5 | CREATION_DT | Date(10) | DATE | Creation Date |
6 | SETID | Character(5) | VARCHAR2(5) NOT NULL | SetID |
7 | REFERENCE_ID | Character(10) | VARCHAR2(10) NOT NULL | Reference ID |
8 | RECEIPT_ID | Character(10) | VARCHAR2(10) NOT NULL | Receipt ID |
9 | ADVANCE_ID | Character(10) | VARCHAR2(10) NOT NULL | Advance ID |
10 | ADVANCE_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Advance Amount |
11 | BUSINESS_PURPOSE | Character(5) | VARCHAR2(5) NOT NULL | Business Purpose |
12 | OPRID_ENTERED_BY | Character(30) | VARCHAR2(30) NOT NULL | Entered By 07/25/2011 MRAD 12383033 :Ensured that OPRID_ENTERED_BY is set with format type of MixedCase. 03/22/2013 GL 16482301: Switched OPRID_ENTERED_BY back to MixedCase again. Please don't change it to UpperCase!!! FYI - The alternatives to use a User ID as uppercase: 1) Create your own User ID, add comments in the Field Properties, and fill out the Owner ID 2) Use %Upper meta-SQL in SQL statements 3) Use Upper function in peoplecodes |
13 | EXPENSE_TYPE | Character(7) | VARCHAR2(7) NOT NULL | Expense Type |
14 | TRANS_DT | Date(10) | DATE | Transaction Date |
15 | REIMBURSEMENT_CD | Character(1) | VARCHAR2(1) NOT NULL |
Deny
N=Nonreimburseable P=Prepaid R=Reimburseable |
16 | PERSONAL_EXPENSE | Character(1) | VARCHAR2(1) NOT NULL |
Personal Expense
N=No Y=Yes |
17 | REIMB_ACTION | Character(5) | VARCHAR2(5) NOT NULL | Reason |
18 | MONETARY_AMOUNT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Specifies the monetary amount of a debit or credit in the business unit base currency. Debit entries are positive and credit entries are negative. This amount is only zero if associated with a statistical account. |
19 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |
20 | TXN_AMOUNT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Transaction Amount |
21 | TXN_CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Transaction Currency |
22 | RATE_MULT | Signed Number(17,8) | DECIMAL(15,8) NOT NULL | Rate Multiplier |
23 | RATE_DIV | Number(16,8) | DECIMAL(15,8) NOT NULL | Rate Divisor |
24 | TXN_LOCATION | Character(5) | VARCHAR2(5) NOT NULL | Expense Location |
25 | EXPEND_MTHD | Character(3) | VARCHAR2(3) NOT NULL | Payment Type |
26 | MERCHANT | Character(40) | VARCHAR2(40) NOT NULL | Merchant |
27 | MERCHANT_CD | Character(10) | VARCHAR2(10) NOT NULL | Preferred Merchant |
28 | DESCR254 | Character(254) | VARCHAR2(254) NOT NULL | Description of length 254 |
29 | AIRFARE_RCPT_NBR | Character(16) | VARCHAR2(16) NOT NULL | Airfare Receipt Number |
30 | DISTANCE | Number(8,2) | DECIMAL(7,2) NOT NULL | Distance Traveled |
31 | DISTANCE_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
Distance Type
3=Metres K=Kilometers M=Miles |
32 | NBR_NIGHTS | Number(3,0) | SMALLINT NOT NULL | Number of Nights |
33 | NO_RECEIPT_FLG | Character(1) | VARCHAR2(1) NOT NULL | No Receipt |
34 | NAME | Character(50) | VARCHAR2(50) NOT NULL | Name |
35 | COUNTRY_CODE | Character(3) | VARCHAR2(3) NOT NULL | Int'l Prefix |
36 | PHONE | Character(24) | VARCHAR2(24) NOT NULL | Telephone |
37 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL | Department |
38 | EXPENSE_TYPE_EDIT | Character(3) | VARCHAR2(3) NOT NULL |
Expense Type Edit
AIR=Airfare ATT=Attendees AUT=Automobile HTL=Hotel NON=None PDL=Per Diem Lodging PDM=Per Diem RTL=Rental |
39 | DESCR | Character(30) | VARCHAR2(30) NOT NULL | Description |
40 | EXPEND_MTHD_EDIT | Character(3) | VARCHAR2(3) NOT NULL |
Payment Type Edit
EMP=Employee PPA=Prepaid Airfare PPD=Prepaid PPH=Prepaid Hotel VND=Supplier |
41 | DESCR1 | Character(30) | VARCHAR2(30) NOT NULL | Descr |
42 | DESCR_BU | Character(30) | VARCHAR2(30) NOT NULL | Business Unit Description |
43 | DESCR2 | Character(30) | VARCHAR2(30) NOT NULL | Descr2 |
44 | DESCR3 | Character(30) | VARCHAR2(30) NOT NULL | Description |