[Home] [Help]
PACKAGE BODY: APPS.BOM_INVOKE_BO
Source
1 PACKAGE BODY Bom_Invoke_Bo AS
2 /* $Header: BOMBIVKB.pls 115.6 2003/03/14 07:23:18 vhymavat ship $ */
3 /***************************************************************************
4 --
5 -- Copyright (c) 1996 Oracle Corporation, Redwood Shores, CA, USA
6 -- All rights reserved.
7 --
8 -- FILENAME
9 --
10 -- BOMBIVKB.pls
11 --
12 -- DESCRIPTION
13 --
14 -- Body of package Bom_Invoke_BO
15 --
16 -- NOTES
17 --
18 -- HISTORY
19 --
20 -- 09-MAR-01 Refai Farook Initial Creation
21 -- 16-MAR-01 Masanori Kimizuka Added wrapper procedures for Error_Handlers
22 -- and FND_GLOBALS.Apps_Initialize
23 ***************************************************************************/
24
25 PROCEDURE Process_Bom
26 ( p_bo_identifier IN VARCHAR2 := 'BOM'
27 , p_api_version_number IN NUMBER := 1.0
28 , p_init_msg_list IN BOOLEAN := FALSE
29 , p_bom_header_rec IN Bom_Bo_Pub.Bom_Head_Rec_Type :=
30 Bom_Bo_Pub.G_MISS_BOM_HEADER_REC
31 , p_bom_revision_tbl IN Bom_Bo_Pub.Bom_Revision_Tbl_Type :=
32 Bom_Bo_Pub.G_MISS_BOM_REVISION_TBL
33 , p_bom_component_tbl IN Bom_Bo_Pub.Bom_Comps_Tbl_Type :=
34 Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL
35 , p_bom_ref_designator_tbl IN Bom_Bo_Pub.Bom_Ref_Designator_Tbl_type :=
36 Bom_Bo_Pub.G_MISS_BOM_REF_DESIGNATOR_TBL
37 , p_bom_sub_component_tbl IN Bom_Bo_Pub.Bom_Sub_Component_Tbl_Type :=
38 Bom_Bo_Pub.G_MISS_BOM_SUB_COMPONENT_TBL
39 , x_bom_header_rec OUT NOCOPY Bom_Bo_Pub.bom_Head_Rec_Type
40 , x_bom_revision_tbl OUT NOCOPY Bom_Bo_Pub.Bom_Revision_Tbl_Type
41 , x_bom_component_tbl OUT NOCOPY Bom_Bo_pub.Bom_Comps_Tbl_Type
42 , x_bom_ref_designator_tbl OUT NOCOPY Bom_Bo_Pub.Bom_Ref_Designator_Tbl_Type
43 , x_bom_sub_component_tbl OUT NOCOPY Bom_Bo_Pub.Bom_Sub_Component_Tbl_Type
44 , x_return_status OUT NOCOPY VARCHAR2
45 , x_msg_count OUT NOCOPY NUMBER
46 , p_debug IN VARCHAR2 := 'N'
47 , p_output_dir IN VARCHAR2 := NULL
48 , p_debug_filename IN VARCHAR2 := 'BOM_BO_debug.log'
49 ) IS
50 BEGIN
51 Bom_Bo_Pub.Process_Bom
52 ( p_bo_identifier => p_bo_identifier
53 , p_api_version_number => p_api_version_number
54 , p_init_msg_list => p_init_msg_list
55 , p_bom_header_rec => p_bom_header_rec
56 , p_bom_revision_tbl => p_bom_revision_tbl
57 , p_bom_component_tbl => p_bom_component_tbl
58 , p_bom_ref_designator_tbl => p_bom_ref_designator_tbl
59 , p_bom_sub_component_tbl => p_bom_sub_component_tbl
60 , x_bom_header_rec => x_bom_header_rec
61 , x_bom_revision_tbl => x_bom_revision_tbl
62 , x_bom_component_tbl => x_bom_component_tbl
63 , x_bom_ref_designator_tbl => x_bom_ref_designator_tbl
64 , x_bom_sub_component_tbl => x_bom_sub_component_tbl
65 , x_return_status => x_return_status
66 , x_msg_count => x_msg_count
67 , p_debug => p_debug
68 , p_output_dir => p_output_dir
69 , p_debug_filename => p_debug_filename
70 );
71 END Process_Bom ;
72
73 -- Invoker for Error_Handler procedures/functions
74 PROCEDURE Initialize
75 IS
76 BEGIN
77
78 Error_Handler.Initialize ;
79
80 END Initialize ;
81
82 PROCEDURE Reset
83 IS
84 BEGIN
85 Error_Handler.Reset ;
86
87 END Reset ;
88
89 PROCEDURE Get_Message_List
90 ( x_message_list OUT NOCOPY Error_Handler.Error_Tbl_Type)
91 IS
92 BEGIN
93
94 Error_Handler.Get_Message_List
95 ( x_message_list => x_message_list ) ;
96
97 END Get_Message_List ;
98
99 PROCEDURE Get_Entity_Message
100 ( p_entity_id IN VARCHAR2
101 , x_message_list OUT NOCOPY Error_Handler.Error_Tbl_Type
102 )
103 IS
104 BEGIN
105
106 Error_Handler.Get_Entity_Message
107 ( p_entity_id => p_entity_id
108 , x_message_list => x_message_list
109 ) ;
110
111 END Get_Entity_Message ;
112
113 PROCEDURE Get_Entity_Message
114 ( p_entity_id IN VARCHAR2
115 , p_entity_index IN NUMBER
116 , x_message_text OUT NOCOPY VARCHAR2
117 )
118 IS
119 BEGIN
120
121 x_message_text := 'This method is no longer supported. Messages returned from this call could be more than one. Please use the other method which returns a list of messages';
122
123 END Get_Entity_Message ;
124
125 PROCEDURE Delete_Message
126 ( p_entity_id IN VARCHAR2
127 , p_entity_index IN NUMBER
128 )
129 IS
130 BEGIN
131
132 Error_Handler.Delete_Message
133 ( p_entity_id => p_entity_id
134 , p_entity_index => p_entity_index
135 );
136
137 END Delete_Message ;
138
139 PROCEDURE Delete_Message
140 ( p_entity_id IN VARCHAR2 )
141 IS
142 BEGIN
143
144 Error_Handler.Delete_Message
145 ( p_entity_id => p_entity_id ) ;
146
147 END Delete_Message ;
148
149 PROCEDURE Get_Message
150 ( x_message_text OUT NOCOPY VARCHAR2
151 , x_entity_index OUT NOCOPY NUMBER
152 , x_entity_id OUT NOCOPY VARCHAR2
153 , x_message_type OUT NOCOPY VARCHAR2
154 )
155 IS
156 BEGIN
157
158 Error_Handler.Get_Message
159 ( x_message_text => x_message_text
160 , x_entity_index => x_entity_index
161 , x_entity_id => x_entity_id
162 , x_message_type => x_message_type
163 ) ;
164
165
166 END Get_Message ;
167
168 FUNCTION Get_Message_Count RETURN NUMBER
169 IS
170 BEGIN
171
172 RETURN Error_Handler.Get_Message_Count ;
173
174 END Get_Message_Count ;
175
176 PROCEDURE Dump_Message_List
177 IS
178 BEGIN
179
180 Error_Handler.Dump_Message_List ;
181
182 END Dump_Message_List ;
183
184 -- Invoker for FND_GLOBAL.APPS_INITIALIZE
185 PROCEDURE Apps_Initialize
186 ( user_id IN NUMBER
187 ,resp_id IN NUMBER
188 ,resp_appl_id IN NUMBER
189 ,security_group_id IN NUMBER default 0
190 )
191 IS
192 BEGIN
193
194 FND_GLOBAL.Apps_Initialize
195 ( user_id => user_id
196 ,resp_id => resp_id
197 ,resp_appl_id => resp_appl_id
198 ,security_group_id => security_group_id
199 ) ;
200
201 END Apps_Initialize ;
202 PROCEDURE Export_BOM(P_org_hierarchy_name IN VARCHAR2 DEFAULT NULL,
203 P_assembly_item_name IN VARCHAR2,
204 P_organization_code IN VARCHAR2,
205 P_alternate_bm_designator IN VARCHAR2 DEFAULT NULL,
206 P_Costs IN NUMBER DEFAULT 2,
207 P_Cost_type_id IN NUMBER DEFAULT 0,
208 X_bom_header_tbl OUT NOCOPY BOM_BO_PUB.BOM_HEADER_TBL_TYPE,
209 X_bom_revisions_tbl OUT NOCOPY BOM_BO_PUB.BOM_REVISION_TBL_TYPE,
210 X_bom_components_tbl OUT NOCOPY BOM_BO_PUB.BOM_COMPS_TBL_TYPE,
211 X_bom_ref_designators_tbl OUT NOCOPY BOM_BO_PUB.BOM_REF_DESIGNATOR_TBL_TYPE,
212 X_bom_sub_components_tbl OUT NOCOPY BOM_BO_PUB.BOM_SUB_COMPONENT_TBL_TYPE,
213 X_bom_comp_ops_tbl OUT NOCOPY BOM_BO_PUB.BOM_COMP_OPS_TBL_TYPE,
214 X_Err_Msg OUT NOCOPY VARCHAR2,
215 X_Error_Code OUT NOCOPY NUMBER)
216 IS
217 Begin
218 BOMPXINQ.Export_BOM(P_org_hierarchy_name => P_org_hierarchy_name ,
219 P_assembly_item_name => P_assembly_item_name ,
220 P_organization_code => P_organization_code,
221 P_alternate_bm_designator => P_alternate_bm_designator ,
222 P_Costs => P_Costs ,
223 P_Cost_type_id => P_Cost_type_id ,
224 X_bom_header_tbl => X_bom_header_tbl ,
225 X_bom_revisions_tbl => X_bom_revisions_tbl ,
226 X_bom_components_tbl => X_bom_components_tbl ,
227 X_bom_ref_designators_tbl => X_bom_ref_designators_tbl ,
228 X_bom_sub_components_tbl => X_bom_sub_components_tbl ,
229 X_bom_comp_ops_tbl => X_bom_comp_ops_tbl ,
230 X_Err_Msg => X_Err_Msg ,
231 X_Error_Code => X_Error_Code );
232
233 End Export_Bom;
234 END Bom_Invoke_Bo;