DBA Data[Home] [Help]

PACKAGE: APPS.CSTPSCHK

Source


1 PACKAGE CSTPSCHK AS
2 /* $Header: CSTSCHKS.pls 120.1 2005/06/14 13:27:02 appldev  $ */
3 
4 -- FUNCTION
5 --  std_cost_dist_hook		Cover routine to allow users to customize.
6 --				They will be able to circumvent the
7 --				standard cost distribution process.  This is
8 --                              called by inltcp.ppc.
9 --
10 -- INPUT PARAMETERS
11 --  I_ORG_ID
12 --  I_TXN_ID
13 --  I_USER_ID
14 --  I_LOGIN_ID
15 --  I_REQ_ID
16 --  I_PRG_APPL_ID
17 --  I_PRG_ID
18 --  O_Err_Num
19 --  O_Err_Code
20 --  O_Err_Msg
21 --
22 -- RETURN VALUES
23 --  integer		1	Hook has been used.
24 --			0	Continue cost distribution for this transaction
25 --				as ususal.
26 --
27 FUNCTION std_cost_dist_hook(
28   I_ORG_ID		IN	NUMBER,
29   I_TXN_ID		IN 	NUMBER,
30   I_USER_ID		IN	NUMBER,
31   I_LOGIN_ID    	IN	NUMBER,
32   I_REQ_ID		IN	NUMBER,
33   I_PRG_APPL_ID		IN	NUMBER,
34   I_PRG_ID		IN 	NUMBER,
35   O_Err_Num		OUT NOCOPY	NUMBER,
36   O_Err_Code            OUT NOCOPY 	VARCHAR2,
37   O_Err_Msg		OUT NOCOPY	VARCHAR2
38 )
39 return integer  ;
40 
41 
42 
43 -- FUNCTION
44 --  std_cost_update_hook        Cover routine to allow users to customize.
45 --                              They will be able to circumvent the
46 --                              standard cost update process.  This is
47 --                              called by cmlicu.ppc.
48 --
49 -- INPUT PARAMETERS
50 --  i_org_id
51 --  i_cost_update_id
52 --  i_user_id
53 --  i_login_id
54 --  i_req_id
55 --  i_prg_appl_id
56 --  i_prg_id
57 --  o_err_num
58 --  o_err_code
59 --  o_err_msg
60 --
61 -- RETURN VALUES
62 --  integer             1       Hook has been used.
63 --                      0       Continue cost distribution for this transaction
64 --                              as ususal.
65 --
66 FUNCTION std_cost_update_hook(
67   i_org_id              IN      NUMBER,
68   i_cost_update_id      IN      NUMBER,
69   i_user_id             IN      NUMBER,
70   i_login_id            IN      NUMBER,
71   i_req_id              IN      NUMBER,
72   i_prg_appl_id         IN      NUMBER,
73   i_prg_id              IN      NUMBER,
74   o_err_num             OUT NOCOPY     NUMBER,
75   o_err_code            OUT NOCOPY     VARCHAR2,
76   o_err_msg             OUT NOCOPY     VARCHAR2
77 )
78 RETURN integer  ;
79 
80 
81 -- FUNCTION
82 --  std_get_account_id		Cover routine to allow users the flexbility
83 --				in determining the account they want to
84 --				post the inventory transaction to.
85 --
86 -- INPUT PARAMETERS
87 --  I_ORG_ID
88 --  I_TXN_ID
89 --  I_DEBIT_CREDIT		1 for debit and -1 for credit.
90 --  I_ACCT_LINE_TYPE		The accounting line type.
91 --  I_COST_ELEMENT_ID
92 --  I_RESOURCE_ID
93 --  I_SUBINV			The subinventory involved if there is one.
94 --  I_CG_ID			The cost group involved.
95 --  I_EXP			Indicates that the cost distributor is looking
96 --				for an expense account. 1 is exp account and 0
97 --                              is asset account.
98 --  I_SND_RCV_ORG		Indicates whether this is an sending or
99 --				receiving organization for interorg txns.
100 --                              1 is send and 2 is recv.
101 --  I_USER_ID
102 --  I_LOGIN_ID
103 --  I_REQ_ID
104 --  I_PRG_APPL_ID
105 --  I_PRG_ID
106 --  O_Err_Num
107 --  O_Err_Code
108 --  O_Err_Msg
109 --
110 -- RETURN VALUES
111 --  integer		>0	Workflow returned account
112 --			-1  	Use the default account for distribution:.
113 --
114 function std_get_account_id(
115   I_ORG_ID		IN	NUMBER,
116   I_TXN_ID		IN 	NUMBER,
117   I_DEBIT_CREDIT	IN	NUMBER,
118   I_ACCT_LINE_TYPE	IN	NUMBER,
119   I_COST_ELEMENT_ID	IN	NUMBER,
120   I_RESOURCE_ID		IN	NUMBER,
121   I_SUBINV		IN	VARCHAR2,
122   I_CG_ID		IN	NUMBER,
123   I_EXP			IN	NUMBER,
124   I_SND_RCV_ORG		IN	NUMBER,
125   O_Err_Num		OUT NOCOPY	NUMBER,
126   O_Err_Code		OUT NOCOPY	VARCHAR2,
127   O_Err_Msg		OUT NOCOPY	VARCHAR2
128 )
129 return integer;
130 
131 -- FUNCTION
132 --  std_get_update_acct_id	Cover routine to allow users the flexbility
133 --				in determining the account they want to
134 --				post the inventory transaction to.
135 --
136 -- INPUT PARAMETERS
137 --  I_ORG_ID
138 --  I_UPDATE_ID
139 --  I_DEBIT_CREDIT		1 for debit and -1 for credit.
140 --  I_ACCT_LINE_TYPE		The accounting line type.
141 --  I_COST_ELEMENT_ID
142 --  I_SUBINV			The subinventory involved if there is one.
143 --  I_CG_ID			The cost group involved.
144 --  I_EXP			Indicates that the cost distributor is looking
145 --				for an expense account. 1 is exp account and 0
146 --                              is asset account.
147 --  I_SND_RCV_ORG		Indicates whether this is an sending or
148 --				receiving organization for interorg txns.
149 --                              1 is send and 2 is recv.
150 --  I_USER_ID
151 --  I_LOGIN_ID
152 --  I_REQ_ID
153 --  I_PRG_APPL_ID
154 --  I_PRG_ID
155 --  O_Err_Num
156 --  O_Err_Code
157 --  O_Err_Msg
158 --
159 -- RETURN VALUES
160 --  integer		>0	User selected account number
161 --			-1  	Use the default account for distribution.
162 --
163 function std_get_update_acct_id(
164   I_ORG_ID		IN      NUMBER,
165   I_TXN_ID            	IN      NUMBER,
166   I_TXN_TYPE_ID	        IN      NUMBER,
167   I_TXN_ACT_ID          IN      NUMBER,
168   I_TXN_SRC_TYPE_ID     IN      NUMBER,
169   I_ITEM_ID	        IN      NUMBER,
170   I_UPDATE_ID		IN 	NUMBER,
171   I_DEBIT_CREDIT	IN	NUMBER,
172   I_ACCT_LINE_TYPE	IN	NUMBER,
173   I_COST_ELEMENT_ID	IN	NUMBER,
174   I_RESOURCE_ID		IN	NUMBER,
175   I_SUBINV		IN	VARCHAR2,
176   I_CG_ID		IN	NUMBER,
177   I_EXP			IN	NUMBER,
178   I_SND_RCV_ORG		IN	NUMBER,
179   O_Err_Num		OUT NOCOPY	NUMBER,
180   O_Err_Code		OUT NOCOPY	VARCHAR2,
181   O_Err_Msg		OUT NOCOPY	VARCHAR2
182 )
183 return integer;
184 
185 -- FUNCTION
186 -- std_get_update_scrap_acct_id  	Routine to allow users to select the account
187 --          				to be used for posting scrap adjustments in the
188 --					std cost update process for standard lot based jobs
189 --
190 -- INPUT PARAMETERS
191 -- I_ORG_ID
192 -- I_UPDATE_ID
193 -- I_WIP_ENTITY_ID        wip_entity_id of the work order
194 -- I_DEPT_ID              department_id of the department that runs the operation
195 -- I_OPERATION_SEQ_NUM    operation sequence number of the operation
196 --
197 -- RETURN VALUES
198 -- integer            -1 	Use the department scrap account
202 -- This pragma is needed because this function is being called directly in a SQL statement
199 --		       		else use the value returned by this function
200 --
201 -- NOTE THE USE OF RESTRICT_REFERERENCES PRAGMA
203 
204 function std_get_update_scrap_acct_id(
205    I_ORG_ID		IN	NUMBER,
206    I_UPDATE_ID		IN	NUMBER,
207    I_WIP_ENTITY_ID	IN	NUMBER,
208    I_DEPT_ID		IN	NUMBER,
209    I_OPERATION_SEQ_NUM	IN	NUMBER
210 )
211 return integer;
212 
213 -- FUNCTION
214 -- std_get_est_scrap_rev_acct_id   Routine to allow users to select the account
215 --                                      to be used for posting estimated scrap reversal in the
216 --                                      Operation Yield Processor for scrap transactions.
217 --
218 -- INPUT PARAMETERS
219 -- I_ORG_ID
220 -- I_WIP_ENTITY_ID        wip_entity_id of the work order
221 -- I_DEPT_ID              department_id of the department that runs the operation
222 -- I_OPERATION_SEQ_NUM    operation sequence number of the operation
223 --
224 -- RETURN VALUES
225 -- integer            -1        Use the department scrap account
226 --                              else use the value returned by this function
227 --
228 
229 function std_get_est_scrap_rev_acct_id(
230    I_ORG_ID             IN      NUMBER,
231    I_WIP_ENTITY_ID      IN      NUMBER,
232    I_OPERATION_SEQ_NUM  IN      NUMBER
233 )
234 return integer;
235 
236 -- Removing this restriction. This is not neccessary for database version 8i and higher.
237 -- PRAGMA RESTRICT_REFERENCES (std_get_update_scrap_acct_id, WNDS);
238 
239 
240 --
241 -- OPM INVCONV umoogala  Process-Discrete Xfers Enh.
242 -- Hook to get transfer price
243 --
244 procedure Get_xfer_price_user_hook
245   ( p_api_version                       IN            NUMBER
246   , p_init_msg_list                     IN            VARCHAR2
247 
248   , p_transaction_uom                   IN            VARCHAR2
249   , p_inventory_item_id                 IN            NUMBER
250   , p_transaction_id                    IN            NUMBER
251   , p_from_organization_id              IN            NUMBER
252   , p_to_organization_id                IN            NUMBER
253   , p_from_ou                           IN            NUMBER
254   , p_to_ou                             IN            NUMBER
255 
256   , x_return_status                     OUT NOCOPY    NUMBER
257   , x_msg_data                          OUT NOCOPY    VARCHAR2
258   , x_msg_count                         OUT NOCOPY    NUMBER
259 
260   , x_transfer_price                    OUT NOCOPY    NUMBER
261   , x_currency_code                     OUT NOCOPY    VARCHAR2
262   )
263 ;
264 END CSTPSCHK;