1 PACKAGE BODY PO_REQUISITION_HEADERS_PKG1 as
2 /* $Header: POXRIH2B.pls 120.1 2005/06/02 06:47:29 appldev $ */
3
4 /**************************************************************************/
5
6 PROCEDURE Lock_Row(X_Rowid VARCHAR2,
7 X_Requisition_Header_Id NUMBER,
8 X_Preparer_Id NUMBER,
9 X_Segment1 VARCHAR2,
10 X_Summary_Flag VARCHAR2,
11 X_Enabled_Flag VARCHAR2,
12 X_Segment2 VARCHAR2,
13 X_Segment3 VARCHAR2,
14 X_Segment4 VARCHAR2,
15 X_Segment5 VARCHAR2,
16 X_Start_Date_Active DATE,
17 X_End_Date_Active DATE,
18 X_Description VARCHAR2,
19 X_Authorization_Status VARCHAR2,
20 X_Note_To_Authorizer VARCHAR2,
21 X_Type_Lookup_Code VARCHAR2,
22 X_Transferred_To_Oe_Flag VARCHAR2,
23 X_Attribute_Category VARCHAR2,
24 X_Attribute1 VARCHAR2,
25 X_Attribute2 VARCHAR2,
26 X_Attribute3 VARCHAR2,
27 X_Attribute4 VARCHAR2,
28 X_Attribute5 VARCHAR2,
29 X_On_Line_Flag VARCHAR2,
30 X_Preliminary_Research_Flag VARCHAR2,
31 X_Research_Complete_Flag VARCHAR2,
32 X_Preparer_Finished_Flag VARCHAR2,
33 X_Preparer_Finished_Date DATE,
34 X_Agent_Return_Flag VARCHAR2,
35 X_Agent_Return_Note VARCHAR2,
36 X_Cancel_Flag VARCHAR2,
37 X_Attribute6 VARCHAR2,
38 X_Attribute7 VARCHAR2,
39 X_Attribute8 VARCHAR2,
40 X_Attribute9 VARCHAR2,
41 X_Attribute10 VARCHAR2,
42 X_Attribute11 VARCHAR2,
43 X_Attribute12 VARCHAR2,
44 X_Attribute13 VARCHAR2,
45 X_Attribute14 VARCHAR2,
46 X_Attribute15 VARCHAR2,
47 X_Ussgl_Transaction_Code VARCHAR2,
48 X_Government_Context VARCHAR2,
49 X_Interface_Source_Code VARCHAR2,
50 X_Interface_Source_Line_Id NUMBER,
51 X_Closed_Code VARCHAR2
52
53 ) IS
54
55 CURSOR C IS
56 SELECT *
57 FROM PO_REQUISITION_HEADERS
58 WHERE rowid = X_Rowid
59 FOR UPDATE of Requisition_Header_Id NOWAIT;
60 Recinfo C%ROWTYPE;
61 BEGIN
62 OPEN C;
63 FETCH C INTO Recinfo;
64 if (C%NOTFOUND) then
65 CLOSE C;
66 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
67 APP_EXCEPTION.Raise_Exception;
68 end if;
69 CLOSE C;
70 if (
71
72 (Recinfo.requisition_header_id = X_Requisition_Header_Id)
73 AND (Recinfo.preparer_id = X_Preparer_Id)
74 AND (Recinfo.segment1 = X_Segment1)
75 AND (Recinfo.summary_flag = X_Summary_Flag)
76 AND (Recinfo.enabled_flag = X_Enabled_Flag)
77 AND ( (Recinfo.segment2 = X_Segment2)
78 OR ( (Recinfo.segment2 IS NULL)
79 AND (X_Segment2 IS NULL)))
80 AND ( (Recinfo.segment3 = X_Segment3)
81 OR ( (Recinfo.segment3 IS NULL)
82 AND (X_Segment3 IS NULL)))
83 AND ( (Recinfo.segment4 = X_Segment4)
84 OR ( (Recinfo.segment4 IS NULL)
85 AND (X_Segment4 IS NULL)))
86 AND ( (Recinfo.segment5 = X_Segment5)
87 OR ( (Recinfo.segment5 IS NULL)
88 AND (X_Segment5 IS NULL)))
89 AND ( (Recinfo.start_date_active = X_Start_Date_Active)
90 OR ( (Recinfo.start_date_active IS NULL)
91 AND (X_Start_Date_Active IS NULL)))
92 AND ( (Recinfo.end_date_active = X_End_Date_Active)
93 OR ( (Recinfo.end_date_active IS NULL)
94 AND (X_End_Date_Active IS NULL)))
95 AND ( (Recinfo.description = X_Description)
96 OR ( (Recinfo.description IS NULL)
97 AND (X_Description IS NULL)))
98 AND ( (Recinfo.authorization_status = X_Authorization_Status)
99 OR ( (Recinfo.authorization_status IS NULL)
100 AND (X_Authorization_Status IS NULL)))
101 AND ( (Recinfo.note_to_authorizer = X_Note_To_Authorizer)
102 OR ( (Recinfo.note_to_authorizer IS NULL)
103 AND (X_Note_To_Authorizer IS NULL)))
104 AND ( (Recinfo.type_lookup_code = X_Type_Lookup_Code)
105 OR ( (Recinfo.type_lookup_code IS NULL)
106 AND (X_Type_Lookup_Code IS NULL)))
107 AND ( (Recinfo.transferred_to_oe_flag = X_Transferred_To_Oe_Flag)
108 OR ( (Recinfo.transferred_to_oe_flag IS NULL)
109 AND (X_Transferred_To_Oe_Flag IS NULL)))
110 AND ( (Recinfo.attribute_category = X_Attribute_Category)
111 OR ( (Recinfo.attribute_category IS NULL)
112 AND (X_Attribute_Category IS NULL)))
113 AND ( (Recinfo.attribute1 = X_Attribute1)
114 OR ( (Recinfo.attribute1 IS NULL)
115 AND (X_Attribute1 IS NULL)))
116 AND ( (Recinfo.attribute2 = X_Attribute2)
117 OR ( (Recinfo.attribute2 IS NULL)
118 AND (X_Attribute2 IS NULL)))
119 AND ( (Recinfo.attribute3 = X_Attribute3)
120 OR ( (Recinfo.attribute3 IS NULL)
121 AND (X_Attribute3 IS NULL)))
122 AND ( (Recinfo.attribute4 = X_Attribute4)
123 OR ( (Recinfo.attribute4 IS NULL)
124 AND (X_Attribute4 IS NULL)))
125 AND ( (Recinfo.attribute5 = X_Attribute5)
126 OR ( (Recinfo.attribute5 IS NULL)
127 AND (X_Attribute5 IS NULL)))
128 AND ( (Recinfo.on_line_flag = X_On_Line_Flag)
129 OR ( (Recinfo.on_line_flag IS NULL)
130 AND (X_On_Line_Flag IS NULL)))
131 AND ( (Recinfo.preliminary_research_flag = X_Preliminary_Research_Flag)
132 OR ( (Recinfo.preliminary_research_flag IS NULL)
133 AND (X_Preliminary_Research_Flag IS NULL)))
134 AND ( (Recinfo.research_complete_flag = X_Research_Complete_Flag)
135 OR ( (Recinfo.research_complete_flag IS NULL)
136 AND (X_Research_Complete_Flag IS NULL)))
137 AND ( (Recinfo.preparer_finished_flag = X_Preparer_Finished_Flag)
138 OR ( (Recinfo.preparer_finished_flag IS NULL)
139 AND (X_Preparer_Finished_Flag IS NULL)))
140 AND ( (Recinfo.preparer_finished_date = X_Preparer_Finished_Date)
141 OR ( (Recinfo.preparer_finished_date IS NULL)
142 AND (X_Preparer_Finished_Date IS NULL)))
143 AND ( (Recinfo.agent_return_flag = X_Agent_Return_Flag)
144 OR ( (Recinfo.agent_return_flag IS NULL)
145 AND (X_Agent_Return_Flag IS NULL)))
146 AND ( (Recinfo.agent_return_note = X_Agent_Return_Note)
147 OR ( (Recinfo.agent_return_note IS NULL)
148 AND (X_Agent_Return_Note IS NULL)))
149 AND ( (Recinfo.cancel_flag = X_Cancel_Flag)
150 OR ( (Recinfo.cancel_flag IS NULL)
151 AND (X_Cancel_Flag IS NULL)))
152 AND ( (Recinfo.attribute6 = X_Attribute6)
153 OR ( (Recinfo.attribute6 IS NULL)
154 AND (X_Attribute6 IS NULL)))
155 AND ( (Recinfo.attribute7 = X_Attribute7)
156 OR ( (Recinfo.attribute7 IS NULL)
157 AND (X_Attribute7 IS NULL)))
158 AND ( (Recinfo.attribute8 = X_Attribute8)
159 OR ( (Recinfo.attribute8 IS NULL)
160 AND (X_Attribute8 IS NULL)))
161 AND ( (Recinfo.attribute9 = X_Attribute9)
162 OR ( (Recinfo.attribute9 IS NULL)
163 AND (X_Attribute9 IS NULL)))
164 AND ( (Recinfo.attribute10 = X_Attribute10)
165 OR ( (Recinfo.attribute10 IS NULL)
166 AND (X_Attribute10 IS NULL)))
167 AND ( (Recinfo.attribute11 = X_Attribute11)
168 OR ( (Recinfo.attribute11 IS NULL)
169 AND (X_Attribute11 IS NULL)))
170 AND ( (Recinfo.attribute12 = X_Attribute12)
171 OR ( (Recinfo.attribute12 IS NULL)
172 AND (X_Attribute12 IS NULL)))
173 AND ( (Recinfo.attribute13 = X_Attribute13)
174 OR ( (Recinfo.attribute13 IS NULL)
175 AND (X_Attribute13 IS NULL)))
176 AND ( (Recinfo.attribute14 = X_Attribute14)
177 OR ( (Recinfo.attribute14 IS NULL)
178 AND (X_Attribute14 IS NULL)))
179 AND ( (Recinfo.attribute15 = X_Attribute15)
180 OR ( (Recinfo.attribute15 IS NULL)
181 AND (X_Attribute15 IS NULL)))
182 AND ( (Recinfo.government_context = X_Government_Context)
183 OR ( (Recinfo.government_context IS NULL)
184 AND (X_Government_Context IS NULL)))
185 AND ( (Recinfo.interface_source_code = X_Interface_Source_Code)
186 OR ( (Recinfo.interface_source_code IS NULL)
187 AND (X_Interface_Source_Code IS NULL)))
188 AND ( (Recinfo.interface_source_line_id = X_Interface_Source_Line_Id)
189 OR ( (Recinfo.interface_source_line_id IS NULL)
190 AND (X_Interface_Source_Line_Id IS NULL)))
191 AND ( (Recinfo.closed_code = X_Closed_Code)
192 OR ( (Recinfo.closed_code IS NULL)
193 AND (X_Closed_Code IS NULL)))
194
195 ) then
196 return;
197 else
198 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
199 APP_EXCEPTION.RAISE_EXCEPTION;
200 end if;
201 END Lock_Row;
202
203 END PO_REQUISITION_HEADERS_PKG1;