DBA Data[Home] [Help]

APPS.ZX_TCM_GET_EXCEPT_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 42

    SELECT tax_exception_id, exception_type_code, rate_modifier
    FROM zx_sco_exceptions
    WHERE product_id = p_inventory_item_id
    -- AND inventory_org_id = p_inventory_organization_id
    AND classification_type_code IS NULL
    AND classification_code IS NULL
    AND tax_regime_code = p_tax_regime_code
    AND NVL(tax, 'XX') IN (NVL(p_tax, 'XX'), 'XX')
    AND NVL(tax_status_code, 'XX') IN (NVL(p_tax_status_code, 'XX'), 'XX')
    AND NVL(tax_rate_code, 'XX') IN (NVL(p_tax_rate_code, 'XX'), 'XX')
    AND NVL(tax_jurisdiction_id, -99) IN (NVL(p_tax_jurisdiction_id, -99), -99)
    /* Added for bug 4619907 */
    AND duplicate_exception = 0
    AND effective_from <= p_trx_date
    AND (effective_to >= p_trx_date or effective_to is null);
Line: 66

    SELECT ex.tax_exception_id, ex.exception_type_code, ex.rate_modifier
    FROM zx_sco_exceptions ex, mtl_categories_b_kfv mc, mtl_category_sets_b mcs,
         fnd_id_flex_structures_vl fifs, mtl_item_categories mic,
         zx_fc_types_b fc, zx_fc_types_reg_assoc fcreg
    WHERE ex.product_id IS NULL
    AND  ex.tax_regime_code = p_tax_regime_code
    AND  (ex.tax = p_tax or ex.tax is null)
    AND  (ex.tax_status_code = p_tax_status_code or ex.tax_status_code is null)
    AND  (ex.tax_rate_code = p_tax_rate_code or ex.tax_rate_code is null)
    AND  (ex.tax_jurisdiction_id = p_tax_jurisdiction_id or ex.tax_jurisdiction_id  is null)
    AND  ex.duplicate_exception = 0
    AND  ex.effective_from <= p_trx_date
    AND (ex.effective_to >= p_trx_date or ex.effective_to is null)
    AND  ex.classification_type_code = fc.classification_type_code
    AND  ex.classification_code = REPLACE(mc.concatenated_segments, fifs.concatenated_segment_delimiter,'')
    AND  mc.structure_id = fifs.id_flex_num
    AND  fifs.application_id = 401
    AND  fifs.id_flex_code = 'MCAT'
    AND  mc.enabled_flag = 'Y'
    AND  fifs.id_flex_num = mcs.structure_id
    AND  mcs.category_set_id = fc.owner_id_num
    AND  fc.classification_type_categ_code = 'PRODUCT_FISCAL_CLASS'
    AND  fc.classification_type_code = fcreg.classification_type_code
    AND  fcreg.tax_regime_code = p_tax_regime_code
    AND  fcreg.use_in_item_exceptions_flag = 'Y'
    AND  fcreg.effective_from <= p_trx_date
    AND (fcreg.effective_to >= p_trx_date OR fcreg.effective_to IS NULL) --Bug 5383505
    AND  mic.category_set_id = mcs.category_set_id
    AND  mc.category_id = mic.category_id
    AND  mic.inventory_item_id = p_inventory_item_id
    AND  mic.organization_id = p_inventory_organization_id;
Line: 105

    SELECT tax_exception_id, exception_type_code, rate_modifier
    FROM zx_sco_exceptions ex, zx_fc_types_b fct, zx_fc_types_reg_assoc fcreg, zx_fc_codes_b fcc
    WHERE ex.tax_regime_code = p_tax_regime_code
    AND  (ex.tax = p_tax or ex.tax is null)
    AND  (ex.tax_status_code = p_tax_status_code or ex.tax_status_code is null)
    AND  (ex.tax_rate_code = p_tax_rate_code or ex.tax_rate_code is null)
    AND  (ex.tax_jurisdiction_id = p_tax_jurisdiction_id or ex.tax_jurisdiction_id  is null)
    AND  ex.classification_type_code = fct.classification_type_code
    AND  ex.classification_code = fcc.classification_code
    AND  ex.duplicate_exception = 0
    AND  ex.effective_from <= p_trx_date
    AND (ex.effective_to >= p_trx_date or ex.effective_to is null)
    AND  fct.classification_type_categ_code = 'PRODUCT_GENERIC_CLASSIFICATION'
    AND  fct.classification_type_code = fcreg.classification_type_code
    AND  fcreg.tax_regime_code = p_tax_regime_code
    AND  fcreg.use_in_item_exceptions_flag = 'Y'
    AND  fct.classification_type_code = fcc.classification_type_code
    AND  p_trx_date BETWEEN fcreg.effective_from AND fcreg.effective_to
    AND  fcc.classification_code = p_product_category;
Line: 185

        SELECT STATUS, DB_STATUS
        INTO l_status, l_db_status
        FROM fnd_product_installations
        WHERE APPLICATION_ID = '401';