index

Package BANINST1.fb_commodity

Common Business interface for commodity information (FB_COMMODITY).


Program units
f_current_version   Returns the current version number.
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 unique columns.
f_is_comm_stock   Checks whether a commodity is a stock item.
p_exists_data   Checks to see if a record exists.
p_lock   Locks commodity record for update.
p_delete   Deletes a commodity record.
p_create   Creates a commodity record.
p_update   Updates a commodity record.

Types
commodity_rec   Commodity record type
commodity_ref   Commodity reference cursor
commodity_tab   Commodity table type


commodity_rec

TYPE commodity_rec IS RECORD (
      p_CODE                     FTVCOMM.FTVCOMM_CODE%TYPE,
      p_EFF_DATE                 FTVCOMM.FTVCOMM_EFF_DATE%TYPE,
      p_ACTIVITY_DATE            FTVCOMM.FTVCOMM_ACTIVITY_DATE%TYPE,
      p_USER_ID                  FTVCOMM.FTVCOMM_USER_ID%TYPE,
      p_DESC                     FTVCOMM.FTVCOMM_DESC%TYPE,
      p_UOMS_CODE                FTVCOMM.FTVCOMM_UOMS_CODE%TYPE,
      p_TERM_DATE                FTVCOMM.FTVCOMM_TERM_DATE%TYPE,
      p_COMM_CODE_PRED           FTVCOMM.FTVCOMM_COMM_CODE_PRED%TYPE,
      p_AMST_IND                 FTVCOMM.FTVCOMM_AMST_IND%TYPE,
      p_TGRP_CODE                FTVCOMM.FTVCOMM_TGRP_CODE%TYPE,
      p_TAX_OVERRIDE_IND         FTVCOMM.FTVCOMM_TAX_OVERRIDE_IND%TYPE,
      p_STOCK_IND                FTVCOMM.FTVCOMM_STOCK_IND%TYPE,
      p_ONORDER_QTY              FTVCOMM.FTVCOMM_ONORDER_QTY%TYPE,
      p_RESERVED_QTY             FTVCOMM.FTVCOMM_RESERVED_QTY%TYPE,
      p_INVOICED_QTY             FTVCOMM.FTVCOMM_NOT_INVOICED_QTY%TYPE,
      p_VALUE_AMT                FTVCOMM.FTVCOMM_TOTAL_VALUE_AMT%TYPE,
      p_EST_LIFE_YEARS           FTVCOMM.FTVCOMM_EST_LIFE_YEARS%TYPE,
      INTERNAL_RECORD_ID     VARCHAR2(18));

Commodity record type


commodity_ref

TYPE commodity_ref IS REF CURSOR RETURN COMMODITY_REC;

Commodity reference cursor


commodity_tab

TYPE commodity_tab IS TABLE OF COMMODITY_REC INDEX BY BINARY_INTEGER;

Commodity table type


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_code      FTVCOMM.FTVCOMM_CODE%TYPE,
                  p_eff_date  FTVCOMM.FTVCOMM_EFF_DATE%TYPE default null,
                  p_term_date FTVCOMM.FTVCOMM_TERM_DATE%TYPE default null)
  RETURN BOOLEAN

Checks to see if a record exists.

Parameters
p_code   The commodity code. VARCHAR2(10) Required.
p_eff_date   The effective date of the commodity. Date.
p_term_date   The termination date of the commodity. Date.

Returns
TRUE if found, otherwise FALSE.


f_query_all

Function f_query_all(p_eff_date FTVCOMM.FTVCOMM_EFF_DATE%TYPE default null)
  RETURN commodity_ref

Selects all records for the entity.

Parameters
p_eff_date   The effective date of the commodity. Date.

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


f_query_one

Function f_query_one(p_code     FTVCOMM.FTVCOMM_CODE%TYPE,
                     p_eff_date FTVCOMM.FTVCOMM_EFF_DATE%TYPE default null)
  RETURN commodity_ref

Selects one record using unique columns.

Parameters
p_code   The commodity code. VARCHAR2(10) Required.
p_eff_date   The effective date of the commodity. Date.

Returns
A cursor variable that will fetch exactly one record.


f_is_comm_stock

