|
|
发表于 2008/3/20 18:01:41
|
显示全部楼层
OIE里建立的明细项目,在AP的费用报表打开后,却没有明细项的问题,应该是在OIE时建立的费用报表还没经过批准吧,所以在AP的费用报表界面查不到。贴一个AP费用报表界面查询sql:
SELECT ROW_ID,
EMPLOYEE_NAME,
EMPLOYEE_NUMBER,
EXPENSE_CHECK_ADDRESS_FLAG,
WEEK_END_DATE,
INVOICE_NUM,
DEFAULT_CURRENCY_CODE,
TOTAL,
DESCRIPTION,
DISPLAYED_HOLD_CODE,
DISPLAYED_EXCHANGE_RATE_TYPE,
PAYMENT_CURRENCY_CODE,
PAYMENT_CROSS_RATE_TYPE,
PAYMENT_CROSS_RATE_DATE,
PAYMENT_CROSS_RATE,
AWT_GROUP_NAME,
APPLY_ADVANCES_FLAG,
PREPAY_NUM,
advance_invoice_to_apply,
PREPAY_DIST_NUM,
MAXIMUM_AMOUNT_TO_APPLY,
PREPAY_GL_DATE,
AP_REVIEWED_FLAG,
MGMT_REVIEWED_FLAG,
REPORT_TYPE,
TOTAL_VIOLATIONS,
RECEIPTS_WITH_VIOLATIONS,
REPORT_HEADER_ID,
EMPLOYEE_ID,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
VOUCHNO,
VENDOR_ID,
VENDOR_SITE_ID,
REFERENCE_1,
REFERENCE_2,
EXPENSE_REPORT_ID,
ACCTS_PAY_CODE_COMBINATION_ID,
SET_OF_BOOKS_ID,
SOURCE,
PURGEABLE_FLAG,
ACCOUNTING_DATE,
EMPLOYEE_CCID,
REJECT_CODE,
ATTRIBUTE_CATEGORY,
ATTRIBUTE1,
ATTRIBUTE2,
ATTRIBUTE3,
ATTRIBUTE4,
ATTRIBUTE5,
DEFAULT_EXCHANGE_RATE_TYPE,
DEFAULT_EXCHANGE_RATE,
DEFAULT_EXCHANGE_DATE,
LAST_UPDATE_LOGIN,
VOUCHER_NUM,
ATTRIBUTE11,
ATTRIBUTE12,
ATTRIBUTE13,
ATTRIBUTE14,
ATTRIBUTE6,
ATTRIBUTE7,
ATTRIBUTE8,
ATTRIBUTE9,
ATTRIBUTE10,
ATTRIBUTE15,
USSGL_TRANSACTION_CODE,
USSGL_TRX_CODE_CONTEXT,
DOC_CATEGORY_CODE,
AWT_GROUP_ID,
ORG_ID,
HOLD_LOOKUP_CODE,
WORKFLOW_APPROVED_FLAG,
EMPLOYEE_ACTIVE_FLAG,
GLOBAL_ATTRIBUTE_CATEGORY,
GLOBAL_ATTRIBUTE1,
GLOBAL_ATTRIBUTE2,
GLOBAL_ATTRIBUTE3,
GLOBAL_ATTRIBUTE4,
GLOBAL_ATTRIBUTE5,
GLOBAL_ATTRIBUTE6,
GLOBAL_ATTRIBUTE7,
GLOBAL_ATTRIBUTE8,
GLOBAL_ATTRIBUTE9,
GLOBAL_ATTRIBUTE10,
GLOBAL_ATTRIBUTE11,
GLOBAL_ATTRIBUTE12,
GLOBAL_ATTRIBUTE13,
GLOBAL_ATTRIBUTE14,
GLOBAL_ATTRIBUTE15,
GLOBAL_ATTRIBUTE16,
GLOBAL_ATTRIBUTE17,
GLOBAL_ATTRIBUTE18,
GLOBAL_ATTRIBUTE19,
GLOBAL_ATTRIBUTE20
FROM AP_EXPENSE_REPORT_HEADERS_V
WHERE ((source = 'NonValidatedWebExpense' AND
workflow_approved_flag in ('W', 'R', 'T')) or
source = 'XpenseXpress' OR (source = 'WebExpense') OR
(source = 'SelfService') OR (source = 'CREDIT CARD') OR
(source = 'Oracle Project Accounting' and
nvl(purgeable_flag, 'N') != 'Y'))
and set_of_books_id = 1
and (INVOICE_NUM = 'TL10475')
order by week_end_date, employee_id
注意:
((source = 'NonValidatedWebExpense' AND
workflow_approved_flag in ('W', 'R', 'T'))
|
|