SELECT *
FROM (SELECT 'q1' query1, msi.organization_id, msi.inventory_item_id,
msi.segment1 item_code, msi.description item_desc,
tmpl.template_name, tmpl.description, tmpl.regime_code,
att.attribute_code, att.attribute_value
FROM jai_rgm_tmpl_itm_regns tmp_itm,
jai_rgm_tmpl_org_regns tmp_org,
jai_rgm_itm_templates tmpl,
jai_rgm_itm_tmpl_attrs att,
mtl_system_items_b msi
WHERE tmp_itm.templ_org_regns_id = tmp_org.templ_org_regns_id
AND tmpl.template_id = tmp_org.template_id
AND tmpl.template_id = att.template_id
AND msi.inventory_item_id = tmp_itm.inventory_item_id
AND msi.organization_id = tmp_org.organization_id
AND tmp_org.organization_id = :P_ORGN_ID
AND tmp_itm.inventory_item_id = :P_ITEM_ID
UNION ALL
SELECT 'q2' query2, msi.organization_id, msi.inventory_item_id,
msi.segment1 item_code, msi.description item_desc,
'tmpl' template_name, NULL description, rgm.regime_code,
tmpl.attribute_code, tmpl.attribute_value
FROM jai_rgm_itm_regns rgm,
jai_rgm_itm_tmpl_attrs tmpl,
mtl_system_items_b msi
WHERE rgm.rgm_item_regns_id = tmpl.rgm_item_regns_id
AND rgm.organization_id = :P_ORGN_ID
--AND rgm.inventory_item_id = :P_ITEM_ID
AND msi.inventory_item_id = rgm.inventory_item_id
AND rgm.organization_id = msi.organization_id)
ORDER BY inventory_item_id
HI,
ReplyDeleteIS THERE ANY QUERY OR api TO CREATE ITEM WITH INDIA eXCISE INFORMATION.