36: program_date,
37: program_id,
38: last_update_date,
39: employee_id
40: FROM PO_ACTION_HISTORY
41: WHERE object_type_code = 'REQUISITION'
42: AND object_id = x_req_header_id
43: AND sequence_num = x_sequence_num;
44:
48: BEGIN
49:
50: SELECT count(*)
51: INTO x_count
52: FROM PO_ACTION_HISTORY
53: WHERE object_type_code = 'REQUISITION'
54: AND object_id = x_req_header_id
55: AND action_code IS NULL;
56:
69: ELSE
70:
71: SELECT max(sequence_num)
72: INTO x_sequence_num
73: FROM PO_ACTION_HISTORY
74: WHERE object_type_code = 'REQUISITION'
75: AND object_id = x_req_header_id;
76:
77: OPEN C;
243: /*
244: ** if we cannot find the responder within our system, either the ntf has not
245: ** been responded yet or the response came from outside.
246: ** Therefore we cannot record the responder in
247: ** PO_ACTION_HISTORY
248: */
249:
250: /* internal name of responder */
251:
337: END Update_Action_History;
338:
339: /* Bug# 2684757: kagarwal
340: ** Desc: Added new procedure to insert null action in
341: ** po_action_history for the Requisition if it does not exists.
342: */
343:
344: procedure Reserve_Action_History(x_approval_path_id in number,
345: x_req_header_id in number,
363: program_date,
364: program_id,
365: last_update_date,
366: employee_id
367: FROM PO_ACTION_HISTORY
368: WHERE object_type_code = 'REQUISITION'
369: AND object_id = x_req_header_id
370: AND sequence_num = x_sequence_num;
371:
376: l_progress := '010';
377:
378: SELECT max(sequence_num)
379: INTO x_sequence_num
380: FROM PO_ACTION_HISTORY
381: WHERE object_type_code = 'REQUISITION'
382: AND object_id = x_req_header_id;
383:
384: OPEN C;
463: PH.OBJECT_ID object_id
464: FROM
465: PO_DOCUMENT_TYPES PODT,
466: PO_REQUISITION_HEADERS PRH,
467: PO_ACTION_HISTORY PH
468: WHERE PRH.REQUISITION_HEADER_ID = PH.OBJECT_ID AND
469: PODT.DOCUMENT_TYPE_CODE = 'REQUISITION' AND
470: PODT.DOCUMENT_SUBTYPE (+) = PRH.TYPE_LOOKUP_CODE AND
471: PODT.DOCUMENT_TYPE_CODE = PH.OBJECT_TYPE_CODE AND
478: BEGIN
479:
480: SELECT max(sequence_num)
481: INTO x_sequence_num
482: FROM PO_ACTION_HISTORY
483: WHERE object_type_code = 'REQUISITION'
484: AND object_id = p_req_header_id;
485:
486: -- dbms_output.put_line ('x_sequence_num' || to_char(x_sequence_num));
563: fnd_global.login_id
564: );
565:
566: /*
567: ** insert a new NULL row into PO_ACTION_HISTORY for
568: ** the new approver
569: */
570:
571: l_progress := '050';
609: */
610: /*
611: Bug 14580064 : Replaced p_responder_id by p_original_recipient_id for the case when recepient and responder are different.
612: */
613: UPDATE PO_ACTION_HISTORY
614: SET last_update_date = sysdate,
615: last_updated_by = fnd_global.user_id, --x_user_id,
616: last_update_login = fnd_global.login_id, --x_login_id,
617: action_date = sysdate,