DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_RFQ_VENDORS_PKG_S1

Source


1 PACKAGE BODY PO_RFQ_VENDORS_PKG_S1 as
2 /* $Header: POXPIR2B.pls 115.0 99/07/17 01:49:44 porting ship $ */
3 
4   PROCEDURE Lock_Row(X_Rowid                            VARCHAR2,
5                      X_Po_Header_Id                     NUMBER,
6                      X_Sequence_Num                     NUMBER,
7                      X_Vendor_Id                        NUMBER,
8                      X_Vendor_Site_Id                   NUMBER,
9                      X_Vendor_Contact_Id                NUMBER,
10                      X_Print_Flag                       VARCHAR2,
11                      X_Print_Count                      NUMBER,
12                      X_Printed_Date                     DATE,
13                      X_Attribute_Category               VARCHAR2,
14                      X_Attribute1                       VARCHAR2,
15                      X_Attribute2                       VARCHAR2,
16                      X_Attribute3                       VARCHAR2,
17                      X_Attribute4                       VARCHAR2,
18                      X_Attribute5                       VARCHAR2,
19                      X_Attribute6                       VARCHAR2,
20                      X_Attribute7                       VARCHAR2,
21                      X_Attribute8                       VARCHAR2,
22                      X_Attribute9                       VARCHAR2,
23                      X_Attribute10                      VARCHAR2,
24                      X_Attribute11                      VARCHAR2,
25                      X_Attribute12                      VARCHAR2,
26                      X_Attribute13                      VARCHAR2,
27                      X_Attribute14                      VARCHAR2,
28                      X_Attribute15                      VARCHAR2
29 
30   ) IS
31     CURSOR C IS
32         SELECT *
33         FROM   PO_RFQ_VENDORS
34         WHERE  rowid = X_Rowid
35         FOR UPDATE of Sequence_Num NOWAIT;
36     Recinfo C%ROWTYPE;
37   BEGIN
38     OPEN C;
39     FETCH C INTO Recinfo;
40     if (C%NOTFOUND) then
41       CLOSE C;
42       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
43       APP_EXCEPTION.Raise_Exception;
44     end if;
45     CLOSE C;
46     if (
47 
48                (Recinfo.po_header_id = X_Po_Header_Id)
49            AND (Recinfo.sequence_num = X_Sequence_Num)
50            AND (   (Recinfo.vendor_id = X_Vendor_Id)
51                 OR (    (Recinfo.vendor_id IS NULL)
52                     AND (X_Vendor_Id IS NULL)))
53            AND (   (Recinfo.vendor_site_id = X_Vendor_Site_Id)
54                 OR (    (Recinfo.vendor_site_id IS NULL)
55                     AND (X_Vendor_Site_Id IS NULL)))
56            AND (   (Recinfo.vendor_contact_id = X_Vendor_Contact_Id)
57                 OR (    (Recinfo.vendor_contact_id IS NULL)
58                     AND (X_Vendor_Contact_Id IS NULL)))
59            AND (   (Recinfo.print_flag = X_Print_Flag)
60                 OR (    (Recinfo.print_flag IS NULL)
61                     AND (X_Print_Flag IS NULL)))
62            AND (   (Recinfo.print_count = X_Print_Count)
63                 OR (    (Recinfo.print_count IS NULL)
64                     AND (X_Print_Count IS NULL)))
65            AND (   (Recinfo.printed_date = X_Printed_Date)
66                 OR (    (Recinfo.printed_date IS NULL)
67                     AND (X_Printed_Date IS NULL)))
68            AND (   (Recinfo.attribute_category = X_Attribute_Category)
69                 OR (    (Recinfo.attribute_category IS NULL)
70                     AND (X_Attribute_Category IS NULL)))
71            AND (   (Recinfo.attribute1 = X_Attribute1)
72                 OR (    (Recinfo.attribute1 IS NULL)
73                     AND (X_Attribute1 IS NULL)))
74            AND (   (Recinfo.attribute2 = X_Attribute2)
75                 OR (    (Recinfo.attribute2 IS NULL)
76                     AND (X_Attribute2 IS NULL)))
77            AND (   (Recinfo.attribute3 = X_Attribute3)
78                 OR (    (Recinfo.attribute3 IS NULL)
79                     AND (X_Attribute3 IS NULL)))
80            AND (   (Recinfo.attribute4 = X_Attribute4)
81                 OR (    (Recinfo.attribute4 IS NULL)
82                     AND (X_Attribute4 IS NULL)))
83            AND (   (Recinfo.attribute5 = X_Attribute5)
84                 OR (    (Recinfo.attribute5 IS NULL)
85                     AND (X_Attribute5 IS NULL)))
86            AND (   (Recinfo.attribute6 = X_Attribute6)
87                 OR (    (Recinfo.attribute6 IS NULL)
88                     AND (X_Attribute6 IS NULL)))
89            AND (   (Recinfo.attribute7 = X_Attribute7)
90                 OR (    (Recinfo.attribute7 IS NULL)
91                     AND (X_Attribute7 IS NULL)))
92            AND (   (Recinfo.attribute8 = X_Attribute8)
93                 OR (    (Recinfo.attribute8 IS NULL)
94                     AND (X_Attribute8 IS NULL)))
95            AND (   (Recinfo.attribute9 = X_Attribute9)
96                 OR (    (Recinfo.attribute9 IS NULL)
97                     AND (X_Attribute9 IS NULL)))
98            AND (   (Recinfo.attribute10 = X_Attribute10)
99                 OR (    (Recinfo.attribute10 IS NULL)
100                     AND (X_Attribute10 IS NULL)))
101            AND (   (Recinfo.attribute11 = X_Attribute11)
102                 OR (    (Recinfo.attribute11 IS NULL)
103                     AND (X_Attribute11 IS NULL)))
104            AND (   (Recinfo.attribute12 = X_Attribute12)
105                 OR (    (Recinfo.attribute12 IS NULL)
106                     AND (X_Attribute12 IS NULL)))
107            AND (   (Recinfo.attribute13 = X_Attribute13)
108                 OR (    (Recinfo.attribute13 IS NULL)
109                     AND (X_Attribute13 IS NULL)))
110            AND (   (Recinfo.attribute14 = X_Attribute14)
111                 OR (    (Recinfo.attribute14 IS NULL)
112                     AND (X_Attribute14 IS NULL)))
113            AND (   (Recinfo.attribute15 = X_Attribute15)
114                 OR (    (Recinfo.attribute15 IS NULL)
115                     AND (X_Attribute15 IS NULL)))
116 
117             ) then
118       return;
119     else
120       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
121       APP_EXCEPTION.RAISE_EXCEPTION;
122     end if;
123   END Lock_Row;
124 
125 END PO_RFQ_VENDORS_PKG_S1;