Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

-----------------------SALES-----------------ORDER-------------------------------

update jai_reporting_associations set REPORTING_CODE='rahul2' where


ENTITY_CODE='ITEM' and ENTITY_SOURCE_TABLE='JAI_TAX_DET_FACTORS'
and REPORTING_TYPE_ID=10000 and ENTITY_ID=10549

select SEGMENT1,ORGANIZATION_ID
from apps.mtl_system_items_b F where 1=1 AND segment1 like '%S009%'
AND ORGANIZATION_ID NOT IN (0,4814)
and ORGANIZATION_ID=523
AND (ORGANIZATION_ID,INVENTORY_ITEM_ID) NOT IN (
select B.ORGANIZATION_ID,
B.INVENTORY_ITEM_ID
from APPS.jai_item_templ_dtls A,
APPS.jai_item_templ_hdr B ,APPS.MTL_SYSTEM_ITEMS_B C ,
APPS.jai_reporting_associations D
Where 1=1 and ATTRIBUTE_CODE='RECOVERABLE' and
B.inventory_item_id=C.inventory_item_id AND
B.Organization_id=C.Organization_id
AND a.TEMPLATE_HDR_ID = b.TEMPLATE_HDR_ID AND a.TEMPLATE_HDR_ID
=D.ENTITY_ID(+) AND D.EFFECTIVE_TO IS NULL
--and b.organization_id in (select organization_id from
apps.org_organization_definitions where ORGANIZATION_CODE = 'REX')
AND SEGMENT1 =F.SEGMENT1
)

select
ATTRIBUTE_CODE,ATTRIBUTE_VALUE,A.REGIME_ID,APPLICABLE_FLAG,ITEM_CLASSIFICATION,B.IN
VENTORY_ITEM_ID--,ORGANIZATION_ID
, SEGMENT1 ,REPORTING_TYPE_NAME ,REPORTING_CODE_DESCRIPTION ,REPORTING_CODE

from APPS.jai_item_templ_dtls A,
APPS.jai_item_templ_hdr B ,APPS.MTL_SYSTEM_ITEMS_B C ,
APPS.jai_reporting_associations D
Where
B.inventory_item_id=C.inventory_item_id AND
B.Organization_id=C.Organization_id
AND a.TEMPLATE_HDR_ID = b.TEMPLATE_HDR_ID AND a.TEMPLATE_HDR_ID
=D.ENTITY_ID(+) AND D.EFFECTIVE_TO IS NULL
and b.organization_id in (select organization_id from
apps.org_organization_definitions where ORGANIZATION_CODE = 'REX')
AND SEGMENT1 LIKE 'S00%'
and b.inventory_item_id in (select inventory_item_id from mtl_system_items_b where
segment1 = '021721600')

You might also like