DBA Data[Home] [Help]

PACKAGE: APPS.WSH_USA_ACTIONS_PVT

Source


1 PACKAGE WSH_USA_ACTIONS_PVT as
2 /* $Header: WSHUSAAS.pls 120.0.12000000.1 2007/01/16 05:52:13 appldev ship $ */
3 
4 TYPE Split_Table_Type is RECORD (
5         source_line_id  NUMBER ,
6         original_source_line_id  NUMBER ,
7         changed_Attributes_index NUMBER ,
8         direction_flag           VARCHAR2(1) default 'F' ,
9         date_requested           DATE );
10 
11 TYPE Split_Table_Tab_Type IS TABLE OF Split_Table_Type
12   INDEX BY BINARY_INTEGER;
13 
14 TYPE direction_flag_tab_type  IS TABLE OF VARCHAR2(1)
15   INDEX BY BINARY_INTEGER;
16 
17 
18 CURSOR c_check_ship_sets (c_p_set_id NUMBER,
19                             c_p_source_header_id NUMBER) IS -- 2373131
20   select wdd.ship_set_id from
21   wsh_delivery_details wdd where
22   wdd.ship_set_id = c_p_set_id and
23   wdd.source_code = 'OE' and
24   wdd.source_header_id = c_p_source_header_id and
25   ((wdd.released_status = 'C') or exists (select wda.delivery_detail_id
26                                      from   wsh_delivery_assignments_v wda, wsh_new_deliveries wnd
27                                      where  wda.delivery_detail_id = wdd.delivery_detail_id
28                                      and    wda.delivery_id = wnd.delivery_id
29                                      and    wnd.status_code in ('CO', 'IT', 'CL', 'SR', 'SC')))
30   AND rownum = 1;
31 
32 --
33 --  Procedure:          Import_Records
34 --  Parameters:
35 --               p_source_code         source system of records to import
36 --               p_changed_attributes  list of records to process
37 --               x_return_status       return status
38 --
39 --  Description:
40 --               Import source lines where action_flag = 'I'
41 --
42 PROCEDURE Import_Records(
43   p_source_code            IN            VARCHAR2,
44   p_changed_attributes     IN            WSH_INTERFACE.ChangedAttributeTabType,
45   x_return_status          OUT NOCOPY            VARCHAR2);
46 
47 
48 --
49 --  Procedure:          Split_Records
50 --  Parameters:
51 --               p_source_code         source system of records to split
52 --               p_changed_attributes  list of records to process
53 --               p_interface_flag      flag identifying the session
54 --                                     'Y' - called during OM Interface,
55 --                                     'N' - normal session
56 --               x_return_status       return status
57 --
58 --  Description:
59 --               Determine whether the call is initated by OM Interface
60 --               or a normal process.
61 --               Then split the records accordingly where action_flag = 'S'.
62 --
63 PROCEDURE Split_Records(
64   p_source_code            IN            VARCHAR2,
65   p_changed_attributes     IN            WSH_INTERFACE.ChangedAttributeTabType,
66   p_interface_flag         IN            VARCHAR2,
67   x_return_status          OUT NOCOPY            VARCHAR2);
68 
69 
70 --
71 --  Procedure:          Update_Records
72 --  Parameters:
73 --               p_source_code         source system of records to update
74 --               p_changed_attributes  list of records to process
75 --               p_interface_flag      flag identifying the session
76 --                                     'Y' - called during OM Interface,
77 --                                     'N' - normal session
78 --               x_return_status       return status
79 --
80 --  Description:
81 --               Based on p_interface_flag and action_flag,
82 --               check attributes being changed
83 --               and calls Update_Attributes to update the delivery details
84 --               with the new values.
85 --
86 PROCEDURE Update_Records(
87   p_source_code            IN            VARCHAR2,
88   p_changed_attributes     IN            WSH_INTERFACE.ChangedAttributeTabType,
89   p_interface_flag         IN            VARCHAR2,
90   x_return_status          OUT NOCOPY            VARCHAR2);
91 
92 
93 --  Procedure:          Update_Attributes
94 --  Parameters:
95 --               p_source_code         source system to update
96 --               p_attributes_rec      record of attributes to change
97 --               p_changed_detail      Detail record of attributes to change
98 --               x_return_status       return status
99 --  Description:
100 --               Maps the attributes to shipping values as needed
101 --               and updates WSH_DELIVERY_DETAILS
102 --
103 PROCEDURE Update_Attributes(
104   p_source_code       IN        VARCHAR2,
105   p_attributes_rec    IN        WSH_INTERFACE.ChangedAttributeRecType,
106   p_changed_detail    IN        WSH_USA_CATEGORIES_PVT.ChangedDetailRec,
107   x_return_status     OUT NOCOPY        VARCHAR2);
108 
109 
110 
111 --  Procedure:      Import_Delivery_Details
112 --  Parameters:
113 --                p_source_line_id   source line to import
114 --                                   if NULL, import all source lines
115 --                p_source_code      must be 'OE' (Order Management)
116 --                x_return_status    return status
117 --
118 --  Description:    Pulls source line to create new delivery details
119 --
120 PROCEDURE Import_Delivery_Details(
121   p_source_line_id    IN   NUMBER,
122   p_source_code       IN   VARCHAR2,
123   x_return_status     OUT NOCOPY   VARCHAR2);
124 
125 
126 END WSH_USA_ACTIONS_PVT;