DBA Data[Home] [Help]

PACKAGE BODY: APPS.OE_FLEX_UTIL

Source


1 PACKAGE BODY OE_Flex_UTIL AS
2 /* $Header: OEXUFLXB.pls 120.0 2005/05/31 23:18:46 appldev noship $ */
3 
4 --  Global constant holding the package name
5 
6 G_PKG_NAME                    CONSTANT VARCHAR2(30) := 'OE_Order_PUB';
7 
8 FUNCTION Get_Concat_Value(
9  Line_Number      IN NUMBER,
10  Shipment_Number  IN NUMBER,
11  Option_Number    IN NUMBER,
12  Component_Number IN NUMBER DEFAULT NULL,
13  Service_Number   IN NUMBER DEFAULT NULL
14  )RETURN VARCHAR2
15 IS
16 p_concat_value   VARCHAR2(240);
17 BEGIN
18 
19     --=========================================
20     -- Added for identifying Service Lines
21     --=========================================
22     IF service_number is not null then
23 	 IF option_number is not null then
24 	   IF component_number is not null then
25 	     p_concat_value := line_number||'.'||shipment_number||'.'||
26 					   option_number||'.'||component_number||'.'||
27 					   service_number;
28         ELSE
29 	     p_concat_value := line_number||'.'||shipment_number||'.'||
30 					   option_number||'..'||service_number;
31         END IF;
32 
33       --- if a option is not attached
34       ELSE
35 	   IF component_number is not null then
36 	     p_concat_value := line_number||'.'||shipment_number||'..'||
37 					   component_number||'.'||service_number;
38         ELSE
39 	     p_concat_value := line_number||'.'||shipment_number||
40 					   '...'||service_number;
41         END IF;
42 
43 	 END IF; /* if option number is not null */
44 
45     -- if the service number is null
46     ELSE
47 	 IF option_number is not null then
48 	   IF component_number is not null then
49 	     p_concat_value := line_number||'.'||shipment_number||'.'||
50 					   option_number||'.'||component_number;
51         ELSE
52 	     p_concat_value := line_number||'.'||shipment_number||'.'||
53 					   option_number;
54         END IF;
55 
56       --- if a option is not attached
57       ELSE
58 	   IF component_number is not null then
59 	     p_concat_value := line_number||'.'||shipment_number||'..'||
60 					   component_number;
61         ELSE
62 	     p_concat_value := line_number||'.'||shipment_number;
63         END IF;
64 
65 	 END IF; /* if option number is not null */
66 
67     END IF; /* if service number is not null */
68     RETURN p_concat_value;
69 
70 END Get_Concat_Value;
71 
72 
73 END OE_Flex_UTIL;