Wednesday, July 27, 2016

Query to find out responsibility and request group for concurrent program


SELECT DISTINCT
  FCPL.USER_CONCURRENT_PROGRAM_NAME
, FCP.CONCURRENT_PROGRAM_NAME
, FAPP.APPLICATION_NAME
, FRG.REQUEST_GROUP_NAME
, FNRTL.RESPONSIBILITY_NAME
FROM
  APPS.FND_REQUEST_GROUPS FRG
, APPS.FND_APPLICATION_TL FAPP
, APPS.FND_REQUEST_GROUP_UNITS FRGU
, APPS.FND_CONCURRENT_PROGRAMS FCP
, APPS.FND_CONCURRENT_PROGRAMS_TL FCPL
, APPS.FND_RESPONSIBILITY FNR
, APPS.FND_RESPONSIBILITY_TL FNRTL
WHERE
FRG.APPLICATION_ID=fapp.APPLICATION_ID
AND FRG.APPLICATION_ID = FRGU.APPLICATION_ID
AND FRG.REQUEST_GROUP_ID = FRGU.REQUEST_GROUP_ID
AND FRG.REQUEST_GROUP_ID = FNR.REQUEST_GROUP_ID
AND FRG.APPLICATION_ID = FNR.APPLICATION_ID
AND FNR.RESPONSIBILITY_ID = FNRTL.RESPONSIBILITY_ID
AND FRGU.REQUEST_UNIT_ID = FCP.CONCURRENT_PROGRAM_ID
AND FRGU.UNIT_APPLICATION_ID = FCP.APPLICATION_ID
AND FCP.CONCURRENT_PROGRAM_ID = FCPL.CONCURRENT_PROGRAM_ID
AND FCPL.USER_CONCURRENT_PROGRAM_NAME LIKE :conc_prg_name
AND FNRTL.LANGUAGE = 'US'
AND FAPP.LANGUAGE = 'US';

Query For Getting The Sub Inventories for Inventory Item


select mi.secondary_inventory_name,mi.DESCRIPTION,ms.INVENTORY_ITEM_ID from mtl_secondary_inventories mi,MTL_SYSTEM_ITEMS_B ms
WHERE secondary_inventory_name IN( 'LA_FGI_L','LA_FGI_PLT','LA_FGI_U')
and mi.ORGANIZATION_ID=ms.ORGANIZATION_ID
and ms.INVENTORY_ITEM_ID='5245705'
and mi.organization_id = 4;

Relation between AR invoice and Sales Order


SELECT oha.order_number,
               ola.ordered_item item_name,
              ola.ordered_quantity * ola.unit_selling_price LINE_AMOUNT,
              rcta.trx_number Transaction_number, rcta.trx_date,
              rctla.line_number TRX_line_number,
               rctla.unit_selling_price unit_selling_price
  FROM oe_order_headers_all oha,
              oe_order_lines_all ola,
               ra_customer_trx_all rcta,
               ra_customer_trx_lines_all rctla
 WHERE oha.header_id = ola.header_id
   AND rcta.customer_trx_id = rctla.customer_trx_id
   AND rctla.interface_line_attribute6 = TO_CHAR (ola.line_id)
   AND rctla.interface_line_attribute1 = TO_CHAR (oha.order_number)

   AND oha.cust_po_number = :cust_po_number

Query To Get The Ship To Address By Order Number in Oracle Apps

SELECT DISTINCT LOC.ADDRESS1,LOC.ADDRESS2,HCSUA.LOCATION,H.ORDER_NUMBER,H.CUST_PO_NUMBER,HP.PARTY_NAME,HP.PARTY_NUMBER FROM 
OE_ORDER_HEADERS_ALL H,
HZ_LOCATIONS LOC,
HZ_PARTY_SITES HPS,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSUA,
HZ_PARTIES HP
WHERE H.SOLD_TO_ORG_ID=HCASA.CUST_ACCOUNT_ID
AND HCSUA.SITE_USE_ID=H.SHIP_TO_ORG_ID
AND LOC.LOCATION_ID=HPS.LOCATION_ID
AND HPS.PARTY_SITE_ID=HCASA.PARTY_SITE_ID
AND HCSUA.CUST_ACCT_SITE_ID=HCASA.CUST_ACCT_SITE_ID
AND HP.PARTY_ID=H.SOLD_TO_ORG_ID
AND H.ORDER_NUMBER='14565';


Oracle Fusion - Cost Lines and Expenditure Item link in Projects

SELECT   ccd.transaction_id,ex.expenditure_item_id,cacat.serial_number FROM fusion.CST_INV_TRANSACTIONS cit,   fusion.cst_cost_distribution_...