1 package BOMPCHDU AUTHID CURRENT_USER as
2 /* $Header: BOMCHDUS.pls 115.0 99/07/16 05:11:42 porting ship $ */
3 /*============================================================================+
4 | Copyright (c) 1993 Oracle Corporation Belmont, California, USA |
5 | All rights reserved. |
6 | Oracle Manufacturing |
7 +=============================================================================+
8 | |
9 | FILE NAME : BOMCHDUS.pls |
10 | DESCRIPTION : |
11 | This file creates packaged functions that check for matching |
12 | configurations. |
13 | |
14 | BOMPCHDU.is_base_demand_row -- Checks whether a given row in |
15 | mtl_demand has already been found to be a duplicate. |
16 | |
17 | BOMPCHDU.bomfchdu_check_dupl_config -- Checks through each |
18 | row in mtl_demand which has been marked to be processed. |
19 | Depending on profile settings, it may call a custom function |
20 | for pre-existing configurations or use the matching function |
21 | from match and reserve. Then, it does an in batch match on |
22 | the configurations. |
23 | |
24 | BOMPCHDU.existing_dupl_match -- for a given demand_id, it |
25 | searches BOM ATO Configurations for a matching configuration. |
26 | |
27 | BOMPCHDU.check_dupl_batch_match -- for a given demand_id, it |
28 | checks the other rows to be processed whether any has an |
29 | identical configuration. If any of the other rows are |
30 | identical, their dupl_config_demand_id or dupl_config_item_id |
31 | is updated accordingly. |
32 | HISTORY : |
33 | 06/13/93 Chung Wei Lee Initial version |
34 | 08/16/93 Chung Wei Lee Added more comments |
35 | 08/23/93 Chung Wei Lee Added codes to check dup new config |
36 | 11/08/93 Randy Roupp Added sql_stmt_num logic |
37 | 11/09/93 Randy Roupp Changed is_base_demand_row function |
38 | 01/14/94 Nagaraj Handle the case if d1.primary_uom_ |
39 | quantity is zero |
40 | 02/21/94 Manish Modi Moved bomfcdec_ch_du_ext_config to |
41 | BOMPCEDC. |
42 | 11/01/95 Edward Lee Re-wrote package to use a matching |
43 | function similar to the one in |
44 | BOMPMCFG which drives off of so_lines|
45 | Also added a check for existing |
46 | configurations in BOM ATO Configs. |
47 =============================================================================*/
48
49 function is_base_demand_row(
50 input_demand_id in number,
51 error_message out VARCHAR2, /* 70 bytes to hold returned msg */
52 message_name out VARCHAR2, /* 30 bytes to hold returned nme */
53 table_name out VARCHAR2 /* 30 bytes to hold returned tbl */
54 )
55 return integer; /* 1=Continue
56 0=Already Matched */
57
58
59 function bomfchdu_check_dupl_config (
60 error_message out VARCHAR2, /* 70 bytes to hold returned msg */
61 message_name out VARCHAR2, /* 30 bytes to hold returned nme */
62 table_name out VARCHAR2, /* 30 bytes to hold returned tbl */
63 nobatch in number default 0
64 /* 1=only 1 line, 0=2+ lines */
65 )
66 return integer; /* 1 = OK
67 0 = Error */
68
69 function existing_dupl_match (
70 input_demand_id in number,
71 dupl_item_id out number,
72 error_message out VARCHAR2, /* 70 bytes to hold returned msg */
73 message_name out VARCHAR2, /* 30 bytes to hold returned name */
74 table_name out VARCHAR2 /* 30 bytes to hold returned tbl */
75 )
76 return integer; /* 1 = OK
77 0 = Error */
78
79 function check_dupl_batch_match (
80 input_demand_id in number,
81 dupl_item_id number,
82 copy_line_id in number,
83 error_message out VARCHAR2, /* 70 bytes to hold returned msg */
84 message_name out VARCHAR2, /* 30 bytes to hold returned name */
85 table_name out VARCHAR2 /* 30 bytes to hold returned tbl */
86 )
87 return integer; /* 1 = OK
88 0 = Error */
89
90 end BOMPCHDU;