DBA Data[Home] [Help]

PACKAGE: APPS.M4U_UCC_UTILS

Source


1 PACKAGE m4u_ucc_utils AUTHID CURRENT_USER AS
2 /* $Header: m4uutils.pls 120.1 2006/01/05 04:18:00 rkrishan noship $ */
3        /*#
4          * This package contains utility routines which are invoked from the
5          * M4U XML Gateway Message maps.
6          * @rep:scope private
7          * @rep:product CLN
8          * @rep:displayname M4U utility APIs invoked from XMLGateway message-maps.
9          * @rep:category BUSINESS_ENTITY EGO_ITEM
10          */
11 
12         c_resp_appl_id          CONSTANT NUMBER       := 431;
13         c_party_type            CONSTANT VARCHAR2(1)  := 'I';
14         c_party_site_name       CONSTANT VARCHAR2(30) := 'UCCNET';
15         c_document_type         CONSTANT VARCHAR2(30) := 'M4U';
16         c_coll_point            CONSTANT VARCHAR2(10) := 'APPS';
17 
18         g_org_id                VARCHAR2(50);
19         g_party_id              VARCHAR2(40);
20         g_party_site_id         VARCHAR2(40);
21         g_host_gln              VARCHAR2(50);
22         g_supp_gln              VARCHAR2(50);
23         g_local_system          wf_systems.name%TYPE;
24 
25 
26 
27         /*#
28          * Converts Oracle date to UCCnet date format.
29          * @param p_ora_date Input date in Oracle format
30          * @param x_ucc_date Output date string in UCCnet format
31          * @rep:displayname Convert Oracle date value to UCCnet date string
32          */
33         PROCEDURE convert_to_uccnet_date (p_ora_date    IN      DATE,
34                                   x_ucc_date    OUT     NOCOPY VARCHAR2
35                                               );
36         /*#
37          * Converts Oracle date-time to UCCnet date-time format.
38          * @param p_ora_date Input date-time in Oracle format
39          * @param x_ucc_date Output date-time string in UCCnet format
40          * @rep:displayname Convert Oracle date-time value to UCCnet date string
41          */
42         PROCEDURE convert_to_uccnet_datetime (p_ora_date        IN      DATE,
43                                       x_ucc_date        OUT     NOCOPY VARCHAR2
44                                       );
45 
46         /*#
47          * Returns FND lookup meaning corresponding to input lookup type, code combination.
48          * @param p_lookup_type FND lookup type, to wghich the lookup code belongs
49          * @param p_lookup_code FND lookup code, whose meaning is to be queried
50          * @return The FND lookup meaning
51          * @rep:displayname Get FND lookup meaning.
52          */
53         FUNCTION get_lookup_meaning( p_lookup_type VARCHAR2, p_lookup_code VARCHAR)
54           RETURN VARCHAR2;
55 
56         /*#
57          * Returns the server date in UCCnet date format.
58          * @return The server date in UCCnet date format
59          * @rep:displayname Get sysdate.
60          */
61         FUNCTION get_sys_date   RETURN VARCHAR2;
62 
63         /*#
64          * Returns the server time-zone indicator.
65          * @return The server time zone.
66          * @rep:displayname Get time-zone.
67          */
68         FUNCTION get_time_zone  RETURN VARCHAR2;
69 
70         /*#
71          * Returns the current system time in UCCnet time format
72          * @return The current system time in UCCnet time format
73          * @rep:displayname Get system time.
74          */
75         FUNCTION get_time       RETURN VARCHAR2;
76 
77         /*#
78          * Wrapper around sys_guid function call, returns Oracle generated GUID.
79          * @return The GUID
80          * @rep:displayname Get system generated GUID.
81          */
82         FUNCTION get_guid       RETURN VARCHAR2;
83 
84 
85         /*#
86          * Calculate the status type of an item
87          * @param p_cancel_date Input date-time in Oracle format
88          * @param p_discontinue_date Input date-time in Oracle format
89          * @param x_catalogue_item_status Output varchar string
90          * @rep:displayname Process Catalogue Item Status
91          */
92         PROCEDURE process_catalogue_item_status(
93                 p_cancel_date                   IN  DATE,
94                 p_discontinue_date              IN  DATE,
95                 x_catalogue_item_status         OUT NOCOPY VARCHAR2
96         );
97 
98         /*#
99          * converts the date from string to date format
100          * @param p_string API input string format of date
101          * @return The date format of the input string.
102          * @rep:scope private
103          * @rep:displayname Get date format of the string.
104          */
105         FUNCTION CONVERT_TO_DATE(
106               p_string                 VARCHAR2
107         ) RETURN DATE;
108 
109 
110         /*#
111          * Form a string representing the industry extensions supported
112          * from the input value for XSLT processing.
113          * @param p_industry_column Input Varchar String
114          * @param x_mutiple_industry_ext Output Varchar String
115          * @rep:displayname Format Industry Extension String
116          */
117         PROCEDURE format_industry_ext_string(
118                 p_industry_column               IN         VARCHAR2,
119                 x_mutiple_industry_ext          OUT NOCOPY VARCHAR2
120         );
121 
122 
123 
124         -- Name
125         --      validate_uccnet_attr
126         -- Purpose
127         --      This procedure is used for validating the GTIN/GLN at the moment
128         -- Arguments
129         -- Notes
130         --
131         /*#
132          * Validates the given UCCnet attribute(GLN or GTIN). Returns 'true' if validation succeeds
133          * else returns 'false'.
134          * @param x_return_status API return status
135          * @param x_msg_data Error/Success message
136          * @param p_attr_type UCCnet attribute type being validated.(GLN/GTIN)
137          * @param p_attr_value UCCnet atttribute value being validated.
138          * @return Validation true/false.
139          * @rep:scope private
140          * @rep:displayname Validate UCCnet attributes.
141         */
142         FUNCTION validate_uccnet_attr(
143                 x_return_status         OUT NOCOPY VARCHAR2,
144                 x_msg_data              OUT NOCOPY VARCHAR2,
145                 p_attr_type             IN  VARCHAR2,
146                 p_attr_value            IN  VARCHAR2
147           )RETURN BOOLEAN;
148 
149 END m4u_ucc_utils;