index

Package gb_currency

Functional support for Currency Code (Common Business interface CURRENCY in a future release).


Program units
f_api_version   Returns the API version number.
f_code_exists_active   Selects the status of the currency code as of the date provided.
f_exists   Checks to see if a record exists.
f_query_all   Selects all records for the entity.
f_query_one   Selects one record using key.
f_query_by_rowid   Selects one record using ROWID.

Types
currency_rec   Entity record type
currency_ref   Entity cursor variable type
currency_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity name


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(8) := 'CURRENCY';

Business Entity name


currency_rec

TYPE currency_rec IS RECORD (
   r_curr_code               gtvcurr.gtvcurr_curr_code%TYPE,
   r_rate_eff_date           gtvcurr.gtvcurr_rate_eff_date%TYPE,
   r_user_id                 gtvcurr.gtvcurr_user_id%TYPE,
   r_rate_nchg_date          gtvcurr.gtvcurr_rate_nchg_date%TYPE,
   r_rate_term_date          gtvcurr.gtvcurr_rate_term_date%TYPE,
   r_title                   gtvcurr.gtvcurr_title%TYPE,
   r_status_ind              gtvcurr.gtvcurr_status_ind%TYPE,
   r_ap_acct                 gtvcurr.gtvcurr_ap_acct%TYPE,
   r_nation_code             gtvcurr.gtvcurr_nation_code%TYPE,
   r_conv_type               gtvcurr.gtvcurr_conv_type%TYPE,
   r_exch_acct               gtvcurr.gtvcurr_exch_acct%TYPE,
   r_bank_code               gtvcurr.gtvcurr_bank_code%TYPE,
   r_disb_agent_pidm         gtvcurr.gtvcurr_disb_agent_pidm%TYPE,
   r_ap_acct2                gtvcurr.gtvcurr_ap_acct2%TYPE,
   r_exch_acct2              gtvcurr.gtvcurr_exch_acct2%TYPE,
   r_scod_code_iso           gtvcurr.gtvcurr_scod_code_iso%TYPE,
   r_internal_record_id      VARCHAR2(18));

Entity record type


currency_ref

TYPE currency_ref IS REF CURSOR RETURN currency_rec;

Entity cursor variable type


currency_tab

TYPE currency_tab IS TABLE OF currency_rec INDEX BY BINARY_INTEGER;

Entity table type


f_api_version

FUNCTION f_api_version RETURN PLS_INTEGER

Returns the API version number.

Returns
Version of the API signature. Changes only when the signature changes.


f_code_exists_active

FUNCTION f_code_exists_active(p_curr_code     gtvcurr.gtvcurr_curr_code%TYPE,
                              p_rate_eff_date gtvcurr.gtvcurr_rate_eff_date%TYPE)
  RETURN VARCHAR2

Selects the status of the currency code as of the date provided.

Parameters
p_curr_code   A code which uniquely identifies a type of currency. VARCHAR2(4) Required Key
p_rate_eff_date   Effective date used to find the status. DATE Required Key

Returns
A if found and active, I if found and inactive, T if terminated, or N if not found.


f_exists

FUNCTION f_exists(p_curr_code     gtvcurr.gtvcurr_curr_code%TYPE,
                  p_rate_eff_date gtvcurr.gtvcurr_rate_eff_date%TYPE,
                  p_rowid         VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_curr_code   A code which uniquely identifies a type of currency. VARCHAR2(4) Required Key
p_rate_eff_date   Effective date of the particular record. DATE Required Key
p_rowid   Database ROWID of record to select. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_query_all

FUNCTION f_query_all(p_curr_code     gtvcurr.gtvcurr_curr_code%TYPE,
                     p_rate_eff_date gtvcurr.gtvcurr_rate_eff_date%TYPE)
  RETURN currency_ref

Selects all records for the entity.

Parameters
p_curr_code   A code which uniquely identifies a type of currency. VARCHAR2(4) Required Key
p_rate_eff_date   The effective date of this particular record. DATE Required Key

Returns
A cursor variable that will fetch the set of records.


f_query_one

FUNCTION f_query_one(p_curr_code     gtvcurr.gtvcurr_curr_code%TYPE,
                     p_rate_eff_date gtvcurr.gtvcurr_rate_eff_date%TYPE)
  RETURN currency_ref

Selects one record using key.

Parameters
p_curr_code   A code which uniquely identifies a type of currency. VARCHAR2(4) Required Key
p_rate_eff_date   The effective date of this particular record. DATE Required Key

Returns
A cursor variable that will fetch exactly one record.


f_query_by_rowid

FUNCTION f_query_by_rowid(p_rowid VARCHAR2) RETURN currency_ref

Selects one record using ROWID.

Parameters
p_rowid   Database ROWID of record to select. VARCHAR2(18) Required

Returns
A cursor variable that will fetch exactly one record.