1 package ENGPKIMP as
2 /* $Header: ENGEIMPS.pls 120.1.12010000.2 2008/11/04 18:07:43 sanmani ship $ */
3
4 yes constant number(1) := 1;
5 no constant number(1) := 2;
6 Type StringArray is table of varchar2(81) index by binary_integer;
7 Type NameArray is table of varchar2(30) index by binary_integer;
8 Type BooleanArray is table of number(1) index by binary_integer;
9 ----------------------------- Procedure ---------------------------------
10 --
11 -- NAME
12 -- implement_revised_item
13 -- DESCRIPTION
14 -- Implements a revised item defined on an Engineering Change Order.
15 -- REQUIRES
16 -- Revised Item Sequence Id - The unique identifier of the Revised Item.
17 -- Who values - Information about the user enviroment for who columns.
18 -- Trial mode - Yes(1) or No(2). If Yes, then all possible errors are
19 -- returned. If No, aborts upon first error.
20 -- MODIFIES
21 --
22 -- RETURNS
23 -- Update WIP - Yes(1) or No(2). Should work in progress be updated with
24 -- re-exploded bills of material.
25 -- New Item Revision High Date - High Date of Revision to use for
26 -- Update WIP routine.
27 -- Bill Sequence Id - Unique identifier of bill of material for
28 -- this item.
29 -- Error Messages - Names, tokens, values, translates and quantity of
30 -- message dictionary messages.
31 -- NOTES
32 -- This must be called within the C program, enlimp. Enlimp updates work
33 -- in progress with a re-exploded bill of material if update_wip
34 -- is "yes".
35 -- EXAMPLE
36 --
37
38
39
40
41
42
43
44
45 TYPE Rev_op_disable_date_Rec_Type IS RECORD
46 (
47 Revised_Item_Id NUMBER
48 , Operation_seq_id NUMBER
49 , Disable_date DATE
50 );
51 TYPE Rev_Op_Disable_Date_Tbl_Type IS TABLE OF Rev_op_disable_date_Rec_Type
52 INDEX BY BINARY_INTEGER ;
53
54 TYPE Rev_Comp_Disable_Date_Rec_Type IS RECORD
55 (
56 Revised_Item_Id NUMBER
57 , Component_seq_id NUMBER
58 , Disable_date DATE
59 );
60 TYPE Rev_Comp_Disable_Date_Tbl_Type IS TABLE OF Rev_Comp_Disable_Date_Rec_Type
61 INDEX BY BINARY_INTEGER ;
62
63 Procedure implement_revised_item(
64 revised_item in eng_revised_items.revised_item_sequence_id%type,
65 trial_mode in number,
66 max_messages in number, -- size of host arrays
67 userid in number, -- user id
68 reqstid in number, -- concurrent request id
69 appid in number, -- application id
70 progid in number, -- program id
71 loginid in number, -- login id
72 bill_sequence_id OUT NOCOPY eng_revised_items.bill_sequence_id%type,
73 routing_sequence_id OUT NOCOPY eng_revised_items.routing_sequence_id%type,
74 eco_for_production OUT NOCOPY eng_revised_items.eco_for_production%type,
75 revision_high_date OUT NOCOPY mtl_item_revisions.effectivity_date%type,
76 rtg_revision_high_date OUT NOCOPY mtl_rtg_item_revisions.effectivity_date%type,
77 update_wip OUT NOCOPY eng_revised_items.update_wip%type,
78 group_id1 OUT NOCOPY wip_job_schedule_interface.group_id%type,
79 group_id2 OUT NOCOPY wip_job_schedule_interface.group_id%type,
80 wip_job_name1 OUT NOCOPY wip_entities.wip_entity_name%type,
81 wip_job_name2 OUT NOCOPY wip_entities.wip_entity_name%type,
82 wip_job_name2_org_id OUT NOCOPY wip_entities.organization_id%type,
83 message_names OUT NOCOPY NameArray,
84 token1 OUT NOCOPY NameArray,
85 value1 OUT NOCOPY StringArray,
86 translate1 OUT NOCOPY BooleanArray,
87 token2 OUT NOCOPY NameArray,
88 value2 OUT NOCOPY StringArray,
89 translate2 OUT NOCOPY BooleanArray,
90 msg_qty in OUT NOCOPY binary_integer,
91 warnings in OUT NOCOPY number);
92
93 Procedure reverse_standard_bom(
94 revised_item in eng_revised_items.revised_item_sequence_id%type,
95 userid in number,
96 reqstid in number,
97 appid in number,
98 progid in number,
99 loginid in number,
100 bill_sequence_id in eng_revised_items.bill_sequence_id%type,
101 routing_sequence_id in eng_revised_items.routing_sequence_id%type,
102 return_message OUT NOCOPY VARCHAR2,
103 return_status in OUT NOCOPY NUMBER
104 );
105
106 Procedure generate_new_wip_name(
107 p_wip_entity_name IN VARCHAR2
108 ,p_organization_id IN NUMBER
109 ,x_wip_entity_name1 OUT NOCOPY VARCHAR2
110 ,x_wip_entity_name2 OUT NOCOPY VARCHAR2
111 ,x_return_status OUT NOCOPY NUMBER
112 );
113
114 -- Added procedure for bug 4767315
115 /********************************************************************
116 * API Name : implement_eco_wo_revised_item
117 * Parameters IN : p_change_notice
118 * temp_organization_id
119 * Parameters OUT: None
120 * Purpose : used to implement eco for which all revised items are implemented/cancelled and no mandatory tasks are left
121 *********************************************************************/
122
123 PROCEDURE implement_eco_wo_revised_item
124 (
125 p_change_notice in varchar2,
126 temp_organization_id in varchar2
127 );
128
129
130 -- Added procedure for bug 3402607
131 /********************************************************************
132 * API Name : LOG_IMPLEMENT_FAILURE
133 * Parameters IN : p_change_id
134 * p_revised_item_seq_id
135 * Parameters OUT: None
136 * Purpose : Used to update the lifecycle states of the header
137 * and create a log in header Action Log if implementation fails.
138 * In case of revised item implementation failure, updates the revised
139 * item status_type
140 *********************************************************************/
141 PROCEDURE LOG_IMPLEMENT_FAILURE(p_change_id IN NUMBER
142 ,p_revised_item_seq_id IN NUMBER -- Added parameter for bug 3720341
143 );
144
145 end ENGPKIMP;