[Home] [Help]
PACKAGE BODY: APPS.PO_LINES_SV2
Source
1 PACKAGE BODY PO_LINES_SV2 as
2 /* $Header: POXPOL2B.pls 115.6 2003/10/08 16:58:04 zxzhang ship $ */
3
4 /*============================= PO_LINES_SV2 ===============================*/
5 /*===========================================================================
6
7 FUNCTION NAME: get_max_line_num()
8
9 ===========================================================================*/
10 FUNCTION get_max_line_num
11 (X_po_header_id NUMBER) return number is
12
13 x_max_line_num NUMBER;
14 X_Progress varchar2(3) := '';
15
16 BEGIN
17 X_Progress := '010';
18
19 SELECT nvl(max(line_num),0)
20 INTO X_max_line_num
21 FROM po_lines
22 WHERE po_header_id = X_po_header_id;
23
24 return(x_max_line_num);
25
26 EXCEPTION
27
28 WHEN OTHERS THEN
29 return(0);
30
31
32 END get_max_line_num;
33
34
35 /*===========================================================================
36
37 PROCEDURE NAME: update_line()
38 Moved to PO_LINES_SV11
39 ecso 3/19/97 for globalization
40
41 ===========================================================================*/
42
43 /*RETROACTIVE FPI START */
44 Procedure retroactive_change(p_po_line_id IN number) IS
45 X_progress VARCHAR2(3) := '';
46 x_user_id NUMBER := fnd_global.user_id;
47 BEGIN
48 X_progress := '010';
49
50 update po_lines
51 set retroactive_date = sysdate,
52 last_update_date = sysdate,
53 last_updated_by = x_user_id
54 where po_line_id = p_po_line_id;
55 EXCEPTION
56 WHEN OTHERS THEN
57 po_message_s.sql_error('retroactive_change', X_progress, sqlcode);
58 raise;
59 END retroactive_change;
60 /*RETROACTIVE FPI END*/
61
62 -- <FPJ Retroactive START>
63 --------------------------------------------------------------------------------
64 --Start of Comments
65 --Name: retroactive_change
66 --Pre-reqs:
67 -- None.
68 --Modifies:
69 -- PO_LINE_LOCATIONS_ALL.retroactive_date.
70 --Locks:
71 -- None.
72 --Function:
73 -- This is the API which updates the column retroactive_date in po_line_locations
74 -- for Release ONLY with sysdate.
75 -- This procedure is called from PO_SHIPMENTS.price_override WHEN-VALIDATE-ITEM
76 -- trigger in the Enter Release form.
77 -- This will give the release shipment a different time with its corresponding
78 -- blanket agreement line, so that Approval Workflow will know this release had
79 -- some retroactive price change.
80 --Parameters:
81 --IN:
82 --p_line_location_id
83 -- the line_location_id for which the retroactive_Date needs to be updated.
84 --OUT:
85 -- None.
86 --Testing:
87 --
88 --End of Comments
89 -------------------------------------------------------------------------------
90 Procedure retro_change_shipment(p_line_location_id IN number) IS
91 l_progress VARCHAR2(3) := '';
92 l_user_id NUMBER := FND_GLOBAL.user_id;
93 BEGIN
94 l_progress := '010';
95
96 UPDATE po_line_locations
97 SET retroactive_date = SYSDATE,
98 last_update_date = SYSDATE,
99 last_updated_by = l_user_id
100 WHERE line_location_id = p_line_location_id;
101 EXCEPTION
102 WHEN OTHERS THEN
103 po_message_s.sql_error('retro_change_shipment', l_progress, sqlcode);
104 raise;
105 END retro_change_shipment;
106 -- <FPJ Retroactive END>
107
108
109 END PO_LINES_SV2;