[Home] [Help]
PACKAGE BODY: APPS.POA_DNB_LITEM
Source
1 PACKAGE BODY POA_DNB_LITEM AS
2 /* $Header: poalitmb.pls 120.0 2005/06/01 12:37:29 appldev noship $ */
3
4
5 PROCEDURE poa_list_all_items(Errbuf in out NOCOPY Varchar2,
6 Retcode in out NOCOPY Varchar2)
7 IS
8 CURSOR c_all_items IS
9 SELECT distinct item_number_pk,
10 item_name,
11 description
12 FROM EDW_Item_Item_LTC
13 WHERE (CATSET1_Category_FK_Key <> 0);
14
15 v_buf VARCHAR2(240) := NULL;
16
17 BEGIN
18
19 errbuf := NULL;
20 Retcode := 0;
21
22 POA_LOG.setup('POAITEMS');
23 POA_LOG.debug_line('In List All Items');
24
25 FOR litem in c_all_items LOOP
26 POA_LOG.output_line('"' ||
27 litem.item_number_pk || '","' ||
28 litem.item_name || '","' ||
29 litem.description || '"');
30 END LOOP;
31
32 POA_LOG.put_line('POAITEMS.out generated');
33 POA_LOG.wrapup('SUCCESS');
34
35 EXCEPTION WHEN OTHERS THEN
36 errbuf := sqlerrm;
37 retcode := sqlcode;
38
39 POA_LOG.put_line('Error while listing items:');
40 POA_LOG.put_line(sqlcode || ': ' || sqlerrm);
41
42 v_buf := retcode || ':' || errbuf;
43 ROLLBACK;
44 POA_LOG.put_line(v_buf);
45 POA_LOG.wrapup('ERROR');
46
47 RETURN;
48
49 END poa_list_all_items;
50
51 END POA_DNB_LITEM;
52