DBA Data[Home] [Help]

PACKAGE: APPS.CST_PRJMFG_ACCT_HOOK

Source


1 PACKAGE CST_PRJMFG_ACCT_HOOK AUTHID CURRENT_USER as
2 /* $Header: CSTPMHKS.pls 120.0.12010000.2 2010/02/18 01:25:49 ipineda ship $*/
3 
4 /*----------------------------------------------------------------------------*
5  |  PRIVATE FUNCTION/PROCEDURES                                               |
6  *----------------------------------------------------------------------------*/
7 
8 /*----------------------------------------------------------------------------*
9  | PUBLIC FUNCTION                                                            |
10  |    pm_use_hook_acct                                                        |
11  |                                                                            |
12  | DESCRIPTION                                                                |
13  |    This function is an indicator to the cost collector program as to       |
14  |    whether the accounting hook is to be used or not.  In order to use      |
15  |    the accounting hook, this function should return the value 'TRUE'       |
16  |    and code should be written. The function should never pass NULL values  |
17  |    to the OUT arguments. 						      |
18  |							                      |
19  | PARAMETERS                                                                 |
20  |       p_transaction_id,                                                    |
21  |       p_transaction_action_id,	                                      |
22  |       p_transaction_source_type_id,                                        |
23  |       p_organization_id,                                                   |
24  |       p_inventory_item_id,                                                 |
25  |       p_cost_element_id,                                                   |
26  |       p_resource_id,                                                       |
27  |	 p_primary_quantity,						      |
28  |	 p_transfer_organization_id,					      |
29  |	 p_fob_point,						              |
30  |	 p_wip_entity_id, 						      |
31  |	 p_basis_resource_id,						      |
32  |	 O_dr_code_combination_id,					      |
33  |	 O_cr_code_combination_id					      |
34  |                                                                            |
35  |                                                                            |
36  | CALLED FROM							              |
37  |	 CST_PRJMFG_COST_COLLECTOR.PM_PROCESS_TXN_MMT                         |
38  |	 CST_PRJMFG_COST_COLLECTOR.PM_PROCESS_TXN_WT                          |
39  | HISTORY                                                                    |
40  |    	 30-JUL-97  Hemant Gosain Created.                                    |
41  *----------------------------------------------------------------------------*/
42   FUNCTION  pm_use_hook_acct (  p_transaction_id 		NUMBER,
43 				p_transaction_action_id		NUMBER,
44 				p_transaction_source_type_id	NUMBER,
45 				p_organization_id		NUMBER,
46 				p_inventory_item_id		NUMBER,
47 				p_cost_element_id		NUMBER,
48 				p_resource_id			NUMBER,
49 				p_primary_quantity		NUMBER,
50 				p_transfer_organization_id	NUMBER,
51 				p_fob_point			NUMBER,
52 				p_wip_entity_id			NUMBER,
53 				p_basis_resource_id		NUMBER,
54 				O_dr_code_combination_id IN OUT NOCOPY	NUMBER,
55 				O_cr_code_combination_id IN OUT NOCOPY NUMBER)
56   RETURN BOOLEAN ;
57 
58 
59 /*----------------------------------------------------------------------------*
60  | PUBLIC FUNCTION                                                            |
61  |    blueprint_sla_hook                                                      |
62  |                                                                            |
63  | DESCRIPTION                                                                |
64  |    This client extension is a function that works as an indicator to the   |
65  |    cost manager program as to whether the accounting events in SLA should  |
66  |    be created or not when Blue Print configuration takes place. This will  |
67  |    be accomplished by customer extending this function using their custom  |
68  |    logic to determine if a particular transaction should have the events   |
69  |    created or not which will enable the Create Accounting for that specific|
70  |    transaction.                                                            |
71  |							                      |
72  | PARAMETERS:                                                                |
73  |       INPUT:                                                               |
74  |       -p_transaction_id     Transaction ID                                 |
75  |       -p_table_source       String identifying the source table of the     |
76  |                             transaction that is calling the hook, the      |
77  |                             possible values are:                           |
78  |                             "MMT" for transaction belonging to table       |
79  |                              MTL_MATERIAL_TRANSACTIONS                     |
80  |                             "WCTI"  for transactions belonging to table    |
81  |                              WIP_COST_TXN_INTERFACE for normal WIP         |
82  |                              transactions                                  |
83  |                              "WT" for wip transactions belonging to WIP    |
84  |                               transactions table, but this will only be    |
85  |                               called during the WIP Cost update accounting |
86  |                               which is the only case were WT will exist    |
87  |                               at the time the hook has been used, in other |
88  |                               cases only WCTI will be there                |
89  |       OUTPUT:                                                              |
90  |	 -x_return_status						      |
91  |	 -x_msg_count      					              |
92  |	 -x_msg_data           					              |
93  |                                                                            |
94  |                                                                            |
95  | CALLED FROM							              |
96  |	 CST_XLA_PVT.Create_INVXLAEvent                                       |
97  |	 CST_XLA_PVT.Create_WIPXLAEvent                                       |
98  |	                                                                      |
99  | RETURN VALUES                                                              |
100  |       integer    1   Create SLA events in blue print org for this txn      |
101  |                 -1   Error in the hook                                     |
102  |                  0 or any other number                                     |
103  |                      Do not create SLA events in blue print org for this   |
104  |                      transaction  (Default)                                |
105  | HISTORY                                                                    |
106  |    	 04-Jan-2010   Ivan Pineda   Created                                  |
107  *----------------------------------------------------------------------------*/
108   FUNCTION  blueprint_sla_hook(p_transaction_id	                     NUMBER,
109                                      p_table_source                  VARCHAR2,
110                                      x_return_status  OUT NOCOPY     VARCHAR2,
111                                      x_msg_count      OUT NOCOPY     NUMBER,
112                                      x_msg_data       OUT NOCOPY     VARCHAR2)
113 
114   RETURN INTEGER;
115 
116 
117 END CST_PRJMFG_ACCT_HOOK;