index

Package BANINST1.fb_accounting_element

Common Business interface for IFOAPAL information (FB_ACCOUNTING_ELEMENT).


Program units
f_current_version   Returns the current version number.
f_exists   Checks to see if a record exists.
f_query_one   Selects one record using unique columns.
f_query_all   Selects all records for the entity.
f_publish_sync   This function is called from the post-insert, post-update, post-delete
p_delete   Deletes a record.
p_create   Creates a record.
p_update   Updates a record.
p_populate_global   This procedure populates the global variables new_element and old_element
p_publish_sync   Procedure to publish the data in the new_element and old_element variables.
p_publish_sync   Procedure to publish the data in the new_element and old_element variables.

Types
ifoapal_rec   Foapal element record type
accounting_element_rec   Accounting element record type
accounting_element_ref   Accounting element reference cursor
accounting_element_tab   Accounting element table type

Variables
new_element   Global Variables for storing new values of the ifoapal elements before update and delete.
old_element   Global Variables for storing old values of the ifoapal elements before update and delete.

Constants
MAXDATE   Maximum date


MAXDATE

MAXDATE  CONSTANT DATE := to_date(''||G$_DATE.NORMALISE_GREG_DATE('31-12-2099', 'DD-MM-YYYY')||'235959',''||G$_DATE.GET_NLS_DATE_FORMAT||'HH24MISS');

Maximum date


ifoapal_rec

TYPE ifoapal_rec IS RECORD (
        element_type             VARCHAR2(20),
        chart_code               FTVCOAS.FTVCOAS_COAS_CODE%TYPE,
        chart_title              FTVCOAS.FTVCOAS_TITLE%TYPE,
        element_code             VARCHAR2(6),
        element_title            VARCHAR2(50),
        effective_date           DATE,
        termination_date         DATE,
        element_status           VARCHAR2(1),
        data_entry_ind           VARCHAR2(1),
        internal_record_id       VARCHAR2(18));

Foapal element record type


accounting_element_rec

TYPE accounting_element_rec IS RECORD (
        element_type             VARCHAR2(20),
        chart_code               FTVCOAS.FTVCOAS_COAS_CODE%TYPE,
        chart_title              FTVCOAS.FTVCOAS_TITLE%TYPE,
        element_code             VARCHAR2(6),
        element_title            VARCHAR2(50),
        effective_date           DATE,
        termination_date         DATE,
        element_status           VARCHAR2(1),
        internal_record_id       VARCHAR2(18));

Accounting element record type


accounting_element_ref

TYPE accounting_element_ref IS REF CURSOR ;

Accounting element reference cursor


accounting_element_tab

TYPE accounting_element_tab IS TABLE OF accounting_element_rec INDEX BY BINARY_INTEGER;

Accounting element table type


new_element

new_element   IFOAPAL_REC;

Global Variables for storing new values of the ifoapal elements before update and delete.


old_element

old_element   IFOAPAL_REC;

Global Variables for storing old values of the ifoapal elements before update and delete.


f_current_version

Function f_current_version RETURN VARCHAR2

Returns the current version number.

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


f_exists

Function f_exists(p_element_type   VARCHAR2,
                  p_chart_code     FTVCOAS.FTVCOAS_COAS_CODE%TYPE,
                  p_element_code   VARCHAR2,
                  p_effective_date DATE DEFAULT SYSDATE) RETURN BOOLEAN

Checks to see if a record exists.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_chart_code   The chart of accounts code. VARCHAR2(1) Required.
p_element_code   The code of the foapal element. VARCHAR2(6) Required.
p_effective_date   The effective date of the foapal element. Date.

Returns
TRUE if found, otherwise FALSE.


f_query_one

Function f_query_one(p_element_type   VARCHAR2,
                     p_chart_code     FTVCOAS.FTVCOAS_COAS_CODE%TYPE,
                     p_element_code   VARCHAR2,
                     p_effective_date DATE DEFAULT SYSDATE)
  RETURN accounting_element_ref

Selects one record using unique columns.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_chart_code   The chart of accounts code. VARCHAR2(1) Required.
p_element_code   The code of the foapal element. VARCHAR2(6) Required.
p_effective_date   The effective date of the foapal element. Date.

Returns
a cursor variable that will fetch exactly one record.


f_query_all

Function f_query_all(p_element_type   VARCHAR2,
                     p_chart_code     FTVCOAS.FTVCOAS_COAS_CODE%TYPE DEFAULT NULL,
                     p_effective_date DATE DEFAULT SYSDATE)
  RETURN accounting_element_ref

