1: PACKAGE BODY WSH_TRXSN_HANDLER AS
2: /* $Header: WSHIISNB.pls 115.6 2004/06/08 02:12:56 anxsharm ship $ */
3:
4: --
5: -- PACKAGE VARIABLES
6: --
7:
8: g_userid NUMBER;
9: --
10: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_TRXSN_HANDLER';
11: --
12:
13: --HVOP heali
14: PROCEDURE INSERT_ROW_BULK (
177: l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'INSERT_ROW';
178: --
179: BEGIN
180:
181: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.INSERT_ROW',
182: 'START',
183: 'Start of procedure INSERT_ROW, input parameters:
184: source_code='||p_source_code||
185: ',source_line_id='||to_char(p_source_line_id)||
238: WSH_DEBUG_SV.log(l_module_name,'P_PROCESS_FLAG',P_PROCESS_FLAG);
239: END IF;
240: --
241: IF (p_fm_serial_number IS NULL) THEN
242: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.INSERT_ROW',
243: 'END',
244: 'Insert failed. From serial number is NULL.
245: Raising WSH_FM_SERIALNO_NULL');
246: */
310:
311: FETCH row_id INTO x_rowid;
312:
313: IF (row_id%NOTFOUND) then
314: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.INSERT_ROW',
315: 'END',
316: 'No rowid found. Raising NO_DATA_FOUND.');
317: */
318: CLOSE row_id;
323: END IF;
324:
325: CLOSE row_id;
326:
327: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.INSERT_ROW',
328: 'END',
329: 'End of procedure INSERT_ROW');
330: */
331:
374: --
375: l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'UPDATE_ROW';
376: --
377: BEGIN
378: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.UPDATE_ROW',
379: 'START',
380: 'Start of procedure UPDATE_ROW, input parameters:
381: source_code='||p_source_code||
382: ', source_line_id='||p_source_line_id||
429: WSH_DEBUG_SV.log(l_module_name,'P_PROCESS_FLAG',P_PROCESS_FLAG);
430: END IF;
431: --
432: IF (p_fm_serial_number IS NULL) THEN
433: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.UPDATE_ROW',
434: 'END',
435: 'UPDATE failed. From serial number is NULL.
436: Raising WSH_FM_SERIALNO_NULL');
437: */
467: WSH_DEBUG_SV.log(l_module_name,'Rows Updated',SQL%ROWCOUNT);
468: END IF;
469:
470: IF (SQL%NOTFOUND) THEN
471: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.UPDATE_ROW',
472: 'END',
473: 'No rows updated. Raising NO_DATA_FOUND.');
474: */
475: IF l_debug_on THEN
477: END IF;
478: RAISE NO_DATA_FOUND;
479: END IF;
480:
481: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.UPDATE_ROW',
482: 'END',
483: 'End of procedure UPDATE_ROW');
484: */
485: --
510: --
511: l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'DELETE_ROW';
512: --
513: BEGIN
514: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.DELETE_ROW',
515: 'START',
516: 'Start of procedure DELETE_ROW');
517: */
518: --
535: IF l_debug_on THEN
536: WSH_DEBUG_SV.log(l_module_name,'Rows deleted',SQL%ROWCOUNT);
537: END IF;
538: IF (SQL%NOTFOUND) THEN
539: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.DELETE_ROW',
540: 'END',
541: 'No rows deleted. Raising NO_DATA_FOUND');
542: */
543: IF l_debug_on THEN
545: END IF;
546: RAISE NO_DATA_FOUND;
547: END IF;
548:
549: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.DELETE_ROW',
550: 'END',
551: 'End of procedure DELETE_ROW');
552: */
553: --
595: --
596: l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'LOCK_ROW';
597: --
598: BEGIN
599: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.LOCK_ROW',
600: 'START',
601: 'Start of procedure LOCK_ROW, input parameters:
602: source_code='||p_source_code||
603: ', source_line_id='||p_source_line_id||
638:
639: FETCH lock_record into rec_info;
640:
641: IF (lock_record%NOTFOUND) THEN
642: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.LOCK_ROW',
643: 'END',
644: 'Lock record failed. Raising exception FORM_RECORD_DELETED');
645: */
646: CLOSE lock_record;
680: AND ((rec_info.parent_serial_number = p_parent_serial_number)
681: OR ((rec_info.parent_serial_number IS NULL)
682: AND (p_parent_serial_number IS NULL)))
683: ) THEN
684: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.LOCK_ROW',
685: 'END',
686: 'End of procedure LOCK_ROW');
687: */
688: --
691: END IF;
692: --
693: return;
694: ELSE
695: /* wsh_server_debug.log_event('WSH_TRXSN_HANDLER.LOCK_ROW',
696: 'END',
697: 'Lock record failed. Raising exception FORM_RECORD_CHANGED');
698: */
699: fnd_message.set_name('FND','FORM_RECORD_CHANGED');
708: END IF;
709: --
710: END Lock_Row;
711:
712: END WSH_TRXSN_HANDLER;