PDH-Item FUTURE_HIERARCHY Eff Attribute Report
-------------------------------------------------
Report query
---------------
SELECT esi.item_number product_id,
eseb.attribute_char3 product_type,
eseb.attribute_char7 effective_date,
eseb.attribute_char5 reason_code,
eseb.attribute_char4 list_price_impact,
decode(eseb.attribute_char6,
'Orderable-Decrease','D',
'Orderable-Increase','I',
'Non-Orderble','E') increase_decrease,
eseb.attribute_char8 buc_approver,
eseb.attribute_char13 doc_id
FROM ego_item_eff_b eseb,
egp_system_items_b esi,
egp_item_classes_tl eict,
inv_org_parameters iop,
egp_system_items_tl esit
WHERE 1 = 1
--And esi.Item_number ='APR5PID2'
AND eseb.inventory_item_id = esi.inventory_item_id
AND eseb.organization_id = esi.organization_id
AND eict.item_class_id = esi.item_catalog_group_id
AND iop.organization_id = esi.organization_id
AND esit.inventory_item_id = esi.inventory_item_id
AND esit.organization_id = esi.organization_id
AND esit.LANGUAGE = 'US'
AND eict.LANGUAGE = 'US'
AND eseb.acd_type = 'PROD'
AND esi.acd_type = 'PROD'
AND iop.organization_code='GLO'
AND eict.item_class_name='Billing'
AND eseb.context_code = 'FUTURE_HIERARCHY'
AND (
eseb.attribute_char13 IN ( :P_DOC_ID )
OR coalesce(:P_DOC_ID, NULL)IS NULL )
AND (
eseb.attribute_char14 IN ( :P_DOC_AUTHOR)
OR coalesce(:P_DOC_AUTHOR, NULL)IS NULL )
--------------------Bursting Query
SELECT doc_id AS KEY,
'CSCO_FUT_HEIRARCHY_RPT' template,
'en-US' locale,
'XLSX' output_format,
'EMAIL' del_channel,
'Future_heirarchy' output_name,
'sambchin@cisco.com,gagoud@cisco.com,chetverm@cisco.com' parameter1,
'borajesh@cisco.com' parameter2,
'sambchin@cisco.com' parameter3,
'Future Heirarchy values for the Item ' parameter4, --Subject
'Dear customer PFA attachment' parameter5,
'true' parameter6
FROM (
SELECT eseb.attribute_char1 family,
eseb.attribute_char2 sub_group,
eseb.attribute_char3 product_type,
eseb.attribute_char4 list_price_impact,
eseb.attribute_char5 reason_code,
decode(eseb.attribute_char6,
'Orderable-Decrease','D',
'Orderable-Increase','I',
'Non-Orderble','E') increase_decrease,
eseb.attribute_char7 effective_date,
eseb.attribute_char8 buc_approver,
esi.item_number product_id,
eseb.attribute_char13 doc_id
FROM ego_item_eff_b eseb,
egp_system_items_b esi,
egp_item_classes_tl eict,
inv_org_parameters iop,
egp_system_items_tl esit
WHERE 1 = 1
--And esi.Item_number ='APR5PID2'
AND eseb.inventory_item_id = esi.inventory_item_id
AND eseb.organization_id = esi.organization_id
AND eict.item_class_id = esi.item_catalog_group_id
AND iop.organization_id = esi.organization_id
AND esit.inventory_item_id = esi.inventory_item_id
AND esit.organization_id = esi.organization_id
AND esit.LANGUAGE = 'US'
AND eict.LANGUAGE = 'US'
AND eseb.acd_type = 'PROD'
AND esi.acd_type = 'PROD'
AND iop.organization_code='GLO'
AND eict.item_class_name='Billing'
AND eseb.context_code = 'FUTURE_HIERARCHY'
AND (
eseb.attribute_char13 IN ( :P_DOC_ID )
OR coalesce(:P_DOC_ID, NULL)IS NULL )
AND (
eseb.attribute_char14 IN ( :P_DOC_AUTHOR)
OR coalesce(:P_DOC_AUTHOR, NULL)IS NULL ) )
No comments:
Post a Comment