1 PACKAGE BODY CTO_CUSTOM_CATALOG_DESC AS
2 /* $Header: CTOCUCLB.pls 115.0 2003/02/17 18:26:40 sbhaskar noship $ */
3 /*============================================================================+
4 | Copyright (c) 1999 Oracle Corporation Belmont, California, USA |
5 | All rights reserved. |
6 | Oracle Manufacturing |
7 +=============================================================================+
8 | |
9 | FILE NAME : CTOCUCLS.pls |
10 | DESCRIPTION : |
11 | Package specification for package which enables customers |
12 | to customize the catalog description of the configuration |
13 | item either during pre-configuration process or autocreate |
14 | Configuration item process. |
15 | |
16 | This package contains 2 functions namely : |
17 | - catalog_desc_method |
18 | - user_catalog_desc |
19 | |
20 | * Function CATALOG_DESC_METHOD controls the flow of the code. |
21 | This function should return one of the following values: |
22 | N = If you do NOT want to rollup the lower level's catalog |
23 | value to upper level models. This is one of Oracle's std |
24 | functionality. This is the default. |
25 | |
26 | Y = If you want to rollup the lower level's catalog |
27 | value to upper level models. This is als one of Oracle's |
28 | std functionality. |
29 | |
30 | C = Set this value if you do NOT want to use Oracle's std |
31 | functionality. |
32 | |
33 | * Function USER_CATALOG_DESC will be called only if function |
34 | CATALOG_DESC_METHOD returns "C" (custom). This function has 3|
35 | parameters: |
36 | p_params |
37 | p_catalog_dtls |
38 | x_return_status |
39 | |
40 | - p_params is a record-type and contains 2 elements namely: |
41 | p_item_id number |
42 | p_org_id number |
43 | Hence, p_params.p_item_id will have Inventory_Item_Id value for
44 | the configuration item. |
45 | And, p_params.p_org_id will have the organization_id value. |
46 | |
47 | - p_catalog_dtls is a table of records which contains 2 |
48 | elements namely: |
49 | cat_element_name varchar2(30) |
50 | cat_element_value varchar2(30) |
51 | p_catalog_dtls(i).cat_element_name will contain the element |
52 | name in its "i"th index. |
53 | You need to update p_catalog_dtls(i).cat_element_value |
54 | with an appropriate value corresponding cat_element_name |
55 | |
56 | You SHOULD NEVER alter the index value of p_catalog_dtls pl/sql
57 | table. Doing so will cause the process to fail. |
58 | |
59 | - x_return_status is the OUT parameter which should be set |
60 | to one of the following values : |
61 | |
62 | FND_API.G_RET_STS_SUCCESS |
63 | to indicate success |
64 | |
65 | FND_API.FND_API.G_RET_STS_ERROR |
66 | to indicate failure with expected status |
67 | |
68 | FND_API.FND_API.G_RET_STS_UNEXP_ERROR |
69 | to indicate failure with unexpected status |
70 | |
71 | Note: This function will be called for each newly |
72 | created configuration |
73 | |
74 | HISTORY : 02/14/03 Shashi Bhaskaran Initial Creation |
75 | |
76 *============================================================================*/
77
78
79 function catalog_desc_method return varchar2 is
80 Begin
81
82 -- N = Do NOT Rollup lower level model catalog desc to top level
83 -- This is one of Oracle's standard feature. This is the default.
84
85 -- Y = Rollup lower level model catalog desc to top level.
86 -- This is one of Oracle's standard feature.
87
88 -- C = Customized Method.
89
90 return 'N';
91
92 end catalog_desc_method;
93
94
95
96 procedure user_catalog_desc (
97 p_params IN CTO_CUSTOM_CATALOG_DESC.inparams,
98 p_catalog_dtls IN OUT NOCOPY CTO_CUSTOM_CATALOG_DESC.catalog_dtls_tbl_type,
99 x_return_status OUT NOCOPY VARCHAR2)
100 is
101 begin
102 -- Put your logic here in such a way that you populate p_catalog_dtls
103 -- parameter. p_catalog_dtls is a array of records. The attributes of
104 -- this record are cat_element_name and cat_element_value.
105 -- viz. record (
106 -- cat_element_name varchar2(30),
107 -- cat_element_value varchar2(30)
108 -- );
109 -- Example : p_catalog_dtls(1).cat_element_value := 'XYZ';
110 --
111 -- IMPORTANT : DO NOT ALTER THE VALUE OF cat_element_name . Doing so will
112 -- result in incorrect or inconsistent behaviour.
113 --
114 -- Make sure you set the x_return_status variable to one of the following:
115 -- FND_API.G_RET_STS_SUCCESS to indicate success
116 -- FND_API.FND_API.G_RET_STS_ERROR to indicate failure with expected status
117 -- FND_API.FND_API.G_RET_STS_UNEXP_ERROR to indicate failure with unexpected status
118
119 x_return_status := FND_API.G_RET_STS_SUCCESS;
120
121 end user_catalog_desc;
122
123
124 end CTO_CUSTOM_CATALOG_DESC;