1 PACKAGE GMD_FORMULA_PUB AUTHID CURRENT_USER AS
2 /* $Header: GMDPFMHS.pls 120.1.12010000.3 2010/03/17 15:07:12 rnalla ship $ */
3 /*#
4 * This interface is used to create, update and delete Formula headers.
5 * This package defines and implements the procedures and datatypes
6 * required to create, update and delete Formula header information.
7 * Provides customers with thet ability to load/update externally formulated
8 * products and byproducts into OPM database schema.
9 * @rep:scope public
10 * @rep:product GMD
11 * @rep:lifecycle active
12 * @rep:displayname Formula Header package
13 * @rep:compatibility S
14 * @rep:category BUSINESS_ENTITY GMD_FORMULA
15 */
16
17 TYPE formula_update_hdr_tbl_type IS TABLE OF GMD_FORMULA_COMMON_PUB.formula_update_rec_type
18 INDEX BY BINARY_INTEGER;
19
20 TYPE formula_insert_hdr_tbl_type IS TABLE OF GMD_FORMULA_COMMON_PUB.formula_insert_rec_type
21 INDEX BY BINARY_INTEGER;
22 /* Changed the NUMBER(5) TO NUMBER so that user will not get errors upon using
23 large numbers */
24 TYPE Fm_Id IS TABLE OF NUMBER; /* Added in Bug No.8753171 */
25
26 /* Start of commments */
27 /* API name : Insert_Formula */
28 /* Type : Public */
29 /* Function : */
30 /* Paramaters : */
31 /* IN : p_api_version IN NUMBER Required */
32 /* p_init_msg_list IN Varchar2 Optional */
33 /* p_commit IN Varchar2 Optional */
34 /* p_called_from_forms IN Varchar2 Optional */
35 /* p_formula_header_tbl_type IN Required */
36 /* p_allow_zero_ing_qty IN VARCHAR2 DEFAULT 'FALSE' --BUG#2868184 */
37 /* OUT x_return_status OUT varchar2(1) */
38 /* x_msg_count OUT Number */
39 /* x_msg_data OUT varchar2(2000) */
40 /* */
41 /* Version : Current Version 1.0 */
42 /* */
43 /* Notes : */
44 /* */
45 /* End of comments */
46
47 /*#
48 * Inserts Formula Header
49 * This is a PL/SQL procedure to create a Formula header.
50 * Every formula header at least needs an ingredient and a product, so formula line
51 * details and formula effectivity are also inserted for the formula header.
52 * Call is made to Insert_FormulaHeader API of GMD_FORMULA_HEADER_PVT package.
53 * @param p_api_version API version field
54 * @param p_init_msg_list Flag to check if message list intialized
55 * @param p_commit Flag to check for commit
56 * @param p_called_from_forms Flag to check if API is called from a form
57 * @param x_return_status 'S'-Success, 'E'-Error, 'U'-Unexpected Error
58 * @param x_msg_count Number of msg's on message stack
59 * @param x_msg_data Actual message data on message stack
60 * @param p_formula_header_tbl Table structure of Formula header
61 * @param p_allow_zero_ing_qty Flag to check if ingredient qty. can be zero
62 * @rep:scope public
63 * @rep:lifecycle active
64 * @rep:displayname Insert Formula Header procedure
65 * @rep:compatibility S
66 */
67 PROCEDURE Insert_Formula
68 ( p_api_version IN NUMBER ,
69 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
70 p_commit IN VARCHAR2 := FND_API.G_FALSE ,
71 p_called_from_forms IN VARCHAR2 := 'NO' ,
72 x_return_status OUT NOCOPY VARCHAR2 ,
73 x_msg_count OUT NOCOPY NUMBER ,
74 x_msg_data OUT NOCOPY VARCHAR2 ,
75 p_formula_header_tbl IN formula_insert_hdr_tbl_type ,
76 p_allow_zero_ing_qty IN VARCHAR2 := 'FALSE'
77 );
78
79
80
81 /* Start of commments */
82 /* API name : Update_formulaHeader */
83 /* Type : Public */
84 /* Function : */
85 /* Paramaters : */
86 /* IN : p_api_version IN NUMBER Required */
87 /* p_init_msg_list IN Varchar2 Optional */
88 /* p_commit IN Varchar2 Optional */
89 /* p_called_from_forms IN Varchar2 Optional */
90 /* p_formula_header_tbl_type IN formula_header_tbl_type Required */
91 /* p_delete_mark IN NUMBER Required */
92 /* */
93 /* OUT x_return_status OUT varchar2(1) */
94 /* x_msg_count OUT Number */
95 /* x_msg_data OUT varchar2(2000) */
96 /* */
97 /* Version : Current Version 1.0 */
98 /* */
99 /* Notes : */
100 /* */
101 /* End of comments */
102
103 /*#
104 * Updates Formula Header
105 * This PL/SQL procedure is responsible for updating a formula header.
106 * Call is made to Update_FormulaHeader API of GMD_FORMULA_HEADER_PVT package.
107 * @param p_api_version API version field
108 * @param p_init_msg_list Flag to check if message list intialized
109 * @param p_commit Flag to check for commit
110 * @param p_called_from_forms Flag to check if API is called from a form
111 * @param x_return_status 'S'-Success, 'E'-Error, 'U'-Unexpected Error
112 * @param x_msg_count Number of msg's on message stack
113 * @param x_msg_data Actual message data on message stack
114 * @param p_formula_header_tbl Table structure of Formula header
115 * @rep:scope public
116 * @rep:lifecycle active
117 * @rep:displayname Update Formula Header procedure
118 * @rep:compatibility S
119 */
120 PROCEDURE Update_FormulaHeader
121 ( p_api_version IN NUMBER ,
122 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
123 p_commit IN VARCHAR2 := FND_API.G_FALSE ,
124 p_called_from_forms IN VARCHAR2 := 'NO' ,
125 x_return_status OUT NOCOPY VARCHAR2 ,
126 x_msg_count OUT NOCOPY NUMBER ,
127 x_msg_data OUT NOCOPY VARCHAR2 ,
128 p_formula_header_tbl IN formula_update_hdr_tbl_type
129 );
130
131
132
133 /* Start of commments */
134 /* API name : Delete_FormulaHeader */
135 /* Type : Public */
136 /* Function : */
137 /* Paramaters : */
138 /* IN : p_api_version IN NUMBER Required */
139 /* p_init_msg_list IN Varchar2 Optional */
140 /* p_commit IN Varchar2 Optional */
141 /* p_called_from_forms IN Varchar2 Optional */
142 /* p_formula_header_tbl IN formula_header_tbl_type Required */
143 /* */
144 /* OUT x_return_status OUT varchar2(1) */
145 /* x_msg_count OUT Number */
146 /* x_msg_data OUT varchar2(2000) */
147 /* */
148 /* Version : Current Version 1.0 */
149 /* */
150 /* Notes : */
151 /* */
152 /* End of comments */
153
154 /*#
155 * Deletes Formula Header
156 * This PL/SQL procedure is responsible for deleting a formula header.
157 * Call is made to Delete_FormulaHeader API of GMD_FORMULA_HEADER_PVT package.
158 * @param p_api_version API version field
159 * @param p_init_msg_list Flag to check if message list intialized
160 * @param p_commit Flag to check for commit
161 * @param p_called_from_forms Flag to check if API is called from a form
162 * @param x_return_status 'S'-Success, 'E'-Error, 'U'-Unexpected Error
163 * @param x_msg_count Number of msg's on message stack
164 * @param x_msg_data Actual message data on message stack
165 * @param p_formula_header_tbl Table structure of Formula header
166 * @rep:scope public
167 * @rep:lifecycle active
168 * @rep:displayname Delete Formula Header procedure
169 * @rep:compatibility S
170 */
171 PROCEDURE Delete_FormulaHeader
172 ( p_api_version IN NUMBER ,
173 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
174 p_commit IN VARCHAR2 := FND_API.G_FALSE ,
175 p_called_from_forms IN VARCHAR2 := 'YES' ,
176 x_return_status OUT NOCOPY VARCHAR2 ,
177 x_msg_count OUT NOCOPY NUMBER ,
178 x_msg_data OUT NOCOPY VARCHAR2 ,
179 p_formula_header_tbl IN formula_update_hdr_tbl_type
180 );
181
182
183
184 END GMD_FORMULA_PUB;