Function f_is_comm_stock(p_comm_code FTVCOMM.FTVCOMM_CODE%type,
                         p_eff_date  DATE) RETURN VARCHAR2

Checks whether a commodity is a stock item.

Parameters
p_comm_code   The commodity code. VARCHAR2(10) Required.
p_eff_date   The effective date of the commodity. Date.

Returns
Y if the commodity is a stock item, otherwise N.


p_exists_data

Procedure p_exists_data(p_code            IN FTVCOMM.FTVCOMM_CODE%TYPE,
                        p_eff_date        IN FTVCOMM.FTVCOMM_EFF_DATE%TYPE default null,
                        p_term_date       IN FTVCOMM.FTVCOMM_TERM_DATE%TYPE default null,
                        p_ftvcomm_rec_out IN OUT COMMODITY_REC,
                        p_error_msg_out   OUT VARCHAR2)

Checks to see if a record exists.

Parameters
p_code   The commodity code. VARCHAR2(10)  Required.
p_eff_date   The effective date of the commodity. Date.
p_term_date   The termination date of the commodity. Date.
p_ftvcomm_rec_out   The commodity record. COMMODITY_REC Required.
p_error_msg_out   The error message to get out. VARCHAR2  Required.


p_lock

Procedure p_lock(p_code  FTVCOMM.FTVCOMM_CODE%TYPE,
                 p_rowid VARCHAR2 DEFAULT NULL)

Locks commodity record for update.

Parameters
p_code   The commodity code. VARCHAR2(10)  Required.
p_rowid   The rowid of the commodity record. VARCHAR2.


p_delete

Procedure p_delete(p_code  FTVCOMM.FTVCOMM_CODE%TYPE,
                   p_rowid VARCHAR2 DEFAULT NULL)

Deletes a commodity record.

Parameters
p_code   The commodity code. VARCHAR2(10)  Required.
p_rowid   The rowid of the commodity record. VARCHAR2.


p_create

Procedure p_create(p_code             FTVCOMM.FTVCOMM_CODE%TYPE,
                   p_eff_date         FTVCOMM.FTVCOMM_EFF_DATE%TYPE,
                   p_activity_date    FTVCOMM.FTVCOMM_ACTIVITY_DATE%TYPE,
                   p_user_id          FTVCOMM.FTVCOMM_USER_ID%TYPE,
                   p_desc             FTVCOMM.FTVCOMM_DESC%TYPE,
                   p_uoms_code        FTVCOMM.FTVCOMM_UOMS_CODE%TYPE,
                   p_term_date        FTVCOMM.FTVCOMM_TERM_DATE%TYPE,
                   p_comm_code_pred   FTVCOMM.FTVCOMM_COMM_CODE_PRED%TYPE,
                   p_amst_ind         FTVCOMM.FTVCOMM_AMST_IND%TYPE,
                   p_tgrp_code        FTVCOMM.FTVCOMM_TGRP_CODE%TYPE,
                   p_tax_override_ind FTVCOMM.FTVCOMM_TAX_OVERRIDE_IND%TYPE,
                   p_stock_ind        FTVCOMM.FTVCOMM_STOCK_IND%TYPE,
                   p_onorder_qty      FTVCOMM.FTVCOMM_ONORDER_QTY%TYPE,
                   p_reserved_qty     FTVCOMM.FTVCOMM_RESERVED_QTY%TYPE,
                   p_invoiced_qty     FTVCOMM.FTVCOMM_NOT_INVOICED_QTY%TYPE,
                   p_value_amt        FTVCOMM.FTVCOMM_TOTAL_VALUE_AMT%TYPE,
                   p_est_life_years   FTVCOMM.FTVCOMM_EST_LIFE_YEARS%TYPE,
                   p_rowid            OUT VARCHAR2)

Creates a commodity record.

