DBA Data[Home] [Help]

APPS.INV_DS_LOGICAL_TRX_INFO_PUB SQL Statements

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

Line: 25

 |                  a drop shipment so that they can update the inventory   |
 |               accordingly                                                |
 |                                                                          |
 |                                                                          |
 | Input Parameters :                                                       |
 |   p_api_version_number - API version number                              |
 |   p_init_msg_lst       - Whether initialize the error message list or not|
 |                          Should be fnd_api.g_false or fnd_api.g_true     |
 |   p_transaction_id     - transaction id of the inserted SO issue MMT     |
 |                          record.                                         |
 | Output Parameters :                                                      |
 |   x_return_status      - fnd_api.g_ret_sts_success, if succeeded         |
 |                          fnd_api.g_ret_sts_exc_error, if an expected     |
 |                          error occurred                                  |
 |                          fnd_api.g_ret_sts_unexp_error, if an unexpected |
 |                          eror occurred                                   |
 |   x_msg_count          - Number of error message in the error message    |
 |                          list                                            |
 |   x_msg_data           - If the number of error message in the error     |
 |                          message list is one, the error message is in    |
 |                          this output parameter                           |
 |   x_logical_trx_attr_values - returns a record type with all the attributes|
 |                                  for a logical transaction.              |
 *==========================================================================*/

   PROCEDURE GET_LOGICAL_ATTR_VALUES
   (
    x_return_status       OUT NOCOPY  VARCHAR2
    , x_msg_count           OUT NOCOPY  NUMBER
    , x_msg_data            OUT nocopy VARCHAR2
    , x_logical_trx_attr_values  OUT NOCOPY INV_DROPSHIP_GLOBALS.logical_trx_attr_tbl
    , p_api_version_number  IN          NUMBER   := 1.0
    , p_init_msg_lst        IN          VARCHAR2 := G_FALSE
    , p_transaction_id      IN          NUMBER
    )
   IS
      --Bug 3620584: Changed the SQL to improve performance. Removed the OR
      -- condition and used a UNION in its place.

      CURSOR logical_transactions(l_txn_id NUMBER)
	IS
	   SELECT transaction_id,transaction_type_id,
	     transaction_source_type_id,transaction_action_id,
	     parent_transaction_id,logical_trx_type_code,
	     intercompany_cost,intercompany_pricing_option,
	     trx_flow_header_id,logical_transactions_created,
	     logical_transaction,intercompany_currency_code

	     FROM MTL_MATERIAL_TRANSACTIONS
	     WHERE TRANSACTION_ACTION_ID NOT IN (24,30) AND
	     (transaction_id = p_transaction_id)

	     UNION

	      SELECT transaction_id,transaction_type_id,
	     transaction_source_type_id,transaction_action_id,
	     parent_transaction_id,logical_trx_type_code,
	     intercompany_cost,intercompany_pricing_option,
	     trx_flow_header_id,logical_transactions_created,
	     logical_transaction,intercompany_currency_code
	     FROM MTL_MATERIAL_TRANSACTIONS
	     WHERE TRANSACTION_ACTION_ID NOT IN (24,30) AND
	     ( PARENT_TRANSACTION_ID IN
	       (SELECT PARENT_TRANSACTION_ID FROM MTL_MATERIAL_TRANSACTIONS
		WHERE TRANSACTION_ACTION_ID NOT IN (24,30) AND
		(transaction_id = p_transaction_id)) AND
	       PARENT_TRANSACTION_ID IS NOT NULL);