DBA Data[Home] [Help]

APPS.INV_TRANSACTIONS SQL Statements

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

Line: 6

/***********************LINE_INTERFACE_INSERT PROCEDURE*********************************/
/****************************************************************************************/
/**This procedure Inserts lines related transaction information in the                 **/
/**mtl_transactions_interface table                                                    **/
/**USED BY: ON_SUBMIT and ON_SERIAL Procedures                                         **/
/****************************************************************************************/
/****************************************************************************************/


PROCEDURE LINE_INTERFACE_INSERT(   p_Inventory_Item_Id IN NUMBER,
				   p_Item_Revision IN VARCHAR2,
				   p_Organization_Id IN NUMBER,
				   p_Transaction_Source_Id IN NUMBER,
				   p_Transaction_Action_Id IN NUMBER,
				   p_From_Subinventory_Code IN VARCHAR2,
				   p_To_Subinventory_Code IN VARCHAR2,
				   p_From_Locator_Id IN NUMBER,
				   p_To_Locator_Id IN NUMBER,
				   p_To_Organization IN NUMBER,
				   p_Transaction_Type_Id IN NUMBER,
				   p_Transaction_Source_Type_Id IN NUMBER,
				   p_Transaction_Quantity IN NUMBER,
      				   p_Transaction_UOM IN VARCHAR2,
      				   p_Transaction_Date IN DATE,
				   p_Reason_Id IN NUMBER,
				   p_User_Id IN NUMBER,
				   x_Message OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
				   x_Status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)

IS
l_dist_acct_id NUMBER; --Accounting info
Line: 53

	Insert into MTL_TRANSACTIONS_INTERFACE
     (
      transaction_interface_id,
      transaction_header_id,
      Source_Code,
      Source_Line_Id,
      Source_Header_Id,
      Process_flag,
      Transaction_Mode,
      Lock_Flag,
      Inventory_Item_Id,
      Organization_id,
      Subinventory_Code,
      Transfer_Subinventory,
      Locator_Id,
      Transfer_Locator,
      Transfer_Organization,
      Transaction_Type_Id,
      Transaction_Source_Type_Id,
      --transaction_source_name,
      Transaction_Action_Id,
      Transaction_Quantity,
      Transaction_UOM,
      Transaction_Date,
      Last_Update_Date,
      Last_Updated_By,
      Creation_Date,
      Created_By,
      reason_id,
      transaction_source_id,
      revision,
      distribution_account_id
     )
     Values (
             G_Interface_Id,          	-- Global Variable set/unset by On_Submit and On_Serial
             G_Header_Id,         	-- Same as above
             1,                		-- Source_Code,
             -1,                	-- Source_Line_Id,
             -1,                	-- Source_Header_Id,
             1,                 	-- Process_flag,
             1,                 	-- Transaction_Mode,
             2,                 	-- Lock_Flag,
             p_Inventory_Item_Id,       -- Inventory_Item_Id,
             p_Organization_Id,        	-- Organization_Id for
             p_From_Subinventory_Code,  -- Subinventory_Code
	     p_To_Subinventory_Code,    -- Transfer_Subinventory
	     p_From_Locator_Id,         -- Locator_ID
	     p_To_Locator_Id,		-- Transfer_Locator
	     p_To_Organization,
             p_Transaction_Type_Id,	-- Transaction_Type_Id,
             p_Transaction_Source_Type_Id,-- Transaction_Source_Type_Id,
            --'OnLine API Testing',      -- transaction_source_name
            -- 12831,             	-- Transaction_Source_id,is gl_code_combinations.code_combination_id
             p_Transaction_Action_Id,   -- Transaction_Action_Id
             p_Transaction_Quantity,   	-- Transaction_Quantity,
             p_Transaction_UOM, 	-- Transaction_UOM,
             p_Transaction_Date,   	-- Transaction_Date,
             sysdate,           	-- Last_Update_Date,
             p_User_Id,              	-- Last_Updated_By,
             sysdate,           	-- Creation_Date,
             p_User_Id,              	-- Created_By,
             p_Reason_Id,     	  	-- reason id,
	     l_source_id,    -- Transaction Source Id
	     p_Item_Revision,		--Inventory Item Revision
             l_dist_acct_id             -- distribution account
	     );
