index

Package BANINST1.fp_encumbrance

Process API for Encumbrances (ENCUMBRANCE).


Program units
f_fgbencp_exists   Checks if encumbrance has been posted or rolled.
f_get_item_description   Returns a description for an item of an encumbrance.
p_cancel_change   Cancels change request initiated on a General Encumbrance.
p_complete   Completes a General Encumbrance and forwards to the next step.
p_delete_encumbrance   Delete a General Encumbrance document.
p_register_entity   Register an Event in the processing of a General Encumbrance.
p_validate_detail   Validate all detail records.


f_fgbencp_exists

Function f_fgbencp_exists(p_num     fgbencp.fgbencp_num%TYPE,
                          p_item    fgbencp.fgbencp_item%TYPE DEFAULT NULL,
                          p_seq_num fgbencp.fgbencp_seq_num%TYPE DEFAULT NULL,
                          p_fsyr    fgbencp.fgbencp_fsyr_code%TYPE DEFAULT NULL)
  RETURN VARCHAR2

Checks if encumbrance has been posted or rolled.
 
If only p_num is populated, returns Y if the encumbrance posted in any Fiscal Year.
If p_item and p_seq_num are populated, returns Y if the specified sequence posted in any Fiscal Year.
If p_fsyr is populated, returns Y if the encumbrance posted or rolled into the Fiscal Year specified.

Parameters
p_num   The unique identifier of an Encumbrance document.  VARCHAR2(8) Required Key
p_item   The reference number which associates an accounting record to a related item. NUMBER(4)
p_seq_num   The unique sequence number associated with the Item Number of the accounting record. NUMBER(4)
p_fsyr   The Fiscal Year in which the Encumbrance must be recorded. VARCHAR2(2)

Returns
Y if a record meets the criteria, or N.


f_get_item_description

Function f_get_item_description(p_doc_num    fgbench.fgbench_num%TYPE,
                                p_item       fgbencd.fgbencd_item%TYPE,
                                p_type       fgbench.fgbench_type%TYPE,
                                p_source_ind fgbench.fgbench_source_ind%TYPE DEFAULT NULL)
  RETURN VARCHAR2

Returns a description for an item of an encumbrance.
 
Function will look to the appropriate source document to find the description for Requisitions, Purchase Orders, and General Encumbrances.

Parameters
p_doc_num   The unique identifier of an Encumbrance. VARCHAR2(8) Required Key
p_item   Encumbrance detail item number. NUMBER(4) Required Key
p_type   Encumbrance document type of encumbrance or the source of the encumbrance.  VARCHAR2(1) Required
E   General Encumbrance
M   Memo
L   Labor
R   Requisition
P   Purchase Order
T   Travel Module

p_source_ind   Encumbrance Document Source Indicator. VARCHAR2(1)
NULL   General Encumbrance
R   Requisition
P   Purchase Order
T   Travel Module


Returns
Description of the item.  VARCHAR2(50)


p_cancel_change

Procedure p_cancel_change(p_num            fgbench.fgbench_num%TYPE,
                          p_doc_change_num fgbench.fgbench_doc_change_num%TYPE)

Cancels change request initiated on a General Encumbrance.
 
Any detail rows which have never been posted are deleted, and detail rows which were previously posted and have pending amounts are reset to NULL pending amount.  Available balance is adjusted in both cases. The header status is reset to (C)omplete, approval to Y, and the document change number and description to NULL.

Parameters
p_num   The unique identifier of a General Encumbrance document. VARCHAR2(8) Required Key
p_doc_change_num   The user-defined document change number. VARCHAR2(8) Required Key


p_complete

Procedure p_complete(p_num                fgbench.fgbench_num%TYPE,
                     p_complete_requested VARCHAR2 DEFAULT 'Y',
                     p_user_id            fgbench.fgbench_user_id%TYPE DEFAULT gb_common.f_sct_user,
                     p_rowid              gb_common.internal_record_id_type DEFAULT NULL,
                     p_success_msg_out    OUT gb_common_strings.err_type,
                     p_warn_msg_out       OUT gb_common_strings.err_type)

Completes a General Encumbrance and forwards to the next step.

Parameters
p_num   The unique identifier of a General Encumbrance document. VARCHAR2(8) Required Key
p_complete_requested   Designate whether document is to be left in progress, or completed and forwarded. VARCHAR2(1)
Y   Change status to Complete if no errors, and forward to the next processing step.
N   Validate balance and matching of asset class only, and leave Encumbrance as work in progress.

p_user_id   The identification code of the user requesting that the document be completed. VARCHAR2(30)
p_rowid   Database ROWID of the General Encumbrance Header record. VARCHAR2(18)
p_success_msg_out   A return message regarding disposition of the document. VARCHAR2(255)
p_warn_msg_out   An informational return message which may warn of data inconsistencies. VARCHAR2(255)


p_delete_encumbrance

Procedure p_delete_encumbrance(p_num fgbench.fgbench_num%TYPE)

Delete a General Encumbrance document.
 
All detail records, header text, and the header record will be deleted, if the encumbrance has never been posted.

Parameters
p_num   The unique identifier of a General Encumbrance document. VARCHAR2(8) Required Key


p_register_entity

Procedure p_register_entity(p_num   fgbench.fgbench_num%TYPE,
                            p_event VARCHAR2)

Register an Event in the processing of a General Encumbrance.
 
Note that this procedure will provide Event Registration in a future release, and does not currently perform any activity.

Parameters
p_num   The unique identifier of a General Encumbrance document. VARCHAR2(8) Required Key
p_event   The change which has been made to the General Encumbrance which is to be registered. VARCHAR2


p_validate_detail

Procedure p_validate_detail(p_num        fgbench.fgbench_num%TYPE,
                            p_user_id    fgbench.fgbench_user_id%TYPE DEFAULT gb_common.f_sct_user,
                            p_dist_total VARCHAR2 DEFAULT NULL,
                            p_header_rec fb_encumbrance_header.encumbrance_header_rec DEFAULT NULL)

Validate all detail records.
 
This procedure may be called, after changing the amount of the General Encumbrance header record, to update detail records with a new amount based on the Distribution Percent.
 
If errors (including non-sufficent funds) are encountered in the detail records, they will not be raised by this procedure.  However, the status indicator of the record will be set to E (error) or N (NSF) as required.
 
Note that the User Id is changed in the records, and the Fiscal Year and Period are updated to reflect the current transaction date.

Parameters
p_num   The unique identifier of a General Encumbrance document. VARCHAR2(8) Required Key
p_user_id   The identification code of the user requesting validation of the document. VARCHAR2(30)
p_dist_total   Request to redistribute Encumbrance Total. VARCHAR2
Y   Change transaction amount on each detail record using Distribution Percent multiplied by Document Amount