1 PACKAGE BODY PO_REQUISITION_LINES_PKG7 as
2 /* $Header: POXRIL7B.pls 120.0 2005/06/01 17:51:36 appldev noship $ */
3
4 PROCEDURE Lock2_Row(X_Rowid VARCHAR2,
5 X_Research_Agent_Id NUMBER,
6 X_On_Line_Flag VARCHAR2,
7 X_Wip_Entity_Id NUMBER,
8 X_Wip_Line_Id NUMBER,
9 X_Wip_Repetitive_Schedule_Id NUMBER,
10 X_Wip_Operation_Seq_Num NUMBER,
11 X_Wip_Resource_Seq_Num NUMBER,
12 X_Attribute_Category VARCHAR2,
13 X_Destination_Context VARCHAR2,
14 X_Inventory_Source_Context VARCHAR2,
15 X_Vendor_Source_Context VARCHAR2,
16 X_Attribute1 VARCHAR2,
17 X_Attribute2 VARCHAR2,
18 X_Attribute3 VARCHAR2,
19 X_Attribute4 VARCHAR2,
20 X_Attribute5 VARCHAR2,
21 X_Attribute6 VARCHAR2
22 ) IS
23
24 CURSOR C IS
25 SELECT *
26 FROM PO_REQUISITION_LINES
27 WHERE rowid = X_Rowid
28 FOR UPDATE of Requisition_Line_Id NOWAIT;
29
30 Recinfo C%ROWTYPE;
31 BEGIN
32 OPEN C;
33 FETCH C INTO Recinfo;
34 if (C%NOTFOUND) then
35 CLOSE C;
36 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
37 APP_EXCEPTION.Raise_Exception;
38 end if;
39 CLOSE C;
40
41 if (
42
43 ( (Recinfo.research_agent_id = X_Research_Agent_Id)
44 OR ( (Recinfo.research_agent_id IS NULL)
45 AND (X_Research_Agent_Id IS NULL)))
46 AND ( (Recinfo.on_line_flag = X_On_Line_Flag)
47 OR ( (Recinfo.on_line_flag IS NULL)
48 AND (X_On_Line_Flag IS NULL)))
49 AND ( (Recinfo.wip_entity_id = X_Wip_Entity_Id)
50 OR ( (Recinfo.wip_entity_id IS NULL)
51 AND (X_Wip_Entity_Id IS NULL)))
52 AND ( (Recinfo.wip_line_id = X_Wip_Line_Id)
53 OR ( (Recinfo.wip_line_id IS NULL)
54 AND (X_Wip_Line_Id IS NULL)))
55 AND ( (Recinfo.wip_repetitive_schedule_id = X_Wip_Repetitive_Schedule_Id)
56 OR ( (Recinfo.wip_repetitive_schedule_id IS NULL)
57 AND (X_Wip_Repetitive_Schedule_Id IS NULL)))
58 AND ( (Recinfo.wip_operation_seq_num = X_Wip_Operation_Seq_Num)
59 OR ( (Recinfo.wip_operation_seq_num IS NULL)
60 AND (X_Wip_Operation_Seq_Num IS NULL)))
61 AND ( (Recinfo.wip_resource_seq_num = X_Wip_Resource_Seq_Num)
62 OR ( (Recinfo.wip_resource_seq_num IS NULL)
63 AND (X_Wip_Resource_Seq_Num IS NULL)))
64 AND ( (Recinfo.attribute_category = X_Attribute_Category)
65 OR ( (Recinfo.attribute_category IS NULL)
66 AND (X_Attribute_Category IS NULL)))
67 AND ( (Recinfo.destination_context = X_Destination_Context)
68 OR ( (Recinfo.destination_context IS NULL)
69 AND (X_Destination_Context IS NULL)))
70 AND ( (Recinfo.inventory_source_context = X_Inventory_Source_Context)
71 OR ( (Recinfo.inventory_source_context IS NULL)
72 AND (X_Inventory_Source_Context IS NULL)))
73 AND ( (Recinfo.vendor_source_context = X_Vendor_Source_Context)
74 OR ( (Recinfo.vendor_source_context IS NULL)
75 AND (X_Vendor_Source_Context IS NULL)))
76 AND ( (Recinfo.attribute1 = X_Attribute1)
77 OR ( (Recinfo.attribute1 IS NULL)
78 AND (X_Attribute1 IS NULL)))
79 AND ( (Recinfo.attribute2 = X_Attribute2)
80 OR ( (Recinfo.attribute2 IS NULL)
81 AND (X_Attribute2 IS NULL)))
82 AND ( (Recinfo.attribute3 = X_Attribute3)
83 OR ( (Recinfo.attribute3 IS NULL)
84 AND (X_Attribute3 IS NULL)))
85 AND ( (Recinfo.attribute4 = X_Attribute4)
86 OR ( (Recinfo.attribute4 IS NULL)
87 AND (X_Attribute4 IS NULL)))
88 AND ( (Recinfo.attribute5 = X_Attribute5)
89 OR ( (Recinfo.attribute5 IS NULL)
90 AND (X_Attribute5 IS NULL)))
91 AND ( (Recinfo.attribute6 = X_Attribute6)
92 OR ( (Recinfo.attribute6 IS NULL)
93 AND (X_Attribute6 IS NULL)))
94 ) then
95 return;
96 else
97 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
98 APP_EXCEPTION.RAISE_EXCEPTION;
99 end if;
100
101 END Lock2_Row;
102
103 END PO_REQUISITION_LINES_PKG7;