1 PACKAGE wip_batch_move AS
2 /* $Header: wipbmovs.pls 120.2.12010000.1 2008/07/24 05:21:38 appldev ship $*/
3
4 -- declare a PL/SQL table to store jobs, operations, move and scrap quantities.
5 TYPE move_record IS RECORD(wip_entity_id NUMBER,
6 wip_entity_name VARCHAR2(240),
7 op_seq NUMBER,
8 move_qty NUMBER,
9 scrap_qty NUMBER,
10 assy_serial VARCHAR2(30));
11
12 TYPE move_table IS TABLE OF move_record INDEX BY binary_integer;
13
14
15 /***************************************************************************
16 * This procedure will be used to do batch move, scrap or both move and scrap.
17 * This procedure will be called by OA page. Even if the name is batch move,
18 * each move transaction is unlikely to depend on each other. If one record
19 * fails, we will rollback only the changes related to that record. We will
20 * commit other succesfully processed records.
21 *
22 * PARAMETER:
23 *
24 * p_move_table A PL/SQL table contains jobs, operations, move and
25 * scrap quantities information. User can pass as many
26 * records as they want, but it will take longer to
27 * process because we have to process record one by one
28 * to support a requirement to rollback only error record.
29 * p_resp_key Responsibility key that the user log in. It is either
30 * operator or supervisor.
31 * p_org_id Organization ID that user log in.
32 * p_dept_id Department ID that user log in.
33 * p_employee_id Employee ID of the person who submit the transaction.
34 * x_return_status There are 2 possible values
35 * *fnd_api.g_ret_sts_success*
36 * means the every record was succesfully processed
37 * *fnd_api.g_ret_sts_error*
38 * means some records error out
39 *
40 * Note: Error message will be put in message stack for caller to display to
41 * the user. If x_returnStatus is equal to fnd_api.g_ret_sts_error,
42 * caller knows that some records error out.
43 *
44 ****************************************************************************/
45 PROCEDURE process(p_move_table IN wip_batch_move.move_table,
46 p_resp_key IN VARCHAR2,
47 p_org_id IN NUMBER,
48 p_dept_id IN NUMBER,
49 p_employee_id IN NUMBER,
50 x_return_status OUT NOCOPY VARCHAR2);
51 END wip_batch_move;