DBA Data[Home] [Help]

PACKAGE BODY: APPS.GMF_AP_GET_1099_TYPES

Source


1 PACKAGE BODY GMF_AP_GET_1099_TYPES AS
2 /* $Header: gmftaxtb.pls 115.0 99/07/16 04:24:43 porting shi $ */
3   CURSOR cur_ap_get_1099_types(st_date date, en_date date)
4     IS
5         SELECT   '', income_tax_type, description, inactive_date
6            FROM     ap_income_tax_types
7         WHERE    last_update_date
8         BETWEEN nvl(st_date, last_update_date)
9         AND nvl(en_date,last_update_date);
10         /*
11         SELECT   form_type_name, form_name, description, inactive_date
12            FROM     ap_1099_types
13         WHERE    last_update_date
14         BETWEEN nvl(st_date, last_update_date)
15         AND nvl(en_date,last_update_date);
16 */
17   PROCEDURE proc_ap_get_1099_types(
18           st_date  in out  date,
19           en_date    in out  date,
20           form_type   out  varchar2,
21           formname    out   varchar2,
22           descr out varchar2,
23            inac_date out date,
24           row_to_fetch in out number,
25           error_status out   number) is
26 
27   Begin  /*Beginning of procedure proc_ap_get_1099_types*/
28     IF NOT cur_ap_get_1099_types%ISOPEN THEN
29       OPEN cur_ap_get_1099_types(st_date, en_date);
30     END IF;
31 
32     FETCH cur_ap_get_1099_types
33     INTO   form_type, formname, descr, inac_date;
34 
35     IF cur_ap_get_1099_types%NOTFOUND or row_to_fetch = 1 THEN
36       CLOSE cur_ap_get_1099_types;
37       if cur_ap_get_1099_types%NOTFOUND then
38          error_status := 100;
39          end if;
40       RETURN;
41     END IF;
42 
43 /* Exception Handling */
44 
45     EXCEPTION
46 
47       when others then
48       error_status := SQLCODE;
49 
50   END;  /*End of procedure proc_ap_get_1099_types*/
51 END GMF_AP_GET_1099_TYPES;  -- END GMF_AP_GET_1099_TYPES