DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIS_RG_FIX_AKFLEX_DATA

Source


1 PACKAGE BODY BIS_RG_FIX_AKFLEX_DATA as
2 /* $Header: BISVAFXB.pls 115.4 2002/11/19 19:04:06 kiprabha noship $ */
3 -- dbdrv: sql ~PROD ~PATH ~FILE none none none package &phase=plb \
4 -- dbdrv: checkfile:~PROD:~PATH:~FILE
5 ----------------------------------------------------------------------------
6 --  PACKAGE:      BIS_SCHEDULE_PVT
7 --                                                                        --
8 --  DESCRIPTION:  Private package to move the AK region flex field data
9 --                for Report Regions from global data elements context to
10 --                BIS PM Viewer context                                   --
11 --  MODIFICATIONS                                                         --
12 --  Date       User       Modification
13 --  XX-XXX-XX  XXXXXXXX   Modifications made, which procedures changed &  --
14 --                        list bug number, if fixing a bug.               --
15 --                                --
16 --  02-25-00   amkulkar   Initial creation                                --
17 ----------------------------------------------------------------------------
18 PROCEDURE FIX_AK_REGIONITEMS
19 (
20  x_return_code    OUT  NOCOPY NUMBER
21 ,x_return_status  OUT  NOCOPY VARCHAR2
22 )
23 IS
24    CURSOR c_repregions IS
25    SELECT substr(web_html_call,
26                  instr(web_html_call, '''',1,1) + 1,
27                  instr(web_html_call, '''',1,2) -
28                  instr(web_html_call, '''',1,1) - 1) region_code
29    FROM  fnd_form_functions
30    WHERE upper(web_html_call) like 'BISVIEWER.SHOWREPORT%';
31    l_count  NUMBER := 0;
32 BEGIN
33    FOR c_rec IN c_repregions LOOP
34        UPDATE ak_region_items
35        SET attribute_category='BIS PM Viewer'
36        WHERE region_code=c_rec.region_code;
37        l_Count := l_count+1;
38    END LOOP;
39    --x_return_Status := to_char(l_Count) || ' records updated in ak_region_items table  ';
40 EXCEPTION
41 WHEN OTHERS THEN
42      x_return_code := SQLCODE;
43      x_return_status := SQLERRM;
44 END;
45 PROCEDURE FIX_AK_REGIONS
46 (
47  x_return_code    OUT  NOCOPY NUMBER
48 ,x_return_status  OUT  NOCOPY VARCHAR2
49 )
50 IS
51    CURSOR c_repregions IS
52    SELECT substr(web_html_call,
53                  instr(web_html_call, '''',1,1) + 1,
54                  instr(web_html_call, '''',1,2) -
55                  instr(web_html_call, '''',1,1) - 1) region_code
56    FROM  fnd_form_functions
57    WHERE upper(web_html_call) like 'BISVIEWER.SHOWREPORT%';
58    l_count  NUMBER := 0;
59 BEGIN
60    FOR c_rec IN c_repregions LOOP
61        UPDATE ak_regions
62        SET attribute_category='BIS PM Viewer'
63        WHERE region_code=c_rec.region_code;
64        l_count := l_count + 1;
65    END LOOP;
66    x_return_status := l_count || ' records updated in ak_regions table  ';
67 EXCEPTION
68 WHEN OTHERS THEN
69      x_return_code := SQLCODE;
70      x_return_status := SQLERRM;
71 END;
72 END BIS_RG_FIX_AKFLEX_DATA;