Translate

Thursday, January 5, 2023

Production Floor to Distribution Transfer query in Oracle apps r12

 Production Floor to Distribution Transfer query SQL


select 

 forg.organization_code giver_org, forg.organization_name giver_org_name,

         torg.organization_code recever_org,

         torg.organization_name recever_org_name, itm.segment1 item,

         itm.description item_name,

         SUM (DECODE (mmt.transaction_type_id, 62, mmt.transaction_quantity)

             ) issue_qty,

         SUM (DECODE (mmt.transaction_type_id, 61, mmt.transaction_quantity)

             ) received_qty  

 FROM mtl_system_items_b itm, mtl_material_transactions mmt, org_organization_definitions forg, org_organization_definitions torg

WHERE itm.ORGANIZATION_ID=mmt.ORGANIZATION_ID and itm.INVENTORY_ITEM_ID=mmt.INVENTORY_ITEM_ID and 

mmt.transaction_date BETWEEN  TO_DATE ('01/12/22 00:00:00', 'DD/mm/yy HH24:MI:SS' ) AND TO_DATE ('31/12/22 23:59:59', 'DD/mm/yy HH24:MI:SS'  )

     AND mmt.transaction_type_id IN (61, 62)

    and exists (SELECT o.organization_id

            FROM org_organization_definitions o, mtl_parameters p

           WHERE o.organization_id = p.organization_id

           ----  AND p.process_enabled_flag = 'Y'

            ---- AND o.operating_unit <> xx123  AND o.organization_id = mmt.organization_id )              

   AND exists (SELECT organization_id  FROM org_organization_definitions ouk

                                         WHERE ouk.operating_unit = 148 and ouk.organization_id= mmt.transfer_organization_id)

  and mmt.ORGANIZATION_ID=forg.ORGANIZATION_ID and mmt.TRANSFER_ORGANIZATION_ID=torg.ORGANIZATION_ID  

  GROUP BY forg.organization_code,

         forg.organization_name,

         torg.organization_code,

         torg.organization_name,

         itm.segment1,

         itm.description


Query to find all responsibilities of users in Oracle Apps r12

 Query to find all responsibilities of a user

-------------------------------------------------------------------------------
SELECT fu.user_name                "User Name",
       frt.responsibility_name     "Responsibility Name",
       furg.start_date             "Start Date",
       furg.end_date               "End Date",      
       fr.responsibility_key       "Responsibility Key",
       fa.application_short_name   "Application Short Name"
  FROM fnd_user_resp_groups_direct        furg,
       applsys.fnd_user                   fu,
       applsys.fnd_responsibility_tl      frt,
       applsys.fnd_responsibility         fr,
       applsys.fnd_application_tl         fat,
       applsys.fnd_application            fa
 WHERE furg.user_id             =  fu.user_id
   AND furg.responsibility_id   =  frt.responsibility_id
   AND fr.responsibility_id     =  frt.responsibility_id
   AND fa.application_id        =  fat.application_id
   AND fr.application_id        =  fat.application_id
   AND frt.language             =  USERENV('LANG')
   AND UPPER(fu.user_name)      =  UPPER('xxxxx')  -- <change it>
   -- AND (furg.end_date IS NULL OR furg.end_date >= TRUNC(SYSDATE))
 ORDER BY frt.responsibility_name;

Accounts Receivable-AR setups in Oracle EBS Functional Financials - Apps R12

   1. Oracle Receivables -> Setup -> System ->System Options     a. Receivable GL related setup    b. Transaction and Customer rela...