DBA Data[Home] [Help]

APPS.WSH_TRANSACTIONS_UTIL SQL Statements

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

Line: 116

select name, customer_id from wsh_new_deliveries
where delivery_id = p_entity_id;
Line: 121

select distinct 'X'
from wsh_delivery_details wdd1,
wsh_delivery_assignments_v wda1,
wsh_delivery_details wdd2,
wsh_delivery_assignments_v wda2
where
wdd1.source_line_id = wdd2.source_line_id
and wdd1.delivery_detail_id = wda1.delivery_detail_id
and wdd1.container_flag='N'
and wda1.delivery_id = p_delivery_id
and wdd2.delivery_detail_id = wda2.delivery_detail_id
and wdd2.container_flag='N'
and (wda2.delivery_id <> p_delivery_id
     or wda2.delivery_id is null);
Line: 139

select distinct 'X'
from wsh_delivery_details wdd,
     wsh_delivery_assignments_v wda
where wdd.delivery_detail_id = wda.delivery_detail_id
and   wdd.container_flag = 'N'
and   wdd.released_status not in ('X', 'R', 'B')
and   wda.delivery_id =p_delivery_id;
Line: 148

select distinct 'X'
from wsh_delivery_details wdd,
     wsh_delivery_assignments_v wda
where wdd.delivery_detail_id = wda.delivery_detail_id
and   wdd.container_flag = 'N'
and   wdd.released_status not in ('X','Y')
and   wda.delivery_id =p_delivery_id;
Line: 159

select document_number,transaction_status
from wsh_transactions_history
where transaction_id = (
			select max(transaction_id)
			from wsh_transactions_history
			where entity_number = p_entity_number
			and trading_partner_id = p_tp_id
			and document_direction = 'O'
			--and transaction_status = 'ST'
			and action_type = 'A'
			);
Line: 172

select	distinct 'X'
from	wsh_delivery_details wdd,
	wsh_delivery_assignments_v wda
where	wda.delivery_id = p_delivery_id
and	wda.parent_delivery_detail_id is null
and	wda.delivery_detail_id = wdd.delivery_detail_id
and	wdd.container_flag='N';
Line: 183

select wdd.delivery_detail_id,
       wdd.source_header_id,
       wdd.source_line_id
from   wsh_delivery_details wdd,
       wsh_delivery_assignments_v wda
where  wda.delivery_id = p_delivery_id
and    wda.delivery_detail_id = wdd.delivery_detail_id
and    wdd.container_flag = 'N'
and    wda.delivery_id IS NOT NULL;
Line: 199

wsh_insert_history_error EXCEPTION;
Line: 254

     select organization_code
     into  l_org_code
     from mtl_parameters
     where organization_id = p_organization_id;
Line: 286

  select to_char(WSH_DOCUMENT_NUMBER_S.nextval) into l_txns_history_rec.document_number from dual;
Line: 406

	WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
				              p_action_type,
					      p_document_type,
                                              x_return_status);
Line: 411

	select 1 into l_tmp
	from wsh_new_deliveries
	where delivery_id = p_entity_id
	for update nowait;
Line: 417

         wsh_debug_sv.log (l_module_name,'Update_Dlvy_Status-> x_return_status: ',x_return_status);
Line: 421

	   raise wsh_insert_history_error;
Line: 464

        select 1 into l_tmp
        from wsh_new_deliveries
        where delivery_id = p_entity_id
        for update nowait;
Line: 469

        WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
					         p_action_type,
						 p_document_type,
                                                 x_return_status);
Line: 476

           wsh_debug_sv.log (l_module_name,'Update_Dlvy_Status-> x_return_status: ',x_return_status);
Line: 550

  WHEN wsh_insert_history_error THEN
       IF ( p_action_type = 'A' ) THEN
	  WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
						NULL,
						p_document_type,
                                                x_return_status);
Line: 559

	  WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
						'A',
						p_document_type,
                                                x_return_status);
