DBA Data[Home] [Help]

PACKAGE: APPS.CTO_CONFIG_ITEM_PK

Source


1 package CTO_CONFIG_ITEM_PK as
2 /* $Header: CTOCITMS.pls 120.1 2005/06/21 16:18:57 appldev ship $ */
3 
4 gUserID         number       ;
5 gLoginId        number       ;
6 
7 --
8 -- bugfix 2301167: Added the following 2 global variables for wt/vol calculation.
9 -- we shouldn't calculate the wt/vol for the upper level config if lower level
10 -- config has errored out. For this, the following 2 globals are used.
11 -- 0 means success. -1 means error.
12 --
13 gWtStatus	number := 0  ;
14 gVolStatus	number := 0  ;
15 
16 type smc_rec is record (
17      item_id    oe_order_lines.inventory_item_id%type,
18      sequence_id oe_order_lines.component_sequence_id%type,
19      quantity   oe_order_lines.ordered_quantity%type ,
20      check_atp  bom_explosions.check_atp%type
21   );
22 
23 type SmcTab is table of smc_rec index by binary_integer;
24 
25 
26 /*---------------------------------------------------------------------+
27    Name        : create_item
28 
29    Description : This function creates a new inventory_item for the
30                  ordered configuration. It also validates the setup
31                  and profile options. It generates new item number
32                  and then stores the item in mtl_system_items.
33 
34    Returns     :  TRUE - If the function completes succesfully
35                   FALSE - If the function completes with error
36 
37                   Inventory_item_id of the newly generated item is
38                   returned in pConfigId
39 +---------------------------------------------------------------------*/
40 FUNCTION Create_Item(
41         pModelId        in      number,
42         pLineId         in      number,
43         pConfigId       in out NOCOPY     number,  /* NOCOPY Project */
44 	xMsgCount	out  NOCOPY   number,
45         xMsgData        out NOCOPY    varchar2,
46         p_mode          in     varchar2 default 'AUTOCONFIG' )
47 RETURN integer;
48 
49 
50 /*---------------------------------------------------------------------+
51    Name        : create_item_data
52 
53    Description : This function populates the additional item data
54                  for the newly created configuration item.
55                  All necessary inventory and cost tables are populated
56 
57    Returns     :  TRUE  - If the function completes succesfully
58                   FALSE - If the function completes with error
59 
60 +----------------------------------------------------------------------*/
61 FUNCTION Create_Item_Data(
62         pModelId         in     number,
63         pConfigId        in     number,
64         pLineId          in     number,
65         p_mode          in     varchar2 default 'AUTOCONFIG' )
66 return integer;
67 
68 
69 /*---------------------------------------------------------------------+
70    Name        : link_item
71 
72    Description : This function links a newly created or a matching
73                  config item to the order line. It calls OE's
74                  process_order API to insert config line in oe_order_lines
75 
76    Returns     :  TRUE  - If the function completes succesfully
77                   FALSE - If the function completes with error
78 
79 +----------------------------------------------------------------------*/
80 FUNCTION link_item(
81          pOrgId          in     number   ,
82          pModelId        in     number   ,
83          pConfigId       in     number   ,
84          pLineId         in     number   ,
85          xMsgCount	 out NOCOPY    number,
86          xMsgData        out NOCOPY   varchar2)
87 RETURN integer;
88 
89 
90 function delink_item (
91          pModelLineId          in     number    ,
92 	 pConfigId        in     number    ,
93          xErrorMessage    out NOCOPY    varchar2  ,
94          xMessageName     out NOCOPY   varchar2  ,
95          xTableName       out NOCOPY   varchar2  )
96 return integer;
97 
98 function  Get_Mandatory_Components(
99          p_ship_set            in           MRP_ATP_PUB.ATP_Rec_Typ,
100 	 p_organization_id     in           number default null,
101 	 p_inventory_item_id   in           number default null,
102          x_smc_rec             out NOCOPY   MRP_ATP_PUB.ATP_Rec_Typ,
103          xErrorMessage         out NOCOPY         varchar2,
104          xMessageName          out NOCOPY         varchar2,
105          xTableName            out NOCOPY         varchar2  )
106 return integer;
107 
108 function evaluate_order( p_atp_flag mtl_system_items.atp_flag%type
109                        , p_atp_comp mtl_system_items.atp_components_flag%type
110                        , p_item_type mtl_system_items.bom_item_type%type )
111 return number ;
112 
113 FUNCTION chk_model_in_bcod(
114                             pLineId in number)
115 return integer;
116 
117 -- begin bugfix 1811007 : added new procedure ato_weight_volume
118 PROCEDURE ato_weight_volume(
119                 p_ato_line_id   IN      NUMBER,
120                 p_orgn_id       IN      NUMBER,
121                 weight_uom      IN OUT NOCOPY  VARCHAR2, /* NOCOPY Project */
122                 weight          OUT NOCOPY     NUMBER,
123                 volume_uom      IN OUT NOCOPY  VARCHAR2, /* NOCOPY Project */
124                 volume          OUT NOCOPY     NUMBER,
125                 status          IN OUT NOCOPY  NUMBER,
126 		pConfigId       IN      NUMBER); ----3737772 (FP 3473737)
127 
128 -- end bugfix 1811007
129 
130 
131 
132 function get_attribute_control( p_attribute_name varchar2)
133 return number;
134 
135 
136 function evaluate_atp_attributes( p_atp_flag in mtl_system_items_b.atp_flag%type
137                       , p_atp_components_flag in mtl_system_items_b.atp_components_flag%type )
138 return char ;
139 
140 
141 function get_atp_flag
142 return char ;
143 
144 
145 end CTO_CONFIG_ITEM_PK;
146