DBA Data[Home] [Help]

APPS.CSTACOSN SQL Statements

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

Line: 19

   SELECT
      transaction_temp_id,
      transaction_source_id,
      primary_quantity,
      operation_seq_num,
      transaction_action_id
   FROM
      mtl_material_transactions_temp
   WHERE
      transaction_temp_id = i_txn_temp_id;
Line: 44

   INSERT INTO cst_comp_snap_temp
      (transaction_temp_id,
       wip_entity_id,
       operation_seq_num,
       last_update_date,
       last_updated_by,
       creation_date,
       created_by,
       last_update_login,
       new_operation_flag,
       primary_quantity,
       quantity_completed,
       prior_completion_quantity,
       prior_scrap_quantity,
       request_id,
       program_application_id,
       program_id,
       program_update_date)
   SELECT
      l_txn_temp_id,
      l_wip_entity_id,
      operation_seq_num,
      sysdate,
      -1,
      sysdate,
      -1,
      -1,
      2,
       --
       -- Bug 608310
       -- If the transaction is a scrap transaction
       -- Operation after the scrap operation should be
       -- primary_quantity of zero.
       --
       decode(l_transaction_action_id,
	      30,
	      decode(sign(operation_seq_num - l_operation_seq_num),
		     1,0,
		     l_primary_quantity),
	      l_primary_quantity),
       quantity_completed,
       0,
       0,
       -1,
       -1,
       -1,
       sysdate
    FROM
       wip_operations wo
    WHERE
       wo.wip_entity_id = l_wip_entity_id;