DBA Data[Home] [Help]

PACKAGE: APPS.WSH_FTE_TP_INTEGRATION

Source


1 PACKAGE WSH_FTE_TP_INTEGRATION AUTHID CURRENT_USER as
2 /* $Header: WSHFTPIS.pls 115.4 2003/09/12 02:27:23 wrudge noship $ */
3 
4 
5 TYPE cm_info_rec_type IS RECORD (
6          move_id          NUMBER,
7          cm_trip_number   NUMBER,
8          sequence_number  NUMBER);
9 
10 
11 TYPE plan_trip_move_rec_type IS RECORD (
12           trip_move_interface_id    NUMBER,
13           trip_move_id              NUMBER,
14           move_interface_id         NUMBER,
15           move_id                   NUMBER,
16           move_index                NUMBER,
17           trip_interface_id         NUMBER,
18           trip_id                   NUMBER,
19           trip_index                NUMBER,
20           sequence_number           NUMBER
21      );
22 TYPE plan_trip_move_tab_type IS TABLE OF plan_trip_move_rec_type INDEX BY BINARY_INTEGER;
23 
24 
25 TYPE plan_move_rec_type IS RECORD (
26           move_interface_id         NUMBER,
27           move_id                   NUMBER,
28           move_type_code            VARCHAR2(30),
29           lane_id                   NUMBER,
30           service_level             VARCHAR2(30),
31           planned_flag              VARCHAR2(1),
32           fte_planned_flag          VARCHAR2(1),
33           tp_plan_name              VARCHAR2(10),
34           cm_trip_number            NUMBER,
35           trip_move_base_index      NUMBER
36      );
37 TYPE plan_move_tab_type IS TABLE OF plan_move_rec_type INDEX BY BINARY_INTEGER;
38 
39 
40 TYPE obsoleted_trip_move_rec_type IS RECORD (
41           trip_move_id       NUMBER,
42           move_id            NUMBER,
43           trip_id            NUMBER,
44           sequence_number    NUMBER
45      );
46 TYPE obsoleted_trip_move_tab_type IS TABLE OF obsoleted_trip_move_rec_type INDEX BY BINARY_INTEGER;
47 
48 
49 
50 --
51 --  Procedure:          lookup_cm_info
52 --  Parameters:
53 --               p_trip_id             trip_id to look up its continuous move segment
54 --               x_cm_info_rec         attributes of continuous move and segment
55 --               x_return_status       return status
56 --
57 --  Description:
58 --               Wrapper for FTE api:
59 --               Looks up continuous move information associated with the trip
60 --               to be displayed in shipping UIs.
61 --
62 --
63 
64 PROCEDURE lookup_cm_info (
65         p_trip_id              IN            NUMBER,
66         x_cm_info_rec          OUT    NOCOPY cm_info_rec_type,
67         x_return_status        OUT    NOCOPY VARCHAR2);
68 
69 
70 --
71 --  Procedure:          trip_callback
72 --  Parameters:
73 --               p_api_version_number  known api version (1.0)
74 --               p_init_msg_list       FND_API.G_TRUE to reset list
75 --               x_return_status       return status
76 --               x_msg_count           number of messages in the list
77 --               x_msg_data            text of messages
78 --               p_actions_prms        action parameters record
79 --                                          used to identify the action triggering
80 --                                          the callback to FTE.
81 --               p_rec_attr_tab        table of trip records to process
82 --
83 --  Description:
84 --               Wrapper for FTE api:
85 --               take care of continuous moves based on the action being
86 --               performed on the trips.
87 --
88 
89 PROCEDURE trip_callback (
90     p_api_version_number     IN             NUMBER,
91     p_init_msg_list          IN             VARCHAR2,
92     x_return_status             OUT NOCOPY  VARCHAR2,
93     x_msg_count                 OUT NOCOPY  NUMBER,
94     x_msg_data                  OUT NOCOPY  VARCHAR2,
95     p_action_prms            IN             WSH_TRIPS_GRP.action_parameters_rectype,
96     p_rec_attr_tab           IN             WSH_TRIPS_PVT.Trip_Attr_Tbl_Type);
97 
98 
99 
100 
101 --
102 --  Procedure:          stop_callback
103 --  Parameters:
104 --               p_api_version_number  known api version (1.0)
105 --               p_init_msg_list       FND_API.G_TRUE to reset list
106 --               x_return_status       return status
107 --               x_msg_count           number of messages in the list
108 --               x_msg_data            text of messages
109 --               p_actions_prms        action parameters record
110 --                                          used to identify the action triggering
111 --                                          the callback to FTE.
112 --               p_rec_attr_tab        table of stop records to process
113 --
114 --  Description:
115 --               Wrapper for FTE api:
116 --               take care of continuous moves based on the action being performed
117 --               on the stops.
118 --
119 
120 PROCEDURE stop_callback (
121     p_api_version_number     IN             NUMBER,
122     p_init_msg_list          IN             VARCHAR2,
123     x_return_status             OUT NOCOPY  VARCHAR2,
124     x_msg_count                 OUT NOCOPY  NUMBER,
125     x_msg_data                  OUT NOCOPY  VARCHAR2,
126     p_action_prms            IN             WSH_TRIP_STOPS_GRP.action_parameters_rectype,
127     p_rec_attr_tab           IN             WSH_TRIP_STOPS_PVT.stop_attr_tbl_type);
128 
129 
130 
131 --
132 --  Procedure:          map_moves
133 --  Parameters:
134 --               x_context             context in this session
135 --               x_plan_trips          list of trips mapped to interface trips
136 --               x_plan_trip_moves     list of continuous move segments
137 --               x_plan_moves          list of continuous moves
138 --               x_obsoleted_trip_moves list of continous move segments that need to be deleted
139 --               x_errors_tab          list of errors to insert into wsh_interface_errors at the end
140 --               x_return_status       return status
141 --
142 --  Description:
143 --               Wrapper for FTE api:
144 --               Part of TP release process
145 --               Maps the plan's continuous moves: generate and lock candidates
146 --               x_obsoleted_trip_moves will have the obsoleted move segments.
147 --
148 
149 PROCEDURE map_moves(
150            x_context                  IN OUT NOCOPY WSH_TP_RELEASE_INT.context_rec_type,
151            x_plan_trips               IN OUT NOCOPY WSH_TP_RELEASE_INT.plan_trip_tab_type,
152            x_plan_trip_moves          IN OUT NOCOPY plan_trip_move_tab_type,
153            x_plan_moves               IN OUT NOCOPY plan_move_tab_type,
154            x_obsoleted_trip_moves     IN OUT NOCOPY obsoleted_trip_move_tab_type,
155            x_errors_tab               IN OUT NOCOPY WSH_TP_RELEASE_INT.interface_errors_tab_type,
156            x_return_status               OUT NOCOPY VARCHAR2
157           );
158 
159 --
160 --  Procedure:          reconciliate_moves
161 --  Parameters:
162 --               x_context             context in this session
163 --               x_plan_trips          list of trips mapped to interface trips
164 --               x_plan_trip_moves     list of continuous move segments
165 --               x_plan_moves          list of continuous moves
166 --               x_obsoleted_trip_moves list of continous move segments that need to be deleted
167 --               x_errors_tab          list of errors to insert into wsh_interface_errors at the end
168 --               x_return_status       return status
169 --
170 --  Description:
171 --               Wrapper for FTE api:
172 --               Part of TP release process
173 --               Create or update continous moves and their segments, delete obsoleted segments.
174 --
175 
176 PROCEDURE reconciliate_moves(
177            x_context                  IN OUT NOCOPY WSH_TP_RELEASE_INT.context_rec_type,
178            x_plan_trips               IN OUT NOCOPY WSH_TP_RELEASE_INT.plan_trip_tab_type,
179            x_plan_trip_moves          IN OUT NOCOPY plan_trip_move_tab_type,
180            x_plan_moves               IN OUT NOCOPY plan_move_tab_type,
181            x_obsoleted_trip_moves     IN OUT NOCOPY obsoleted_trip_move_tab_type,
182            x_errors_tab               IN OUT NOCOPY WSH_TP_RELEASE_INT.interface_errors_tab_type,
183            x_return_status               OUT NOCOPY VARCHAR2
184           );
185 
186 --
187 --  Procedure:          tp_firm_moves
188 --  Parameters:
189 --               x_context             context in this session
190 --               x_plan_trips          list of trips mapped to interface trips
191 --               x_plan_trip_moves     list of continuous move segments
192 --               x_plan_moves          list of continuous moves
193 --               x_obsoleted_trip_moves list of continous move segments that need to be deleted
194 --               x_errors_tab          list of errors to insert into wsh_interface_errors at the end
195 --               x_return_status       return status
196 --
197 --  Description:
198 --               Wrapper for FTE api:
199 --               Part of TP release process
200 --               Upgrade continuous moves' PLANNED_FLAG based on the plan
201 --
202 
203 PROCEDURE tp_firm_moves(
204            x_context                  IN OUT NOCOPY WSH_TP_RELEASE_INT.context_rec_type,
205            x_plan_moves               IN OUT NOCOPY plan_move_tab_type,
206            x_errors_tab               IN OUT NOCOPY WSH_TP_RELEASE_INT.interface_errors_tab_type,
207            x_return_status               OUT NOCOPY VARCHAR2
208           );
209 
210 
211 
212 --
213 --  Procedure:          purge_interface_tables
214 --  Parameters:
215 --               p_group_ids           list of group_ids to purge
216 --                                     FTE interface tables (based on WSH_TRIPS_INTERFACE.GROUP_ID)
217 --               x_return_status       return status
218 --
219 --  Description:
220 --               Wrapper for FTE api:
221 --               Part of TP release process
222 --               Delete the records from FTE interface tables:
223 --                   FTE_MOVES_INTERFACE
224 --                   FTE_TRIP_MOVES_INTERFACE
225 --
226 PROCEDURE purge_interface_tables(
227   p_group_ids              IN            WSH_TP_RELEASE_GRP.ID_TAB_TYPE,
228   x_return_status          OUT NOCOPY    VARCHAR2);
229 
230 
231 END WSH_FTE_TP_INTEGRATION;