DBA Data[Home] [Help]

APPS.PJM_COMMON_PROJ_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 12

  Select Common_Project_Id
  into   l_common_proj_id
  from   pjm_org_parameters
  where  Organization_Id = X_Org_Id;
Line: 41

  select organization_id , common_project_id
  from   pjm_org_parameters
  where  organization_id = nvl(X_Org_Id , organization_id)
  and    common_project_id is not null
  order by organization_id,common_project_id  /*Bug 6972181 (FP of 6900015): Added order by clause*/
  FOR  UPDATE of organization_id; /*Bug  8668526 (one-off for 7198823) */
Line: 53

    update mtl_material_transactions mmt
    set    mmt.project_id =
               nvl(mmt.project_id , crec.common_project_id)
    ,      mmt.source_project_id =
               nvl(mmt.source_project_id,
               decode(transaction_source_type_id,
                      5, crec.common_project_id,
                         null))
    where  mmt.pm_cost_collected = 'N'
    and  organization_id = crec.organization_id
    and  (  mmt.project_id is null or
         (MMT.SOURCE_PROJECT_ID IS NULL and transaction_source_type_id = 5)
         ); /* Modified where clause for Bug 8668526 (one-off for 7198823) */
Line: 73

    update mtl_material_transactions mmt
    set    mmt.to_project_id = crec.common_project_id
    where  mmt.pm_cost_collected = 'N'
    and    transfer_organization_id = crec.organization_id
    and    transaction_action_id not in ( 12 , 21 )
    and    to_project_id is null;
Line: 83

    update mtl_material_transactions mmt
    set    mmt.to_project_id = crec.common_project_id
    where  mmt.pm_cost_collected = 'N'
    and    transaction_action_id in ( 12 , 21 )
    and    to_project_id is null
    and    ( organization_id , transfer_organization_id ) in (
        select from_organization_id , to_organization_id
        from   mtl_interorg_parameters
        where  crec.organization_id =
                decode( fob_point
                      , 1 /* Shipment */ , to_organization_id
                      , 2 /* Receipt  */ , from_organization_id )
        and    mmt.transaction_action_id = 21
        union all
        select to_organization_id , from_organization_id
        from   mtl_interorg_parameters
        where  crec.organization_id =
                decode( fob_point
                      , 1 /* Shipment */ , to_organization_id
                      , 2 /* Receipt  */ , from_organization_id )
        and    mmt.transaction_action_id = 12
    );
Line: 106

    update wip_transactions wt
    set    wt.project_id = crec.common_project_id
    where   wt.pm_cost_collected = 'N'
    and     wt.organization_id = crec.organization_id
    and     wt.project_id is null;