index

Package BANINST1.fpkreqn

Common routines for requisition (FPKREQN).


Program units
f_fpbreqh_ref   Selects requisition header record.
f_fprreqd_ref   Selects requisition item records.
f_fprreqa_ref   Selects requisition accounting records.
p_create_req   Creates a complete set of requisition records.
p_complete_req   Performs a full set of validations to complete a requisition.
p_scrub_header   Scrubs the requisition header values.
p_validate_header   Validates the requisition header data.
p_create_header   Creates requisition header record using passed in req_headentry_rectype.
p_create_header   Creates requisition header record using passed in reqh_headentry_rectype.
p_scrub_item   Scrubs the requisition item values.
P_validate_item   Validates requisition item data.
p_create_item   Creates requisition item record using passed in reqd_itemsentry_rectype.
p_create_item   Creates requisition item record using passed in req_itemsentry_rectype.
p_scrub_acctg   Scrubs the requisition accounting values.
p_validate_acctg   Validates requisition accounting data.
p_create_acctg   Creates requisition accounting record using passed in req_acctgentry_rectype.
p_create_acctg   Creates requisition accounting record using passed in reqa_acctgentry_rectype.

Types
req_headentry_rectype   Requisition header data entry record type
req_itemsentry_rectype   Requisition item data entry record type
req_acctgentry_rectype   Requisition accounting data entry record type
req_itemsentry_tabtype   Requisition item data entry table type
req_acctgentry_tabtype   Requisition accounting data entry table type
reqh_headentry_rectype   Requisition header record type
reqd_itemsentry_rectype   Requisition item record type
reqa_acctgentry_rectype   Requisition accounting record type
reqd_itemsentry_tabtype   Requisition item table type for reqd_itemsentry_rectype
reqa_acctgentry_tabtype   Requisition accounting table type for reqa_acctgentry_rectype
fprreqd_tabletype   Requisition item table type for rowtype
fprreqa_tabletype   Requisition accounting table type for rowtype


req_headentry_rectype

TYPE req_headentry_rectype IS RECORD (
    req_code                  Fpkutil.max_data_entry ,
    req_userid                Fpkutil.max_data_entry,
    req_order_date            Fpkutil.max_data_entry,
    req_trans_date            Fpkutil.max_data_entry,
    req_vend_id               Fpkutil.max_data_entry,
    req_addr_type             Fpkutil.max_data_entry,
    req_addr_seq_no           Fpkutil.max_data_entry,
    req_deliv_date            Fpkutil.max_data_entry,
    req_coas                  Fpkutil.max_data_entry,
    req_orgn                  Fpkutil.max_data_entry,
    req_ship_code             Fpkutil.max_data_entry,
    req_disc_code             Fpkutil.max_data_entry,
    req_print_text            fottext.fottext_text%TYPE,
    req_noprint_text          fottext.fottext_text%TYPE,
    req_tgrp_code             Fpkutil.max_data_entry,
    req_curr_code             Fpkutil.max_data_entry,
    req_acctg_type            Fpkutil.max_data_entry,
    req_email_addr            Fpkutil.max_data_entry,
    req_fax_area              Fpkutil.max_data_entry,
    req_fax_number            Fpkutil.max_data_entry,
    req_fax_ext               Fpkutil.max_data_entry,
    req_attn_to               Fpkutil.max_data_entry,
    req_vend_contact          Fpkutil.max_data_entry,
    req_deliv_comment         Fpkutil.max_data_entry,
    req_vend_email            Fpkutil.max_data_entry,
    req_requestor             Fpkutil.max_data_entry,
    req_phone_area            Fpkutil.max_data_entry,
    req_phone_num             Fpkutil.max_data_entry,
    req_phone_ext             Fpkutil.max_data_entry,
    req_edi_ind               Fpkutil.max_data_entry,
    req_ftrm_code             Fpkutil.max_data_entry,
    req_origin                Fpkutil.max_data_entry,
    req_type                  Fpkutil.max_data_entry,
    req_doc_ref               fpkutil.max_data_entry,
    req_ctry_code_phone       Fpkutil.max_data_entry,
    req_ctry_code_fax         Fpkutil.max_data_entry
);

