1: package body iby_accttype_pkg as
2: /*$Header: ibyactpb.pls 115.8 2002/11/15 23:50:06 jleybovi ship $*/
3:
4: /*
5: ** Function: createAcctType.
6: ** Purpose: creates the acct type information, if it is not already
7: ** there in the database.
8: ** and passes back the corresponding accttypeid id.
9: */
10: procedure createAcctType( i_accttype in iby_accttype.accttype%type,
11: i_instrtype in iby_accttype.instrtype%type,
12: io_accttypeid in out nocopy iby_accttype.accttypeid%type)
13: is
14: l_accttypeid iby_accttype.accttypeid%type;
7: ** there in the database.
8: ** and passes back the corresponding accttypeid id.
9: */
10: procedure createAcctType( i_accttype in iby_accttype.accttype%type,
11: i_instrtype in iby_accttype.instrtype%type,
12: io_accttypeid in out nocopy iby_accttype.accttypeid%type)
13: is
14: l_accttypeid iby_accttype.accttypeid%type;
15: cursor c_accttypeid is
8: ** and passes back the corresponding accttypeid id.
9: */
10: procedure createAcctType( i_accttype in iby_accttype.accttype%type,
11: i_instrtype in iby_accttype.instrtype%type,
12: io_accttypeid in out nocopy iby_accttype.accttypeid%type)
13: is
14: l_accttypeid iby_accttype.accttypeid%type;
15: cursor c_accttypeid is
16: select iby_accttype_s.nextval
10: procedure createAcctType( i_accttype in iby_accttype.accttype%type,
11: i_instrtype in iby_accttype.instrtype%type,
12: io_accttypeid in out nocopy iby_accttype.accttypeid%type)
13: is
14: l_accttypeid iby_accttype.accttypeid%type;
15: cursor c_accttypeid is
16: select iby_accttype_s.nextval
17: from dual;
18: cursor c_get_accttypeid(ci_accttype in iby_accttype.accttype%type,
12: io_accttypeid in out nocopy iby_accttype.accttypeid%type)
13: is
14: l_accttypeid iby_accttype.accttypeid%type;
15: cursor c_accttypeid is
16: select iby_accttype_s.nextval
17: from dual;
18: cursor c_get_accttypeid(ci_accttype in iby_accttype.accttype%type,
19: ci_instrtype in iby_accttype.instrtype%type)
20: is
14: l_accttypeid iby_accttype.accttypeid%type;
15: cursor c_accttypeid is
16: select iby_accttype_s.nextval
17: from dual;
18: cursor c_get_accttypeid(ci_accttype in iby_accttype.accttype%type,
19: ci_instrtype in iby_accttype.instrtype%type)
20: is
21: SELECT accttypeid
22: FROM iby_accttype
15: cursor c_accttypeid is
16: select iby_accttype_s.nextval
17: from dual;
18: cursor c_get_accttypeid(ci_accttype in iby_accttype.accttype%type,
19: ci_instrtype in iby_accttype.instrtype%type)
20: is
21: SELECT accttypeid
22: FROM iby_accttype
23: WHERE accttype = ci_accttype
18: cursor c_get_accttypeid(ci_accttype in iby_accttype.accttype%type,
19: ci_instrtype in iby_accttype.instrtype%type)
20: is
21: SELECT accttypeid
22: FROM iby_accttype
23: WHERE accttype = ci_accttype
24: AND instrtype = ci_instrtype;
25: begin
26: /*
49: fetch c_accttypeid into l_accttypeid;
50: /*
51: ** insert name in the database.
52: */
53: INSERT INTO iby_accttype ( accttypeid, accttype, instrtype,
54: last_update_date, last_updated_by,
55: creation_date, created_by,
56: last_update_login, object_version_number)
57: VALUES ( l_accttypeid, i_accttype, i_instrtype,
65: io_accttypeid := l_accttypeid;
66: close c_get_accttypeid;
67: --commit;
68: end createaccttype;
69: end iby_accttype_pkg;