1 PACKAGE OE_Order_Context_GRP AUTHID CURRENT_USER AS
2 /* $Header: OEXGCTXS.pls 120.0 2005/06/01 23:18:05 appldev noship $ */
3
4 -- Start of Comments
5 -- API name Set_Created_By_Context
6 -- Type Group
7 --
8 -- Function This API may be used when group callers in an operating
9 -- unit need to update orders in a DIFFERENT operating unit.
10 --
11 -- Used to re-initialize application context based on user, resp
12 -- and application combination for user who created the order or line.
13 -- This would ensure that operating unit is re-set to operating
14 -- unit in which order or line was created.
15 --
16 -- Please NOTE that order processing will then run in the context of
17 -- created by and NOT the caller i.e. user, responsibility level
18 -- profiles and other user/resp specific functions (e.g. OM
19 -- security constraints) will be evaluated for the order created by.
20 --
21 -- IMPORTANT: After calling this API and calling respective OM API
22 -- to process this update (e.g. Process_Order), you should re-set to
23 -- your original context using FND_GLOBAL.Apps_Initialize with
24 -- original user, resp,application returned by this function.
25 --
26 -- Parameters Pass p_header_id if the context should be set using
27 -- created by for the order.
28 -- Pass p_line_id if the context should be set using
29 -- created by for the line.
30 -- If you pass both p_line_id and p_header_id, context will be set
31 -- using created_by for the line.
32 -- Original application context values for the API caller are returned
33 -- in : x_orig_user_id, x_orig_resp_id, x_orig_resp_appl_id
34 --
35 -- Examples 1. If you are updating/deleting only one line and/or only the child
36 -- entities of this line e.g. price adjustments, sales credits
37 -- - pass p_line_id.
38 -- 2. When you are CREATING/UPDATING lines, you can pass p_header_id.
39 -- If lines being processed are under ONE model, you can pass
40 -- top_model_line_id in the p_line_id parameter.
41 -- 3. For all other operations spanning multiple lines or multiple
42 -- child entities of one order, pass p_header_id.
43 --
44 -- End of Comments
45
46 PROCEDURE Set_Created_By_Context
47 (p_header_id IN NUMBER DEFAULT NULL
48 ,p_line_id IN NUMBER DEFAULT NULL
49 ,x_orig_user_id OUT NOCOPY /* file.sql.39 change */ NUMBER
50 ,x_orig_resp_id OUT NOCOPY /* file.sql.39 change */ NUMBER
51 ,x_orig_resp_appl_id OUT NOCOPY /* file.sql.39 change */ NUMBER
52 ,x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2
53 ,x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER
54 ,x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
55 );
56
57 END OE_Order_Context_GRP;