Parameters
p_code   The commodity code. VARCHAR2(10)  Required.
p_eff_date   The effective date of the commodity. Date.
p_activity_date   Activity date.  Date  Required.
p_user_id   The user ID.  VARCHAR2(30)  Required.
p_desc   Commodity description.  VARCHAR2(50)  Required.
p_uoms_code   Unit of measure code.  VARCHAR2(3)  Required.
p_term_date   Commodity termination date.  Date  Required.
p_comm_code_pred   Commodity code Predesessor.  VARCHAR2(10)  Required.
p_amst_ind   Fixed asset indicator.  VARCHAR2(1)  Required.
p_tgrp_code   Tax group code.  VARCHAR2(4)  Required.
p_tax_override_ind   Tax override indicator.  VARCHAR2(1)  Required.
p_stock_ind   Stock indicator.  VARCHAR2(1)  Required.
p_onorder_qty   On order quantity.  NUMBER(17,2)  Required.
p_reserved_qty   Reserved quantity.  NUMBER(17,2)  Required.
p_invoiced_qty   Not invoiced quantity.  NUMBER(17,2)  Required.
p_value_amt   Total value amount.  NUMBER(17,2)  Required.
p_est_life_years   Estimated life in years.  NUMBER(4)  Required.
p_rowid   The rowid of the commodity record.  VARCHAR2  Required.


p_update

Procedure p_update(p_code             FTVCOMM.FTVCOMM_CODE%TYPE,
                   p_eff_date         FTVCOMM.FTVCOMM_EFF_DATE%TYPE,
                   p_activity_date    FTVCOMM.FTVCOMM_ACTIVITY_DATE%TYPE,
                   p_user_id          FTVCOMM.FTVCOMM_USER_ID%TYPE,
                   p_desc             FTVCOMM.FTVCOMM_DESC%TYPE,
                   p_uoms_code        FTVCOMM.FTVCOMM_UOMS_CODE%TYPE,
                   p_term_date        FTVCOMM.FTVCOMM_TERM_DATE%TYPE,
                   p_comm_code_pred   FTVCOMM.FTVCOMM_COMM_CODE_PRED%TYPE,
                   p_amst_ind         FTVCOMM.FTVCOMM_AMST_IND%TYPE,
                   p_tgrp_code        FTVCOMM.FTVCOMM_TGRP_CODE%TYPE,
                   p_tax_override_ind FTVCOMM.FTVCOMM_TAX_OVERRIDE_IND%TYPE,
                   p_stock_ind        FTVCOMM.FTVCOMM_STOCK_IND%TYPE,
                   p_onorder_qty      FTVCOMM.FTVCOMM_ONORDER_QTY%TYPE,
                   p_reserved_qty     FTVCOMM.FTVCOMM_RESERVED_QTY%TYPE,
                   p_invoiced_qty     FTVCOMM.FTVCOMM_NOT_INVOICED_QTY%TYPE,
                   p_value_amt        FTVCOMM.FTVCOMM_TOTAL_VALUE_AMT%TYPE,
                   p_est_life_years   FTVCOMM.FTVCOMM_EST_LIFE_YEARS%TYPE,
                   p_rowid            VARCHAR2 DEFAULT NULL)

Updates a commodity record.

Parameters
p_code   The commodity code. VARCHAR2(10)  Required.
p_eff_date   The effective date of the commodity. Date.
p_activity_date   Activity date.  Date  Required.
p_user_id   The user ID.  VARCHAR2(30)  Required.
p_desc   Commodity description.  VARCHAR2(50)  Required.
p_uoms_code   Unit of measure code.  VARCHAR2(3)  Required.
p_term_date   Commodity termination date.  Date  Required.
p_comm_code_pred   Commodity code Predesessor.  VARCHAR2(10)  Required.
p_amst_ind   Fixed asset indicator.  VARCHAR2(1)  Required.
p_tgrp_code   Tax group code.  VARCHAR2(4)  Required.
p_tax_override_ind   Tax override indicator.  VARCHAR2(1)  Required.
p_stock_ind   Stock indicator.  VARCHAR2(1)  Required.
p_onorder_qty   On order quantity.  NUMBER(17,2)  Required.
p_reserved_qty   Reserved quantity.  NUMBER(17,2)  Required.
p_invoiced_qty   Not invoiced quantity.  NUMBER(17,2)  Required.
p_value_amt   Total value amount.  NUMBER(17,2)  Required.
p_est_life_years   Estimated life in years.  NUMBER(4)  Required.
p_rowid   The rowid of the commodity record.  VARCHAR2  Required.