Requisition header data entry record type


req_itemsentry_rectype

TYPE req_itemsentry_rectype IS RECORD (
   req_code             Fpkutil.max_data_entry,
   req_itemnum          Fpkutil.max_data_entry,
   req_comm_code        Fpkutil.max_data_entry,
   req_comm_desc        Fpkutil.max_data_entry,
   req_uom              Fpkutil.max_data_entry,
   req_unit_price       Fpkutil.max_data_entry,
   req_quantity         Fpkutil.max_data_entry,
   req_disc_amt         Fpkutil.max_data_entry,
   req_addl_amt         Fpkutil.max_data_entry,
   req_tax_amt          Fpkutil.max_data_entry,
   req_tgrp_code        Fpkutil.max_data_entry,
   req_ship_code        Fpkutil.max_data_entry,
   req_deliv_date       Fpkutil.max_data_entry,
   req_print_text       fottext.fottext_text%TYPE,
   req_noprint_text     fottext.fottext_text%TYPE
);

Requisition item data entry record type


req_acctgentry_rectype

TYPE req_acctgentry_rectype IS RECORD (
   req_code             FPKUTIL.MAX_DATA_ENTRY,
   req_seqitem          FPKUTIL.MAX_DATA_ENTRY,
   req_seqnum           FPKUTIL.MAX_DATA_ENTRY,
   req_acctg_amt        FPKUTIL.MAX_DATA_ENTRY,
   req_disc_amt         FPKUTIL.MAX_DATA_ENTRY,
   req_tax_amt          FPKUTIL.MAX_DATA_ENTRY,
   req_addl_amt         FPKUTIL.MAX_DATA_ENTRY,
   req_coas             FPKUTIL.MAX_DATA_ENTRY,
   req_acci             FPKUTIL.MAX_DATA_ENTRY,
   req_fund             FPKUTIL.MAX_DATA_ENTRY,
   req_orgn             FPKUTIL.MAX_DATA_ENTRY,
   req_acct             FPKUTIL.MAX_DATA_ENTRY,
   req_prog             FPKUTIL.MAX_DATA_ENTRY,
   req_actv             FPKUTIL.MAX_DATA_ENTRY,
   req_locn             FPKUTIL.MAX_DATA_ENTRY,
   req_nsf_override     FPKUTIL.MAX_DATA_ENTRY,
   req_percent_dist     FPKUTIL.MAX_DATA_ENTRY
);

Requisition accounting data entry record type


req_itemsentry_tabtype

TYPE req_itemsentry_tabtype IS TABLE OF req_itemsentry_rectype ;

Requisition item data entry table type


req_acctgentry_tabtype

TYPE req_acctgentry_tabtype IS TABLE OF req_acctgentry_rectype;

Requisition accounting data entry table type


reqh_headentry_rectype