Selects all records for the entity.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_chart_code   The chart of accounts code. VARCHAR2(1) Required.
p_effective_date   The effective date of the foapal element. Date.

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


f_publish_sync

Function f_publish_sync(p_element_type VARCHAR2, p_sync_type VARCHAR2)
  RETURN VARCHAR2

This function is called from the post-insert, post-update, post-delete
  triggers in the respective maintenance forms.  It will publish the data
  in the new_element and old_element variables and will re-initialize them
  when done.
* @param p_element_type   The name of the foapal element. VARCHAR2(8) Required.
* @param p_sync_type  The synchronization type. Acceptable values are INSERT, UPDATE and DELETE. VARCHAR2 Required.
* @RETURN Y if the synchronization published, otherwise N.


p_delete

Procedure p_delete(p_element_type   VARCHAR2,
                   p_chart_code     FTVCOAS.FTVCOAS_COAS_CODE%TYPE,
                   p_element_code   VARCHAR2,
                   p_effective_date DATE DEFAULT SYSDATE,
                   p_nchg_date      DATE DEFAULT MAXDATE)

Deletes a record.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_chart_code   The chart of accounts code. VARCHAR2(1) Required.
p_element_code   The code of the foapal element. VARCHAR2(6) Required.
p_effective_date   The effective date of the foapal element. Date.
p_nchg_date   The next change date of the foapal element. Date.


p_create

Procedure p_create(p_element_type   VARCHAR2,
                   p_chart_code     FTVCOAS.FTVCOAS_COAS_CODE%TYPE,
                   p_element_code   VARCHAR2,
                   p_effective_date DATE DEFAULT SYSDATE,
                   p_nchg_date      DATE DEFAULT MAXDATE)

Creates a record.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_chart_code   The chart of accounts code. VARCHAR2(1) Required.
p_element_code   The code of the foapal element. VARCHAR2(6) Required.
p_effective_date   The effective date of the foapal element. Date.
p_nchg_date   The next change date of the foapal element. Date.


p_update

Procedure p_update(p_element_type   VARCHAR2,
                   p_chart_code     FTVCOAS.FTVCOAS_COAS_CODE%TYPE,
                   p_element_code   VARCHAR2,
                   p_effective_date DATE DEFAULT SYSDATE,
                   p_nchg_date      DATE DEFAULT MAXDATE)

Updates a record.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_chart_code   The chart of accounts code. VARCHAR2(1) Required.
p_element_code   The code of the foapal element. VARCHAR2(6) Required.
p_effective_date   The effective date of the foapal element. Date.
p_nchg_date   The next change date of the foapal element. Date.


p_populate_global

Procedure p_populate_global(p_element_type  VARCHAR2,
                            p_element_rowid varchar2,
                            new_or_old      varchar2)

This procedure populates the global variables new_element and old_element   declared in the package specification.  This procedure will be called in
  the pre-update and pre-delete triggers in the respective maintenance forms
  to store the data before it gets modified.  Globals are used because forms
  cannot access package variables and cursors directly.
* @param p_element_type   The name of the foapal element. VARCHAR2(8) Required.
* @param p_element_rowid  The rowid of the foapal element. VARCHAR2 Required.
* @param new_or_old   The indicator for new or old foapal element. VARCHAR2 Required.


p_publish_sync

Procedure p_publish_sync(p_element_type    VARCHAR2,
                         p_sync_type       VARCHAR2,
                         p_current_values  ifoapal_rec default NULL,
                         p_previous_values ifoapal_rec default NULL,
                         message_published in out varchar2)

Procedure to publish the data in the new_element and old_element variables.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_sync_type   The synchronization type. Acceptable values are INSERT, UPDATE and DELETE. VARCHAR2 Required.
p_current_values   The current foapal element values. IFOAPAL_REC.
p_previous_values   The previous foapal element values. IFOAPAL_REC.
message_published   The indicator for publishing message. VARCHAR2 Required.


p_publish_sync

Procedure p_publish_sync(p_element_type    VARCHAR2,
                         p_sync_type       VARCHAR2,
                         p_current_rowid   VARCHAR2,
                         p_previous_rowid  VARCHAR2 default NULL,
                         message_published in out varchar2)

Procedure to publish the data in the new_element and old_element variables.

Parameters
p_element_type   The name of the foapal element. VARCHAR2(8) Required.
p_sync_type   The synchronization type. Acceptable values are INSERT, UPDATE and DELETE. VARCHAR2 Required.
p_current_values   The current foapal element values. VARCHAR2 Required.
p_previous_values   The previous foapal element values. VARCHAR2.
message_published   The indicator for published message. Valid values are Y and N.  VARCHAR2 Required.