DBA Data[Home] [Help]

PACKAGE: APPS.WIP_MOVE_VALIDATOR

Source


1 PACKAGE wip_move_validator AUTHID CURRENT_USER AS
2 /* $Header: wipmovvs.pls 120.1 2005/08/05 16:03:16 kboonyap noship $ */
3 
4 -- declare a PL/SQL table to store errors information
5 -- with three columns: transaction_id, error_column and error_message
6 
7 TYPE request_error IS RECORD(transaction_id     NUMBER,
8                              error_column       VARCHAR2(30),
9                              error_message      VARCHAR2(240));
10 
11 TYPE error_list IS TABLE OF request_error INDEX BY binary_integer;
12 
13 TYPE txnID_list IS TABLE OF wip_move_txn_interface.transaction_id%TYPE INDEX BY binary_integer;
14 
15 current_errors error_list ;
16 any_current_request boolean ;
17 
18 -- Add an error message into PL/SQL table current_errors.
19 PROCEDURE add_error(p_txn_id  IN NUMBER,
20                     p_err_col IN VARCHAR2,
21                     p_err_msg IN VARCHAR2);
22 
23 -- Add an error message into PL/SQL table current_errors.
24 PROCEDURE add_error(p_txn_ids IN txnID_list,
25                     p_err_col IN VARCHAR2,
26                     p_err_msg IN VARCHAR2);
27 
28 -- Copy all errors from current_errors into WIP_TXN_INTERFACE_ERRORS.
29 PROCEDURE load_errors;
30 
31 /***************************************************************************
32  *
33  * This procedure is used to validate all the necessary column in
34  * WIP_MOVE_TXN_INTERFACE table before processing the record.
35  * This procedure is very useful for background transaction inserted by
36  * 3rd party softwares.
37  *
38  * PARAMETER:
39  *
40  * p_group_id             group_id in WIP_MOVE_TXN_INTERFACE
41  * p_initMsgList          A flag used to determine whether the user want to
42  *                        initialize message list or not
43  * NOTE:
44  * There is no return status from this routine. If some information is invalid,
45  * update process_status in WIP_MOVE_TXN_INTERFACE to WIP_CONSTANTS.ERROR, and
46  * the move processor will not process this record. We will also insert error
47  * message into WIP_TXN_INTERFACE_ERRORS
48  *
49  ***************************************************************************/
50 PROCEDURE validate(p_group_id    IN NUMBER,
51                    p_initMsgList IN VARCHAR2);
52 
53 /* Fix for bug#2956953 - Added procedure organization_id which is called from
54 wip move maanger for validation of organization_id/organization_code
55 - Changes done as part of the Wip Move Sequencing Project */
56 
57 PROCEDURE organization_id(p_count_of_errored OUT NOCOPY NUMBER);
58 
59 /***************************************************************************
60  *
61  * The following two function/procedure returns the type of the move
62  * transaction based on the transaction_id in wip_move_transactions.  The
63  * possible return values are: Move transaction, Move and completion
64  * transaction, Return and move transaction
65  *
66  * PARAMETER:
67  *
68  * p_move_id      transaction_id in wip_move_transactions
69  * Following optional parameters were added for performance reasons.  If not
70  * passed in, they will be queried from wip_move_transactions.
71  * p_org_id              organization id of the move txn.
72  * p_wip_entity_id       wip_entity_id of the job for the move txn
73  * p_assm_item_id        the inventory_item_id of the assembly
74  *
75  ***************************************************************************/
76 
77 FUNCTION move_txn_type(p_move_id        IN NUMBER,
78                        p_org_id         IN NUMBER DEFAULT NULL,
79                        p_wip_entity_id  IN NUMBER DEFAULT NULL,
80                        p_assm_item_id   IN NUMBER DEFAULT NULL) return VARCHAR2;
81 
82 PROCEDURE get_move_txn_type(p_move_id         IN NUMBER,
83                             p_org_id          IN NUMBER DEFAULT NULL,
84                             p_wip_entity_id   IN NUMBER DEFAULT NULL,
85                             p_assm_item_id    IN NUMBER DEFAULT NULL,
86                             p_txn_type        OUT NOCOPY VARCHAR2);
87 
88 /***************************************************************************
89  *
90  * This procedure is used to validate transaction inserted by WIP OA page.
91  *
92  * PARAMETER:
93  *
94  * p_group_id             group_id in WIP_MOVE_TXN_INTERFACE
95 
96  * NOTE:
97  * There is no return status from this routine. If some information is invalid,
98  * update process_status in WIP_MOVE_TXN_INTERFACE to WIP_CONSTANTS.ERROR, and
99  * the move processor will not process this record. We will also insert error
100  * message into WIP_TXN_INTERFACE_ERRORS
101  *
102  ***************************************************************************/
103 PROCEDURE validateOATxn(p_group_id    IN NUMBER);
104 
105 
106 END wip_move_validator;