The blog provides the Oracle Apps R12 useful SQL Queries to get Tax_classification_code in Purchase Order (PO) , Query to get Tax Codes and Tax Rates defined for EBTAX.
Oracle Apps R12 Query for Tax Codes in Purchase Order (PO)
SELECT PO_HDRS_ALL_TBL.SEGMENT1, PO_LINES_ALL_TBL.LINE_NUM,POLL.SHIPMENT_NUM,
ZL_DET_FACTORS_TBL.INPUT_TAX_CLASSIFICATION_CODE,
ZL_DET_FACTORS_TBL.USER_DEFINED_FISC_CLASS
FROM ZX_LINES_DET_FACTORS ZL_DET_FACTORS_TBL,
ZX_LINES ZXL,
PO_HEADERS_ALL PO_HDRS_ALL_TBL,
PO_LINES_ALL PO_LINES_ALL_TBL,
PO_LINE_LOCATIONS_ALL POLL
WHERE PO_HDRS_ALL_TBL.PO_HEADER_ID = PO_LINES_ALL_TBL.PO_HEADER_ID AND
PO_LINES_ALL_TBL.PO_LINE_ID = POLL.PO_LINE_ID AND
ZL_DET_FACTORS_TBL.TRX_ID = ZXL.TRX_ID AND
ZXL.TRX_ID = POLL.PO_HEADER_ID AND
ZL_DET_FACTORS_TBL.ENTITY_CODE = 'PURCHASE_ORDER' AND
PO_HDRS_ALL_TBL.SEGMENT1 = '<PONUMBER>&'
Oracle Apps R12 Query to get Tax Code and Tax Rate for EBTAX
SELECT DISTINCT
ZX_TAXES_B_tbl.TAX_ID,
ZX_TAXES_B_tbl.TAX,
ZX_TAXES_B_tbl.TAX_FULL_NAME,
ZX_TAXES_B_tbl.TAX_REGIME_CODE,
ZX_TAXES_B_tbl.TAX_TYPE_CODE,
ZX_RATES_B_TBL.TAX_RATE_CODE,
ZX_RATES_B_TBL.TAX_STATUS_CODE,
ZX_RATES_B_TBL.RATE_TYPE_CODE,
ZX_RATES_B_TBL.PERCENTAGE_RATE,
ZX_RATES_B_TBL.DESCRIPTION,
ZX_RATES_TL_TBL.TAX_RATE_NAME
FROM
ZX_TAXES_B ZX_TAXES_B_tbl,
ZX_TAXES_TL ZX_TAXES_TL_TBL,
ZX_RATES_B ZX_RATES_B_TBL,
ZX_RATES_TL ZX_RATES_TL_TBL,
WHERE 1=1
AND ZX_TAXES_B_tbl.TAX_ID =ZX_TAXES_TL_TBL.TAX_ID
AND ZX_RATES_B_TBL.TAX = ZX_TAXES_B_tbl.TAX
AND ZX_RATES_B_TBL.TAX_RATE_ID = ZX_RATES_TL_TBL.TAX_RATE_ID
ORDER BY
ZX_TAXES_B_tbl.TAX,
ZX_RATES_B_TBL.TAX_RATE_CODE