DBA Data[Home] [Help]

PACKAGE: APPS.WSH_OTM_OUTBOUND

Source


1 PACKAGE  WSH_OTM_OUTBOUND as
2 /* $Header: WSHOTOIS.pls 120.0.12010000.2 2008/10/17 13:17:12 anvarshn ship $ */
3 
4 --===================
5 -- CONSTANTS
6 --===================
7 G_PKG_NAME CONSTANT VARCHAR2(30) := 'WSH_OTM_OUTBOUND';
8 
9 -- +==================================================================================================+
10 --   Procedure : Get_Delivery_objects
11 --   Description:
12 --     	Procedure to get the delivery,delivery details and Lpn info
13 --      in the form of objects (WSH_OTM_DLV_TAB)
14 
15 --   Inputs/Outputs:
16 --            p_dlv_id_tab - id table (list of delivery Ids)
17 --            p_user_id  - User Id to set the context
18 --            p_resp_id  - Resp Id to set the context
19 --            p_resp_appl_id  - Resp Appl Id to set the context
20 --            p_caller   - When passed from GET_TRIP_OBJECTS this will have a
21 --				value of 'T' else default 'D'
22 --            p_trip_id  -  When passed from GET_TRIP_OBJECTS this will have trip_id else dafault -1
23 --
24 --   Output:
25 --            x_domain_name - domain name
26 --            x_otm_user_name - otm User Name
27 -- 	      x_otm_pwd    - otm Password
28 -- 	      x_otm_pwd    - otm Password
29 -- 	      x_dlv_tab    - Nested Table which contains the delivery info
30 -- 	      x_error_dlv_id_tab - List of ids for which the data could not be retrieved
31 --            x_return_status
32 
33 PROCEDURE GET_DELIVERY_OBJECTS(p_dlv_id_tab 		IN OUT NOCOPY	WSH_OTM_ID_TAB,
34 			       p_user_id		IN		NUMBER,
35 			       p_resp_id		IN		NUMBER,
36 			       p_resp_appl_id		IN		NUMBER,
37 			       p_caller			IN		VARCHAR2 DEFAULT 'D',
38                                p_trip_id		IN		NUMBER DEFAULT -1, --Bug 7408338
39 			       x_domain_name    	OUT NOCOPY	VARCHAR2,
40 			       x_otm_user_name 		OUT NOCOPY	VARCHAR2,
41 			       x_otm_pwd		OUT NOCOPY	VARCHAR2,
42 			       x_server_tz_code		OUT NOCOPY	VARCHAR2,
43 			       x_dlv_tab 		OUT NOCOPY 	WSH_OTM_DLV_TAB,
44 			       x_error_dlv_id_tab	OUT NOCOPY 	WSH_OTM_ID_TAB	,
45 			       x_return_status 		OUT NOCOPY 	VARCHAR2);
46 
47 
48 
49 
50 -- +==========================================================================================+
51 --   Procedure : GET_TRIP_OBJECTS
52 --   Description:
53 --     	Procedure to get the Trip, Trip Stop, delivery,delivery details and Lpn info
54 --      in the form of objects (WSH_OTM_TRIP_TAB)
55 
56 --   Inputs/Outputs:
57 --            p_trip_id_tab - id table (list of Trip Ids)
58 --            p_user_id  - User Id to set the context
59 --            p_resp_id  - Resp Id to set the context
60 --            p_resp_appl_id  - Resp Appl Id to set the context
61 --   Output:
62 --            x_domain_name - domain name
63 --            x_otm_user_name - otm User Name
64 -- 	      x_otm_pwd    - otm Password
65 -- 	      x_otm_pwd    - otm Password
66 -- 	      x_trip_tab    - Nested Table which contains the trip info
67 -- 	      x_error_trip_id_tab - List of ids for which the data could not be retrieved
68 --            x_return_status
69 
70 PROCEDURE GET_TRIP_OBJECTS(p_trip_id_tab 		IN OUT NOCOPY	WSH_OTM_ID_TAB,
71 			       p_user_id		IN		NUMBER,
72 			       p_resp_id		IN		NUMBER,
73 			       p_resp_appl_id		IN		NUMBER,
74 			       x_domain_name    	OUT NOCOPY	VARCHAR2,
75 			       x_otm_user_name 		OUT NOCOPY	VARCHAR2,
76 			       x_otm_pwd		OUT NOCOPY	VARCHAR2,
77 			       x_server_tz_code		OUT NOCOPY	VARCHAR2,
78 			       x_trip_tab 		OUT NOCOPY 	WSH_OTM_TRIP_TAB,
79 			       x_dlv_tab		OUT NOCOPY	WSH_OTM_DLV_TAB,
80 			       x_error_trip_id_tab	OUT NOCOPY 	WSH_OTM_ID_TAB,
81 			       x_return_status 		OUT NOCOPY 	VARCHAR2);
82 
83 
84 -- +======================================================================+
85 --   Procedure : UPDATE_ENTITY_INTF_STATUS
86 --   Description:
87 --     	Procedure to upate the interface flag status on the delivery or stop.
88 --      Calling API should pass in the StopIds as not all Stops are picked up per trip.
89 --
90 --   Inputs/Outputs:
91 --            p_entity_type - Values are DELIVERY  TRIP
92 --            p_entity_id_tab  - id table  (IN / OUT)
93 --            p_new_intf_status - Delivery or Trip Stop Status
94 --                       Trip Stop Interface Flag values:
95 --                       ASR - ACTUAL_SHIP_REQUIRED
96 --                       ASP - ACTUAL_IN_PROCESS
97 --                       CMP - COMPLETE
98 
99 --                       Delivery Interface Flag values:
100 --                       NS - NOT TO BE SENT
101 --                       CR - CREATE_REQUIRED
102 --                       UR - UPDATE_REQUIRED
103 --                       DR - DELETE_REQUIRED
104 --                       CP - CREATE_IN_PROCESS
105 --                       UP- UPDATE_IN_PROCESS
106 --                       DP - DELETE_IN_PROCESS
107 --                       AW - AWAITING_ANSWER
108 --                       AR - ANSWER_RECEIVED
109 --                       CMP - COMPLETE
110 --            p_user_Id  - user id
111 --            p_resp_Id - responsibility id
112 --            p_resp_appl_Id - resp application id
113 --   Output:
114 --            p_error_id_tab - erred entity id table
115 --            x_return_status
116 --   API is called from the following
117 /*
118 1.Concurrent Request --TripStop and Delivery TMS_INTERFACE_FLAG is updated to newStatus = X_IN_PROCESS.
119 2.WSH_GLOG_OUTBOUND.GET_TRIP_OBJECTS - TripStop and Delivery TMS_INTERFACE_FLAG is updated to newStatus = AWAITING_ANSWER.
120 3.WSH_GLOG_OUTBOUND.GET_DELIVERY_OBJECTS - TripStop and Delivery TMS_INTERFACE_FLAG is updated to newStatus = AWAITING_ANSWER.
121 */
122 -- +======================================================================+
123 PROCEDURE UPDATE_ENTITY_INTF_STATUS(
124            x_return_status   OUT NOCOPY   VARCHAR2,
125            p_entity_type     IN VARCHAR2,
126            p_new_intf_status IN VARCHAR2,
127            p_userId          IN    NUMBER DEFAULT NULL,
128            p_respId          IN    NUMBER DEFAULT NULL,
129            p_resp_appl_Id    IN    NUMBER DEFAULT NULL,
130            p_entity_id_tab   IN OUT NOCOPY WSH_OTM_ID_TAB,
131            p_error_id_tab    IN OUT NOCOPY WSH_OTM_ID_TAB
132       );
133 
134 
135 
136 END WSH_otm_OUTBOUND;