167: -- ----------------------------------------------------------------------------
168: -- |-----------------------< chk_state >-------------------------------|
169: -- ----------------------------------------------------------------------------
170: Procedure chk_state
171: (p_state IN hr_wip_transactions.state%TYPE
172: )is
173: begin
174: If p_state not in (g_start_state,g_save_for_later_state
175: ,g_pending_approval_state,g_reject_for_correction_state)
182: -- ----------------------------------------------------------------------------
183: -- |-----------------------< chk_sub_state >-----------------------|
184: -- ----------------------------------------------------------------------------
185: Procedure chk_sub_state
186: (p_state IN hr_wip_transactions.state%TYPE
187: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE)is
188: begin
189: If (p_state <> g_save_for_later_state and p_sub_state is not null)
190: then
183: -- |-----------------------< chk_sub_state >-----------------------|
184: -- ----------------------------------------------------------------------------
185: Procedure chk_sub_state
186: (p_state IN hr_wip_transactions.state%TYPE
187: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE)is
188: begin
189: If (p_state <> g_save_for_later_state and p_sub_state is not null)
190: then
191: fnd_message.set_name('PER','PER_289668_TXN_INV_SUBSTATE');
201: -- ----------------------------------------------------------------------------
202: -- |-----------------------< get_and_chk_and_return_dml_mode >----------------|
203: -- ----------------------------------------------------------------------------
204: Function get_and_chk_and_ret_dml_mode
205: (p_new_dml_mode IN hr_wip_transactions.dml_mode%TYPE
206: ,p_old_dml_mode IN hr_wip_transactions.dml_mode%TYPE)
207: RETURN hr_wip_transactions.dml_mode%TYPE is
208: begin
209: If p_new_dml_mode = hr_api.g_varchar2 THEN
202: -- |-----------------------< get_and_chk_and_return_dml_mode >----------------|
203: -- ----------------------------------------------------------------------------
204: Function get_and_chk_and_ret_dml_mode
205: (p_new_dml_mode IN hr_wip_transactions.dml_mode%TYPE
206: ,p_old_dml_mode IN hr_wip_transactions.dml_mode%TYPE)
207: RETURN hr_wip_transactions.dml_mode%TYPE is
208: begin
209: If p_new_dml_mode = hr_api.g_varchar2 THEN
210: RETURN(p_old_dml_mode);
203: -- ----------------------------------------------------------------------------
204: Function get_and_chk_and_ret_dml_mode
205: (p_new_dml_mode IN hr_wip_transactions.dml_mode%TYPE
206: ,p_old_dml_mode IN hr_wip_transactions.dml_mode%TYPE)
207: RETURN hr_wip_transactions.dml_mode%TYPE is
208: begin
209: If p_new_dml_mode = hr_api.g_varchar2 THEN
210: RETURN(p_old_dml_mode);
211: end if;
240: -- ----------------------------------------------------------------------------
241: -- |-----------------------< get_context_display_text >-----------------------|
242: -- ----------------------------------------------------------------------------
243: Function get_context_display_text
244: (p_new_context_display_text IN hr_wip_transactions.context_display_text%TYPE
245: ,p_old_context_display_text IN hr_wip_transactions.context_display_text%TYPE)
246: RETURN hr_wip_transactions.context_display_text%TYPE IS
247: begin
248: -- set the correct context_display_text
241: -- |-----------------------< get_context_display_text >-----------------------|
242: -- ----------------------------------------------------------------------------
243: Function get_context_display_text
244: (p_new_context_display_text IN hr_wip_transactions.context_display_text%TYPE
245: ,p_old_context_display_text IN hr_wip_transactions.context_display_text%TYPE)
246: RETURN hr_wip_transactions.context_display_text%TYPE IS
247: begin
248: -- set the correct context_display_text
249: If p_new_context_display_text = hr_api.g_varchar2
242: -- ----------------------------------------------------------------------------
243: Function get_context_display_text
244: (p_new_context_display_text IN hr_wip_transactions.context_display_text%TYPE
245: ,p_old_context_display_text IN hr_wip_transactions.context_display_text%TYPE)
246: RETURN hr_wip_transactions.context_display_text%TYPE IS
247: begin
248: -- set the correct context_display_text
249: If p_new_context_display_text = hr_api.g_varchar2
250: then
262: (p_item_type IN wf_items.item_type%TYPE
263: ,p_item_key IN wf_items.item_key%TYPE
264: ,p_function_id IN fnd_form_functions.function_id%TYPE
265: ,p_creator_user_id IN fnd_user.user_id%TYPE
266: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
267: ,p_vo_xml IN VARCHAR2
268: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
269: ) RETURN hr_wip_transactions.transaction_id%TYPE is
270: --
264: ,p_function_id IN fnd_form_functions.function_id%TYPE
265: ,p_creator_user_id IN fnd_user.user_id%TYPE
266: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
267: ,p_vo_xml IN VARCHAR2
268: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
269: ) RETURN hr_wip_transactions.transaction_id%TYPE is
270: --
271: l_tran_id hr_wip_transactions.transaction_id%TYPE;
272: --
265: ,p_creator_user_id IN fnd_user.user_id%TYPE
266: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
267: ,p_vo_xml IN VARCHAR2
268: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
269: ) RETURN hr_wip_transactions.transaction_id%TYPE is
270: --
271: l_tran_id hr_wip_transactions.transaction_id%TYPE;
272: --
273: begin
267: ,p_vo_xml IN VARCHAR2
268: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
269: ) RETURN hr_wip_transactions.transaction_id%TYPE is
270: --
271: l_tran_id hr_wip_transactions.transaction_id%TYPE;
272: --
273: begin
274: chk_item_type_item_key_mand(p_item_type => p_item_type
275: ,p_item_key => p_item_key
279: ,p_item_key => p_item_key
280: );
281: chk_creator_user_id(p_creator_user_id => p_creator_user_id);
282: chk_function_id(p_function_id => p_function_id);
283: insert into hr_wip_transactions(transaction_id
284: ,creator_user_id
285: ,item_type
286: ,item_key
287: ,function_id
290: ,vo_cache
291: ,context_display_text
292: ,dml_mode
293: )
294: values(hr_wip_transactions_s.nextval
295: ,p_creator_user_id
296: ,p_item_type
297: ,p_item_key
298: ,p_function_id
314: -- ----------------------------------------------------------------------------
315: -- |-----------------------< upd >-----------------------|
316: -- ----------------------------------------------------------------------------
317: Procedure upd
318: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
319: ,p_state IN hr_wip_transactions.state%TYPE
320: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
321: ,p_vo_xml IN VARCHAR2
322: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
315: -- |-----------------------< upd >-----------------------|
316: -- ----------------------------------------------------------------------------
317: Procedure upd
318: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
319: ,p_state IN hr_wip_transactions.state%TYPE
320: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
321: ,p_vo_xml IN VARCHAR2
322: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
323: default hr_api.g_varchar2
316: -- ----------------------------------------------------------------------------
317: Procedure upd
318: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
319: ,p_state IN hr_wip_transactions.state%TYPE
320: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
321: ,p_vo_xml IN VARCHAR2
322: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
323: default hr_api.g_varchar2
324: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
318: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
319: ,p_state IN hr_wip_transactions.state%TYPE
320: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
321: ,p_vo_xml IN VARCHAR2
322: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
323: default hr_api.g_varchar2
324: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
325: default hr_api.g_varchar2
326: )is
320: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
321: ,p_vo_xml IN VARCHAR2
322: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
323: default hr_api.g_varchar2
324: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
325: default hr_api.g_varchar2
326: )is
327: --
328: begin
325: default hr_api.g_varchar2
326: )is
327: --
328: begin
329: update hr_wip_transactions
330: set state = p_state
331: ,sub_state = p_sub_state
332: ,vo_cache = p_vo_xml
333: ,context_display_text = p_context_display_text
341: (p_item_type IN wf_items.item_type%TYPE
342: ,p_item_key IN wf_items.item_key%TYPE
343: ,p_function_id IN fnd_form_functions.function_id%TYPE
344: ,p_creator_user_id IN fnd_user.user_id%TYPE
345: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
346: ,p_vo_xml IN VARCHAR2
347: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
348: ) RETURN hr_wip_transactions.transaction_id%TYPE
349: is
343: ,p_function_id IN fnd_form_functions.function_id%TYPE
344: ,p_creator_user_id IN fnd_user.user_id%TYPE
345: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
346: ,p_vo_xml IN VARCHAR2
347: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
348: ) RETURN hr_wip_transactions.transaction_id%TYPE
349: is
350: PRAGMA AUTONOMOUS_TRANSACTION;
351: l_transaction_id number;
344: ,p_creator_user_id IN fnd_user.user_id%TYPE
345: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
346: ,p_vo_xml IN VARCHAR2
347: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
348: ) RETURN hr_wip_transactions.transaction_id%TYPE
349: is
350: PRAGMA AUTONOMOUS_TRANSACTION;
351: l_transaction_id number;
352: begin
371: (p_item_type IN wf_items.item_type%TYPE
372: ,p_item_key IN wf_items.item_key%TYPE
373: ,p_function_id IN fnd_form_functions.function_id%TYPE
374: ,p_creator_user_id IN fnd_user.user_id%TYPE
375: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
376: ,p_vo_xml IN VARCHAR2
377: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
378: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
379: )is
373: ,p_function_id IN fnd_form_functions.function_id%TYPE
374: ,p_creator_user_id IN fnd_user.user_id%TYPE
375: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
376: ,p_vo_xml IN VARCHAR2
377: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
378: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
379: )is
380: PRAGMA AUTONOMOUS_TRANSACTION;
381: begin
374: ,p_creator_user_id IN fnd_user.user_id%TYPE
375: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
376: ,p_vo_xml IN VARCHAR2
377: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
378: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
379: )is
380: PRAGMA AUTONOMOUS_TRANSACTION;
381: begin
382: p_transaction_id := ins
400: ,p_item_key IN wf_items.item_key%TYPE
401: ,p_function_id IN fnd_form_functions.function_id%TYPE
402: ,p_creator_user_id IN fnd_user.user_id%TYPE
403: ,p_vo_xml IN VARCHAR2
404: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
405: ) RETURN hr_wip_transactions.transaction_id%TYPE is
406: PRAGMA AUTONOMOUS_TRANSACTION;
407: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
408: begin
401: ,p_function_id IN fnd_form_functions.function_id%TYPE
402: ,p_creator_user_id IN fnd_user.user_id%TYPE
403: ,p_vo_xml IN VARCHAR2
404: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
405: ) RETURN hr_wip_transactions.transaction_id%TYPE is
406: PRAGMA AUTONOMOUS_TRANSACTION;
407: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
408: begin
409: l_transaction_id := ins
403: ,p_vo_xml IN VARCHAR2
404: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
405: ) RETURN hr_wip_transactions.transaction_id%TYPE is
406: PRAGMA AUTONOMOUS_TRANSACTION;
407: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
408: begin
409: l_transaction_id := ins
410: (p_item_type => p_item_type
411: ,p_item_key => p_item_key
427: ,p_item_key IN wf_items.item_key%TYPE
428: ,p_function_id IN fnd_form_functions.function_id%TYPE
429: ,p_creator_user_id IN fnd_user.user_id%TYPE
430: ,p_vo_xml IN VARCHAR2
431: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
432: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
433: )is
434: PRAGMA AUTONOMOUS_TRANSACTION;
435: begin
428: ,p_function_id IN fnd_form_functions.function_id%TYPE
429: ,p_creator_user_id IN fnd_user.user_id%TYPE
430: ,p_vo_xml IN VARCHAR2
431: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
432: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
433: )is
434: PRAGMA AUTONOMOUS_TRANSACTION;
435: begin
436: p_transaction_id := ins
448: -- ----------------------------------------------------------------------------
449: -- |-----------------------< save_for_later >-----------------------|
450: -- ----------------------------------------------------------------------------
451: Procedure save_for_later
452: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
453: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
454: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
455: ,p_state IN hr_wip_transactions.state%TYPE
456: ,p_vo_xml IN VARCHAR2
449: -- |-----------------------< save_for_later >-----------------------|
450: -- ----------------------------------------------------------------------------
451: Procedure save_for_later
452: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
453: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
454: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
455: ,p_state IN hr_wip_transactions.state%TYPE
456: ,p_vo_xml IN VARCHAR2
457: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
450: -- ----------------------------------------------------------------------------
451: Procedure save_for_later
452: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
453: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
454: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
455: ,p_state IN hr_wip_transactions.state%TYPE
456: ,p_vo_xml IN VARCHAR2
457: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
458: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
451: Procedure save_for_later
452: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
453: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
454: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
455: ,p_state IN hr_wip_transactions.state%TYPE
456: ,p_vo_xml IN VARCHAR2
457: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
458: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
459: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
453: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
454: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
455: ,p_state IN hr_wip_transactions.state%TYPE
456: ,p_vo_xml IN VARCHAR2
457: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
458: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
459: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
460: --
461: begin
454: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
455: ,p_state IN hr_wip_transactions.state%TYPE
456: ,p_vo_xml IN VARCHAR2
457: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
458: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
459: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
460: --
461: begin
462: --
455: ,p_state IN hr_wip_transactions.state%TYPE
456: ,p_vo_xml IN VARCHAR2
457: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
458: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
459: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
460: --
461: begin
462: --
463: chk_transaction_creator
489: (p_item_type IN wf_items.item_type%TYPE
490: ,p_item_key IN wf_items.item_key%TYPE
491: ,p_current_user_id IN fnd_user.user_id%TYPE
492: ,p_vo_xml IN VARCHAR2
493: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
494: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
495: default hr_api.g_varchar2
496: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
497: default hr_api.g_varchar2
490: ,p_item_key IN wf_items.item_key%TYPE
491: ,p_current_user_id IN fnd_user.user_id%TYPE
492: ,p_vo_xml IN VARCHAR2
493: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
494: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
495: default hr_api.g_varchar2
496: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
497: default hr_api.g_varchar2
498: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
492: ,p_vo_xml IN VARCHAR2
493: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
494: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
495: default hr_api.g_varchar2
496: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
497: default hr_api.g_varchar2
498: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
499: )is
500: PRAGMA AUTONOMOUS_TRANSACTION;
494: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
495: default hr_api.g_varchar2
496: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
497: default hr_api.g_varchar2
498: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
499: )is
500: PRAGMA AUTONOMOUS_TRANSACTION;
501: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
502: l_state hr_wip_transactions.state%TYPE;
497: default hr_api.g_varchar2
498: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
499: )is
500: PRAGMA AUTONOMOUS_TRANSACTION;
501: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
502: l_state hr_wip_transactions.state%TYPE;
503: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
504: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
505: cursor csr_user_id is
498: ,p_transaction_id OUT NOCOPY hr_wip_transactions.transaction_id%TYPE
499: )is
500: PRAGMA AUTONOMOUS_TRANSACTION;
501: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
502: l_state hr_wip_transactions.state%TYPE;
503: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
504: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
505: cursor csr_user_id is
506: select creator_user_id
499: )is
500: PRAGMA AUTONOMOUS_TRANSACTION;
501: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
502: l_state hr_wip_transactions.state%TYPE;
503: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
504: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
505: cursor csr_user_id is
506: select creator_user_id
507: ,transaction_id
500: PRAGMA AUTONOMOUS_TRANSACTION;
501: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
502: l_state hr_wip_transactions.state%TYPE;
503: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
504: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
505: cursor csr_user_id is
506: select creator_user_id
507: ,transaction_id
508: ,state,dml_mode
506: select creator_user_id
507: ,transaction_id
508: ,state,dml_mode
509: ,context_display_text
510: from hr_wip_transactions
511: where item_type = p_item_type
512: and item_key = p_item_key;
513: begin
514: chk_item_type_item_key_mand
559: -- ----------------------------------------------------------------------------
560: -- |-----------------------< save_for_later >-----------------------|
561: -- ----------------------------------------------------------------------------
562: Procedure save_for_later
563: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
564: ,p_current_user_id IN fnd_user.user_id%TYPE
565: ,p_vo_xml IN VARCHAR2
566: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
567: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
562: Procedure save_for_later
563: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
564: ,p_current_user_id IN fnd_user.user_id%TYPE
565: ,p_vo_xml IN VARCHAR2
566: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
567: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
568: default hr_api.g_varchar2
569: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
570: default hr_api.g_varchar2
563: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
564: ,p_current_user_id IN fnd_user.user_id%TYPE
565: ,p_vo_xml IN VARCHAR2
566: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
567: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
568: default hr_api.g_varchar2
569: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
570: default hr_api.g_varchar2
571: )is
565: ,p_vo_xml IN VARCHAR2
566: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
567: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
568: default hr_api.g_varchar2
569: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
570: default hr_api.g_varchar2
571: )is
572: PRAGMA AUTONOMOUS_TRANSACTION;
573: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
569: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
570: default hr_api.g_varchar2
571: )is
572: PRAGMA AUTONOMOUS_TRANSACTION;
573: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
574: l_state hr_wip_transactions.state%TYPE;
575: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
576: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
577: cursor csr_user_id is
570: default hr_api.g_varchar2
571: )is
572: PRAGMA AUTONOMOUS_TRANSACTION;
573: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
574: l_state hr_wip_transactions.state%TYPE;
575: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
576: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
577: cursor csr_user_id is
578: select creator_user_id,
571: )is
572: PRAGMA AUTONOMOUS_TRANSACTION;
573: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
574: l_state hr_wip_transactions.state%TYPE;
575: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
576: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
577: cursor csr_user_id is
578: select creator_user_id,
579: state,
572: PRAGMA AUTONOMOUS_TRANSACTION;
573: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
574: l_state hr_wip_transactions.state%TYPE;
575: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
576: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
577: cursor csr_user_id is
578: select creator_user_id,
579: state,
580: dml_mode,
578: select creator_user_id,
579: state,
580: dml_mode,
581: context_display_text
582: from hr_wip_transactions
583: where transaction_id = p_transaction_id;
584: begin
585: open csr_user_id;
586: fetch csr_user_id into l_creator_user_id,
622: -- ----------------------------------------------------------------------------
623: -- |-----------------------< save_for_later_append >-----------------------|
624: -- ----------------------------------------------------------------------------
625: Procedure save_for_later_append
626: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
627: ,p_vo_xml IN VARCHAR2
628: )is
629: PRAGMA AUTONOMOUS_TRANSACTION;
630:
627: ,p_vo_xml IN VARCHAR2
628: )is
629: PRAGMA AUTONOMOUS_TRANSACTION;
630:
631: l_db_clob hr_wip_transactions.vo_cache%type;
632: cursor csr_vo_cache is
633: select vo_cache
634: from hr_wip_transactions
635: where transaction_id = p_transaction_id
630:
631: l_db_clob hr_wip_transactions.vo_cache%type;
632: cursor csr_vo_cache is
633: select vo_cache
634: from hr_wip_transactions
635: where transaction_id = p_transaction_id
636: for update nowait;
637: begin
638:
649: length(p_vo_xml),
650: DBMS_LOB.GETLENGTH(l_db_clob)+1,
651: p_vo_xml);
652:
653: update hr_wip_transactions
654: set vo_cache = l_db_clob
655: where transaction_id = p_transaction_id;
656:
657: commit;
664: -- ----------------------------------------------------------------------------
665: -- |-----------------------< pending_approval >-----------------------|
666: -- ----------------------------------------------------------------------------
667: Procedure pending_approval
668: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
669: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
670: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
671: ,p_state IN hr_wip_transactions.state%TYPE
672: ,p_vo_xml IN VARCHAR2
665: -- |-----------------------< pending_approval >-----------------------|
666: -- ----------------------------------------------------------------------------
667: Procedure pending_approval
668: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
669: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
670: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
671: ,p_state IN hr_wip_transactions.state%TYPE
672: ,p_vo_xml IN VARCHAR2
673: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
666: -- ----------------------------------------------------------------------------
667: Procedure pending_approval
668: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
669: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
670: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
671: ,p_state IN hr_wip_transactions.state%TYPE
672: ,p_vo_xml IN VARCHAR2
673: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
674: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
667: Procedure pending_approval
668: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
669: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
670: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
671: ,p_state IN hr_wip_transactions.state%TYPE
672: ,p_vo_xml IN VARCHAR2
673: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
674: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
675: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
669: ,p_current_user_id IN hr_wip_transactions.creator_user_id%TYPE
670: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
671: ,p_state IN hr_wip_transactions.state%TYPE
672: ,p_vo_xml IN VARCHAR2
673: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
674: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
675: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
676: begin
677: chk_transaction_creator(p_creator_user_id => p_creator_user_id
670: ,p_creator_user_id IN hr_wip_transactions.creator_user_id%TYPE
671: ,p_state IN hr_wip_transactions.state%TYPE
672: ,p_vo_xml IN VARCHAR2
673: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
674: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
675: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
676: begin
677: chk_transaction_creator(p_creator_user_id => p_creator_user_id
678: ,p_current_user_id => p_current_user_id
671: ,p_state IN hr_wip_transactions.state%TYPE
672: ,p_vo_xml IN VARCHAR2
673: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
674: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
675: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
676: begin
677: chk_transaction_creator(p_creator_user_id => p_creator_user_id
678: ,p_current_user_id => p_current_user_id
679: );
707: (p_item_type IN wf_items.item_type%TYPE
708: ,p_item_key IN wf_items.item_key%TYPE
709: ,p_current_user_id IN fnd_user.user_id%TYPE
710: ,p_vo_xml IN VARCHAR2
711: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
712: default hr_api.g_varchar2
713: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
714: default hr_api.g_varchar2
715: )is
709: ,p_current_user_id IN fnd_user.user_id%TYPE
710: ,p_vo_xml IN VARCHAR2
711: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
712: default hr_api.g_varchar2
713: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
714: default hr_api.g_varchar2
715: )is
716: PRAGMA AUTONOMOUS_TRANSACTION;
717: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
713: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
714: default hr_api.g_varchar2
715: )is
716: PRAGMA AUTONOMOUS_TRANSACTION;
717: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
718: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
719: l_state hr_wip_transactions.state%TYPE;
720: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
721: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
714: default hr_api.g_varchar2
715: )is
716: PRAGMA AUTONOMOUS_TRANSACTION;
717: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
718: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
719: l_state hr_wip_transactions.state%TYPE;
720: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
721: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
722: cursor csr_user_id is
715: )is
716: PRAGMA AUTONOMOUS_TRANSACTION;
717: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
718: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
719: l_state hr_wip_transactions.state%TYPE;
720: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
721: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
722: cursor csr_user_id is
723: select creator_user_id,
716: PRAGMA AUTONOMOUS_TRANSACTION;
717: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
718: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
719: l_state hr_wip_transactions.state%TYPE;
720: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
721: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
722: cursor csr_user_id is
723: select creator_user_id,
724: transaction_id,
717: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
718: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
719: l_state hr_wip_transactions.state%TYPE;
720: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
721: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
722: cursor csr_user_id is
723: select creator_user_id,
724: transaction_id,
725: state,
724: transaction_id,
725: state,
726: dml_mode,
727: context_display_text
728: from hr_wip_transactions
729: where item_type = p_item_type
730: and item_key = p_item_key;
731: begin
732: chk_item_type_item_key_mand
776: -- ----------------------------------------------------------------------------
777: -- |-----------------------< pending_approval >-----------------------|
778: -- ----------------------------------------------------------------------------
779: Procedure pending_approval
780: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
781: ,p_current_user_id IN fnd_user.user_id%TYPE
782: ,p_vo_xml IN VARCHAR2
783: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
784: default hr_api.g_varchar2
779: Procedure pending_approval
780: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
781: ,p_current_user_id IN fnd_user.user_id%TYPE
782: ,p_vo_xml IN VARCHAR2
783: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
784: default hr_api.g_varchar2
785: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
786: default hr_api.g_varchar2
787: )is
781: ,p_current_user_id IN fnd_user.user_id%TYPE
782: ,p_vo_xml IN VARCHAR2
783: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
784: default hr_api.g_varchar2
785: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
786: default hr_api.g_varchar2
787: )is
788: PRAGMA AUTONOMOUS_TRANSACTION;
789: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
785: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
786: default hr_api.g_varchar2
787: )is
788: PRAGMA AUTONOMOUS_TRANSACTION;
789: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
790: l_state hr_wip_transactions.state%TYPE;
791: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
792: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
793: cursor csr_user_id is
786: default hr_api.g_varchar2
787: )is
788: PRAGMA AUTONOMOUS_TRANSACTION;
789: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
790: l_state hr_wip_transactions.state%TYPE;
791: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
792: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
793: cursor csr_user_id is
794: select creator_user_id,
787: )is
788: PRAGMA AUTONOMOUS_TRANSACTION;
789: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
790: l_state hr_wip_transactions.state%TYPE;
791: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
792: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
793: cursor csr_user_id is
794: select creator_user_id,
795: state,
788: PRAGMA AUTONOMOUS_TRANSACTION;
789: l_creator_user_id hr_wip_transactions.creator_user_id%TYPE;
790: l_state hr_wip_transactions.state%TYPE;
791: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
792: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
793: cursor csr_user_id is
794: select creator_user_id,
795: state,
796: dml_mode,
794: select creator_user_id,
795: state,
796: dml_mode,
797: context_display_text
798: from hr_wip_transactions
799: where transaction_id = p_transaction_id;
800: begin
801: open csr_user_id;
802: fetch csr_user_id into l_creator_user_id,
838: -- ----------------------------------------------------------------------------
839: -- |-----------------------< reject_for_correction >-----------------------|
840: -- ----------------------------------------------------------------------------
841: Procedure reject_for_correction
842: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
843: ,p_state IN hr_wip_transactions.state%TYPE
844: ,p_vo_xml IN clob
845: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
846: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
839: -- |-----------------------< reject_for_correction >-----------------------|
840: -- ----------------------------------------------------------------------------
841: Procedure reject_for_correction
842: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
843: ,p_state IN hr_wip_transactions.state%TYPE
844: ,p_vo_xml IN clob
845: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
846: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
847: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
841: Procedure reject_for_correction
842: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
843: ,p_state IN hr_wip_transactions.state%TYPE
844: ,p_vo_xml IN clob
845: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
846: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
847: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
848: l_vo_xml_var varchar(32767);
849: l_amount number;
842: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
843: ,p_state IN hr_wip_transactions.state%TYPE
844: ,p_vo_xml IN clob
845: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
846: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
847: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
848: l_vo_xml_var varchar(32767);
849: l_amount number;
850: begin
843: ,p_state IN hr_wip_transactions.state%TYPE
844: ,p_vo_xml IN clob
845: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
846: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
847: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE) is
848: l_vo_xml_var varchar(32767);
849: l_amount number;
850: begin
851: If p_state <> g_pending_approval_state
875: (p_item_type IN wf_items.item_type%TYPE
876: ,p_item_key IN wf_items.item_key%TYPE
877: )is
878: PRAGMA AUTONOMOUS_TRANSACTION;
879: l_state hr_wip_transactions.state%TYPE;
880: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
881: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
882: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
883: l_vo_xml clob;
876: ,p_item_key IN wf_items.item_key%TYPE
877: )is
878: PRAGMA AUTONOMOUS_TRANSACTION;
879: l_state hr_wip_transactions.state%TYPE;
880: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
881: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
882: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
883: l_vo_xml clob;
884: cursor csr_user_id is
877: )is
878: PRAGMA AUTONOMOUS_TRANSACTION;
879: l_state hr_wip_transactions.state%TYPE;
880: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
881: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
882: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
883: l_vo_xml clob;
884: cursor csr_user_id is
885: select transaction_id,
878: PRAGMA AUTONOMOUS_TRANSACTION;
879: l_state hr_wip_transactions.state%TYPE;
880: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
881: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
882: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
883: l_vo_xml clob;
884: cursor csr_user_id is
885: select transaction_id,
886: state,
886: state,
887: vo_cache,
888: dml_mode,
889: context_display_text
890: from hr_wip_transactions
891: where item_type = p_item_type
892: and item_key = p_item_key;
893: begin
894: chk_item_type_item_key_mand
929: -- ----------------------------------------------------------------------------
930: -- |-----------------------< reject_for_correction >-----------------------|
931: -- ----------------------------------------------------------------------------
932: Procedure reject_for_correction
933: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
934: )is
935: PRAGMA AUTONOMOUS_TRANSACTION;
936: l_state hr_wip_transactions.state%TYPE;
937: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
932: Procedure reject_for_correction
933: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
934: )is
935: PRAGMA AUTONOMOUS_TRANSACTION;
936: l_state hr_wip_transactions.state%TYPE;
937: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
938: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
939: l_vo_xml clob;
940: cursor csr_user_id is
933: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
934: )is
935: PRAGMA AUTONOMOUS_TRANSACTION;
936: l_state hr_wip_transactions.state%TYPE;
937: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
938: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
939: l_vo_xml clob;
940: cursor csr_user_id is
941: select state,
934: )is
935: PRAGMA AUTONOMOUS_TRANSACTION;
936: l_state hr_wip_transactions.state%TYPE;
937: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
938: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
939: l_vo_xml clob;
940: cursor csr_user_id is
941: select state,
942: vo_cache,
941: select state,
942: vo_cache,
943: dml_mode,
944: context_display_text
945: from hr_wip_transactions
946: where transaction_id = p_transaction_id;
947: begin
948: open csr_user_id;
949: fetch csr_user_id into l_state,
980: (p_item_type IN wf_items.item_type%TYPE
981: ,p_item_key IN wf_items.item_key%TYPE
982: )is
983: PRAGMA AUTONOMOUS_TRANSACTION;
984: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
985: cursor csr_transaction is
986: select transaction_id
987: from hr_wip_transactions
988: where item_type = p_item_type
983: PRAGMA AUTONOMOUS_TRANSACTION;
984: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
985: cursor csr_transaction is
986: select transaction_id
987: from hr_wip_transactions
988: where item_type = p_item_type
989: and item_key = p_item_key;
990: begin
991: --
1006: --
1007: delete from hr_wip_locks
1008: where transaction_id = l_transaction_id;
1009: --
1010: delete from hr_wip_transactions
1011: where transaction_id = l_transaction_id;
1012: --
1013: commit;
1014: exception
1023: -- ----------------------------------------------------------------------------
1024: -- |-----------------------< delete_transaction >-----------------------|
1025: -- ----------------------------------------------------------------------------
1026: Procedure delete_transaction
1027: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
1028: )is
1029: PRAGMA AUTONOMOUS_TRANSACTION;
1030: l_transaction_id varchar2(1);
1031: cursor csr_transaction is
1029: PRAGMA AUTONOMOUS_TRANSACTION;
1030: l_transaction_id varchar2(1);
1031: cursor csr_transaction is
1032: select null
1033: from hr_wip_transactions
1034: where transaction_id = p_transaction_id;
1035: begin
1036: --
1037: open csr_transaction;
1045: close csr_transaction;
1046: delete from hr_wip_locks
1047: where transaction_id = p_transaction_id;
1048: --
1049: delete from hr_wip_transactions
1050: where transaction_id = p_transaction_id;
1051: --
1052: commit;
1053: exception
1065: -- ----------------------------------------------------------------------------
1066: Procedure update_transaction
1067: (p_item_type IN wf_items.item_type%TYPE
1068: ,p_item_key IN wf_items.item_key%TYPE
1069: ,p_state IN hr_wip_transactions.state%TYPE
1070: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1071: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1072: default hr_api.g_varchar2
1073: ,p_vo_xml IN VARCHAR2
1066: Procedure update_transaction
1067: (p_item_type IN wf_items.item_type%TYPE
1068: ,p_item_key IN wf_items.item_key%TYPE
1069: ,p_state IN hr_wip_transactions.state%TYPE
1070: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1071: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1072: default hr_api.g_varchar2
1073: ,p_vo_xml IN VARCHAR2
1074: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1067: (p_item_type IN wf_items.item_type%TYPE
1068: ,p_item_key IN wf_items.item_key%TYPE
1069: ,p_state IN hr_wip_transactions.state%TYPE
1070: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1071: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1072: default hr_api.g_varchar2
1073: ,p_vo_xml IN VARCHAR2
1074: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1075: default hr_api.g_varchar2
1070: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1071: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1072: default hr_api.g_varchar2
1073: ,p_vo_xml IN VARCHAR2
1074: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1075: default hr_api.g_varchar2
1076: )is
1077: PRAGMA AUTONOMOUS_TRANSACTION;
1078: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
1074: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1075: default hr_api.g_varchar2
1076: )is
1077: PRAGMA AUTONOMOUS_TRANSACTION;
1078: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
1079: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
1080: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
1081: cursor csr_transaction is
1082: select transaction_id
1075: default hr_api.g_varchar2
1076: )is
1077: PRAGMA AUTONOMOUS_TRANSACTION;
1078: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
1079: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
1080: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
1081: cursor csr_transaction is
1082: select transaction_id
1083: ,dml_mode
1076: )is
1077: PRAGMA AUTONOMOUS_TRANSACTION;
1078: l_transaction_id hr_wip_transactions.transaction_id%TYPE;
1079: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
1080: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
1081: cursor csr_transaction is
1082: select transaction_id
1083: ,dml_mode
1084: ,context_display_text
1081: cursor csr_transaction is
1082: select transaction_id
1083: ,dml_mode
1084: ,context_display_text
1085: from hr_wip_transactions
1086: where item_type = p_item_type
1087: and item_key = p_item_key;
1088: begin
1089: chk_item_type_item_key_mand
1136: -- ----------------------------------------------------------------------------
1137: -- |-----------------------< update_transaction >-----------------------|
1138: -- ----------------------------------------------------------------------------
1139: Procedure update_transaction
1140: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
1141: ,p_state IN hr_wip_transactions.state%TYPE
1142: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1143: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1144: default hr_api.g_varchar2
1137: -- |-----------------------< update_transaction >-----------------------|
1138: -- ----------------------------------------------------------------------------
1139: Procedure update_transaction
1140: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
1141: ,p_state IN hr_wip_transactions.state%TYPE
1142: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1143: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1144: default hr_api.g_varchar2
1145: ,p_vo_xml IN VARCHAR2
1138: -- ----------------------------------------------------------------------------
1139: Procedure update_transaction
1140: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
1141: ,p_state IN hr_wip_transactions.state%TYPE
1142: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1143: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1144: default hr_api.g_varchar2
1145: ,p_vo_xml IN VARCHAR2
1146: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1139: Procedure update_transaction
1140: (p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
1141: ,p_state IN hr_wip_transactions.state%TYPE
1142: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1143: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1144: default hr_api.g_varchar2
1145: ,p_vo_xml IN VARCHAR2
1146: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1147: default hr_api.g_varchar2
1142: ,p_sub_state IN hr_wip_transactions.sub_state%TYPE
1143: ,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
1144: default hr_api.g_varchar2
1145: ,p_vo_xml IN VARCHAR2
1146: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1147: default hr_api.g_varchar2
1148: )is
1149: PRAGMA AUTONOMOUS_TRANSACTION;
1150: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
1146: ,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
1147: default hr_api.g_varchar2
1148: )is
1149: PRAGMA AUTONOMOUS_TRANSACTION;
1150: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
1151: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
1152: cursor csr_transaction is
1153: select dml_mode,
1154: context_display_text
1147: default hr_api.g_varchar2
1148: )is
1149: PRAGMA AUTONOMOUS_TRANSACTION;
1150: l_dml_mode hr_wip_transactions.dml_mode%TYPE;
1151: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
1152: cursor csr_transaction is
1153: select dml_mode,
1154: context_display_text
1155: from hr_wip_transactions
1151: l_context_display_text hr_wip_transactions.context_display_text%TYPE;
1152: cursor csr_transaction is
1153: select dml_mode,
1154: context_display_text
1155: from hr_wip_transactions
1156: where transaction_id = p_transaction_id;
1157: begin
1158: chk_state(p_state => p_state);
1159: chk_sub_state(p_state => p_state