TYPE reqh_headentry_rectype IS RECORD (
   p_code                FPBREQH.FPBREQH_code%TYPE ,
   p_user_id             FPBREQH.FPBREQH_USER_ID%TYPE DEFAULT USER,
   p_reqh_date           FPBREQH.FPBREQH_reqh_DATE%TYPE DEFAULT SYSDATE,
   p_trans_date          FPBREQH.FPBREQH_TRANS_DATE%TYPE DEFAULT SYSDATE,
   p_vendor_id           SPRIDEN.SPRIDEN_ID%TYPE  ,
   p_atyp_code           FPBREQH.FPBREQH_ATYP_CODE%TYPE  ,
   p_atyp_seq_num        FPBREQH.FPBREQH_ATYP_SEQ_NUM%TYPE  ,
   p_reqd_date           FPBREQH.FPBREQH_REQD_DATE%TYPE  ,
   p_coas_code           FPBREQH.FPBREQH_COAS_CODE%TYPE  ,
   p_orgn_code           FPBREQH.FPBREQH_ORGN_CODE%TYPE  ,
   p_ship_code           FPBREQH.FPBREQH_SHIP_CODE%TYPE  ,
   p_disc_code           FPBREQH.FPBREQH_DISC_CODE%TYPE  ,
   p_print_text          FOTTEXT.FOTTEXT_TEXT%TYPE,
   p_noprint_text        FOTTEXT.FOTTEXT_TEXT%TYPE,
   p_tgrp_code           FPBREQH.FPBREQH_TGRP_CODE%TYPE  ,
   p_curr_code           FPBREQH.FPBREQH_CURR_CODE%TYPE  ,
   p_single_acctg_ind    FPBREQH.FPBREQH_SINGLE_ACCTG_IND%TYPE  ,
   p_email_addr          FPBREQH.FPBREQH_EMAIL_ADDR%TYPE  ,
   p_fax_area            FPBREQH.FPBREQH_FAX_AREA%TYPE  ,
   p_fax_number          FPBREQH.FPBREQH_FAX_NUMBER%TYPE  ,
   p_fax_ext             FPBREQH.FPBREQH_FAX_EXT%TYPE  ,
   p_attention_to        FPBREQH.FPBREQH_ATTENTION_TO%TYPE  ,
   p_vendor_contact      FPBREQH.FPBREQH_VENDOR_CONTACT%TYPE  ,
   p_delivery_comment    FPBREQH.FPBREQH_DELIVERY_COMMENT%TYPE  ,
   p_vend_email_addr     FPBREQH.FPBREQH_VEND_EMAIL_ADDR%TYPE  ,
   p_name                FPBREQH.FPBREQH_NAME%TYPE  ,
   p_phone_area          FPBREQH.FPBREQH_PHONE_AREA%TYPE  ,
   p_phone_num           FPBREQH.FPBREQH_PHONE_NUM%TYPE  ,
   p_phone_ext           FPBREQH.FPBREQH_PHONE_EXT%TYPE  ,
   p_origin_code         FPBREQH.FPBREQH_ORIGIN_CODE%TYPE DEFAULT 'BANNER',
   p_rqst_type_ind       FPBREQH.FPBREQH_rqst_TYPE_IND%TYPE DEFAULT 'P',
   p_doc_ref_code        FPBREQH.FPBREQH_DOC_REF_CODE%TYPE,
   p_ctry_code_phone     FPBREQH.FPBREQH_ctry_code_phone%TYPE,
   p_ctry_code_fax       FPBREQH.FPBREQH_ctry_code_fax%TYPE
 );

Requisition header record type


reqd_itemsentry_rectype

TYPE reqd_itemsentry_rectype  IS  RECORD (
     p_code                   FPRREQD.FPRREQD_reqh_CODE%TYPE,
     p_item                   FPRREQD.FPRREQD_ITEM%TYPE  ,
     p_comm_code              FPRREQD.FPRREQD_COMM_CODE%TYPE  ,
     p_comm_desc              FPRREQD.FPRREQD_COMM_DESC%TYPE  ,
     p_uoms_code              FPRREQD.FPRREQD_UOMS_CODE%TYPE  ,
     p_unit_price             FPRREQD.FPRREQD_UNIT_PRICE%TYPE  ,
     p_qty                    FPRREQD.FPRREQD_QTY%TYPE  ,
     p_disc_amt               FPRREQD.FPRREQD_DISC_AMT%TYPE  ,
     p_addl_chrg_amt          FPRREQD.FPRREQD_ADDL_CHRG_AMT%TYPE  ,
     p_tax_amt                FPRREQD.FPRREQD_TAX_AMT%TYPE  ,
     p_tgrp_code              FPRREQD.FPRREQD_TGRP_CODE%TYPE  ,
     p_ship_code              FPRREQD.FPRREQD_SHIP_CODE%TYPE  ,
     p_reqd_date              FPRREQD.FPRREQD_REQD_DATE%TYPE   ,
     p_print_text             FOTTEXT.FOTTEXT_TEXT%TYPE,
     p_noprint_text           FOTTEXT.FOTTEXT_TEXT%TYPE
  );

Requisition item record type


reqa_acctgentry_rectype

