DBA Data[Home] [Help]

PACKAGE: APPS.WIP_FLOWUTIL_PRIV

Source


1 package wip_flowUtil_priv as
2 /* $Header: wipfscms.pls 120.6.12000000.1 2007/01/18 22:15:42 appldev ship $ */
3 
4   /**
5    * This is to derive and validate the flow interface records for the given
6    * header id.
7    */
8   procedure processFlowInterfaceRecords(p_txnHeaderID in number);
9 
10 
11 
12   /**
13    * This procedure explodes the BOM and insert the material requirement into
14    * mti table under the given header id and parent id.
15    * If the supply subinv and locator in the BOM is not provided, then it will try
16    * to default those the rule: BOM level --> item level --> wip parameter
17    */
18   procedure explodeRequirementsToMTI(p_txnHeaderID     in  number,
19                                      p_parentID        in  number,
20                                      p_txnTypeID       in  number,
21                                      p_assyID          in  number,
22                                      p_orgID           in  number,
23                                      p_qty             in  number,
24                                      p_altBomDesig     in  varchar2,
25                                      p_altOption       in  number,
26                                      p_bomRevDate      in  date default NULL,
27                                      p_txnDate         in  date,
28                                      p_projectID       in  number,
29                                      p_taskID          in  number,
30                                      p_toOpSeqNum      in  number,
31                                      p_altRoutDesig    in  varchar2,
32                                      p_txnMode         in  number,
33                                      p_lockFlag        in  number := null,
34                                      p_txnSourceID     in  number := null,
35                                      p_acctPeriodID    in  number := null,
36                                      p_cplTxnID        in  number := null,
37                                      p_txnBatchID      in  number := null,
38                                      p_txnBatchSeq     in  number := null,
39       /* Fix for bug#5262858 */      p_defaultPushSubinv in varchar2 default null,
40                                      x_returnStatus    out NOCOPY varchar2,
41       /*Fix for bug 5630078 */       x_nontxn_excluded out NOCOPY varchar2);
42 
43   /**
44    * This procedure creates an entry in wip_flow_schedules and wip_entities for
45    * unscheduled work orderless completion. Those entries are needed for the
46    * following resource and material transactions.
47    * Pass p_txnInterfaceID to insert into WFS based on MTI, pass p_txnTmpID
48    * to insert into WFS based on MMTT
49    */
50   procedure createFlowSchedule(p_txnInterfaceID    in  number := null,
51                                p_txnTmpID          in  number := null,
52                                x_returnStatus  out NOCOPY varchar2,
53                                x_wipEntityID   out nocopy number);
54 
55   /**
56    * This procedure performs the update to wip flow schedule.
57    */
58   procedure updateFlowSchedule(p_txnTempID    in  number,
59                                x_returnStatus  out NOCOPY varchar2);
60 
61   /**
62    * This procedure sets the error status to the mmtt. It sets the error
63    * for the given temp id as well as the child records.
64    */
65   procedure setMmttError(p_txnTempID in number,
66                          p_msgData   in varchar2);
67 
68 
69   /**
70    * This procedure explodes the BOM for the given assemble and do the default of
71    * subinventory and locator. It will find the components up to the toOpSeqNum.
72    * If the supply subinv and locator in the BOM is not provided, then it will try
73    * to default those the rule: BOM level --> item level --> wip parameter
74    *
75    * ER 4369064: This API is called from both Flow and WIP. If called from Flow, we
76    * need to   1) Validate transaction flag for components
77    *           2) Include / exclude component yield based on WIP Parameter
78    * Calling program should pass 'TRUE' through the parameter p_txnFlag if the above
79    * two tasks are applicable, and 'FALSE' if not.
80    */
81   procedure explodeRequirementsAndDefault(p_assyID          in  number,
82                                           p_orgID           in  number,
83                                           p_qty             in  number,
84                                           p_altBomDesig     in  varchar2,
85                                           p_altOption       in  number,
86             /* Fix for bug#3423629 */     p_bomRevDate      in  date default NULL,
87                                           p_txnDate         in  date,
88 	    /* Fix for bug 5383135 */     p_implFlag        in  number,
89                                           p_projectID       in  number,
90                                           p_taskID          in  number,
91                                           p_toOpSeqNum      in  number,
92                                           p_altRoutDesig    in  varchar2,
93            /* Fix for bug#4538135 */      p_txnFlag         in  boolean default true,
94            /* Fix for bug#5262858 */      p_defaultPushSubinv in varchar2 default null,
95            /* added for bug 5332615 */    p_unitNumber  in varchar2 DEFAULT '',
96                                           x_compTbl          out NOCOPY system.wip_component_tbl_t,
97                                           x_returnStatus     out NOCOPY varchar2);
98 
99 
100   /**
101    * This procedure explodes the BOM and insert the material requirement into
102    * mmtt table under the given header id and completion txn id.
103    * If the supply subinv and locator in the BOM is not provided, then it will try
104    * to default those the rule: BOM level --> item level --> wip parameter
105    */
106   procedure explodeRequirementsToMMTT(p_txnTempID    in  number,
107                                       p_assyID       in  number,
108                                       p_orgID        in  number,
109                                       p_qty          in  number,
110                                       p_altBomDesig  in  varchar2,
111                                       p_altOption    in  number,
112                                       p_txnDate      in  date,
113                                       p_projectID       in  number,
114                                       p_taskID          in  number,
115                                       p_toOpSeqNum   in  number,
116                                       p_altRoutDesig in  varchar2,
117                                       x_returnStatus  out NOCOPY varchar2);
118 
119 
120   /**
121    * This procedure constructs the wip line ops table of records by calling
122    * the appropriate BOM API.
123    *
124    * You must either privide the routing sequence id or
125    * (assy id, orgid, alternate routing designator)
126    *
127    * p_terminalOpSeqNum is greater than 0, it calls the BOM API to get all the
128    *   line ops before the terminal line op in the primary path of the routing network.
129    * p_terminalOpSeqNum is -1, then all the line ops in the primary patch of the
130    *   routing network are cached.
131    * p_terminalOpSeqNum is -2, then all the line ops (except rework loops) in the
132    *   routing network are cached.
133    */
134   procedure constructWipLineOps(p_routingSeqID     in  number,
135                                 p_assyItemID       in  number,
136                                 p_orgID            in  number,
137                                 p_altRoutDesig     in  varchar2,
138                                 p_terminalOpSeqNum in  number,
139                                 x_lineOpTbl         out NOCOPY bom_rtg_network_api.op_tbl_type);
140 
141   /**
142    * This function decides whether the given event belongs to a line op that is
143    * prior to or the same as the given line op or not.
144    * It returns true if p_eventNum belongs to a line op that is prior or same as
145    * p_lineOpNum. It returns false otherwise. It also returns false if any of the
146    * given parameter does not exist.
147    */
148   function eventInPriorSameLineOp(p_routingSeqID in number,
149                                   p_eventNum     in number,
150                                   p_lineOpNum    in number,
151                                   p_lineOpTbl    in bom_rtg_network_api.op_tbl_type) return boolean;
152 
153   /**
154    * This function is used to derive the transaction action id from the
155    * transaction type id
156    */
157   function getTypeFromAction(p_txnActionID in number) return number;
158 
159 
160   /**
161    * This function is used to derive the transaction_type_id and transaction_action_id
162    * of the child given the parent txn type id and required per assembly.
163    */
164   procedure getChildTxn(p_parentTxnTypeID  in  number,
165                         p_signOfPer        in  number,
166                         x_childTxnTypeID    out NOCOPY number,
167                         x_childTxnActionID  out NOCOPY number);
168 
169   /**
170    * Generate the issue locators for all the issues associated with a completion
171    * This would be called only for a project related completions.
172    */
173   procedure generateCompLocator(p_parentID     in  number,
174                                 x_returnStatus  out NOCOPY varchar2);
175 
176 end wip_flowUtil_priv;