Line: 567

        WSH_DEBUG_SV.logmsg(l_module_name,'wsh_insert_history_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 568

        WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_insert_history_error');
Line: 572

	  WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
						NULL,
						p_document_type,
                                                x_return_status);
Line: 579

	  WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
						'A',
						p_document_type,
                                                x_return_status);
Line: 667

select event_key
from wsh_transactions_history
where item_type = p_item_type
and document_number = p_orig_doc_number
and trading_partner_id = p_organization_id;
Line: 674

select	delivery_id
from	wsh_new_deliveries
where 	name = p_delivery_name
and	organization_id = p_organization_id;
Line: 721

        select wsh_transaction_s.nextval into l_temp from dual;
Line: 734

     select wsh_transaction_s.nextval into l_temp from dual;
Line: 777

SELECT	wnd.delivery_id
from	wsh_new_deliveries wnd,
	wsh_transactions_history wth
where	wnd.name = wth.entity_number
and	entity_type='DLVY'
and	wth.event_key = item_key
and	wth.item_type = item_type
and	wth.document_direction='O';
Line: 823

     WSH_DELIVERY_UTIL.Update_Dlvy_Status(l_delivery_id,
					  NULL,
					  NULL,
				          l_return_status);
Line: 873

PROCEDURE update_atnms(  p_transaction_id       IN      number)

IS

  pragma AUTONOMOUS_TRANSACTION;
Line: 882

    || 'UPDATE_ATNMS';
Line: 897

   UPDATE wsh_transactions_history
           SET transaction_status = 'ER'
           WHERE transaction_id = p_transaction_id;
Line: 920

END update_atnms;
Line: 944

  SELECT wth1.entity_number , wth1.transaction_id
  FROM wsh_transactions_history wth1,
       wsh_transactions_history wth2
  WHERE wth1.action_type = 'A'
  AND wth1.entity_type = 'DLVY'
  AND wth1.document_type = 'SR'
  AND wth1.document_direction = 'O'
  AND wth1.document_number = wth2.ORIG_DOCUMENT_NUMBER
  AND wth1.event_key = wth2.event_key
  AND wth2.document_direction = 'I'
  AND wth2.transaction_id = v_trx_id
  AND wth2.document_type = 'SA'
  ORDER BY wth1.transaction_id desc;
Line: 959

  SELECT  wth2.transaction_id  ,
        wth2.document_type   ,
        wth2.document_direction      ,
        wth2.document_number ,
        wth2.orig_document_number    ,
        wth2.entity_number   ,
        wth2.entity_type     ,
        wth2.trading_partner_id      ,
        wth2.action_type     ,
        wth2.transaction_status ,
        wth2.ecx_message_id  ,
        wth2.event_name      ,
        wth2.event_key       ,
        wth2.item_type       ,
        wth2.internal_control_number ,
        wth2.attribute_category      ,
        wth2.attribute1      ,
        wth2.attribute2      ,
        wth2.attribute3      ,
        wth2.attribute4      ,
        wth2.attribute5      ,
        wth2.attribute6      ,
        wth2.attribute7      ,
        wth2.attribute8      ,
        wth2.attribute9      ,
        wth2.attribute10     ,
        wth2.attribute11     ,
        wth2.attribute12     ,
        wth2.attribute13     ,
        wth2.attribute14     ,
        wth2.attribute15
  FROM wsh_transactions_history wth1,
       wsh_transactions_history wth2
  WHERE wth1.transaction_id = v_sr_trx_id
  AND wth2.entity_number = wth1.entity_number
  AND wth2.document_direction = 'O'
  AND wth2.document_type = 'SR'
  AND wth2.action_type = 'D'
  ORDER BY wth2.transaction_id desc;
Line: 1082

              update_atnms(l_txns_history_rec.transaction_id);
Line: 1163

