DBA Data[Home] [Help]

PACKAGE: APPS.EAM_METERREADING_PUB

Source


1 PACKAGE EAM_MeterReading_PUB as
2 /* $Header: EAMPMTRS.pls 120.3 2005/06/23 07:47:47 appldev ship $ */
3 /*#
4  * This package is used for creating and disabling the meter readings.
5  * It defines 2 key procedures create_meter_reading, disable_meter_reading
6  * which first validates and massages the IN parameters
7  * and then carries out the respective operations.
8  * @rep:scope public
9  * @rep:product EAM
10  * @rep:lifecycle active
11  * @rep:displayname Meter Reading package
12  * @rep:category BUSINESS_ENTITY EAM_METER_READING
13  */
14 
15 
16 TYPE Meter_Reading_Rec_Type is RECORD
17 (
18 meter_id                number := NULL,
19 meter_reading_id        number,
20 current_reading         number,
21 current_reading_date    date,
22 reset_flag              varchar2(1),
23 description             varchar2(100),
24 wip_entity_id           number,
25 check_in_out_type       number,
26 check_in_out_txn_id     number,
27 instance_id             number,
28 source_line_id          number,
29 source_code             varchar2(30),
30 wo_entry_fake_flag      varchar2(1),
31 adjustment_type         varchar2(30),
32 adjustment_reading      number,
33 net_reading             number,
34 reset_reason            VARCHAR2(255),
35 attribute_category      varchar2(30),
36 attribute1              varchar2(150),
37 attribute2              varchar2(150),
38 attribute3              varchar2(150),
39 attribute4              varchar2(150),
40 attribute5              varchar2(150),
41 attribute6              varchar2(150),
42 attribute7              varchar2(150),
43 attribute8              varchar2(150),
44 attribute9              varchar2(150),
45 attribute10             varchar2(150),
46 attribute11             varchar2(150),
47 attribute12             varchar2(150),
48 attribute13             varchar2(150),
49 attribute14             varchar2(150),
50 attribute15             varchar2(150),
51 attribute16             varchar2(150),
52 attribute17             varchar2(150),
53 attribute18             varchar2(150),
54 attribute19             varchar2(150),
55 attribute20             varchar2(150),
56 attribute21             varchar2(150),
57 attribute22             varchar2(150),
58 attribute23             varchar2(150),
59 attribute24             varchar2(150),
60 attribute25             varchar2(150),
61 attribute26             varchar2(150),
62 attribute27             varchar2(150),
63 attribute28             varchar2(150),
64 attribute29             varchar2(150),
65 attribute30             varchar2(150)
66 );
67 
68 TYPE Ctr_Property_Readings_Rec IS RECORD
69 (
70 counter_property_id     number,
71 property_value          varchar2(240),
72 value_timestamp         date,
73 attribute_category      varchar2(30),
74 attribute1              varchar2(150),
75 attribute2              varchar2(150),
76 attribute3              varchar2(150),
77 attribute4              varchar2(150),
78 attribute5              varchar2(150),
79 attribute6              varchar2(150),
80 attribute7              varchar2(150),
81 attribute8              varchar2(150),
82 attribute9              varchar2(150),
83 attribute10             varchar2(150),
84 attribute11             varchar2(150),
85 attribute12             varchar2(150),
86 attribute13             varchar2(150),
87 attribute14             varchar2(150),
88 attribute15             varchar2(150),
89 migrated_flag           VARCHAR2(1)
90 );
91 
92 TYPE Ctr_Property_readings_Tbl IS TABLE OF Ctr_Property_Readings_Rec
93           INDEX BY BINARY_INTEGER;
94 
95 
96 
97 /*#
98  * This procedure creates the meter reading. It creates one row of record at a time.
99  * @param p_api_version  Version of the API
100  * @param p_init_msg_list Flag to indicate initialization of message list
101  * @param p_commit Flag to indicate whether API should commit changes
102  * @param x_return_status Return status of the procedure call
103  * @param x_msg_count Count of the return messages that API returns
104  * @param x_msg_data The collection of the messages.
105  * @param p_meter_reading_rec This is a PL SQL record type, it consists of all the columns of the EAM_METER_READINGS table except LIFE_TO_DATE_READING, DISABLE_FLAG and WHO columns
106  * @param p_ctr_property_readings_tbl This is a PL SQL table type, it consists of all the columns for the Counter properties
107  * @param p_value_before_reset This is the meter reading (life _to_date) value before the reset. This is mandatory if the current reading is reset reading
108  * @param p_ignore_warnings Indicates whether any violation of Meter Direction should be ignored or not
109  * @param x_meter_reading_id This is the unique identifier of the newly created record. It is the meter reading identifier
110  * @return Returns the unique identifier of newly created record and status of the procedure call as well as the return messages
111  * @rep:scope public
112  * @rep:displayname Create meter reading
113  */
114 
115 procedure create_meter_reading
116 (
117    p_api_version                IN             number,
118    p_init_msg_list              IN             varchar2 := FND_API.G_FALSE,
119    p_commit                     IN             varchar2 := FND_API.G_FALSE,
120    x_msg_count                  OUT  NOCOPY    number,
121    x_msg_data                   OUT  NOCOPY    varchar2,
122    x_return_status              OUT  NOCOPY    varchar2,
123    p_meter_reading_rec          IN             EAM_MeterReading_PUB.Meter_Reading_Rec_Type,
124    p_ctr_property_readings_tbl  IN             EAM_MeterReading_PUB.Ctr_Property_readings_Tbl,
125    p_value_before_reset         IN             number := NULL,
126    p_ignore_warnings            IN             varchar2 := 'Y',
127    x_meter_reading_id           OUT  NOCOPY    number
128 );
129 
130 
131 /*#
132  * This procedure creates the meter reading. It creates one row of record at a time. Thsi is an overloaded API retained for backward compatibility.
133  * @param p_api_version  Version of the API
134  * @param p_init_msg_list Flag to indicate initialization of message list
135  * @param p_commit Flag to indicate whether API should commit changes
136  * @param x_return_status Return status of the procedure call
137  * @param x_msg_count Count of the return messages that API returns
138  * @param x_msg_data The collection of the messages.
139  * @param p_meter_reading_rec This is a PL SQL record type, it consists of all the columns of the EAM_METER_READINGS table except LIFE_TO_DATE_READING, DISABLE_FLAG and WHO columns
140  * @param p_value_before_reset This is the meter reading (life _to_date) value before the reset. This is mandatory if the current reading is reset reading
141  * @param p_ignore_warnings Indicates whether any violation of Meter Direction should be ignored or not
142  * @param x_meter_reading_id This is the unique identifier of the newly created record. It is the meter reading identifier
143  * @return Returns the unique identifier of newly created record and status of the procedure call as well as the return messages
144  * @rep:scope public
145  * @rep:displayname Create meter reading
146  */
147 
148 procedure create_meter_reading
149 (
150    p_api_version                IN             number,
151    p_init_msg_list              IN             varchar2 := FND_API.G_FALSE,
152    p_commit                     IN             varchar2 := FND_API.G_FALSE,
153    x_msg_count                  OUT  NOCOPY    number,
154    x_msg_data                   OUT  NOCOPY    varchar2,
155    x_return_status              OUT  NOCOPY    varchar2,
156    p_meter_reading_rec          IN             EAM_MeterReading_PUB.Meter_Reading_Rec_Type,
157    p_value_before_reset         IN             number := NULL,
158    p_ignore_warnings            IN             varchar2 := 'Y',
159    x_meter_reading_id           OUT  NOCOPY    number
160 );
161 
162 
163 /*#
164  * This procedure updates the meter reading. It updates one row of record at a time
165  * @param p_api_version  Version of the API
166  * @param p_init_msg_list Flag to indicate initialization of message list
167  * @param p_commit Flag to indicate whether API should commit changes
168  * @param x_return_status Return status of the procedure call
169  * @param x_msg_count Count of the return messages that API returns
170  * @param x_msg_data The collection of the messages.
171  * @param p_meter_reading_id The unique identifier of the meter reading record
172 * @param p_meter_id The unique identifier for the meter
173 * @param p_meter_reading_date The meter reading date
174  * @return Returns the status of the procedure call as well as the return messages
175  * @rep:scope public
176  * @rep:displayname Disable meter reading
177  */
178 
179 procedure disable_meter_reading
180 (
181         p_api_version         IN    NUMBER,
182         p_init_msg_list       IN    VARCHAR2:=FND_API.G_FALSE,
183         p_commit              IN    VARCHAR2:=FND_API.G_FALSE,
184         x_msg_count           OUT NOCOPY   NUMBER,
185         x_msg_data            OUT NOCOPY   VARCHAR2,
186         x_return_status       OUT NOCOPY   VARCHAR2,
187         p_meter_reading_id    IN    NUMBER:=null,
188         p_meter_id            IN    NUMBER:=null,
189         p_meter_reading_date  IN    DATE :=NULL
190 );
191 
192 
193 end EAM_MeterReading_PUB;