Line: 129

/***********************LOT_INTERFACE_INSERT PROCEDURE  *********************************/
/****************************************************************************************/
/**This procedure Inserts lot related transaction information in the                   **/
/**mtl_lot_numbers_interface table                                                     **/
/**USED BY: ON_SUBMIT and ON_SERIAL Procedures                                         **/
/****************************************************************************************/
/****************************************************************************************/

PROCEDURE LOT_INTERFACE_INSERT(p_Transaction_Quantity IN NUMBER,
			       p_Lot_Number IN VARCHAR2,
			       p_User_Id IN NUMBER,
			       p_serial_number_control_code IN NUMBER)

IS
BEGIN
--INSERTING VALUES INTO MTL_TRANSACTION_LOTS_INTERFACE

IF p_serial_number_control_code <>1 AND p_serial_number_control_code <>6 THEN

	Insert into MTL_TRANSACTION_LOTS_INTERFACE
       (
       transaction_interface_id,
       Source_Code,
       Source_Line_Id,
       Process_Flag, --Why is this one a VARCHAR2 whereas the rest are NUMBERs
       Last_Update_Date,
       Last_Updated_By,
       Creation_Date,
       Created_By,
       Lot_Number,
       Transaction_Quantity,
       Serial_transaction_temp_id
       )
       Values (
	  	G_Header_Id,  --Global Variable (set and unset in ON_SUBMIT and ON_SERIAL procs
		1,
		-1,
		'Y',
		sysdate,
		p_User_Id,
		sysdate,
		p_User_Id,
		p_Lot_Number,
		p_Transaction_Quantity,
		G_Serial_Id
	      );
Line: 176

Insert into MTL_TRANSACTION_LOTS_INTERFACE
       (
       transaction_interface_id,
       Source_Code,
       Source_Line_Id,
       Process_Flag, --Why is this one a VARCHAR2 whereas the rest are NUMBERs
       Last_Update_Date,
       Last_Updated_By,
       Creation_Date,
       Created_By,
       Lot_Number,
       Transaction_Quantity,
       Serial_transaction_temp_id
       )
       Values (
	  	G_Header_Id,  --Global Variable (set and unset in ON_SUBMIT and ON_SERIAL procs
		1,
		-1,
		'Y',
		sysdate,
		p_User_Id,
		sysdate,
		p_User_Id,
		p_Lot_Number,
		p_Transaction_Quantity,
		NULL
	      );
Line: 211

/***********************SERIAL_INTERFACE_INSERT PROCEDURE********************************/
/****************************************************************************************/
/**This procedure Inserts SN related transaction information in the                    **/
/**mtl_serial_numbers_interface table                                                  **/
/**USED BY: ON_SUBMIT and ON_SERIAL Procedures                                         **/
/****************************************************************************************/
/****************************************************************************************/



PROCEDURE SERIAL_INTERFACE_INSERT(p_From_Serial IN VARCHAR2,
				  p_To_Serial   IN VARCHAR2,
				  p_User_Id     IN NUMBER,
				  p_lot_control_code IN NUMBER)

IS
l_header_id NUMBER;
Line: 235

    Insert into MTL_SERIAL_NUMBERS_INTERFACE
    (
      transaction_interface_id,
      Source_Code,
      Source_Line_Id,
      Process_flag, --Is this the same process_flag as above?
      Last_Update_Date,
      Last_Updated_By,
      Creation_Date,
      Created_By,
      Fm_Serial_Number,
      To_Serial_Number
     )
     Values (
             l_header_id,          	-- transaction_interface_id
             1,                		-- Source_Code,
             -1,                	-- Source_Line_Id,
             1,                 	-- Process_flag,
             sysdate,           	-- Last_Update_Date,
             p_User_Id,              	-- Last_Updated_By,
             sysdate,           	-- Creation_Date,
             p_User_Id,              	-- Created_By,
             p_From_Serial,     	-- from_Serial_Number,
	     p_To_Serial		-- To_Serial_Number
             );
Line: 262

END SERIAL_INTERFACE_INSERT;
Line: 270

/**This procedure Actually processes the transaction online using information inserted **/
/**In the interface tables using the Mobile transactions form.                         **/
/****************************************************************************************/
/****************************************************************************************/

PROCEDURE PROCESS(x_Message OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
		  x_Status  OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
IS
l_error_code VARCHAR2(80);
Line: 349

	UPDATE MTL_TRANSACTIONS_INTERFACE SET
	Transfer_Subinventory = p_To_Sub,
	Transfer_Locator = p_To_Loc_Id
	WHERE Transaction_Interface_Id = G_Interface_Id;
Line: 437

SELECT mtl_material_transactions_s.NEXTVAL
 INTO G_Header_Id
FROM DUAL;
Line: 448

LINE_INTERFACE_INSERT(   p_Inventory_Item_Id,
				   p_Item_Revision,
				   p_Organization_Id,
				   l_Transaction_Source_Id,
				   p_Transaction_Action_Id,
				   p_From_Subinventory_Code,
				   p_To_Subinventory_Code,
				   p_From_Locator_Id,
				   p_To_Locator_Id,
				   p_Transfer_Organization,
				   p_Transaction_Type_Id,
				   p_Transaction_Source_Type_Id,
				   0,
      				   p_Transaction_UOM,
      				   p_Transaction_Date,
				   p_Reason_Id,
				   p_User_Id,
				   x_Message,
				   x_Status);
Line: 532

UPDATE MTL_TRANSACTIONS_INTERFACE SET
	transaction_quantity = l_txn_qty
	WHERE Transaction_Header_Id = G_Header_Id;
Line: 540

	UPDATE MTL_TRANSACTION_LOTS_INTERFACE SET
	transaction_quantity = p_txn_qty
	WHERE Transaction_Interface_Id = G_Interface_Id;
Line: 582

select primary_uom_code into l_primary_uom_code
from mtl_system_items where
inventory_item_id = p_inventory_item_id and
organization_id = p_organization_id;
Line: 605

UPDATE MTL_TRANSACTION_LOTS_INTERFACE SET
	transaction_quantity = p_current_lot_qty
	WHERE Transaction_Interface_Id = G_Interface_Id
	AND Lot_Number = p_Lot_Number;
Line: 643

SELECT mtl_material_transactions_s.NEXTVAL
 INTO G_Serial_Id
FROM DUAL;
Line: 650

 LOT_INTERFACE_INSERT(0,
		      p_Lot_Number,
	   	      p_User_Id,
		      p_serial_number_control_code);
Line: 749

select primary_uom_code into l_prim from mtl_system_items where
organization_id = p_Organization_Id
and inventory_item_id = p_inventory_item_id;
Line: 772

select revision,current_subinventory_code,current_locator_id
into l_revision,l_from_sub, l_from_loc from mtl_serial_numbers
where current_organization_id = p_organization_id and inventory_item_id =
p_inventory_item_id and serial_number = p_from_serial;
Line: 777

UPDATE MTL_TRANSACTIONS_INTERFACE SET
	subinventory_code = l_from_sub,
	revision = l_revision,
	locator_id = l_from_loc
	WHERE Transaction_Header_Id = G_Header_Id;
Line: 784

SERIAL_INTERFACE_INSERT(p_from_serial,
			p_to_serial,
			p_User_Id,
			p_lot_control_code);