TYPE reqa_acctgentry_rectype IS RECORD (
   p_code                   FPRREQA.FPRREQA_reqh_CODE%TYPE  ,
   p_item                   FPRREQA.FPRREQA_ITEM%TYPE  ,
   p_seq_num                FPRREQA.FPRREQA_SEQ_NUM%TYPE  ,
   p_amt                    FPRREQA.FPRREQA_AMT%TYPE  ,
   p_disc_amt               FPRREQA.FPRREQA_DISC_AMT%TYPE  ,
   p_tax_amt                FPRREQA.FPRREQA_TAX_AMT%TYPE  ,
   p_addl_chrg_amt          FPRREQA.FPRREQA_ADDL_CHRG_AMT%TYPE  ,
   p_coas_code              FPRREQA.FPRREQA_COAS_CODE%TYPE  ,
   p_acci_code              FPRREQA.FPRREQA_ACCI_CODE%TYPE  ,
   p_fund_code              FPRREQA.FPRREQA_FUND_CODE%TYPE  ,
   p_orgn_code              FPRREQA.FPRREQA_ORGN_CODE%TYPE  ,
   p_acct_code              FPRREQA.FPRREQA_ACCT_CODE%TYPE  ,
   p_prog_code              FPRREQA.FPRREQA_PROG_CODE%TYPE  ,
   p_actv_code              FPRREQA.FPRREQA_ACTV_CODE%TYPE  ,
   p_locn_code              FPRREQA.FPRREQA_LOCN_CODE%TYPE  ,
   p_proj_code              FPRREQA.FPRREQA_PROJ_CODE%TYPE  ,
   p_nsf_override_ind       FPRREQA.FPRREQA_NSF_OVERRIDE_IND%TYPE  ,
   p_pct                    FPRREQA.FPRREQA_PCT%TYPE  ,
   p_disc_amt_pct           FPRREQA.FPRREQA_DISC_AMT_PCT%TYPE  ,
   p_addl_amt_pct           FPRREQA.FPRREQA_ADDL_AMT_PCT%TYPE  ,
   p_tax_amt_pct            FPRREQA.FPRREQA_TAX_AMT_PCT%TYPE
);

Requisition accounting record type


reqd_itemsentry_tabtype

TYPE reqd_itemsentry_tabtype IS TABLE OF reqd_itemsentry_rectype;

Requisition item table type for reqd_itemsentry_rectype


reqa_acctgentry_tabtype

TYPE reqa_acctgentry_tabtype IS TABLE OF reqa_acctgentry_rectype;

Requisition accounting table type for reqa_acctgentry_rectype


fprreqd_tabletype

TYPE fprreqd_tabletype     IS TABLE OF FPRREQD%ROWTYPE;

Requisition item table type for rowtype


fprreqa_tabletype

TYPE fprreqa_tabletype     IS TABLE OF FPRREQA%ROWTYPE;

Requisition accounting table type for rowtype


f_fpbreqh_ref

Function f_fpbreqh_ref(req_code FPBREQH.FPBREQH_code%TYPE)
  RETURN foksels.ref_cursortype

Selects requisition header record.


f_fprreqd_ref

Function f_fprreqd_ref(req_code     FPRREQD.FPRREQD_reqh_code%TYPE,
                       req_item_num FPRREQD.FPRREQD_item%TYPE DEFAULT NULL)
  RETURN foksels.ref_cursortype

Selects requisition item records.


f_fprreqa_ref

Function f_fprreqa_ref(req_code     FPRREQA.FPRREQA_reqh_code%TYPE,
                       req_item_num FPRREQA.FPRREQA_item%TYPE DEFAULT NULL,
                       req_seq_num  FPRREQA.FPRREQA_seq_num%TYPE DEFAULT NULL)
  RETURN foksels.ref_cursortype

Selects requisition accounting records.


p_create_req

Procedure p_create_req(req_headentry_rec    REQ_HEADENTRY_RECTYPE DEFAULT NULL,
                       req_itemsentry_table REQ_ITEMSENTRY_TABTYPE DEFAULT NULL,
                       req_acctgentry_table REQ_ACCTGENTRY_TABTYPE DEFAULT NULL,
                       error_mesg_table     IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                       success_message      IN OUT VARCHAR2)

Creates a complete set of requisition records.


p_complete_req

Procedure p_complete_req(req_code           FPBREQH.FPBREQH_CODE%TYPe,
                         error_mesg         IN OUT FPKUTIL.ERROR_MESG_TABTYpe,
                         success_mesg       IN OUT VARCHAR2,
                         final_req_code     OUT FPBREQH.FPBREQH_CODE%TYPe,
                         gen_seqn_for_eproc BOOLEAN DEFAULT TRUE)

