1 PACKAGE inv_autodetail AS
2 /* $Header: INVRSV4S.pls 120.0 2005/05/25 06:51:02 appldev noship $ */
3 --
4 -- Description
5 -- Create transaction suggestions api based on rules in mtl_picking_rules.
6 --
7 -- The output of this procedure is records in mtl_material_transactions_temp
8 -- , mtl_transaction_lots_temp, and mtl_serial_numbers_temp.
9 --
10 -- Notes
11 -- 1. Integration with reservations
12 -- If table p_reservations passed by the calling is not empty, the
13 -- engine will detailing based on a combination of the info in the
14 -- move order line (the record that represents detailing request),
15 -- and the info in p_reservations. For example, a sales order line
16 -- can have two reservations, one for revision A in quantity of 10,
17 -- and one for revision B in quantity of 5, and the line quantity
18 -- can be 15; so when the pick release api calls the engine
19 -- p_reservations will have two records of the reservations. So
20 -- if the move order line based on the sales order line does not
21 -- specify a revision, the engine will merge the information from
22 -- move order line and p_reservations to create the input for
23 -- detailing as two records, one for revision A, and one for revision
24 -- B. Please see documentation for the pick release API for more
25 -- details.
26 --
27 -- 2. Serial Number Detailing in Picking
28 -- Currently the serial number detailing is quite simple. If the caller
29 -- gives a range (start, and end) serial numbers in the move order line
30 -- and pass p_suggest_serial as fnd_api.true, the engine will filter
31 -- the locations found from a rule, and suggest unused serial numbers
32 -- in the locator. If p_suggest_serial is passed as fnd_api.g_false
33 -- (default), the engine will not give serial numbers in the output.
34 --
35 -- Input Parameters
36 -- p_api_version_number standard input parameter
37 -- p_init_msg_lst standard input parameter
38 -- p_commit standard input parameter
39 -- p_validation_level standard input parameter
40 -- p_transaction_temp_id equals to the move order line id
41 -- for the detailing request
42 -- p_reservations reservations for the demand source
43 -- as the transaction source
44 -- in the move order line.
45 -- p_suggest_serial whether or not the engine should suggest
46 -- serial numbers in the detailing
47 --
48 -- Output Parameters
49 -- x_return_status standard output parameters
50 -- x_msg_count standard output parameters
51 -- x_msg_data standard output parameters
52 --
53 PROCEDURE create_suggestions
54 (p_api_version IN NUMBER,
55 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
56 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
57 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_none,
58 x_return_status OUT NOCOPY VARCHAR2,
59 x_msg_count OUT NOCOPY NUMBER,
60 x_msg_data OUT NOCOPY VARCHAR2,
61 p_transaction_temp_id IN NUMBER,
62 p_reservations IN inv_reservation_global.mtl_reservation_tbl_type,
63 p_suggest_serial IN VARCHAR2 DEFAULT fnd_api.g_false
64 );
65 END inv_autodetail;