PROCEDURE Update_Txn_Hist_Err_WF(	Item_type 	IN	VARCHAR2,
					Item_key	IN	VARCHAR2,
					Actid		IN	NUMBER,
					Funcmode	IN	VARCHAR2,
					Resultout	OUT NOCOPY 	VARCHAR2
                       	 	     )

IS
l_return_status VARCHAR2(1);
Line: 1172

wsh_update_history EXCEPTION;
Line: 1176

l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'UPDATE_TXN_HIST_ERR_WF';
Line: 1188

  wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
Line: 1197

     Update_Txn_History ( Item_type,
			  Item_key,
			  'ER',
                          l_return_status
                        );
Line: 1203

      wsh_debug_sv.log(l_module_name, 'Update_Txn_History l_return_status ',l_return_status);
Line: 1207

	raise wsh_update_history;
Line: 1223

  WHEN wsh_update_history THEN
	resultout := 'COMPLETE:FAILURE';
Line: 1226

         WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 1227

         WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
Line: 1238

END Update_Txn_Hist_Err_WF;
Line: 1240

PROCEDURE Update_Txn_Hist_Success_WF(	Item_type 	IN	VARCHAR2,
					Item_key	IN	VARCHAR2,
					Actid		IN	NUMBER,
					Funcmode	IN	VARCHAR2,
					Resultout	OUT NOCOPY 	VARCHAR2
                       	 	     )

IS
l_return_status VARCHAR2(1);
Line: 1249

wsh_update_history EXCEPTION;
Line: 1253

l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'UPDATE_TXN_HIST_SUCCESS_WF';
Line: 1265

  wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
Line: 1273

     Update_Txn_History ( Item_type,
			  Item_key,
			  'ST',
                          l_return_status
                        );
Line: 1279

      wsh_debug_sv.log(l_module_name, 'Update_Txn_History l_return_status ',l_return_status);
Line: 1282

	raise wsh_update_history;
Line: 1296

  WHEN wsh_update_history THEN
	resultout := 'COMPLETE:FAILURE';
Line: 1299

         WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 1300

         WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
Line: 1311

END Update_Txn_Hist_Success_WF;
Line: 1313

PROCEDURE Update_Txn_History ( p_item_type     IN      VARCHAR2,
                               p_item_key      IN      VARCHAR2,
                               p_transaction_status IN VARCHAR2,
                               x_return_status OUT NOCOPY      VARCHAR2
                              )
IS


pragma AUTONOMOUS_TRANSACTION;
Line: 1328

wsh_update_history EXCEPTION;
Line: 1333

l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'UPDATE_TXN_HISTORY';
Line: 1373

     raise wsh_update_history;
Line: 1376

  WSH_TRANSACTIONS_HISTORY_PKG.Create_Update_Txns_History ( l_txns_history_rec,
                                                            l_txn_id,
                                                            x_return_status );
Line: 1380

   wsh_debug_sv.log(l_module_name, 'Create_Update_Txns_History x_return_status',x_return_status);
Line: 1384

     raise wsh_update_history;
Line: 1393

  WHEN wsh_update_history THEN
	x_return_status := wsh_util_core.g_ret_sts_error;
Line: 1396

         WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 1397

         WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
Line: 1406

END Update_Txn_History;
Line: 1408

PROCEDURE WSHSUPI_SELECTOR(             Item_type       IN      VARCHAR2,
                                        Item_key        IN      VARCHAR2,
                                        Actid           IN      NUMBER,
                                        Funcmode        IN      VARCHAR2,
                                        Resultout       IN OUT NOCOPY   VARCHAR2
                                     ) IS
l_user_id       NUMBER;
Line: 1423

l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'WSHSUPI_SELECTOR';
Line: 1436

        wsh_debug_sv.push(l_module_name, 'WSHSUPI_SELECTOR');
Line: 1487

END WSHSUPI_SELECTOR;
Line: 1586

  SELECT status_code
  FROM wsh_new_deliveries
  WHERE name = v_delivery_name;