Performs a full set of validations to complete a requisition.


p_scrub_header

Procedure p_scrub_header(in_req_headrec   REQ_HEADENTRY_RECTYPE,
                         out_reqh_headrec IN OUT REQH_HEADENTRY_RECTYPE,
                         error_mesg       IN OUT FPKUTIL.ERROR_MESG_TABTYPE)

Scrubs the requisition header values.


p_validate_header

Procedure p_validate_header(reqh_header_data REQH_HEADENTRY_RECTYPE DEFAULT NULL,
                            fpbreqh_data     IN OUT FPBREQH%ROWTYPE,
                            error_mesg       IN OUT FPKUTIL.ERROR_MESG_TABTYPE)

Validates the requisition header data.


p_create_header

Procedure p_create_header(req_head_entry REQ_HEADENTRY_RECTYPE,
                          error_mesg     IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                          req_doc_code   IN OUT FPBREQH.FPBREQH_CODE%TYPE)

Creates requisition header record using passed in req_headentry_rectype.


p_create_header

Procedure p_create_header(reqh_head_entry REQH_HEADENTRY_RECTYPE,
                          error_mesg      IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                          req_doc_code    IN OUT FPBREQH.FPBREQH_CODE%TYPE)

Creates requisition header record using passed in reqh_headentry_rectype.


p_scrub_item

Procedure p_scrub_item(in_req_item_rec REQ_ITEMSENTRY_RECTYPE,
                       out_reqdt_rec   IN OUT REQD_ITEMSENTRY_RECTYPE,
                       error_mesg      IN OUT FPKUTIL.ERROR_MESG_TABTYPE)

Scrubs the requisition item values.


P_validate_item

Procedure P_validate_item(reqd_entry_rec REQD_ITEMSENTRY_RECTYPE,
                          fprreqd_rec    IN OUT FPRREQD%ROWTYPE,
                          error_mesg     IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                          doc_code       IN FPBREQH.FPBREQH_CODE%TYPE DEFAULT NULL)

Validates requisition item data.


p_create_item

Procedure p_create_item(reqd_item_entry REQD_ITEMSENTRY_RECTYPE,
                        error_mesg      IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                        req_doc_code    FPBREQH.FPBREQH_CODE%TYPE)

Creates requisition item record using passed in reqd_itemsentry_rectype.


p_create_item

Procedure p_create_item(req_item_entry REQ_ITEMSENTRY_RECTYPE,
                        error_mesg     IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                        req_doc_code   FPBREQH.FPBREQH_CODE%TYPE)

Creates requisition item record using passed in req_itemsentry_rectype.


p_scrub_acctg

Procedure p_scrub_acctg(in_req_acctg_rec REQ_ACCTGENTRY_RECTYPE,
                        out_reqda_rec    IN OUT REQA_ACCTGENTRY_RECTYPE,
                        error_mesg       IN OUT FPKUTIL.ERROR_MESG_TABTYPE)

Scrubs the requisition accounting values.


p_validate_acctg

Procedure p_validate_acctg(reqa_entry_rec REQA_ACCTGENTRY_RECTYPE,
                           fprreqa_rec    IN OUT FPRREQA%ROWTYPE,
                           error_mesg     IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                           doc_code       IN FPBREQH.FPBREQH_CODE%TYPE DEFAULT NULL)

Validates requisition accounting data.


p_create_acctg

Procedure p_create_acctg(req_acctg_entry REQ_ACCTGENTRY_RECTYPE,
                         error_mesg      IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                         req_doc_code    FPBREQH.FPBREQH_CODE%TYPE)

Creates requisition accounting record using passed in req_acctgentry_rectype.


p_create_acctg

Procedure p_create_acctg(reqa_acctg_entry REQA_ACCTGENTRY_RECTYPE,
                         error_mesg       IN OUT FPKUTIL.ERROR_MESG_TABTYPE,
                         req_doc_code     FPBREQH.FPBREQH_CODE%TYPE)

Creates requisition accounting record using passed in reqa_acctgentry_rectype.