DBA Data[Home] [Help]

PACKAGE: APPS.EAM_COPY_BOM_PKG

Source


1 PACKAGE EAM_COPY_BOM_PKG AUTHID CURRENT_USER as
2 /* $Header: EAMCPBMS.pls 120.0.12020000.1 2012/06/27 12:15:26 appldev ship $ */
3 
4 /*
5   Record type for materials in the asset bom
6 --  component_item_id  Inventory Item Id
7 --  description        Material Description
8 --  component_quantity quantity
9 --  uom                Material's unit of measure
10 --  wip_supply_type    Supply Type
11 */
12 
13 TYPE t_bom_record IS RECORD (
14   component_item_id	NUMBER,
15   description		VARCHAR2(240),
16   component_quantity	NUMBER,
17   uom			VARCHAR2(3),
18   wip_supply_type	NUMBER
19 );
20 
21 /*
22    Record Type for materials in workorder requirements
23 --  component_item              Item Name
24 --  component_item_id           Inventory Item Id
25 --  operation_sequence_number   Operation in the workorder
26 --  quantity_per_assembly       Quantity
27 --  wip_supply_type             Supply Type
28 --  supply_subinventory         Sub-inventory Name
29 --  supply_locator_id           Locator Id
30 --  supply_locator_name         Locator Name
31 */
32 TYPE t_component_record IS RECORD (
33   component_item	VARCHAR2(81),
34   component_item_id	NUMBER,
35   operation_sequence_number	NUMBER,
36   quantity_per_assembly	NUMBER,
37   wip_supply_type	NUMBER,
38   supply_subinventory	VARCHAR2(30),
39   supply_locator_id	NUMBER,
40   supply_locator_name	VARCHAR2(81)
41 );
42 
43 --Table type for bom materials
44 TYPE t_bom_table IS TABLE OF t_bom_record
45   INDEX BY BINARY_INTEGER;
46 --Table type form  material requirements
47 TYPE t_component_table IS TABLE OF t_component_record
48   INDEX BY BINARY_INTEGER;
49 
50 /*
51   Procedure to copy materials from  workorder to bom
52 --  p_organization_id   Organization Id
53 --  p_organization_code Organization Code
54 --  p_asset_number      Asset Number
55 --  p_asset_group_id    Inventory Item  Id
56 --  p_component_table   Table of workorder materials
57 --  x_error_code        0   success
58                         1   some of components are already in the asset bom
59                         2   error in the bom api
60 */
61 PROCEDURE copy_to_bom(
62 		p_organization_id	IN	NUMBER,
63 		p_organization_code	IN	VARCHAR2,
64 		p_asset_number		IN	VARCHAR2,
65 		p_asset_group_id	IN	NUMBER,
66 		p_component_table	IN	t_component_table,
67                 x_error_code		OUT NOCOPY	NUMBER);
68 
69 
70 /*
71    Procedure to copy materials from the asset bom to workorder
72 -- p_organization_id      Organization Id
73 -- p_wip_entity_id        Wip Entity Id
74 -- p_operation_seq_num    Operation to which materials are to be copied
75 -- p_department_id        Department
76 -- p_bom_table            Table of bom materials
77 -- x_error_code           S    success
78                           U    error
79                           E    error
80 */
81 PROCEDURE retrieve_asset_bom(
82 		p_organization_id	IN 	NUMBER,
83 		p_wip_entity_id         IN      NUMBER,
84                 p_operation_seq_num     IN      NUMBER,
85                 p_department_id         IN      NUMBER,
86  		p_bom_table		IN 	t_bom_table,
87                 x_error_code		OUT NOCOPY	VARCHAR2);
88 
89 END EAM_COPY_BOM_PKG;