Line: 1591

  SELECT event_key
  FROM wsh_transactions_history
  WHERE ENTITY_NUMBER = v_delivery_name
  AND ENTITY_TYPE = 'DLVY'
  AND ACTION_TYPE = 'D'
  AND document_direction = 'O'
  ORDER BY transaction_id DESC;
Line: 1761

  SELECT  wth2.entity_number ,  wth1.transaction_id
  FROM    wsh_transactions_history wth1,
          wsh_transactions_history wth2
  where   wth1.entity_type='DLVY_INT'
  and     wth1.event_key = v_item_key
  and     wth1.item_type = v_item_type
  and     wth1.document_type = 'SA'
  and     wth1.document_direction='I'
  and     wth1.action_type = 'A'
  AND     wth2.entity_type = 'DLVY'
  AND     wth2.document_type = 'SR'
  AND     wth2.action_type = 'A'
  AND     wth2.document_direction = 'O'
  AND     wth2.item_type = v_item_type
  AND     wth2.event_key = v_item_key
  ORDER BY wth1.transaction_id desc;
Line: 1836

              UPDATE wsh_transactions_history
              SET TRANSACTION_STATUS = 'AP'
              WHERE transaction_id = l_transaction_id;
Line: 1965

  SELECT wth2.transaction_id, wth2.transaction_status,
         to_number(wth2.entity_number)
  FROM wsh_transactions_history wth1,
       wsh_transactions_history wth2
  WHERE wth1.entity_number = v_name
  AND wth1.action_type = 'A'
  AND wth1.entity_type = 'DLVY'
  AND wth1.document_type = 'SR'
  AND wth1.document_direction = 'O'
  AND wth1.document_number = wth2.ORIG_DOCUMENT_NUMBER
  AND wth1.event_key = wth2.event_key
  AND wth2.document_direction = 'I'
  AND wth2.document_type = 'SA';
Line: 1981

  SELECT transaction_id,
        document_type,
        document_direction,
        document_number,
        orig_document_number,
        entity_number,
        entity_type,
        trading_partner_id,
        action_type,
        transaction_status,
        ecx_message_id,
        event_name,
        event_key ,
        item_type,
        internal_control_number,
        attribute_category,
        attribute1,
        attribute2,
        attribute3,
        attribute4,
        attribute5,
        attribute6,
        attribute7,
        attribute8,
        attribute9,
        attribute10,
        attribute11,
        attribute12,
        attribute13,
        attribute14,
        attribute15
  FROM wsh_transactions_history
  WHERE
  entity_number = v_entity_number
  AND action_type = 'A'
  AND entity_type = 'DLVY'
  and document_direction  = 'O'
  and document_type       = 'SR'
  ORDER BY transaction_id DESC;
Line: 2022

  SELECT status_code
  FROM wsh_new_deliveries
  WHERE name = v_delivery_name;
Line: 2030

  SELECT entity_number
  FROM  wsh_transactions_history
  WHERE item_type = v_item_type
  AND   event_key = v_item_key
  AND   document_direction = 'O'
  AND   document_type = 'SR'
  AND   ACTION_TYPE = 'D'
  ORDER BY transaction_id desc;
Line: 2041

  SELECT 1
  FROM  wsh_transactions_history
  WHERE item_type = v_item_type
  AND   event_key = v_item_key
  AND   document_direction = 'O'
  AND   document_type = 'SR'
  AND   ACTION_TYPE = 'A'
  ORDER BY transaction_id desc;
Line: 2195

                WSH_PROCESS_INTERFACED_PKG.delete_interface_records (
                    p_delivery_interface_id   => l_del_interface_id,
                    x_return_status           => l_Return_Status
                 ) ;
Line: 2207

                 UPDATE wsh_transactions_history
                 SET transaction_status= 'SX',
                 entity_number = l_entity_number,
                 entity_type = 'DLVY'
                 WHERE
                 transaction_id = l_trx_id; --bmso