1 PACKAGE GMF_ITEMCOST_PUB AUTHID CURRENT_USER AS
2 /* $Header: GMFPCSTS.pls 120.1.12000000.1 2007/01/17 16:52:27 appldev ship $ */
3 /*#
4 * This is the public interface for OPM Item Cost API.
5 * This API can be used for creation, updation, deletion and
6 * retrieval of item costs from the cost details table.
7 * @rep:scope public
8 * @rep:product GMF
9 * @rep:displayname GMF Item Cost API
10 * @rep:lifecycle active
11 * @rep:category BUSINESS_ENTITY GMF_ITEM_COST
12 */
13
14 -- Definition of all the entities
15 TYPE header_rec_type IS RECORD
16 (
17 period_id cm_cmpt_dtl.period_id%TYPE,
18 calendar_code cm_cldr_hdr_b.calendar_code%TYPE,
19 period_code cm_cldr_dtl.period_code%TYPE,
20 cost_type_id cm_cmpt_dtl.cost_type_id%TYPE,
21 cost_mthd_code cm_mthd_mst.cost_mthd_code%TYPE,
22 organization_id cm_cmpt_dtl.organization_id%TYPE,
23 organization_code mtl_parameters.organization_code%TYPE,
24 inventory_item_id cm_cmpt_dtl.inventory_item_id%TYPE,
25 item_number mtl_item_flexfields.item_number%TYPE,
26 user_name fnd_user.user_name%TYPE
27 );
28
29 TYPE this_level_dtl_rec_type IS RECORD
30 (
31 cmpntcost_id NUMBER,
32 cost_cmpntcls_id NUMBER,
36 burden_ind NUMBER,
33 cost_cmpntcls_code cm_cmpt_mst.cost_cmpntcls_code%TYPE,
34 cost_analysis_code cm_cmpt_dtl.cost_analysis_code%TYPE,
35 cmpnt_cost NUMBER,
37 total_qty NUMBER,
38 costcalc_orig NUMBER,
39 rmcalc_type NUMBER,
40 delete_mark NUMBER,
41 attribute1 cm_cmpt_dtl.attribute1%TYPE,
42 attribute2 cm_cmpt_dtl.attribute2%TYPE,
43 attribute3 cm_cmpt_dtl.attribute3%TYPE,
44 attribute4 cm_cmpt_dtl.attribute4%TYPE,
45 attribute5 cm_cmpt_dtl.attribute5%TYPE,
46 attribute6 cm_cmpt_dtl.attribute6%TYPE,
47 attribute7 cm_cmpt_dtl.attribute7%TYPE,
48 attribute8 cm_cmpt_dtl.attribute8%TYPE,
49 attribute9 cm_cmpt_dtl.attribute9%TYPE,
50 attribute10 cm_cmpt_dtl.attribute10%TYPE,
51 attribute11 cm_cmpt_dtl.attribute11%TYPE,
52 attribute12 cm_cmpt_dtl.attribute12%TYPE,
53 attribute13 cm_cmpt_dtl.attribute13%TYPE,
54 attribute14 cm_cmpt_dtl.attribute14%TYPE,
55 attribute15 cm_cmpt_dtl.attribute15%TYPE,
56 attribute16 cm_cmpt_dtl.attribute16%TYPE,
57 attribute17 cm_cmpt_dtl.attribute17%TYPE,
58 attribute18 cm_cmpt_dtl.attribute18%TYPE,
59 attribute19 cm_cmpt_dtl.attribute19%TYPE,
60 attribute20 cm_cmpt_dtl.attribute20%TYPE,
61 attribute21 cm_cmpt_dtl.attribute21%TYPE,
62 attribute22 cm_cmpt_dtl.attribute22%TYPE,
63 attribute23 cm_cmpt_dtl.attribute23%TYPE,
64 attribute24 cm_cmpt_dtl.attribute24%TYPE,
65 attribute25 cm_cmpt_dtl.attribute25%TYPE,
66 attribute26 cm_cmpt_dtl.attribute26%TYPE,
67 attribute27 cm_cmpt_dtl.attribute27%TYPE,
68 attribute28 cm_cmpt_dtl.attribute28%TYPE,
69 attribute29 cm_cmpt_dtl.attribute29%TYPE,
70 attribute30 cm_cmpt_dtl.attribute30%TYPE,
71 attribute_category cm_cmpt_dtl.attribute_category%TYPE
72 );
73
74 TYPE this_level_dtl_tbl_type IS TABLE OF this_level_dtl_rec_type INDEX BY BINARY_INTEGER;
75
76 TYPE lower_level_dtl_rec_type IS RECORD
77 (
78 cmpntcost_id NUMBER,
79 cost_cmpntcls_id NUMBER,
80 cost_cmpntcls_code cm_cmpt_mst.cost_cmpntcls_code%TYPE,
81 cost_analysis_code cm_cmpt_dtl.cost_analysis_code%TYPE,
82 cmpnt_cost NUMBER,
83 delete_mark NUMBER
84 );
85
86 TYPE lower_level_dtl_tbl_type IS TABLE OF lower_level_dtl_rec_type INDEX BY BINARY_INTEGER;
87
88 TYPE costcmpnt_ids_rec_type IS RECORD
89 (
90 cost_cmpntcls_id NUMBER,
91 cost_analysis_code cm_cmpt_dtl.cost_analysis_code%TYPE,
92 cost_level NUMBER,
93 cmpntcost_id NUMBER
94 );
95
96 TYPE costcmpnt_ids_tbl_type IS TABLE OF costcmpnt_ids_rec_type INDEX BY BINARY_INTEGER;
97
98 /*#
99 * Item Cost Creation API
100 * This API Creates a new Item Cost in the Cost Details table
101 * @param p_api_version Version Number of the API
102 * @param p_init_msg_list Flag for initializing message list
103 * @param p_commit Flag for commiting the data or not
104 * @param x_return_status Return status 'S'-Success, 'E'-Error, 'U'-Unexpected Error
105 * @param x_msg_count Number of messages on message stack
106 * @param x_msg_data Actual message data from message stack
107 * @param p_header_rec Item cost header record type
108 * @param p_this_level_dtl_tbl This level item cost detail table type
109 * @param p_lower_level_dtl_Tbl Lower level item cost detail table type
110 * @param x_costcmpnt_ids Component cost identifier table type
111 * @rep:scope public
112 * @rep:lifecycle active
113 * @rep:displayname Create Item Cost API
114 */
115 PROCEDURE Create_Item_Cost
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_return_status OUT NOCOPY VARCHAR2,
121 x_msg_count OUT NOCOPY NUMBER,
122 x_msg_data OUT NOCOPY VARCHAR2,
123 p_header_rec IN Header_Rec_Type,
124 p_this_level_dtl_tbl IN This_Level_Dtl_Tbl_Type,
125 p_lower_level_dtl_Tbl IN Lower_Level_Dtl_Tbl_Type,
126 x_costcmpnt_ids OUT NOCOPY costcmpnt_ids_tbl_type
127 );
128
129 /*#
130 * Item Cost Updation API
131 * This API Updates an Item Cost in the Cost Details table
132 * @param p_api_version Version Number of the API
133 * @param p_init_msg_list Flag for initializing message list
134 * @param p_commit Flag for commiting the data or not
135 * @param x_return_status Return status 'S'-Success, 'E'-Error, 'U'-Unexpected Error
136 * @param x_msg_count Number of messages on message stack
137 * @param x_msg_data Actual message data from message stack
138 * @param p_header_rec Item cost header record type
139 * @param p_this_level_dtl_tbl This level item cost detail table type
140 * @param p_lower_level_dtl_Tbl Lower level item cost detail table type
141 * @rep:scope public
142 * @rep:lifecycle active
143 * @rep:displayname Update Item Cost API
144 */
145 PROCEDURE Update_Item_Cost
146 (
147 p_api_version IN NUMBER,
148 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
149 p_commit IN VARCHAR2 := FND_API.G_FALSE,
150 x_return_status OUT NOCOPY VARCHAR2,
151 x_msg_count OUT NOCOPY NUMBER,
152 x_msg_data OUT NOCOPY VARCHAR2,
153 p_header_rec IN Header_Rec_Type,
154 p_this_level_dtl_tbl IN This_Level_Dtl_Tbl_Type,
155 p_lower_level_dtl_Tbl IN Lower_Level_Dtl_Tbl_Type
156 );
157
158 /*#
159 * Item Cost Deletion API
160 * This API Deletes an Item Cost from the Cost Details table
161 * @param p_api_version Version Number of the API
162 * @param p_init_msg_list Flag for initializing message list
163 * @param p_commit Flag for commiting the data or not
164 * @param x_return_status Return status 'S'-Success, 'E'-Error, 'U'-Unexpected Error
165 * @param x_msg_count Number of messages on message stack
166 * @param x_msg_data Actual message data from message stack
167 * @param p_header_rec Item cost header record type
168 * @param p_this_level_dtl_tbl This level item cost detail table type
169 * @param p_lower_level_dtl_Tbl Lower level item cost detail table type
170 * @rep:scope public
171 * @rep:lifecycle active
172 * @rep:displayname Delete Item Cost API
173 */
174 PROCEDURE Delete_Item_Cost
175 (
176 p_api_version IN NUMBER,
177 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
178 p_commit IN VARCHAR2 := FND_API.G_FALSE,
179 x_return_status OUT NOCOPY VARCHAR2,
180 x_msg_count OUT NOCOPY NUMBER,
181 x_msg_data OUT NOCOPY VARCHAR2,
182 p_header_rec IN Header_Rec_Type,
183 p_this_level_dtl_tbl IN This_Level_Dtl_Tbl_Type,
184 p_lower_level_dtl_Tbl IN Lower_Level_Dtl_Tbl_Type
185 );
186
187 /*#
188 * Item Cost Retrieval API
189 * This API Retrieves an Item Cost from the Cost Details table
190 * @param p_api_version Version Number of the API
191 * @param p_init_msg_list Flag for initializing message list
192 * @param x_return_status Return status 'S'-Success, 'E'-Error, 'U'-Unexpected Error
193 * @param x_msg_count Number of messages on message stack
194 * @param x_msg_data Actual message data from message stack
195 * @param p_header_rec Item cost header record type
196 * @param x_this_level_dtl_tbl This level item cost detail table type
197 * @param x_lower_level_dtl_Tbl Lower level item cost detail table type
198 * @rep:scope public
199 * @rep:lifecycle active
200 * @rep:displayname Retrieve Item Cost API
201 */
202 PROCEDURE Get_Item_Cost
203 (
204 p_api_version IN NUMBER,
205 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
206 x_return_status OUT NOCOPY VARCHAR2,
207 x_msg_count OUT NOCOPY NUMBER,
208 x_msg_data OUT NOCOPY VARCHAR2,
209 p_header_rec IN Header_Rec_Type,
210 x_this_level_dtl_tbl OUT NOCOPY This_Level_Dtl_Tbl_Type,
211 x_lower_level_dtl_Tbl OUT NOCOPY Lower_Level_Dtl_Tbl_Type
212 );
213
214 END GMF_ITEMCOST_PUB;