DBA Data[Home] [Help]

PACKAGE: APPS.WSH_CARRIERS_PUB

Source


1 PACKAGE WSH_CARRIERS_PUB AUTHID CURRENT_USER as
2 /* $Header: WSHCAPBS.pls 120.0.12010000.1 2010/04/22 11:29:26 selsubra noship $ */
3 
4 --===================
5 -- PUBLIC VARS
6 --===================
7   TYPE Carrier_Service_DFF_Rec_Type IS RECORD (
8    CARRIER_SERVICE_ID              NUMBER,
9    ATTRIBUTE_CATEGORY              VARCHAR2(150) DEFAULT NULL ,
10    ATTRIBUTE1                      VARCHAR2(150) DEFAULT NULL,
11    ATTRIBUTE2                      VARCHAR2(150) DEFAULT NULL,
12    ATTRIBUTE3                      VARCHAR2(150) DEFAULT NULL,
13    ATTRIBUTE4                      VARCHAR2(150) DEFAULT NULL,
14    ATTRIBUTE5                      VARCHAR2(150) DEFAULT NULL,
15    ATTRIBUTE6                      VARCHAR2(150) DEFAULT NULL,
16    ATTRIBUTE7                      VARCHAR2(150) DEFAULT NULL,
17    ATTRIBUTE8                      VARCHAR2(150) DEFAULT NULL,
18    ATTRIBUTE9                      VARCHAR2(150) DEFAULT NULL,
19    ATTRIBUTE10                     VARCHAR2(150) DEFAULT NULL,
20    ATTRIBUTE11                     VARCHAR2(150) DEFAULT NULL,
21    ATTRIBUTE12                     VARCHAR2(150) DEFAULT NULL,
22    ATTRIBUTE13                     VARCHAR2(150) DEFAULT NULL,
23    ATTRIBUTE14                     VARCHAR2(150) DEFAULT NULL,
24    ATTRIBUTE15                     VARCHAR2(150) DEFAULT NULL);
25 
26 TYPE Carrier_Ser_DFF_Tab_Type IS Table of Carrier_Service_DFF_Rec_Type  INDEX BY BINARY_INTEGER;
27 
28 TYPE Org_Info_Rec_Type IS RECORD (
29                                   org_id    NUMBER,
30                                   org_code  MTL_PARAMETERS.Organization_Code%TYPE
31                                  );
32 
33 TYPE Org_Info_Tab_Type IS TABLE OF Org_Info_Rec_Type INDEX BY BINARY_INTEGER;
34 
35 --===================
36 -- CONSTANTS
37 --===================
38 
39 --===================
40 -- PROCEDURES
41 --===================
42 
43    --========================================================================
44    -- PROCEDURE : Assign_Org_Carrier_Service         PUBLIC
45    --
46    -- PARAMETERS: p_api_version_number    known api version error number
47    --             p_init_msg_list         FND_API.G_TRUE to reset list
48    --             p_commit                FND_API.G_TRUE  to commit.
49    --             p_action_code            Valid action codes are
50    --                                     'ASSIGN','UNASSIGN'
51    --             p_org_info_tab          Input table variable containing org_id and org_code for which needs to be assigned/unassigned
52    --             p_carrier_id            Carrier Id of the carrier
53    --             p_freight_code          Freight code
54    --             p_carrier_service_id    Carrier service Id to be assigned/unassigned to Organization
55    --             p_ship_method_code      Ship Method code
56    --             p_ship_method           Ship Method meaning
57    --             x_car_out_rec_tab       Out table variable containing carrier_service_id and org_carrier_service_id updated/inserted
58    --             x_return_status         return status
59    --             x_msg_count             number of messages in the list
60    --             x_msg_data              text of messages
61    --
62    -- VERSION   : current version         1.0
63    --             initial version         1.0
64    -- COMMENT   : This procedure is used to perform an action specified in p_action_code on the carrier service
65    --
66    --             If p_action_code is 'ASSIGN' then new record will be inserted in WCSM ,WOCS and org_fieight_tl,
67    --                                  if records are already existing then existing records will be updated
68    --             If p_action_code is 'UNASSIGN' then existing record in WCSM and WOCS will be disabled .
69    --                                  if records are not existing then records will be inserted in disabled status
70    --                                  in WCSM ,WOCS and org_fieight_tl
71    --
72    --             If org_id and org_code are both passed in p_org_info_tab then only org_id is considered than org_code.
73    --
74    --             If p_carrier_service_id is passed then p_carrier_id , p_freight_code , p_ship_method_code and p_ship_method parameters are ignored
75    --
76    --             If p_ship_method_code or p_ship_method is passed then on associated carrier service action will be performed.
77    --             If p_ship_method_code and p_ship_method both are passed then only p_ship_method_code is used.
78    --             If p_ship_method_code or p_ship_method is passed then p_carrier_id/p_freight_code are ignored
79 
80    --             If p_carrier_id or p_freight_code is passed then action will be performed on all associated carrier services.
81    --             If p_carrier_id and p_freight_code  both are passed then only p_carrier_id is considered.
82   --
83    --DESCRIPTION: Organization Assignment/Unassignment for a carrier / carrier service / ship method is possible from Application .
84    --             This Public API is created to fulfill the same requirement.
85    --========================================================================
86 
87 
88     PROCEDURE Assign_Org_Carrier_Service
89         ( p_api_version_number     IN   NUMBER,
90           p_init_msg_list          IN   VARCHAR2,
91           p_commit                 IN   VARCHAR2 DEFAULT FND_API.G_FALSE,
92           p_action_code            IN   VARCHAR2,
93           p_org_info_tab           IN   WSH_CARRIERS_PUB.Org_Info_Tab_Type,
94           p_carrier_id             IN   NUMBER DEFAULT NULL,
95           p_freight_code           IN   VARCHAR2 DEFAULT NULL,
96           p_carrier_service_id     IN   NUMBER DEFAULT NULL,
97           p_ship_method_code       IN   VARCHAR2 DEFAULT NULL,
98           p_ship_method            IN   VARCHAR2 DEFAULT NULL,
99           x_car_out_rec_tab        OUT NOCOPY wsh_carriers_grp.Org_Carrier_Ser_Out_Tab_Type,
100           x_return_status          OUT NOCOPY VARCHAR2,
101           x_msg_count              OUT NOCOPY NUMBER,
102           x_msg_data               OUT NOCOPY VARCHAR2);
103 
104 
105 
106 END WSH_CARRIERS_PUB;