index

Package BANINST1.fb_purchase_order

Common Business interface for purchase order (FB_PURCHASE_ORDER).


Program units
f_current_version   Returns the current version number.
f_exists_header   Checks to see if a purchase order header record exists.
f_is_po_inventory   Checks to see if a purchase order in an inventory order.
f_query_one_header   Selects one record using unique columns.
f_query_all_header   Selects all PO header records for this PO code.
p_lock_header   Locks a PO header record for update.
p_delete_header   Deletes a PO header record.
p_create_header   Creates a Purchase order header record.
p_update_header   Updates a Purchase order header record.
p_update_header_status   Updates Purchase order header status.
p_validate_header   Validates a Purchase order header record.
f_exists_item   Checks to see if a purchase order item record exists.
f_query_one_item   Selects one item record using unique columns.
f_query_all_item   Selects all the item records for the purchase order.
f_query_open_items   Selects the open item records for the purchase order.
p_lock_item   Locks an item record for update.
p_delete_item   Deletes an item record.
p_create_item   Creates an item record.
p_update_item   Updates an item record.
p_validate_item   Validates an item record.
f_exists_accounting   Checks to see if a purchase order accounting record exists.
f_query_one_accounting   Selects one accounting record using unique columns.
f_query_open_accounting   Selects the open accounting records.
f_query_all_accounting   Selects all the records for the purchase order accounting item.
p_lock_accounting   Locks an accounting record for update.
p_delete_accounting   Deletes an accounting record.
p_create_accounting   Creates an accounting record.
P_update_accounting   Updates an accounting record.
p_validate_accounting   Validates an accounting record.
f_complete_order   Wrap up logic for document completion.
f_change_order_in_process   To test PO has receiving, invoicing and returns document
f_get_tax_amts_and_budg_auth   Wrap up logic to perform completion logic and get tax amounts
f_po_posted   Checks to see if a purchase order is posted.
f_po_status   Checks the purchase order status.
f_is_eproc_po   Checks to see if the purchase order is an e-Procurement purchase order.
f_doc_ref_code_exists   Checks to see if a purchase order reference code exists.
f_doc_code_exists   Checks to see if a purchase order code exists.
f_document_ref_code_exists   Checks to see if a purchase order reference code exists.
f_get_doc_ref_code   Selects a purchase order reference code.
f_get_doc_code   Selects a purchase order code.
f_get_cancel_mesg   Selects a purchase order cancellation message.
f_get_status_code   Selects a purchase order status code.
f_is_co_acceptable   Verifies change order is acceptable for the Purchase order number.

Types
order_header_rec   Purchase order header record type
order_header_ref   Purchase order header reference cursor
order_header_tab   Purchase order header table type
order_item_rec   Purchase order item record type
order_item_ref   Purchase order item reference cursor
order_item_tab   Purchase order item table type
order_accounting_rec   Purchase order accounting record type
order_accounting_ref   Purchase order accounting reference cursor
order_accounting_tab   Purchase order accounting table type

Constants
READY_FOR_DISPATCH   Ready for dispatch indicator
PENDING   Pending indicator
DISPATCHED   Dispatch indicator
CANCELLED   Cancelled indicator
CANCEL_MESG   Cancel message
CANCEL_CODE   Cancel code


READY_FOR_DISPATCH

READY_FOR_DISPATCH   CONSTANT VARCHAR2(1) := 'R';

Ready for dispatch indicator


PENDING

PENDING              CONSTANT VARCHAR2(1) := 'P';

Pending indicator


DISPATCHED

DISPATCHED           CONSTANT VARCHAR2(1) := 'D';

Dispatch indicator


CANCELLED

CANCELLED            CONSTANT VARCHAR2(1) := 'C';

Cancelled indicator


CANCEL_MESG

CANCEL_MESG          CONSTANT VARCHAR2(100) :=
G$_NLS.Get('FPKB_ORDER0-0000', 'SQL','This Document will be cancelled since it has originated from an external E-Procurement system.') ;

Cancel message


CANCEL_CODE

CANCEL_CODE          CONSTANT VARCHAR2(4) := 'EPCN';

Cancel code


order_header_rec

TYPE order_header_rec IS RECORD (
            code                   FPBPOHD.FPBPOHD_CODE%TYPE ,
            change_seq_num         FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE ,
            activity_date          FPBPOHD.FPBPOHD_ACTIVITY_DATE%TYPE ,
            user_id                FPBPOHD.FPBPOHD_USER_ID%TYPE ,
            po_date                FPBPOHD.FPBPOHD_PO_DATE%TYPE ,
            trans_date             FPBPOHD.FPBPOHD_TRANS_DATE%TYPE ,
            blanket_code           FPBPOHD.FPBPOHD_BLANKET_CODE%TYPE ,
            blanket_ind            FPBPOHD.FPBPOHD_BLANKET_IND%TYPE ,
            blanket_term_date      FPBPOHD.FPBPOHD_BLANKET_TERM_DATE%TYPE ,
            closed_ind             FPBPOHD.FPBPOHD_CLOSED_IND%TYPE ,
            complete_ind           FPBPOHD.FPBPOHD_COMPLETE_IND%TYPE ,
            print_ind              FPBPOHD.FPBPOHD_PRINT_IND%TYPE ,
            po_printed_date        FPBPOHD.FPBPOHD_PO_PRINTED_DATE%TYPE ,
            vend_pidm              FPBPOHD.FPBPOHD_VEND_PIDM%TYPE ,
                                                             
            atyp_code              FPBPOHD.FPBPOHD_ATYP_CODE%TYPE ,
            atyp_seq_num           FPBPOHD.FPBPOHD_ATYP_SEQ_NUM%TYPE ,
            buyr_code              FPBPOHD.FPBPOHD_BUYR_CODE%TYPE ,
            reqd_date              FPBPOHD.FPBPOHD_REQD_DATE%TYPE ,
            coas_code              FPBPOHD.FPBPOHD_COAS_CODE%TYPE ,
            orgn_code              FPBPOHD.FPBPOHD_ORGN_CODE%TYPE ,
            ship_code              FPBPOHD.FPBPOHD_SHIP_CODE%TYPE ,
            trat_code              FPBPOHD.FPBPOHD_TRAT_CODE%TYPE ,
            fob_code               FPBPOHD.FPBPOHD_FOB_CODE%TYPE ,
            disc_code              FPBPOHD.FPBPOHD_DISC_CODE%TYPE ,
            text_ind               FPBPOHD.FPBPOHD_TEXT_IND%TYPE ,
            clause_ind             FPBPOHD.FPBPOHD_CLAUSE_IND%TYPE ,
            carrier_pidm           FPBPOHD.FPBPOHD_CARRIER_PIDM%TYPE ,
            trsk_code              FPBPOHD.FPBPOHD_TRSK_CODE%TYPE ,
            pmnt_code              FPBPOHD.FPBPOHD_PMNT_CODE%TYPE ,
            prt_ack                FPBPOHD.FPBPOHD_PRT_ACK%TYPE ,
            ack_date               FPBPOHD.FPBPOHD_ACK_DATE%TYPE ,
            appr_ind               FPBPOHD.FPBPOHD_APPR_IND%TYPE ,
            rush_ind               FPBPOHD.FPBPOHD_RUSH_IND%TYPE ,
            rexp_date              FPBPOHD.FPBPOHD_REXP_DATE%TYPE ,
            addl_chrg_amt          FPBPOHD.FPBPOHD_ADDL_CHRG_AMT%TYPE ,
            rush_amt               FPBPOHD.FPBPOHD_RUSH_AMT%TYPE ,
            susp_ind               FPBPOHD.FPBPOHD_SUSP_IND%TYPE ,
            susp_ind_addl          FPBPOHD.FPBPOHD_SUSP_IND_ADDL%TYPE ,
            cancel_ind             FPBPOHD.FPBPOHD_CANCEL_IND%TYPE ,
            cancel_date            FPBPOHD.FPBPOHD_CANCEL_DATE%TYPE ,
            post_date              FPBPOHD.FPBPOHD_POST_DATE%TYPE ,
            req_bid_ind            FPBPOHD.FPBPOHD_REQ_BID_IND%TYPE ,
            edit_defer_ind         FPBPOHD.FPBPOHD_EDIT_DEFER_IND%TYPE ,
            pcls_code              FPBPOHD.FPBPOHD_PCLS_CODE%TYPE ,
            tgrp_code              FPBPOHD.FPBPOHD_TGRP_CODE%TYPE ,
            recomm_vend_name       FPBPOHD.FPBPOHD_RECOMM_VEND_NAME%TYPE ,
            curr_code              FPBPOHD.FPBPOHD_CURR_CODE%TYPE ,
            disb_agent_ind         FPBPOHD.FPBPOHD_DISB_AGENT_IND%TYPE ,
            nsf_on_off_ind         FPBPOHD.FPBPOHD_NSF_ON_OFF_IND%TYPE ,
            inventory_po_ind       FPBPOHD.FPBPOHD_INVENTORY_PO_IND%TYPE ,
            single_acctg_ind       FPBPOHD.FPBPOHD_SINGLE_ACCTG_IND%TYPE ,
            doc_cntrl_ind          FPBPOHD.FPBPOHD_DOC_CNTRL_IND%TYPE ,
            tele_code              FPBPOHD.FPBPOHD_TELE_CODE%TYPE ,
            crsn_code              FPBPOHD.FPBPOHD_CRSN_CODE%TYPE ,
            delivery_comment       FPBPOHD.FPBPOHD_DELIVERY_COMMENT%TYPE ,
            email_addr             FPBPOHD.FPBPOHD_EMAIL_ADDR%TYPE ,
            fax_area               FPBPOHD.FPBPOHD_FAX_AREA%TYPE ,
            fax_number             FPBPOHD.FPBPOHD_FAX_NUMBER%TYPE ,
            fax_ext                FPBPOHD.FPBPOHD_FAX_EXT%TYPE ,
            attention_to           FPBPOHD.FPBPOHD_ATTENTION_TO%TYPE ,
            vendor_contact         FPBPOHD.FPBPOHD_VENDOR_CONTACT%TYPE ,
            po_type_ind            FPBPOHD.FPBPOHD_PO_TYPE_IND%TYPE ,
            vend_email_addr        FPBPOHD.FPBPOHD_VEND_EMAIL_ADDR%TYPE ,
            name                   FPBPOHD.FPBPOHD_NAME%TYPE ,
            phone_area             FPBPOHD.FPBPOHD_PHONE_AREA%TYPE ,
            phone_num              FPBPOHD.FPBPOHD_PHONE_NUM%TYPE ,
            phone_ext              FPBPOHD.FPBPOHD_PHONE_EXT%TYPE ,
            copied_from            FPBPOHD.FPBPOHD_COPIED_FROM%TYPE ,
            closed_date            FPBPOHD.FPBPOHD_CLOSED_DATE%TYPE ,
            ftrm_code              FPBPOHD.FPBPOHD_FTRM_CODE%TYPE ,
            edi_ind                FPBPOHD.FPBPOHD_EDI_IND%TYPE ,
            match_required         FPBPOHD.FPBPOHD_MATCH_REQUIRED%TYPE ,
            origin_code            FPBPOHD.FPBPOHD_ORIGIN_CODE%TYPE ,
            doc_ref_code           FPBPOHD.FPBPOHD_DOC_REF_CODE%TYPE,
            po_status              VARCHAR2(1),
            ctry_code_phone        fpbpohd.fpbpohd_ctry_code_phone%TYPE,
            ctry_code_fax          fpbpohd.fpbpohd_ctry_code_fax%TYPE,
            internal_record_id     VARCHAR2(18)
     );

Purchase order header record type


order_header_ref

TYPE order_header_ref IS REF CURSOR RETURN ORDER_HEADER_REC;

Purchase order header reference cursor


order_header_tab

TYPE order_header_tab IS TABLE OF ORDER_HEADER_REC INDEX BY BINARY_INTEGER;

Purchase order header 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_header

Function f_exists_header(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                         p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN BOOLEAN

Checks to see if a purchase order header record exists.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
TRUE if found, otherwise FALSE.


f_is_po_inventory

Function f_is_po_inventory(p_code fpbpohd.fpbpohd_code%TYPE)
  RETURN VARCHAR2

Checks to see if a purchase order in an inventory order.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.

Returns
the value of fpbpohd_inventory_po_ind, Y if it is an inventory PO.


f_query_one_header

Function f_query_one_header(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                            p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN Order_header_REF

Selects one record using unique columns.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
a cursor variable that will fetch exactly one record.


f_query_all_header

Function f_query_all_header(p_code FPBPOHD.FPBPOHD_CODE%TYPE)
  RETURN Order_header_REF

Selects all PO header records for this PO code.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.

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


p_lock_header

Procedure p_lock_header(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                        p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL,
                        p_rowid          VARCHAR2 DEFAULT NULL)

Locks a PO header record for update.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_rowid   Rowid of the PO header record.  VARCHAR2.


p_delete_header

Procedure p_delete_header(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                          p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL,
                          p_rowid          VARCHAR2 DEFAULT NULL)

Deletes a PO header record.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_rowid   Rowid of the PO header record.  VARCHAR2.


p_create_header

Procedure p_create_header(p_code IN OUT fpbpohd.fpbpohd_code%TYPE,
                          -- CO Enhancement Start
                          -- change the p_chanbe_seq_num from implict IN to explicit IN OUT
                          p_change_seq_num IN OUT FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE,
                          -- CO Enhancement End
                          p_user_id           FPBPOHD.FPBPOHD_USER_ID%TYPE Default USER,
                          p_po_date           FPBPOHD.FPBPOHD_PO_DATE%TYPE Default sysdate,
                          p_trans_date        FPBPOHD.FPBPOHD_TRANS_DATE%TYPE Default sysdate,
                          p_vendor_pidm       FPBPOHD.FPBPOHD_VEND_PIDM%TYPE Default NULL,
                          p_atyp_code         FPBPOHD.FPBPOHD_ATYP_CODE%TYPE Default NULL,
                          p_atyp_seq_num      FPBPOHD.FPBPOHD_ATYP_SEQ_NUM%TYPE Default NULL,
                          p_buyr_code         FPBPOHD.FPBPOHD_BUYR_CODE%TYPE DEFAULT NULL,
                          p_reqd_date         FPBPOHD.FPBPOHD_REQD_DATE%TYPE DEFAULT NULL,
                          p_coas_code         FPBPOHD.FPBPOHD_COAS_CODE%TYPE Default NULL,
                          p_orgn_code         FPBPOHD.FPBPOHD_ORGN_CODE%TYPE Default NULL,
                          p_ship_code         FPBPOHD.FPBPOHD_SHIP_CODE%TYPE Default NULL,
                          p_disc_code         FPBPOHD.FPBPOHD_DISC_CODE%TYPE Default NULL,
                          p_print_text        VARCHAR2 Default NULL,
                          p_noprint_text      VARCHAR2 Default NULL,
                          p_tgrp_code         FPBPOHD.FPBPOHD_TGRP_CODE%TYPE Default NULL,
                          p_curr_code         FPBPOHD.FPBPOHD_CURR_CODE%TYPE Default NULL,
                          p_single_acctg_ind  FPBPOHD.FPBPOHD_SINGLE_ACCTG_IND%TYPE Default 'Y',
                          p_email_addr        FPBPOHD.FPBPOHD_EMAIL_ADDR%TYPE Default NULL,
                          p_fax_area          FPBPOHD.FPBPOHD_FAX_AREA%TYPE Default NULL,
                          p_fax_number        FPBPOHD.FPBPOHD_FAX_NUMBER%TYPE Default NULL,
                          p_fax_ext           FPBPOHD.FPBPOHD_FAX_EXT%TYPE Default NULL,
                          p_attention_to      FPBPOHD.FPBPOHD_ATTENTION_TO%TYPE Default NULL,
                          p_vendor_contact    FPBPOHD.FPBPOHD_VENDOR_CONTACT%TYPE Default NULL,
                          p_delivery_comment  FPBPOHD.FPBPOHD_DELIVERY_COMMENT%TYPE Default NULL,
                          p_vend_email_addr   FPBPOHD.FPBPOHD_VEND_EMAIL_ADDR%TYPE Default NULL,
                          p_name              FPBPOHD.FPBPOHD_NAME%TYPE Default NULL,
                          p_phone_area        FPBPOHD.FPBPOHD_PHONE_AREA%TYPE Default NULL,
                          p_phone_num         FPBPOHD.FPBPOHD_PHONE_NUM%TYPE Default NULL,
                          p_phone_ext         FPBPOHD.FPBPOHD_PHONE_EXT%TYPE Default NULL,
                          p_edi_ind           FPBPOHD.FPBPOHD_EDI_IND%TYPE Default NULL,
                          p_ftrm_code         FPBPOHD.FPBPOHD_FTRM_CODE%TYPE Default NULL,
                          p_origin_code       FPBPOHD.FPBPOHD_ORIGIN_CODE%TYPE Default 'BANNER',
                          p_po_type_ind       FPBPOHD.FPBPOHD_PO_TYPE_IND%TYPE Default 'R',
                          p_doc_ref_code      FPBPOHD.FPBPOHD_DOC_REF_CODE%TYPE Default NULL,
                          p_blanket_code      FPBPOHD.FPBPOHD_BLANKET_CODE%TYPE Default NULL,
                          p_blanket_ind       FPBPOHD.FPBPOHD_BLANKET_IND%TYPE Default NULL,
                          p_blanket_term_date FPBPOHD.FPBPOHD_BLANKET_TERM_DATE%TYPE Default NULL,
                          p_closed_ind        FPBPOHD.FPBPOHD_CLOSED_IND%TYPE Default NULL,
                          p_complete_ind      FPBPOHD.FPBPOHD_COMPLETE_IND%TYPE Default NULL,
                          p_print_ind         FPBPOHD.FPBPOHD_PRINT_IND%TYPE Default NULL,
                          p_po_printed_date   FPBPOHD.FPBPOHD_PO_PRINTED_DATE%TYPE Default NULL,
                          p_trat_code         FPBPOHD.FPBPOHD_TRAT_CODE%TYPE Default NULL,
                          p_fob_code          FPBPOHD.FPBPOHD_FOB_CODE%TYPE Default NULL,
                          p_text_ind          FPBPOHD.FPBPOHD_TEXT_IND%TYPE Default NULL,
                          p_clause_ind        FPBPOHD.FPBPOHD_CLAUSE_IND%TYPE Default NULL,
                          p_carrier_pidm      FPBPOHD.FPBPOHD_CARRIER_PIDM%TYPE Default NULL,
                          p_trsk_code         FPBPOHD.FPBPOHD_TRSK_CODE%TYPE Default NULL,
                          p_pmnt_code         FPBPOHD.FPBPOHD_PMNT_CODE%TYPE Default NULL,
                          p_prt_ack           FPBPOHD.FPBPOHD_PRT_ACK%TYPE Default NULL,
                          p_ack_date          FPBPOHD.FPBPOHD_ACK_DATE%TYPE Default NULL,
                          p_appr_ind          FPBPOHD.FPBPOHD_APPR_IND%TYPE Default NULL,
                          p_rush_ind          FPBPOHD.FPBPOHD_RUSH_IND%TYPE Default NULL,
                          p_rexp_date         FPBPOHD.FPBPOHD_REXP_DATE%TYPE Default NULL,
                          p_addl_chrg_amt     FPBPOHD.FPBPOHD_ADDL_CHRG_AMT%TYPE Default NULL,
                          p_rush_amt          FPBPOHD.FPBPOHD_RUSH_AMT%TYPE Default NULL,
                          p_susp_ind          FPBPOHD.FPBPOHD_SUSP_IND%TYPE Default NULL,
                          p_susp_ind_addl     FPBPOHD.FPBPOHD_SUSP_IND_ADDL%TYPE Default NULL,
                          p_cancel_ind        FPBPOHD.FPBPOHD_CANCEL_IND%TYPE Default NULL,
                          p_cancel_date       FPBPOHD.FPBPOHD_CANCEL_DATE%TYPE Default NULL,
                          p_post_date         FPBPOHD.FPBPOHD_POST_DATE%TYPE Default NULL,
                          p_req_bid_ind       FPBPOHD.FPBPOHD_REQ_BID_IND%TYPE Default NULL,
                          p_edit_defer_ind    FPBPOHD.FPBPOHD_EDIT_DEFER_IND%TYPE Default NULL,
                          p_pcls_code         FPBPOHD.FPBPOHD_PCLS_CODE%TYPE Default NULL,
                          p_recomm_vend_name  FPBPOHD.FPBPOHD_RECOMM_VEND_NAME%TYPE Default NULL,
                          p_disb_agent_ind    FPBPOHD.FPBPOHD_DISB_AGENT_IND%TYPE Default NULL,
                          p_nsf_on_off_ind    FPBPOHD.FPBPOHD_NSF_ON_OFF_IND%TYPE Default NULL,
                          p_inventory_po_ind  FPBPOHD.FPBPOHD_INVENTORY_PO_IND%TYPE Default NULL,
                          p_doc_cntrl_ind     FPBPOHD.FPBPOHD_DOC_CNTRL_IND%TYPE Default NULL,
                          p_tele_code         FPBPOHD.FPBPOHD_TELE_CODE%TYPE Default NULL,
                          p_crsn_code         FPBPOHD.FPBPOHD_CRSN_CODE%TYPE Default NULL,
                          p_copied_from       FPBPOHD.FPBPOHD_COPIED_FROM%TYPE Default NULL,
                          p_closed_date       FPBPOHD.FPBPOHD_CLOSED_DATE%TYPE Default NULL,
                          p_match_required    FPBPOHD.FPBPOHD_MATCH_REQUIRED%TYPE Default NULL,
                          p_ctry_code_phone   fpbpohd.fpbpohd_ctry_code_phone%TYPE DEFAULT NULL,
                          p_ctry_code_fax     fpbpohd.fpbpohd_ctry_code_fax%TYPE DEFAULT NULL,
                          p_rowid             OUT VARCHAR2)

Creates a Purchase order header record.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_user_id   User ID.  VARCHAR2(30).
p_po_date   Purchase Order Date.  Date.
p_trans_date   Transaction Date.  Date.
p_vendor_pidm   Vendor pidm.  NUMBER(8).
p_atyp_code   Vendor address type code.  VARCHAR2(2).
p_atyp_seq_num   Vendor address type sequence number.  NUMBER(2).
p_buyr_code   Buyer code.  VARCHAR2(4).
p_reqd_date   Required delivery date.  Date.
p_coas_code   Chart of accounts code.  VARCHAR2(1).
p_orgn_code   Organization Code.  VARCHAR2(6)
p_ship_code   Shipping code.  VARCHAR2(6).
p_disc_code   Discount code.  VARCHAR2(2)
p_print_text   Print text.  VARCHAR2.
p_noprint_text   No print text.  VARCHAR2.
p_tgrp_code   Tax group code.  VARCHAR2(4).
p_curr_code   Currency code.  VARCHAR2(4).
p_single_acctg_ind   Single accounting distribution indicator.  VARCHAR2(1).
p_email_addr   Email address.  VARCHAR2(128).
p_fax_area   Fax area code.  VARCHAR2(6).
p_fax_number   Fax number.  VARCHAR2(12).
p_fax_ext   Fax extension.  VARCHAR2(10).
p_attention_to   Attention to.  VARCHAR2(35).
p_vendor_contact   Vendor contact.  VARCHAR2(35).
p_delivery_comment   Delivery comment.  VARCHAR2(30).
p_vend_email_addr   Vendor email address.  VARCHAR2(128).
p_name   Name of the person creating the purchase order.  VARCHAR2(35).
p_phone_area   Requestors phone area code.  VARCHAR2(6).
p_phone_num   Requestors telephone number.  VARCHAR2(12).
p_phone_ext   Requestors phone number extension.  VARCHAR2(10).
p_edi_ind   EDI Indicator.  VARCHAR2(1).
p_ftrm_code   Freight Terms Code.  VARCHAR2(2).
p_origin_code   Purchase order origination code.  VARCHAR2(26).
p_po_type_ind   Purchase order type indicator.  VARCHAR2(1).
p_doc_ref_code   Purchase order reference code.  VARCHAR2(20).
p_blanket_code   Blanket code.  VARCHAR2(8).
p_blanket_ind   Blanket indicator.  VARCHAR2(1).
p_blanket_term_date   Blanket termination date.  Date.
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_complete_ind   Complete indicator.  VARCHAR2(1).
p_print_ind   Print indicator.  VARCHAR2(1).
p_po_printed_date   Purchase order print date.  Date.
p_trat_code   Tax rate code.  VARCHAR2(3).
p_fob_code   Free on board code.  VARCHAR2(2).
p_text_ind   Text indicator.  VARCHAR2(1).
p_clause_ind   Clause indicator.  VARCHAR2(1).
p_carrier_pidm   Carrier vendor personal identification master.  NUMBER(8).
p_trsk_code   Transit risk code.  VARCHAR2(2).
p_pmnt_code   Payment code.  VARCHAR2(2).
p_prt_ack   Print acknowledgement.   VARCHAR2(1).
p_ack_date   Acknowledgement date.  Date.
p_appr_ind   Approval indicator.  VARCHAR2(1).
p_rush_ind   Rush purchase order indicator.    VARCHAR2(1).
p_rexp_date   Required expiration date.  Date.
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2).
p_rush_amt   Rush purchase order amount.  NUMBER(17,2).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_susp_ind_addl   Additional suspense indicator.  VARCHAR2(1).
p_cancel_ind   Cancel indicator.  VARCHAR2(1).
p_cancel_date   Cancel date.  Date.
p_post_date   Post date.  Date.
p_req_bid_ind   Requisition bid indicator.  VARCHAR2(1).
p_edit_defer_ind   Defer edit indicator.  VARCHAR2(1).
p_pcls_code   Purchase order classification.  VARCHAR2(1).
p_recomm_vend_name   Recommended vendor name.  VARCHAR2(60).
p_disb_agent_ind   Disbursing agent indicator.  VARCHAR2(1).
p_nsf_on_off_ind   NSF on off indicator.  VARCHAR2(1).
p_inventory_po_ind   Inventory purchase order indicator.  VARCHAR2(1).
p_doc_cntrl_ind   Document control indicator.  VARCHAR2(1).
p_tele_code   Vendors telephone code.  VARCHAR2(4).
p_crsn_code   Cancel reason code.   VARCHAR2(4).
p_copied_from   Document copied from.  VARCHAR2(8).
p_closed_date   Closed date.  Date.
p_match_required   Match required.   VARCHAR2(1)
p_ctry_code_phone   Telephone country code.  VARCHAR2(4).
p_ctry_code_fax   Fax country code.  VARCHAR2(4).
p_rowid   Rowid of the PO header record.  VARCHAR2  Required.


p_update_header

Procedure p_update_header(p_code              FPBPOHD.FPBPOHD_CODE%TYPE,
                          p_change_seq_num    FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT Null,
                          p_activity_date     FPBPOHD.FPBPOHD_ACTIVITY_DATE%TYPE DEFAULT sysdate,
                          p_user_id           FPBPOHD.FPBPOHD_USER_ID%TYPE DEFAULT user,
                          p_po_date           FPBPOHD.FPBPOHD_PO_DATE%TYPE DEFAULT Null,
                          p_trans_date        FPBPOHD.FPBPOHD_TRANS_DATE%TYPE DEFAULT Null,
                          p_blanket_code      FPBPOHD.FPBPOHD_BLANKET_CODE%TYPE DEFAULT Null,
                          p_blanket_ind       FPBPOHD.FPBPOHD_BLANKET_IND%TYPE DEFAULT Null,
                          p_blanket_term_date FPBPOHD.FPBPOHD_BLANKET_TERM_DATE%TYPE DEFAULT Null,
                          p_closed_ind        FPBPOHD.FPBPOHD_CLOSED_IND%TYPE DEFAULT Null,
                          p_complete_ind      FPBPOHD.FPBPOHD_COMPLETE_IND%TYPE DEFAULT Null,
                          p_print_ind         FPBPOHD.FPBPOHD_PRINT_IND%TYPE DEFAULT Null,
                          p_po_printed_date   FPBPOHD.FPBPOHD_PO_PRINTED_DATE%TYPE DEFAULT Null,
                          p_vend_pidm         FPBPOHD.FPBPOHD_VEND_PIDM%TYPE DEFAULT Null,
                          p_atyp_code         FPBPOHD.FPBPOHD_ATYP_CODE%TYPE DEFAULT Null,
                          p_atyp_seq_num      FPBPOHD.FPBPOHD_ATYP_SEQ_NUM%TYPE DEFAULT Null,
                          p_buyr_code         FPBPOHD.FPBPOHD_BUYR_CODE%TYPE DEFAULT Null,
                          p_reqd_date         FPBPOHD.FPBPOHD_REQD_DATE%TYPE DEFAULT Null,
                          p_coas_code         FPBPOHD.FPBPOHD_COAS_CODE%TYPE DEFAULT Null,
                          p_orgn_code         FPBPOHD.FPBPOHD_ORGN_CODE%TYPE DEFAULT Null,
                          p_ship_code         FPBPOHD.FPBPOHD_SHIP_CODE%TYPE DEFAULT Null,
                          p_trat_code         FPBPOHD.FPBPOHD_TRAT_CODE%TYPE DEFAULT Null,
                          p_fob_code          FPBPOHD.FPBPOHD_FOB_CODE%TYPE DEFAULT Null,
                          p_disc_code         FPBPOHD.FPBPOHD_DISC_CODE%TYPE DEFAULT Null,
                          p_text_ind          FPBPOHD.FPBPOHD_TEXT_IND%TYPE DEFAULT Null,
                          p_clause_ind        FPBPOHD.FPBPOHD_CLAUSE_IND%TYPE DEFAULT Null,
                          p_carrier_pidm      FPBPOHD.FPBPOHD_CARRIER_PIDM%TYPE DEFAULT Null,
                          p_trsk_code         FPBPOHD.FPBPOHD_TRSK_CODE%TYPE DEFAULT Null,
                          p_pmnt_code         FPBPOHD.FPBPOHD_PMNT_CODE%TYPE DEFAULT Null,
                          p_prt_ack           FPBPOHD.FPBPOHD_PRT_ACK%TYPE DEFAULT Null,
                          p_ack_date          FPBPOHD.FPBPOHD_ACK_DATE%TYPE DEFAULT Null,
                          p_appr_ind          FPBPOHD.FPBPOHD_APPR_IND%TYPE DEFAULT Null,
                          p_rush_ind          FPBPOHD.FPBPOHD_RUSH_IND%TYPE DEFAULT Null,
                          p_rexp_date         FPBPOHD.FPBPOHD_REXP_DATE%TYPE DEFAULT Null,
                          p_addl_chrg_amt     FPBPOHD.FPBPOHD_ADDL_CHRG_AMT%TYPE DEFAULT Null,
                          p_rush_amt          FPBPOHD.FPBPOHD_RUSH_AMT%TYPE DEFAULT Null,
                          p_susp_ind          FPBPOHD.FPBPOHD_SUSP_IND%TYPE DEFAULT Null,
                          p_susp_ind_addl     FPBPOHD.FPBPOHD_SUSP_IND_ADDL%TYPE DEFAULT Null,
                          p_cancel_ind        FPBPOHD.FPBPOHD_CANCEL_IND%TYPE DEFAULT Null,
                          p_cancel_date       FPBPOHD.FPBPOHD_CANCEL_DATE%TYPE DEFAULT Null,
                          p_post_date         FPBPOHD.FPBPOHD_POST_DATE%TYPE DEFAULT Null,
                          p_req_bid_ind       FPBPOHD.FPBPOHD_REQ_BID_IND%TYPE DEFAULT Null,
                          p_edit_defer_ind    FPBPOHD.FPBPOHD_EDIT_DEFER_IND%TYPE DEFAULT Null,
                          p_pcls_code         FPBPOHD.FPBPOHD_PCLS_CODE%TYPE DEFAULT Null,
                          p_tgrp_code         FPBPOHD.FPBPOHD_TGRP_CODE%TYPE DEFAULT Null,
                          p_recomm_vend_name  FPBPOHD.FPBPOHD_RECOMM_VEND_NAME%TYPE DEFAULT Null,
                          p_curr_code         FPBPOHD.FPBPOHD_CURR_CODE%TYPE DEFAULT Null,
                          p_disb_agent_ind    FPBPOHD.FPBPOHD_DISB_AGENT_IND%TYPE DEFAULT Null,
                          p_nsf_on_off_ind    FPBPOHD.FPBPOHD_NSF_ON_OFF_IND%TYPE DEFAULT Null,
                          p_inventory_po_ind  FPBPOHD.FPBPOHD_INVENTORY_PO_IND%TYPE DEFAULT Null,
                          p_single_acctg_ind  FPBPOHD.FPBPOHD_SINGLE_ACCTG_IND%TYPE DEFAULT Null,
                          p_doc_cntrl_ind     FPBPOHD.FPBPOHD_DOC_CNTRL_IND%TYPE DEFAULT Null,
                          p_tele_code         FPBPOHD.FPBPOHD_TELE_CODE%TYPE DEFAULT Null,
                          p_crsn_code         FPBPOHD.FPBPOHD_CRSN_CODE%TYPE DEFAULT Null,
                          p_delivery_comment  FPBPOHD.FPBPOHD_DELIVERY_COMMENT%TYPE DEFAULT Null,
                          p_email_addr        FPBPOHD.FPBPOHD_EMAIL_ADDR%TYPE DEFAULT Null,
                          p_fax_area          FPBPOHD.FPBPOHD_FAX_AREA%TYPE DEFAULT Null,
                          p_fax_number        FPBPOHD.FPBPOHD_FAX_NUMBER%TYPE DEFAULT Null,
                          p_fax_ext           FPBPOHD.FPBPOHD_FAX_EXT%TYPE DEFAULT Null,
                          p_attention_to      FPBPOHD.FPBPOHD_ATTENTION_TO%TYPE DEFAULT Null,
                          p_vendor_contact    FPBPOHD.FPBPOHD_VENDOR_CONTACT%TYPE DEFAULT Null,
                          p_po_type_ind       FPBPOHD.FPBPOHD_PO_TYPE_IND%TYPE DEFAULT Null,
                          p_vend_email_addr   FPBPOHD.FPBPOHD_VEND_EMAIL_ADDR%TYPE DEFAULT Null,
                          p_name              FPBPOHD.FPBPOHD_NAME%TYPE DEFAULT Null,
                          p_phone_area        FPBPOHD.FPBPOHD_PHONE_AREA%TYPE DEFAULT Null,
                          p_phone_num         FPBPOHD.FPBPOHD_PHONE_NUM%TYPE DEFAULT Null,
                          p_phone_ext         FPBPOHD.FPBPOHD_PHONE_EXT%TYPE DEFAULT Null,
                          p_copied_from       FPBPOHD.FPBPOHD_COPIED_FROM%TYPE DEFAULT Null,
                          p_closed_date       FPBPOHD.FPBPOHD_CLOSED_DATE%TYPE DEFAULT Null,
                          p_ftrm_code         FPBPOHD.FPBPOHD_FTRM_CODE%TYPE DEFAULT Null,
                          p_edi_ind           FPBPOHD.FPBPOHD_EDI_IND%TYPE DEFAULT Null,
                          p_match_required    FPBPOHD.FPBPOHD_MATCH_REQUIRED%TYPE DEFAULT Null,
                          p_origin_code       FPBPOHD.FPBPOHD_ORIGIN_CODE%TYPE DEFAULT Null,
                          p_doc_ref_code      FPBPOHD.FPBPOHD_DOC_REF_CODE%TYPE DEFAULT Null,
                          p_po_status         varchar2 DEFAULT Null,
                          p_status_message    varchar2 default Null,
                          p_ctry_code_phone   fpbpohd.fpbpohd_ctry_code_phone%TYPE DEFAULT NULL,
                          p_ctry_code_fax     fpbpohd.fpbpohd_ctry_code_fax%TYPE DEFAULT NULL,
                          p_rowid             VARCHAR2 DEFAULT Null)

Updates a Purchase order header record.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_activity_date   Activity date.  Date
p_user_id   User ID.  VARCHAR2(30).
p_po_date   Purchase Order Date.  Date.
p_trans_date   Transaction Date.  Date.
p_blanket_code   Blanket code.  VARCHAR2(8).
p_blanket_ind   Blanket indicator.  VARCHAR2(1).
p_blanket_term_date   Blanket termination date.  Date.
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_complete_ind   Complete indicator.  VARCHAR2(1).
p_print_ind   Print indicator.  VARCHAR2(1).
p_po_printed_date   Purchase order print date.  Date.
p_vendor_pidm   Vendor pidm.  NUMBER(8).
p_atyp_code   Vendor address type code.  VARCHAR2(2).
p_atyp_seq_num   Vendor address type sequence number.  NUMBER(2).
p_buyr_code   Buyer code.  VARCHAR2(4).
p_reqd_date   Required delivery date.  Date.
p_coas_code   Chart of accounts code.  VARCHAR2(1).
p_orgn_code   Organization Code.  VARCHAR2(6)
p_ship_code   Shipping code.  VARCHAR2(6).
p_trat_code   Tax rate code.  VARCHAR2(3).
p_fob_code   Free on board code.  VARCHAR2(2).
p_disc_code   Discount code.  VARCHAR2(2)
p_text_ind   Text indicator.  VARCHAR2(1).
p_clause_ind   Clause indicator.  VARCHAR2(1).
p_carrier_pidm   Carrier vendor personal identification master.  NUMBER(8).
p_trsk_code   Transit risk code.  VARCHAR2(2).
p_pmnt_code   Payment code.  VARCHAR2(2).
p_prt_ack   Print acknowledgement.   VARCHAR2(1).
p_ack_date   Acknowledgement date.  Date.
p_appr_ind   Approval indicator.  VARCHAR2(1).
p_rush_ind   Rush purchase order indicator.    VARCHAR2(1).
p_rexp_date   Required expiration date.  Date.
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2).
p_rush_amt   Rush purchase order amount.  NUMBER(17,2).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_susp_ind_addl   Additional suspense indicator.  VARCHAR2(1).
p_cancel_ind   Cancel indicator.  VARCHAR2(1).
p_cancel_date   Cancel date.  Date.
p_post_date   Post date.  Date.
p_req_bid_ind   Requisition bid indicator.  VARCHAR2(1).
p_edit_defer_ind   Defer edit indicator.  VARCHAR2(1).
p_pcls_code   Purchase order classification.  VARCHAR2(1).
p_tgrp_code   Tax group code.  VARCHAR2(4).
p_recomm_vend_name   Recommended vendor name.  VARCHAR2(60).
p_curr_code   Currency code.  VARCHAR2(4).
p_disb_agent_ind   Disbursing agent indicator.  VARCHAR2(1).
p_nsf_on_off_ind   NSF on off indicator.  VARCHAR2(1).
p_inventory_po_ind   Inventory purchase order indicator.  VARCHAR2(1).
p_single_acctg_ind   Single accounting distribution indicator.  VARCHAR2(1).
p_doc_cntrl_ind   Document control indicator.  VARCHAR2(1).
p_tele_code   Vendors telephone code.  VARCHAR2(4).
p_crsn_code   Cancel reason code.   VARCHAR2(4).
p_delivery_comment   Delivery comment.  VARCHAR2(30).
p_email_addr   Email address.  VARCHAR2(128).
p_fax_area   Fax area code.  VARCHAR2(6).
p_fax_number   Fax number.  VARCHAR2(12).
p_fax_ext   Fax extension.  VARCHAR2(10).
p_attention_to   Attention to.  VARCHAR2(35).
p_vendor_contact   Vendor contact.  VARCHAR2(35).
p_po_type_ind   Purchase order type indicator.  VARCHAR2(1).
p_vend_email_addr   Vendor email address.  VARCHAR2(128).
p_name   Name of the person creating the purchase order.  VARCHAR2(35).
p_phone_area   Requestors phone area code.  VARCHAR2(6).
p_phone_num   Requestors telephone number.  VARCHAR2(12).
p_phone_ext   Requestors phone number extension.  VARCHAR2(10).
p_copied_from   Document copied from.  VARCHAR2(8).
p_closed_date   Closed date.  Date.
p_ftrm_code   Freight Terms Code.  VARCHAR2(2).
p_edi_ind   EDI Indicator.  VARCHAR2(1).
p_match_required   Match required.  VARCHAR2(1)
p_origin_code   Purchase order origination code.  VARCHAR2(26).
p_doc_ref_code   Purchase order reference code.  VARCHAR2(20).
p_po_status   Purchase order status.  VARCHAR2
p_status_message   Purchase order status message.  VARCHAR2
p_ctry_code_phone   Telephone country code.  VARCHAR2(4).
p_ctry_code_fax   Fax country code.  VARCHAR2(4).
p_rowid   Rowid of the PO header record.  VARCHAR2  Required.


p_update_header_status

Procedure p_update_header_status(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                                 p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT Null,
                                 p_po_status      varchar2 DEFAULT Null,
                                 p_status_message varchar2 Default Null)

Updates Purchase order header status.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_po_status   Purchase order status.  VARCHAR2
p_status_message   Purchase order status message.  VARCHAR2


p_validate_header

Procedure p_validate_header(p_code              FPBPOHD.FPBPOHD_CODE%TYPE Default Null,
                            p_change_seq_num    FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE Default Null,
                            p_activity_date     FPBPOHD.FPBPOHD_ACTIVITY_DATE%TYPE Default sysdate,
                            p_user_id           FPBPOHD.FPBPOHD_USER_ID%TYPE Default user,
                            p_po_date           FPBPOHD.FPBPOHD_PO_DATE%TYPE Default sysdate,
                            p_trans_date        FPBPOHD.FPBPOHD_TRANS_DATE%TYPE Default sysdate,
                            p_blanket_code      FPBPOHD.FPBPOHD_BLANKET_CODE%TYPE Default Null,
                            p_blanket_ind       FPBPOHD.FPBPOHD_BLANKET_IND%TYPE Default Null,
                            p_blanket_term_date FPBPOHD.FPBPOHD_BLANKET_TERM_DATE%TYPE Default Null,
                            p_closed_ind        FPBPOHD.FPBPOHD_CLOSED_IND%TYPE Default Null,
                            p_complete_ind      FPBPOHD.FPBPOHD_COMPLETE_IND%TYPE Default Null,
                            p_print_ind         FPBPOHD.FPBPOHD_PRINT_IND%TYPE Default Null,
                            p_po_printed_date   FPBPOHD.FPBPOHD_PO_PRINTED_DATE%TYPE Default Null,
                            p_vend_pidm         FPBPOHD.FPBPOHD_VEND_PIDM%TYPE Default Null,
                            p_atyp_code         FPBPOHD.FPBPOHD_ATYP_CODE%TYPE Default Null,
                            p_atyp_seq_num      FPBPOHD.FPBPOHD_ATYP_SEQ_NUM%TYPE Default Null,
                            p_buyr_code         FPBPOHD.FPBPOHD_BUYR_CODE%TYPE Default Null,
                            p_reqd_date         FPBPOHD.FPBPOHD_REQD_DATE%TYPE Default Null,
                            p_coas_code         FPBPOHD.FPBPOHD_COAS_CODE%TYPE Default Null,
                            p_orgn_code         FPBPOHD.FPBPOHD_ORGN_CODE%TYPE Default Null,
                            p_ship_code         FPBPOHD.FPBPOHD_SHIP_CODE%TYPE Default Null,
                            p_trat_code         FPBPOHD.FPBPOHD_TRAT_CODE%TYPE Default Null,
                            p_fob_code          FPBPOHD.FPBPOHD_FOB_CODE%TYPE Default Null,
                            p_disc_code         FPBPOHD.FPBPOHD_DISC_CODE%TYPE Default Null,
                            p_text_ind          FPBPOHD.FPBPOHD_TEXT_IND%TYPE Default Null,
                            p_clause_ind        FPBPOHD.FPBPOHD_CLAUSE_IND%TYPE Default Null,
                            p_carrier_pidm      FPBPOHD.FPBPOHD_CARRIER_PIDM%TYPE Default Null,
                            p_trsk_code         FPBPOHD.FPBPOHD_TRSK_CODE%TYPE Default Null,
                            p_pmnt_code         FPBPOHD.FPBPOHD_PMNT_CODE%TYPE Default Null,
                            p_prt_ack           FPBPOHD.FPBPOHD_PRT_ACK%TYPE Default Null,
                            p_ack_date          FPBPOHD.FPBPOHD_ACK_DATE%TYPE Default Null,
                            p_appr_ind          FPBPOHD.FPBPOHD_APPR_IND%TYPE Default Null,
                            p_rush_ind          FPBPOHD.FPBPOHD_RUSH_IND%TYPE Default Null,
                            p_rexp_date         FPBPOHD.FPBPOHD_REXP_DATE%TYPE Default Null,
                            p_addl_chrg_amt     FPBPOHD.FPBPOHD_ADDL_CHRG_AMT%TYPE Default Null,
                            p_rush_amt          FPBPOHD.FPBPOHD_RUSH_AMT%TYPE Default Null,
                            p_susp_ind          FPBPOHD.FPBPOHD_SUSP_IND%TYPE Default Null,
                            p_susp_ind_addl     FPBPOHD.FPBPOHD_SUSP_IND_ADDL%TYPE Default Null,
                            p_cancel_ind        FPBPOHD.FPBPOHD_CANCEL_IND%TYPE Default Null,
                            p_cancel_date       FPBPOHD.FPBPOHD_CANCEL_DATE%TYPE Default Null,
                            p_post_date         FPBPOHD.FPBPOHD_POST_DATE%TYPE Default Null,
                            p_req_bid_ind       FPBPOHD.FPBPOHD_REQ_BID_IND%TYPE Default Null,
                            p_edit_defer_ind    FPBPOHD.FPBPOHD_EDIT_DEFER_IND%TYPE Default Null,
                            p_pcls_code         FPBPOHD.FPBPOHD_PCLS_CODE%TYPE Default Null,
                            p_tgrp_code         FPBPOHD.FPBPOHD_TGRP_CODE%TYPE Default Null,
                            p_recomm_vend_name  FPBPOHD.FPBPOHD_RECOMM_VEND_NAME%TYPE Default Null,
                            p_curr_code         FPBPOHD.FPBPOHD_CURR_CODE%TYPE Default Null,
                            p_disb_agent_ind    FPBPOHD.FPBPOHD_DISB_AGENT_IND%TYPE Default Null,
                            p_nsf_on_off_ind    FPBPOHD.FPBPOHD_NSF_ON_OFF_IND%TYPE Default Null,
                            p_inventory_po_ind  FPBPOHD.FPBPOHD_INVENTORY_PO_IND%TYPE Default Null,
                            p_single_acctg_ind  FPBPOHD.FPBPOHD_SINGLE_ACCTG_IND%TYPE Default 'Y',
                            p_doc_cntrl_ind     FPBPOHD.FPBPOHD_DOC_CNTRL_IND%TYPE Default Null,
                            p_tele_code         FPBPOHD.FPBPOHD_TELE_CODE%TYPE Default Null,
                            p_crsn_code         FPBPOHD.FPBPOHD_CRSN_CODE%TYPE Default Null,
                            p_delivery_comment  FPBPOHD.FPBPOHD_DELIVERY_COMMENT%TYPE Default Null,
                            p_email_addr        FPBPOHD.FPBPOHD_EMAIL_ADDR%TYPE Default Null,
                            p_fax_area          FPBPOHD.FPBPOHD_FAX_AREA%TYPE Default Null,
                            p_fax_number        FPBPOHD.FPBPOHD_FAX_NUMBER%TYPE Default Null,
                            p_fax_ext           FPBPOHD.FPBPOHD_FAX_EXT%TYPE Default Null,
                            p_attention_to      FPBPOHD.FPBPOHD_ATTENTION_TO%TYPE Default Null,
                            p_vendor_contact    FPBPOHD.FPBPOHD_VENDOR_CONTACT%TYPE Default Null,
                            p_po_type_ind       FPBPOHD.FPBPOHD_PO_TYPE_IND%TYPE Default Null,
                            p_vend_email_addr   FPBPOHD.FPBPOHD_VEND_EMAIL_ADDR%TYPE Default Null,
                            p_name              FPBPOHD.FPBPOHD_NAME%TYPE Default Null,
                            p_phone_area        FPBPOHD.FPBPOHD_PHONE_AREA%TYPE Default Null,
                            p_phone_num         FPBPOHD.FPBPOHD_PHONE_NUM%TYPE Default Null,
                            p_phone_ext         FPBPOHD.FPBPOHD_PHONE_EXT%TYPE Default Null,
                            p_copied_from       FPBPOHD.FPBPOHD_COPIED_FROM%TYPE Default Null,
                            p_closed_date       FPBPOHD.FPBPOHD_CLOSED_DATE%TYPE Default Null,
                            p_ftrm_code         FPBPOHD.FPBPOHD_FTRM_CODE%TYPE Default Null,
                            p_edi_ind           FPBPOHD.FPBPOHD_EDI_IND%TYPE Default Null,
                            p_match_required    FPBPOHD.FPBPOHD_MATCH_REQUIRED%TYPE Default 'U',
                            p_origin_code       FPBPOHD.FPBPOHD_ORIGIN_CODE%TYPE Default 'BANNER',
                            p_doc_ref_code      FPBPOHD.FPBPOHD_DOC_REF_CODE%TYPE Default Null,
                            p_po_status         varchar2 default NULL,
                            p_ctry_code_phone   fpbpohd.fpbpohd_ctry_code_phone%TYPE DEFAULT NULL,
                            p_ctry_code_fax     fpbpohd.fpbpohd_ctry_code_fax%TYPE DEFAULT NULL)

Validates a Purchase order header record.

Parameters
p_code   The purchase order code. VARCHAR2(8).
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_activity_date   Activity date.  Date
p_user_id   User ID.  VARCHAR2(30).
p_po_date   Purchase Order Date.  Date.
p_trans_date   Transaction Date.  Date.
p_blanket_code   Blanket code.  VARCHAR2(8).
p_blanket_ind   Blanket indicator.  VARCHAR2(1).
p_blanket_term_date   Blanket termination date.  Date.
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_complete_ind   Complete indicator.  VARCHAR2(1).
p_print_ind   Print indicator.  VARCHAR2(1).
p_po_printed_date   Purchase order print date.  Date.
p_vendor_pidm   Vendor pidm.  NUMBER(8).
p_atyp_code   Vendor address type code.  VARCHAR2(2).
p_atyp_seq_num   Vendor address type sequence number.  NUMBER(2).
p_buyr_code   Buyer code.  VARCHAR2(4).
p_reqd_date   Required delivery date.  Date.
p_coas_code   Chart of accounts code.  VARCHAR2(1).
p_orgn_code   Organization Code.  VARCHAR2(6)
p_ship_code   Shipping code.  VARCHAR2(6).
p_trat_code   Tax rate code.  VARCHAR2(3).
p_fob_code   Free on board code.  VARCHAR2(2).
p_disc_code   Discount code.  VARCHAR2(2)
p_text_ind   Text indicator.  VARCHAR2(1).
p_clause_ind   Clause indicator.  VARCHAR2(1).
p_carrier_pidm   Carrier vendor personal identification master.  NUMBER(8).
p_trsk_code   Transit risk code.  VARCHAR2(2).
p_pmnt_code   Payment code.  VARCHAR2(2).
p_prt_ack   Print acknowledgement.   VARCHAR2(1).
p_ack_date   Acknowledgement date.  Date.
p_appr_ind   Approval indicator.  VARCHAR2(1).
p_rush_ind   Rush purchase order indicator.    VARCHAR2(1).
p_rexp_date   Required expiration date.  Date.
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2).
p_rush_amt   Rush purchase order amount.  NUMBER(17,2).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_susp_ind_addl   Additional suspense indicator.  VARCHAR2(1).
p_cancel_ind   Cancel indicator.  VARCHAR2(1).
p_cancel_date   Cancel date.  Date.
p_post_date   Post date.  Date.
p_req_bid_ind   Requisition bid indicator.  VARCHAR2(1).
p_edit_defer_ind   Defer edit indicator.  VARCHAR2(1).
p_pcls_code   Purchase order classification.  VARCHAR2(1).
p_tgrp_code   Tax group code.  VARCHAR2(4).
p_recomm_vend_name   Recommended vendor name.  VARCHAR2(60).
p_curr_code   Currency code.  VARCHAR2(4).
p_disb_agent_ind   Disbursing agent indicator.  VARCHAR2(1).
p_nsf_on_off_ind   NSF on off indicator.  VARCHAR2(1).
p_inventory_po_ind   Inventory purchase order indicator.  VARCHAR2(1).
p_single_acctg_ind   Single accounting distribution indicator.  VARCHAR2(1).
p_doc_cntrl_ind   Document control indicator.  VARCHAR2(1).
p_tele_code   Vendors telephone code.  VARCHAR2(4).
p_crsn_code   Cancel reason code.   VARCHAR2(4).
p_delivery_comment   Delivery comment.  VARCHAR2(30).
p_email_addr   Email address.  VARCHAR2(128).
p_fax_area   Fax area code.  VARCHAR2(6).
p_fax_number   Fax number.  VARCHAR2(12).
p_fax_ext   Fax extension.  VARCHAR2(10).
p_attention_to   Attention to.  VARCHAR2(35).
p_vendor_contact   Vendor contact.  VARCHAR2(35).
p_po_type_ind   Purchase order type indicator.  VARCHAR2(1).
p_vend_email_addr   Vendor email address.  VARCHAR2(128).
p_name   Name of the person creating the purchase order.  VARCHAR2(35).
p_phone_area   Requestors phone area code.  VARCHAR2(6).
p_phone_num   Requestors telephone number.  VARCHAR2(12).
p_phone_ext   Requestors phone number extension.  VARCHAR2(10).
p_copied_from   Document copied from.  VARCHAR2(8).
p_closed_date   Closed date.  Date.
p_ftrm_code   Freight Terms Code.  VARCHAR2(2).
p_edi_ind   EDI Indicator.  VARCHAR2(1).
p_match_required   Match required.  VARCHAR2(1)
p_origin_code   Purchase order origination code.  VARCHAR2(26).
p_doc_ref_code   Purchase order reference code.  VARCHAR2(20).
p_po_status   Purchase order status.  VARCHAR2
p_ctry_code_phone   Telephone country code.  VARCHAR2(4).
p_ctry_code_fax   Fax country code.  VARCHAR2(4).


order_item_rec

TYPE order_item_rec IS RECORD (
        pohd_code              FPRPODT.FPRPODT_POHD_CODE%TYPE ,
        change_seq_num         FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE ,
        activity_date          FPRPODT.FPRPODT_ACTIVITY_DATE%TYPE ,
        user_id                FPRPODT.FPRPODT_USER_ID%TYPE ,
        item                   FPRPODT.FPRPODT_ITEM%TYPE ,
        comm_code              FPRPODT.FPRPODT_COMM_CODE%TYPE ,
        comm_desc              FPRPODT.FPRPODT_COMM_DESC%TYPE ,
        uoms_code              FPRPODT.FPRPODT_UOMS_CODE%TYPE ,
        unit_price             FPRPODT.FPRPODT_UNIT_PRICE%TYPE ,
        liq_amt                FPRPODT.FPRPODT_LIQ_AMT%TYPE ,
        qty                    FPRPODT.FPRPODT_QTY%TYPE ,
        disc_amt               FPRPODT.FPRPODT_DISC_AMT%TYPE ,
        tax_amt                FPRPODT.FPRPODT_TAX_AMT%TYPE ,
        vend_ref_num           FPRPODT.FPRPODT_VEND_REF_NUM%TYPE ,
        agre_code              FPRPODT.FPRPODT_AGRE_CODE%TYPE ,
        susp_ind               FPRPODT.FPRPODT_SUSP_IND%TYPE ,
        closed_ind             FPRPODT.FPRPODT_CLOSED_IND%TYPE ,
        cancel_ind             FPRPODT.FPRPODT_CANCEL_IND%TYPE ,
        cancel_date            FPRPODT.FPRPODT_CANCEL_DATE%TYPE ,
        ttag_num               FPRPODT.FPRPODT_TTAG_NUM%TYPE ,
        text_usage             FPRPODT.FPRPODT_TEXT_USAGE%TYPE ,
        addl_chrg_amt          FPRPODT.FPRPODT_ADDL_CHRG_AMT%TYPE ,
        convert_unit_price     FPRPODT.FPRPODT_CONVERT_UNIT_PRICE%TYPE ,
        convert_disc_amt       FPRPODT.FPRPODT_CONVERT_DISC_AMT%TYPE ,
        convert_tax_amt        FPRPODT.FPRPODT_CONVERT_TAX_AMT%TYPE ,
        convert_addl_chrg_amt  FPRPODT.FPRPODT_CONVERT_ADDL_CHRG_AMT%TYPE ,
        tgrp_code              FPRPODT.FPRPODT_TGRP_code%TYPE ,
        ext_amt                FPRPODT.FPRPODT_EXT_AMT%TYPE ,
        bo_remain_bal          FPRPODT.FPRPODT_BO_REMAIN_BAL%TYPE ,
        desc_chge_ind          FPRPODT.FPRPODT_DESC_CHGE_IND%TYPE ,
        SHIP_code              FPRPODT.FPRPODT_SHIp_code%TYPE ,
        reqd_date              FPRPODT.FPRPODT_REQD_DATE%TYPE ,
        internal_record_id     VARCHAR2(18)
   );

Purchase order item record type


order_item_ref

TYPE order_item_ref IS REF CURSOR RETURN ORDER_ITEM_REC;

Purchase order item reference cursor


order_item_tab

TYPE order_item_tab IS TABLE OF ORDER_ITEM_REC INDEX BY BINARY_INTEGER;

Purchase order item table type


f_exists_item

Function f_exists_item(p_pohd_code      FPRPODT.FPRPODT_POHD_CODE%TYPE,
                       p_item           FPRPODT.FPRPODT_ITEM%TYPE,
                       p_change_seq_num FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN BOOLEAN

Checks to see if a purchase order item record exists.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_item   The purchase order item number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
TRUE if found, otherwise FALSE.


f_query_one_item

Function f_query_one_item(p_pohd_code      FPRPODT.FPRPODT_POHD_CODE%TYPE,
                          p_item           FPRPODT.FPRPODT_ITEM%TYPE,
                          p_change_seq_num FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN order_item_ref

Selects one item record using unique columns.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_item   The purchase order item number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
a cursor variable that will fetch exactly one record.


f_query_all_item

Function f_query_all_item(p_pohd_code      FPRPODT.FPRPODT_POHD_CODE%TYPE,
                          p_change_seq_num FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN order_item_ref

Selects all the item records for the purchase order.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

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


f_query_open_items

Function f_query_open_items(p_pohd_code      FPRPODT.FPRPODT_POHD_CODE%TYPE,
                            p_change_seq_num FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN order_item_ref

Selects the open item records for the purchase order.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

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


p_lock_item

Procedure p_lock_item(p_pohd_code      FPRPODT.FPRPODT_POHD_CODE%TYPE,
                      p_item           FPRPODT.FPRPODT_ITEM%TYPE,
                      p_change_seq_num FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE DEFAULT NULL,
                      p_rowid          VARCHAR2 DEFAULT NULL)

Locks an item record for update.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8) Required.
p_item   The purchase order item number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_rowid   Rowid of the item record.  VARCHAR2.


p_delete_item

Procedure p_delete_item(p_pohd_code      FPRPODT.FPRPODT_POHD_CODE%TYPE,
                        p_item           FPRPODT.FPRPODT_ITEM%TYPE,
                        p_change_seq_num FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE DEFAULT NULL,
                        p_rowid          VARCHAR2 DEFAULT NULL)

Deletes an item record.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8) Required.
p_item   The purchase order item number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_rowid   Rowid of the item record.  VARCHAR2.


p_create_item

Procedure p_create_item(p_pohd_code             FPRPODT.FPRPODT_POHD_CODE%TYPE,
                        p_change_seq_num        FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE default NULL,
                        p_item                  FPRPODT.FPRPODT_ITEM%TYPE default NULL,
                        p_comm_code             FPRPODT.FPRPODT_COMM_CODE%TYPE default NULL,
                        p_comm_desc             FPRPODT.FPRPODT_COMM_DESC%TYPE default NULL,
                        p_uoms_code             FPRPODT.FPRPODT_UOMS_CODE%TYPE default NULL,
                        p_unit_price            FPRPODT.FPRPODT_UNIT_PRICE%TYPE default NULL,
                        p_qty                   FPRPODT.FPRPODT_QTY%TYPE default NULL,
                        p_disc_amt              FPRPODT.FPRPODT_DISC_AMT%TYPE default NULL,
                        p_tax_amt               FPRPODT.FPRPODT_TAX_AMT%TYPE default NULL,
                        p_addl_chrg_amt         FPRPODT.FPRPODT_ADDL_CHRG_AMT%TYPE default NULL,
                        p_tgrp_code             FPRPODT.FPRPODT_TGRp_code%TYPE default NULL,
                        p_ship_code             FPRPODT.FPRPODT_SHIp_code%TYPE default NULL,
                        p_reqd_date             FPRPODT.FPRPODT_REQD_DATE%TYPE default NULL,
                        p_print_text            varchar2 default NULL,
                        p_noprint_text          varchar2 default NULL,
                        p_liq_amt               FPRPODT.FPRPODT_LIQ_AMT%TYPE default NULL,
                        p_vend_ref_num          FPRPODT.FPRPODT_VEND_REF_NUM%TYPE default NULL,
                        p_agre_code             FPRPODT.FPRPODT_AGRE_CODE%TYPE default NULL,
                        p_susp_ind              FPRPODT.FPRPODT_SUSP_IND%TYPE default NULL,
                        p_closed_ind            FPRPODT.FPRPODT_CLOSED_IND%TYPE default NULL,
                        p_cancel_ind            FPRPODT.FPRPODT_CANCEL_IND%TYPE default NULL,
                        p_cancel_date           FPRPODT.FPRPODT_CANCEL_DATE%TYPE default NULL,
                        p_ttag_num              FPRPODT.FPRPODT_TTAG_NUM%TYPE default NULL,
                        p_text_usage            FPRPODT.FPRPODT_TEXT_USAGE%TYPE default NULL,
                        p_convert_unit_price    FPRPODT.FPRPODT_CONVERT_UNIT_PRICE%TYPE default NULL,
                        p_convert_disc_amt      FPRPODT.FPRPODT_CONVERT_DISC_AMT%TYPE default NULL,
                        p_convert_tax_amt       FPRPODT.FPRPODT_CONVERT_TAX_AMT%TYPE default NULL,
                        p_convert_addl_chrg_amt FPRPODT.FPRPODT_CONVERT_ADDL_CHRG_AMT%TYPE default NULL,
                        p_ext_amt               FPRPODT.FPRPODT_EXT_AMT%TYPE default NULL,
                        p_bo_remain_bal         FPRPODT.FPRPODT_BO_REMAIN_BAL%TYPE default NULL,
                        p_DESC_CHGE_IND         FPRPODT.FPRPODT_DESC_CHGE_IND%TYPE default NULL,
                        -- CO Enhancement Start
                        -- Added p_data_changed to test change order item data changed
                        p_data_changed varchar2 default NULL,
                        -- CO Enhancement End
                        p_ROWID OUT VARCHAR2)

Creates an item record.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order item change sequence number. NUMBER(3).
p_item   The purchase order item number. NUMBER(4).
p_comm_code   Commodity code.  VARCHAR2(10).
p_comm_desc   Commodity description.  VARCHAR2(50).
p_uoms_code   Unit of measure code.  VARCHAR2(3).
p_unit_price   Unit price.  NUMBER(19,4).
p_qty   Quantity.  NUMBER(8,2).
p_disc_amt   Discount amount.  NUMBER(17,2).
p_tax_amt   Tax amount.  NUMBER(17,2)
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2)
p_tgrp_code   Tax group code.  VARCHAR2(4).
p_ship_code   Ship code.  VARCHAR2(6).
p_reqd_date   Required delivery date.  Date.
p_print_text   Print text.  VARCHAR2.
p_noprint_text   No print text.  VARCHAR2.
p_liq_amt   Liquidation amount.  NUMBER(17,2).
p_vend_ref_num   Vendor reference number.  VARCHAR2(15).
p_agre_code   Agreement code.  VARCHAR2(15).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_cancel_ind   Cancellation indicator.  VARCHAR2(1).
p_cancel_date   Cancellation date.  Date.
p_ttag_num   Temporary tag number.  VARCHAR2(9).
p_text_usage   Text usage indicator.  VARCHAR2(1).
p_convert_unit_price   Converted unit price.  NUMBER(19,4).
p_convert_disc_amt   Converted discount amount.  NUMBER(17,2).
p_convert_tax_amt   Converted tax amount.  NUMBER(17,2).
p_convert_addl_chrg_amt   Converted additional charge amount.  NUMBER(17,2).
p_ext_amt   Extended amount.  NUMBER(17,2)
p_bo_remain_bal   Blanket order remaining balance amount.  NUMBER(17,2)
p_desc_chge_ind   Description changed indicator.  VARCHAR2(1).
p_rowid   Rowid of the item record.  VARCHAR2.


p_update_item

Procedure p_update_item(p_pohd_code             FPRPODT.FPRPODT_POHD_CODE%TYPE,
                        p_change_seq_num        FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE default NULL,
                        p_activity_date         FPRPODT.FPRPODT_ACTIVITY_DATE%TYPE default sysdate,
                        p_user_id               FPRPODT.FPRPODT_USER_ID%TYPE default user,
                        p_item                  FPRPODT.FPRPODT_ITEM%TYPE default NULL,
                        p_comm_code             FPRPODT.FPRPODT_COMM_CODE%TYPE default NULL,
                        p_comm_desc             FPRPODT.FPRPODT_COMM_DESC%TYPE default NULL,
                        p_uoms_code             FPRPODT.FPRPODT_UOMS_CODE%TYPE default NULL,
                        p_unit_price            FPRPODT.FPRPODT_UNIT_PRICE%TYPE default NULL,
                        p_liq_amt               FPRPODT.FPRPODT_LIQ_AMT%TYPE default NULL,
                        p_qty                   FPRPODT.FPRPODT_QTY%TYPE default NULL,
                        p_disc_amt              FPRPODT.FPRPODT_DISC_AMT%TYPE default NULL,
                        p_tax_amt               FPRPODT.FPRPODT_TAX_AMT%TYPE default NULL,
                        p_vend_ref_num          FPRPODT.FPRPODT_VEND_REF_NUM%TYPE default NULL,
                        p_agre_code             FPRPODT.FPRPODT_AGRE_CODE%TYPE default NULL,
                        p_susp_ind              FPRPODT.FPRPODT_SUSP_IND%TYPE default NULL,
                        p_closed_ind            FPRPODT.FPRPODT_CLOSED_IND%TYPE default NULL,
                        p_cancel_ind            FPRPODT.FPRPODT_CANCEL_IND%TYPE default NULL,
                        p_cancel_date           FPRPODT.FPRPODT_CANCEL_DATE%TYPE default NULL,
                        p_ttag_num              FPRPODT.FPRPODT_TTAG_NUM%TYPE default NULL,
                        p_text_usage            FPRPODT.FPRPODT_TEXT_USAGE%TYPE default NULL,
                        p_addl_chrg_amt         FPRPODT.FPRPODT_ADDL_CHRG_AMT%TYPE default NULL,
                        p_convert_unit_price    FPRPODT.FPRPODT_CONVERT_UNIT_PRICE%TYPE default NULL,
                        p_convert_disc_amt      FPRPODT.FPRPODT_CONVERT_DISC_AMT%TYPE default NULL,
                        p_convert_tax_amt       FPRPODT.FPRPODT_CONVERT_TAX_AMT%TYPE default NULL,
                        p_convert_addl_chrg_amt FPRPODT.FPRPODT_CONVERT_ADDL_CHRG_AMT%TYPE default NULL,
                        p_tgrp_code             FPRPODT.FPRPODT_TGRP_code%TYPE default NULL,
                        p_ext_amt               FPRPODT.FPRPODT_EXT_AMT%TYPE default NULL,
                        p_bo_remain_bal         FPRPODT.FPRPODT_BO_REMAIN_BAL%TYPE default NULL,
                        p_desc_chge_ind         FPRPODT.FPRPODT_DESC_CHGE_IND%TYPE default NULL,
                        p_ship_code             FPRPODT.FPRPODT_SHIP_code%TYPE default NULL,
                        p_reqd_date             FPRPODT.FPRPODT_REQD_DATE%TYPE default NULL,
                        p_rowid                 VARCHAR2 Default Null)

Updates an item record.

Parameters
p_pohd_code   The purchase order code.  VARCHAR2(8) Required.
p_change_seq_num   The purchase order item change sequence number. NUMBER(3).
p_activity_date   Activity date.  Date.
p_user_id   User ID.  VARCHAR2(30).
p_item   The purchase order item number. NUMBER(4).
p_comm_code   Commodity code.  VARCHAR2(10).
p_comm_desc   Commodity description.  VARCHAR2(50).
p_uoms_code   Unit of measure code.  VARCHAR2(3).
p_unit_price   Unit price.  NUMBER(19,4).
p_liq_amt   Liquidation amount.  NUMBER(17,2).
p_qty   Quantity.  NUMBER(8,2).
p_disc_amt   Discount amount.  NUMBER(17,2).
p_tax_amt   Tax amount.  NUMBER(17,2)
p_vend_ref_num   Vendor reference number.  VARCHAR2(15).
p_agre_code   Agreement code.  VARCHAR2(15).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_cancel_ind   Cancellation indicator.  VARCHAR2(1).
p_cancel_date   Cancellation date.  Date.
p_ttag_num   Temporary tag number.  VARCHAR2(9).
p_text_usage   Text usage indicator.  VARCHAR2(1).
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2)
p_convert_unit_price   Converted unit price.  NUMBER(19,4).
p_convert_disc_amt   Converted discount amount.  NUMBER(17,2).
p_convert_tax_amt   Converted tax amount.  NUMBER(17,2).
p_convert_addl_chrg_amt   Converted additional charge amount.  NUMBER(17,2).
p_tgrp_code   Tax group code.  VARCHAR2(4).
p_ext_amt   Extended amount.  NUMBER(17,2)
p_bo_remain_bal   Blanket order remaining balance amount.  NUMBER(17,2)
p_desc_chge_ind   Description changed indicator.  VARCHAR2(1).
p_ship_code   Ship code.  VARCHAR2(6).
p_reqd_date   Required delivery date.  Date.
p_rowid   Rowid of the item record.  VARCHAR2.


p_validate_item

Procedure p_validate_item(p_pohd_code             FPRPODT.FPRPODT_POHD_CODE%TYPE,
                          p_change_seq_num        FPRPODT.FPRPODT_CHANGE_SEQ_NUM%TYPE default NULL,
                          p_activity_date         FPRPODT.FPRPODT_ACTIVITY_DATE%TYPE default sysdate,
                          p_user_id               FPRPODT.FPRPODT_USER_ID%TYPE default user,
                          p_item                  FPRPODT.FPRPODT_ITEM%TYPE default NULL,
                          p_comm_code             FPRPODT.FPRPODT_COMM_CODE%TYPE default NULL,
                          p_comm_desc             FPRPODT.FPRPODT_COMM_DESC%TYPE default NULL,
                          p_uoms_code             FPRPODT.FPRPODT_UOMS_CODE%TYPE default NULL,
                          p_unit_price            FPRPODT.FPRPODT_UNIT_PRICE%TYPE default NULL,
                          p_liq_amt               FPRPODT.FPRPODT_LIQ_AMT%TYPE default NULL,
                          p_qty                   FPRPODT.FPRPODT_QTY%TYPE default NULL,
                          p_disc_amt              FPRPODT.FPRPODT_DISC_AMT%TYPE default NULL,
                          p_tax_amt               FPRPODT.FPRPODT_TAX_AMT%TYPE default NULL,
                          p_vend_ref_num          FPRPODT.FPRPODT_VEND_REF_NUM%TYPE default NULL,
                          p_agre_code             FPRPODT.FPRPODT_AGRE_CODE%TYPE default NULL,
                          p_susp_ind              FPRPODT.FPRPODT_SUSP_IND%TYPE default NULL,
                          p_closed_ind            FPRPODT.FPRPODT_CLOSED_IND%TYPE default NULL,
                          p_cancel_ind            FPRPODT.FPRPODT_CANCEL_IND%TYPE default NULL,
                          p_cancel_date           FPRPODT.FPRPODT_CANCEL_DATE%TYPE default NULL,
                          p_ttag_num              FPRPODT.FPRPODT_TTAG_NUM%TYPE default NULL,
                          p_text_usage            FPRPODT.FPRPODT_TEXT_USAGE%TYPE default NULL,
                          p_addl_chrg_amt         FPRPODT.FPRPODT_ADDL_CHRG_AMT%TYPE default NULL,
                          p_convert_unit_price    FPRPODT.FPRPODT_CONVERT_UNIT_PRICE%TYPE default NULL,
                          p_convert_disc_amt      FPRPODT.FPRPODT_CONVERT_DISC_AMT%TYPE default NULL,
                          p_convert_tax_amt       FPRPODT.FPRPODT_CONVERT_TAX_AMT%TYPE default NULL,
                          p_convert_addl_chrg_amt FPRPODT.FPRPODT_CONVERT_ADDL_CHRG_AMT%TYPE default NULL,
                          p_tgrp_code             FPRPODT.FPRPODT_TGRP_code%TYPE default NULL,
                          p_ext_amt               FPRPODT.FPRPODT_EXT_AMT%TYPE default NULL,
                          p_bo_remain_bal         FPRPODT.FPRPODT_BO_REMAIN_BAL%TYPE default NULL,
                          p_desc_chge_ind         FPRPODT.FPRPODT_DESC_CHGE_IND%TYPE default NULL,
                          p_ship_code             FPRPODT.FPRPODT_SHIP_code%TYPE default NULL,
                          p_reqd_date             FPRPODT.FPRPODT_REQD_DATE%TYPE default NULL)

Validates an item record.

Parameters
p_pohd_code   The purchase order code.  VARCHAR2(8) Required.
p_change_seq_num   The purchase order item change sequence number. NUMBER(3).
p_activity_date   Activity date.  Date.
p_user_id   User ID.  VARCHAR2(30).
p_item   The purchase order item number. NUMBER(4).
p_comm_code   Commodity code.  VARCHAR2(10).
p_comm_desc   Commodity description.  VARCHAR2(50).
p_uoms_code   Unit of measure code.  VARCHAR2(3).
p_unit_price   Unit price.  NUMBER(19,4).
p_liq_amt   Liquidation amount.  NUMBER(17,2).
p_qty   Quantity.  NUMBER(8,2).
p_disc_amt   Discount amount.  NUMBER(17,2).
p_tax_amt   Tax amount.  NUMBER(17,2)
p_vend_ref_num   Vendor reference number.  VARCHAR2(15).
p_agre_code   Agreement code.  VARCHAR2(15).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_cancel_ind   Cancellation indicator.  VARCHAR2(1).
p_cancel_date   Cancellation date.  Date.
p_ttag_num   Temporary tag number.  VARCHAR2(9).
p_text_usage   Text usage indicator.  VARCHAR2(1).
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2)
p_convert_unit_price   Converted unit price.  NUMBER(19,4).
p_convert_disc_amt   Converted discount amount.  NUMBER(17,2).
p_convert_tax_amt   Converted tax amount.  NUMBER(17,2).
p_convert_addl_chrg_amt   Converted additional charge amount.  NUMBER(17,2).
p_tgrp_code   Tax group code.  VARCHAR2(4).
p_ext_amt   Extended amount.  NUMBER(17,2)
p_bo_remain_bal   Blanket order remaining balance amount.  NUMBER(17,2)
p_desc_chge_ind   Description changed indicator.  VARCHAR2(1).
p_ship_code   Ship code.  VARCHAR2(6).
p_reqd_date   Required delivery date.  Date.
p_rowid   Rowid of the item record.  VARCHAR2.


order_accounting_rec

TYPE order_accounting_rec IS RECORD (
       pohd_code              FPRPODA.FPRPODA_POHD_CODE%TYPE ,
       change_seq_num         FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE ,
       item                   FPRPODA.FPRPODA_ITEM%TYPE ,
       seq_num                FPRPODA.FPRPODA_SEQ_NUM%TYPE ,
       activity_date          FPRPODA.FPRPODA_ACTIVITY_DATE%TYPE ,
       user_id                FPRPODA.FPRPODA_USER_ID%TYPE ,
       amt                    FPRPODA.FPRPODA_AMT%TYPE ,
       disc_amt               FPRPODA.FPRPODA_DISC_AMT%TYPE ,
       tax_amt                FPRPODA.FPRPODA_TAX_AMT%TYPE ,
       addl_chrg_amt          FPRPODA.FPRPODA_ADDL_CHRG_AMT%TYPE ,
       fsyr_code              FPRPODA.FPRPODA_FSYR_CODE%TYPE ,
       period                 FPRPODA.FPRPODA_PERIOD%TYPE ,
       rucl_code_po           FPRPODA.FPRPODA_RUCL_CODE_PO%TYPE ,
       disc_rucl_code         FPRPODA.FPRPODA_DISC_RUCL_CODE%TYPE ,
       tax_rucl_code          FPRPODA.FPRPODA_TAX_RUCL_CODE%TYPE ,
       addl_rucl_code         FPRPODA.FPRPODA_ADDL_RUCL_CODE%TYPE ,
       rucl_code_liq          FPRPODA.FPRPODA_RUCL_CODE_LIQ%TYPE ,
       coas_code              FPRPODA.FPRPODA_COAS_CODE%TYPE ,
       acci_code              FPRPODA.FPRPODA_ACCI_CODE%TYPE ,
       fund_code              FPRPODA.FPRPODA_FUND_CODE%TYPE ,
       orgn_code              FPRPODA.FPRPODA_ORGN_CODE%TYPE ,
       acct_code              FPRPODA.FPRPODA_ACCT_CODE%TYPE ,
       prog_code              FPRPODA.FPRPODA_PROG_CODE%TYPE ,
       actv_code              FPRPODA.FPRPODA_ACTV_CODE%TYPE ,
       locn_code              FPRPODA.FPRPODA_LOCN_CODE%TYPE ,
       proj_code              FPRPODA.FPRPODA_PROJ_CODE%TYPE ,
       susp_ind               FPRPODA.FPRPODA_SUSP_IND%TYPE ,
       nsf_susp_ind           FPRPODA.FPRPODA_NSF_SUSP_IND%TYPE ,
       post_date              FPRPODA.FPRPODA_POST_DATE%TYPE ,
       appr_ind               FPRPODA.FPRPODA_APPR_IND%TYPE ,
       nsf_override_ind       FPRPODA.FPRPODA_NSF_OVERRIDE_IND%TYPE ,
       closed_ind             FPRPODA.FPRPODA_CLOSED_IND%TYPE ,
       convert_amt            FPRPODA.FPRPODA_CONVERT_AMT%TYPE ,
       convert_disc_amt       FPRPODA.FPRPODA_CONVERT_DISC_AMT%TYPE ,
       convert_tax_amt        FPRPODA.FPRPODA_CONVERT_TAX_AMT%TYPE ,
       convert_addl_chrg_amt  FPRPODA.FPRPODA_CONVERT_ADDL_CHRG_AMT%TYPE ,
       appr_amt_pct           FPRPODA.FPRPODA_APPR_AMT_PCT%TYPE ,
       disc_amt_pct           FPRPODA.FPRPODA_DISC_AMT_PCT%TYPE ,
       addl_amt_pct           FPRPODA.FPRPODA_ADDL_AMT_PCT%TYPE ,
       tax_amt_pct            FPRPODA.FPRPODA_TAX_AMT_PCT%TYPE ,
       internal_record_id       VARCHAR2(18)
   );

Purchase order accounting record type


order_accounting_ref

TYPE order_accounting_ref IS REF CURSOR RETURN ORDER_ACCOUNTING_REC;

Purchase order accounting reference cursor


order_accounting_tab

TYPE order_accounting_tab IS TABLE OF ORDER_ACCOUNTING_REC INDEX BY BINARY_INTEGER;

Purchase order accounting table type


f_exists_accounting

Function f_exists_accounting(p_pohd_code      FPRPODA.FPRPODA_POHD_CODE%TYPE,
                             p_item           FPRPODA.FPRPODA_ITEM%TYPE,
                             p_seq_num        FPRPODA.FPRPODA_SEQ_NUM%TYPE,
                             p_change_seq_num FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN BOOLEAN

Checks to see if a purchase order accounting record exists.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_item   The purchase order item number. NUMBER(4)  Required.
p_seq_num   The purchase order accounting sequence number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
TRUE if found, otherwise FALSE.


f_query_one_accounting

Function f_query_one_accounting(p_pohd_code      FPRPODA.FPRPODA_POHD_CODE%TYPE,
                                p_item           FPRPODA.FPRPODA_ITEM%TYPE,
                                p_seq_num        FPRPODA.FPRPODA_SEQ_NUM%TYPE,
                                p_change_seq_num FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN order_accounting_ref

Selects one accounting record using unique columns.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_item   The purchase order item number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
a cursor variable that will fetch exactly one record.


f_query_open_accounting

Function f_query_open_accounting(p_pohd_code FPRPODA.FPRPODA_POHD_CODE%TYPE,
                                 p_item      FPRPODA.FPRPODA_ITEM%TYPE)
  RETURN order_accounting_ref

Selects the open accounting records.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_item   The purchase order item number. NUMBER(4)  Required.

Returns
a cursor variable that will fetch the open records.


f_query_all_accounting

Function f_query_all_accounting(p_pohd_code      FPRPODA.FPRPODA_POHD_CODE%TYPE,
                                p_item           FPRPODA.FPRPODA_ITEM%TYPE default NULL,
                                p_change_seq_num FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN order_accounting_ref

Selects all the records for the purchase order accounting item.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8)  Required.
p_item   The purchase order accounting item number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

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


p_lock_accounting

Procedure p_lock_accounting(p_pohd_code      FPRPODA.FPRPODA_POHD_CODE%TYPE,
                            p_item           FPRPODA.FPRPODA_ITEM%TYPE,
                            p_seq_num        FPRPODA.FPRPODA_SEQ_NUM%TYPE,
                            p_change_seq_num FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE DEFAULT NULL,
                            p_rowid          VARCHAR2 DEFAULT NULL)

Locks an accounting record for update.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8) Required.
p_item   The purchase order accounting item number. NUMBER(4)  Required.
p_seq_num   The purchase order accounting sequence number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_rowid   Rowid of the accounting record.  VARCHAR2.


p_delete_accounting

Procedure p_delete_accounting(p_pohd_code      FPRPODA.FPRPODA_POHD_CODE%TYPE,
                              p_item           FPRPODA.FPRPODA_ITEM%TYPE,
                              p_seq_num        FPRPODA.FPRPODA_SEQ_NUM%TYPE,
                              p_change_seq_num FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE DEFAULT NULL,
                              p_rowid          VARCHAR2 DEFAULT NULL)

Deletes an accounting record.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8) Required.
p_item   The purchase order item number. NUMBER(4)  Required.
p_seq_num   The purchase order accounting sequence number. NUMBER(4)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
p_rowid   Rowid of the accounting record.  VARCHAR2.


p_create_accounting

Procedure p_create_accounting(p_pohd_code             FPRPODA.FPRPODA_POHD_CODE%TYPE,
                              p_change_seq_num        FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE Default Null,
                              p_item                  FPRPODA.FPRPODA_ITEM%TYPE,
                              p_seq_num               FPRPODA.FPRPODA_SEQ_NUM%TYPE,
                              p_amt                   FPRPODA.FPRPODA_AMT%TYPE,
                              p_disc_amt              FPRPODA.FPRPODA_DISC_AMT%TYPE Default Null,
                              p_tax_amt               FPRPODA.FPRPODA_TAX_AMT%TYPE Default Null,
                              p_addl_chrg_amt         FPRPODA.FPRPODA_ADDL_CHRG_AMT%TYPE Default Null,
                              p_coas_code             FPRPODA.FPRPODA_COAS_CODE%TYPE Default Null,
                              p_acci_code             FPRPODA.FPRPODA_ACCI_CODE%TYPE Default Null,
                              p_fund_code             FPRPODA.FPRPODA_FUND_CODE%TYPE Default Null,
                              p_orgn_code             FPRPODA.FPRPODA_ORGN_CODE%TYPE Default Null,
                              p_acct_code             FPRPODA.FPRPODA_ACCT_CODE%TYPE Default Null,
                              p_prog_code             FPRPODA.FPRPODA_PROG_CODE%TYPE Default Null,
                              p_actv_code             FPRPODA.FPRPODA_ACTV_CODE%TYPE Default Null,
                              p_locn_code             FPRPODA.FPRPODA_LOCN_CODE%TYPE Default Null,
                              p_proj_code             FPRPODA.FPRPODA_PROJ_CODE%TYPE Default Null,
                              p_nsf_override_ind      FPRPODA.FPRPODA_NSF_OVERRIDE_IND%TYPE Default Null,
                              p_appr_amt_pct          FPRPODA.FPRPODA_APPR_AMT_PCT%TYPE Default Null,
                              p_disc_amt_pct          FPRPODA.FPRPODA_DISC_AMT_PCT%TYPE Default Null,
                              p_addl_amt_pct          FPRPODA.FPRPODA_ADDL_AMT_PCT%TYPE Default Null,
                              p_tax_amt_pct           FPRPODA.FPRPODA_TAX_AMT_PCT%TYPE Default Null,
                              p_activity_date         FPRPODA.FPRPODA_ACTIVITY_DATE%TYPE Default sysdate,
                              p_user_id               FPRPODA.FPRPODA_USER_ID%TYPE Default user,
                              p_fsyr_code             FPRPODA.FPRPODA_FSYR_CODE%TYPE Default Null,
                              p_period                FPRPODA.FPRPODA_PERIOD%TYPE Default Null,
                              p_rucl_code_po          FPRPODA.FPRPODA_RUCL_CODE_PO%TYPE Default Null,
                              p_disc_rucl_code        FPRPODA.FPRPODA_DISC_RUCL_CODE%TYPE Default Null,
                              p_tax_rucl_code         FPRPODA.FPRPODA_TAX_RUCL_CODE%TYPE Default Null,
                              p_addl_rucl_code        FPRPODA.FPRPODA_ADDL_RUCL_CODE%TYPE Default Null,
                              p_rucl_code_liq         FPRPODA.FPRPODA_RUCL_CODE_LIQ%TYPE Default Null,
                              p_susp_ind              FPRPODA.FPRPODA_SUSP_IND%TYPE Default Null,
                              p_nsf_susp_ind          FPRPODA.FPRPODA_NSF_SUSP_IND%TYPE Default Null,
                              p_post_date             FPRPODA.FPRPODA_POST_DATE%TYPE Default Null,
                              p_appr_ind              FPRPODA.FPRPODA_APPR_IND%TYPE Default Null,
                              p_closed_ind            FPRPODA.FPRPODA_CLOSED_IND%TYPE Default Null,
                              p_convert_amt           FPRPODA.FPRPODA_CONVERT_AMT%TYPE Default Null,
                              p_convert_disc_amt      FPRPODA.FPRPODA_CONVERT_DISC_AMT%TYPE Default Null,
                              p_convert_tax_amt       FPRPODA.FPRPODA_CONVERT_TAX_AMT%TYPE Default Null,
                              p_convert_addl_chrg_amt FPRPODA.FPRPODA_CONVERT_ADDL_CHRG_AMT%TYPE Default Null,
                              -- CO Enhancement Start
                              -- Added p_data_changed to test change order item data changed
                              p_data_changed varchar2 default NULL,
                              -- CO Enhancement End
                              p_ROWID OUT VARCHAR2)

Creates an accounting record.

Parameters
p_pohd_code   The purchase order code.  VARCHAR2(8) Required.
p_change_seq_num   The purchase order item change sequence number. NUMBER(3).
p_item   The accounting item number.  NUMBER(4).
p_seq_num   The accounting sequence number.  NUMBER(4).
p_amt   Approved amount.  NUMBER(17,2).
p_disc_amt   Discount amount.  NUMBER(17,2).
p_tax_amt   Tax amount.  NUMBER(17,2).
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2).
p_coas_code   Chart of accounts code.  VARCHAR2(1) .
p_acci_code   Index code.  VARCHAR2(6).
p_fund_code   fund code.  VARCHAR2(6).
p_orgn_code   Organization code.  VARCHAR2(6).
p_acct_code   Account code.  VARCHAR2(6).
p_prog_code   Program code.  VARCHAR2(6).
p_actv_code   Activity code.  VARCHAR2(6).
p_locn_code   Location code.  VARCHAR2(6).
p_proj_code   Project code.  VARCHAR2(6).
p_nsf_override_ind   Nonsufficient funds suspense indicator.  VARCHAR2(1).
p_appr_amt_pct   Approved amount percent.  NUMBER(21,16).
p_disc_amt_pct   Discount amount percent.  NUMBER(21,16).
p_addl_amt_pct   Additional charge amount percent.  NUMBER(21,16).
p_tax_amt_pct   Tax amount percent.  NUMBER(21,16).
p_activity_date   Activity date.  Date.
p_user_id   User ID.  VARCHAR2(30).
p_fsyr_code   Fiscal year code.  VARCHAR2(2).
p_period   Fiscal period code.  VARCHAR2(2).
p_rucl_code_po   PO rule class code. VARCHAR2(4).
p_disc_rucl_code   Discount rule class code.  VARCHAR2(4).
p_tax_rucl_code   Tax rule class code.  VARCHAR2(4).
p_addl_rucl_code   Additional charge rule class code.  VARCHAR2(4).
p_rucl_code_liq   Liquidation rule class code.  VARCHAR2(4).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_nsf_susp_ind   Nonsufficient funds suspense indicator.  VARCHAR2(1).
p_post_date   Post date.  Date.
p_appr_ind   Approval indicator.  VARCHAR2(1).
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_convert_amt   Convert approved amount.  NUMBER(17,2).
p_convert_disc_amt   Convert discount amount.  NUMBER(17,2).
p_convert_tax_amt   Convert tax amount.  NUMBER(17,2).
p_convert_addl_chrg_amt   Convert additional charge amount.  NUMBER(17,2).
p_rowid   Rowid of the accounting record.  VARCHAR2.


P_update_accounting

Procedure P_update_accounting(p_pohd_code             FPRPODA.FPRPODA_POHD_CODE%TYPE,
                              p_change_seq_num        FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE Default Null,
                              p_item                  FPRPODA.FPRPODA_ITEM%TYPE,
                              p_seq_num               FPRPODA.FPRPODA_SEQ_NUM%TYPE,
                              p_activity_date         FPRPODA.FPRPODA_ACTIVITY_DATE%TYPE Default Null,
                              p_user_id               FPRPODA.FPRPODA_USER_ID%TYPE Default Null,
                              p_amt                   FPRPODA.FPRPODA_AMT%TYPE Default Null,
                              p_disc_amt              FPRPODA.FPRPODA_DISC_AMT%TYPE Default Null,
                              p_tax_amt               FPRPODA.FPRPODA_TAX_AMT%TYPE Default Null,
                              p_addl_chrg_amt         FPRPODA.FPRPODA_ADDL_CHRG_AMT%TYPE Default Null,
                              p_fsyr_code             FPRPODA.FPRPODA_FSYR_CODE%TYPE Default Null,
                              p_period                FPRPODA.FPRPODA_PERIOD%TYPE Default Null,
                              p_rucl_code_po          FPRPODA.FPRPODA_RUCL_CODE_PO%TYPE Default Null,
                              p_disc_rucl_code        FPRPODA.FPRPODA_DISC_RUCL_CODE%TYPE Default Null,
                              p_tax_rucl_code         FPRPODA.FPRPODA_TAX_RUCL_CODE%TYPE Default Null,
                              p_addl_rucl_code        FPRPODA.FPRPODA_ADDL_RUCL_CODE%TYPE Default Null,
                              p_rucl_code_liq         FPRPODA.FPRPODA_RUCL_CODE_LIQ%TYPE Default Null,
                              p_coas_code             FPRPODA.FPRPODA_COAS_CODE%TYPE Default Null,
                              p_acci_code             FPRPODA.FPRPODA_ACCI_CODE%TYPE Default Null,
                              p_fund_code             FPRPODA.FPRPODA_FUND_CODE%TYPE Default Null,
                              p_orgn_code             FPRPODA.FPRPODA_ORGN_CODE%TYPE Default Null,
                              p_acct_code             FPRPODA.FPRPODA_ACCT_CODE%TYPE Default Null,
                              p_prog_code             FPRPODA.FPRPODA_PROG_CODE%TYPE Default Null,
                              p_actv_code             FPRPODA.FPRPODA_ACTV_CODE%TYPE Default Null,
                              p_locn_code             FPRPODA.FPRPODA_LOCN_CODE%TYPE Default Null,
                              p_proj_code             FPRPODA.FPRPODA_PROJ_CODE%TYPE Default Null,
                              p_susp_ind              FPRPODA.FPRPODA_SUSP_IND%TYPE Default Null,
                              p_nsf_susp_ind          FPRPODA.FPRPODA_NSF_SUSP_IND%TYPE Default Null,
                              p_post_date             FPRPODA.FPRPODA_POST_DATE%TYPE Default Null,
                              p_appr_ind              FPRPODA.FPRPODA_APPR_IND%TYPE Default Null,
                              p_nsf_override_ind      FPRPODA.FPRPODA_NSF_OVERRIDE_IND%TYPE Default Null,
                              p_closed_ind            FPRPODA.FPRPODA_CLOSED_IND%TYPE Default Null,
                              p_convert_amt           FPRPODA.FPRPODA_CONVERT_AMT%TYPE Default Null,
                              p_convert_disc_amt      FPRPODA.FPRPODA_CONVERT_DISC_AMT%TYPE Default Null,
                              p_convert_tax_amt       FPRPODA.FPRPODA_CONVERT_TAX_AMT%TYPE Default Null,
                              p_convert_addl_chrg_amt FPRPODA.FPRPODA_CONVERT_ADDL_CHRG_AMT%TYPE Default Null,
                              p_appr_amt_pct          FPRPODA.FPRPODA_APPR_AMT_PCT%TYPE Default Null,
                              p_disc_amt_pct          FPRPODA.FPRPODA_DISC_AMT_PCT%TYPE Default Null,
                              p_addl_amt_pct          FPRPODA.FPRPODA_ADDL_AMT_PCT%TYPE Default Null,
                              p_tax_amt_pct           FPRPODA.FPRPODA_TAX_AMT_PCT%TYPE Default Null,
                              p_rowid                 VARCHAR2 Default Null)

Updates an accounting record.

Parameters
p_pohd_code   The purchase order code.  VARCHAR2(8) Required.
p_change_seq_num   The purchase order item change sequence number. NUMBER(3).
p_item   The accounting item number.  NUMBER(4).
p_seq_num   The accounting sequence number.  NUMBER(4).
p_activity_date   Activity date.  Date.
p_user_id   User ID.  VARCHAR2(30).
p_amt   Approved amount.  NUMBER(17,2).
p_disc_amt   Discount amount.  NUMBER(17,2).
p_tax_amt   Tax amount.  NUMBER(17,2).
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2).
p_fsyr_code   Fiscal year code.  VARCHAR2(2).
p_period   Fiscal period code.  VARCHAR2(2).
p_rucl_code_po   PO rule class code. VARCHAR2(4).
p_disc_rucl_code   Discount rule class code.  VARCHAR2(4).
p_tax_rucl_code   Tax rule class code.  VARCHAR2(4).
p_addl_rucl_code   Additional charge rule class code.  VARCHAR2(4).
p_rucl_code_liq   Liquidation rule class code.  VARCHAR2(4).
p_coas_code   Chart of accounts code.  VARCHAR2(1) .
p_acci_code   Index code.  VARCHAR2(6).
p_fund_code   fund code.  VARCHAR2(6).
p_orgn_code   Organization code.  VARCHAR2(6).
p_acct_code   Account code.  VARCHAR2(6).
p_prog_code   Program code.  VARCHAR2(6).
p_actv_code   Activity code.  VARCHAR2(6).
p_locn_code   Location code.  VARCHAR2(6).
p_proj_code   Project code.  VARCHAR2(6).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_nsf_susp_ind   Nonsufficient funds suspense indicator.  VARCHAR2(1).
p_post_date   Post date.  Date.
p_appr_ind   Approval indicator.  VARCHAR2(1).
p_nsf_override_ind   No sufficient funds override indicator.  VARCHAR2(1).
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_convert_amt   Convert approved amount.  NUMBER(17,2).
p_convert_disc_amt   Convert discount amount.  NUMBER(17,2).
p_convert_tax_amt   Convert tax amount.  NUMBER(17,2).
p_convert_addl_chrg_amt   Convert additional charge amount.  NUMBER(17,2).
p_appr_amt_pct   Approved amount percent.  NUMBER(21,16).
p_disc_amt_pct   Discount amount percent.  NUMBER(21,16).
p_addl_amt_pct   Additional charge amount percent.  NUMBER(21,16).
p_tax_amt_pct   Tax amount percent.  NUMBER(21,16).
p_rowid   Rowid of the accounting record.  VARCHAR2.


p_validate_accounting

Procedure p_validate_accounting(p_pohd_code             FPRPODA.FPRPODA_POHD_CODE%TYPE,
                                p_change_seq_num        FPRPODA.FPRPODA_CHANGE_SEQ_NUM%TYPE Default Null,
                                p_item                  FPRPODA.FPRPODA_ITEM%TYPE,
                                p_seq_num               FPRPODA.FPRPODA_SEQ_NUM%TYPE,
                                p_activity_date         FPRPODA.FPRPODA_ACTIVITY_DATE%TYPE Default Null,
                                p_user_id               FPRPODA.FPRPODA_USER_ID%TYPE Default Null,
                                p_amt                   FPRPODA.FPRPODA_AMT%TYPE Default Null,
                                p_disc_amt              FPRPODA.FPRPODA_DISC_AMT%TYPE Default Null,
                                p_tax_amt               FPRPODA.FPRPODA_TAX_AMT%TYPE Default Null,
                                p_addl_chrg_amt         FPRPODA.FPRPODA_ADDL_CHRG_AMT%TYPE Default Null,
                                p_fsyr_code             FPRPODA.FPRPODA_FSYR_CODE%TYPE Default Null,
                                p_period                FPRPODA.FPRPODA_PERIOD%TYPE Default Null,
                                p_rucl_code_po          FPRPODA.FPRPODA_RUCL_CODE_PO%TYPE Default Null,
                                p_disc_rucl_code        FPRPODA.FPRPODA_DISC_RUCL_CODE%TYPE Default Null,
                                p_tax_rucl_code         FPRPODA.FPRPODA_TAX_RUCL_CODE%TYPE Default Null,
                                p_addl_rucl_code        FPRPODA.FPRPODA_ADDL_RUCL_CODE%TYPE Default Null,
                                p_rucl_code_liq         FPRPODA.FPRPODA_RUCL_CODE_LIQ%TYPE Default Null,
                                p_coas_code             FPRPODA.FPRPODA_COAS_CODE%TYPE Default Null,
                                p_acci_code             FPRPODA.FPRPODA_ACCI_CODE%TYPE Default Null,
                                p_fund_code             FPRPODA.FPRPODA_FUND_CODE%TYPE Default Null,
                                p_orgn_code             FPRPODA.FPRPODA_ORGN_CODE%TYPE Default Null,
                                p_acct_code             FPRPODA.FPRPODA_ACCT_CODE%TYPE Default Null,
                                p_prog_code             FPRPODA.FPRPODA_PROG_CODE%TYPE Default Null,
                                p_actv_code             FPRPODA.FPRPODA_ACTV_CODE%TYPE Default Null,
                                p_locn_code             FPRPODA.FPRPODA_LOCN_CODE%TYPE Default Null,
                                p_proj_code             FPRPODA.FPRPODA_PROJ_CODE%TYPE Default Null,
                                p_susp_ind              FPRPODA.FPRPODA_SUSP_IND%TYPE Default Null,
                                p_nsf_susp_ind          FPRPODA.FPRPODA_NSF_SUSP_IND%TYPE Default Null,
                                p_post_date             FPRPODA.FPRPODA_POST_DATE%TYPE Default Null,
                                p_appr_ind              FPRPODA.FPRPODA_APPR_IND%TYPE Default Null,
                                p_nsf_override_ind      FPRPODA.FPRPODA_NSF_OVERRIDE_IND%TYPE Default Null,
                                p_closed_ind            FPRPODA.FPRPODA_CLOSED_IND%TYPE Default Null,
                                p_convert_amt           FPRPODA.FPRPODA_CONVERT_AMT%TYPE Default Null,
                                p_convert_disc_amt      FPRPODA.FPRPODA_CONVERT_DISC_AMT%TYPE Default Null,
                                p_convert_tax_amt       FPRPODA.FPRPODA_CONVERT_TAX_AMT%TYPE Default Null,
                                p_convert_addl_chrg_amt FPRPODA.FPRPODA_CONVERT_ADDL_CHRG_AMT%TYPE Default Null,
                                p_appr_amt_pct          FPRPODA.FPRPODA_APPR_AMT_PCT%TYPE Default Null,
                                p_disc_amt_pct          FPRPODA.FPRPODA_DISC_AMT_PCT%TYPE Default Null,
                                p_addl_amt_pct          FPRPODA.FPRPODA_ADDL_AMT_PCT%TYPE Default Null,
                                p_tax_amt_pct           FPRPODA.FPRPODA_TAX_AMT_PCT%TYPE)

Validates an accounting record.

Parameters
p_pohd_code   The purchase order code.  VARCHAR2(8) Required.
p_change_seq_num   The purchase order item change sequence number. NUMBER(3).
p_item   The accounting item number.  NUMBER(4).
p_seq_num   The accounting sequence number.  NUMBER(4).
p_activity_date   Activity date.  Date.
p_user_id   User ID.  VARCHAR2(30).
p_amt   Approved amount.  NUMBER(17,2).
p_disc_amt   Discount amount.  NUMBER(17,2).
p_tax_amt   Tax amount.  NUMBER(17,2).
p_addl_chrg_amt   Additional charge amount.  NUMBER(17,2).
p_fsyr_code   Fiscal year code.  VARCHAR2(2).
p_period   Fiscal period code.  VARCHAR2(2).
p_rucl_code_po   PO rule class code. VARCHAR2(4).
p_disc_rucl_code   Discount rule class code.  VARCHAR2(4).
p_tax_rucl_code   Tax rule class code.  VARCHAR2(4).
p_addl_rucl_code   Additional charge rule class code.  VARCHAR2(4).
p_rucl_code_liq   Liquidation rule class code.  VARCHAR2(4).
p_coas_code   Chart of accounts code.  VARCHAR2(1) .
p_acci_code   Index code.  VARCHAR2(6).
p_fund_code   fund code.  VARCHAR2(6).
p_orgn_code   Organization code.  VARCHAR2(6).
p_acct_code   Account code.  VARCHAR2(6).
p_prog_code   Program code.  VARCHAR2(6).
p_actv_code   Activity code.  VARCHAR2(6).
p_locn_code   Location code.  VARCHAR2(6).
p_proj_code   Project code.  VARCHAR2(6).
p_susp_ind   Suspense indicator.  VARCHAR2(1).
p_nsf_susp_ind   Nonsufficient funds suspense indicator.  VARCHAR2(1).
p_post_date   Post date.  Date.
p_appr_ind   Approval indicator.  VARCHAR2(1).
p_nsf_override_ind   No sufficient funds override indicator.  VARCHAR2(1).
p_closed_ind   Closed indicator.  VARCHAR2(1).
p_convert_amt   Convert approved amount.  NUMBER(17,2).
p_convert_disc_amt   Convert discount amount.  NUMBER(17,2).
p_convert_tax_amt   Convert tax amount.  NUMBER(17,2).
p_convert_addl_chrg_amt   Convert additional charge amount.  NUMBER(17,2).
p_appr_amt_pct   Approved amount percent.  NUMBER(21,16).
p_disc_amt_pct   Discount amount percent.  NUMBER(21,16).
p_addl_amt_pct   Additional charge amount percent.  NUMBER(21,16).
p_tax_amt_pct   Tax amount percent.  NUMBER(21,16).


f_complete_order

Function f_complete_order(P_code           fpbpohd.fpbpohd_code%type,
                          p_change_seq_num number Default Null)
  return string_nt

Wrap up logic for document completion.

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
messages generated during the completion process.


f_change_order_in_process

Function f_change_order_in_process(P_code           fpbpohd.fpbpohd_code%type,
                                   p_change_seq_num fpbpohd.fpbpohd_change_seq_num%type)
  return varchar2

To test PO has receiving, invoicing and returns document

Parameters
P_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
messages generated during the completion process.


f_get_tax_amts_and_budg_auth

Function f_get_tax_amts_and_budg_auth(p_code           fpbpohd.fpbpohd_code%TYPE,
                                      p_change_seq_num NUMBER DEFAULT NULL)
  RETURN foksels.ref_cursortype

Wrap up logic to perform completion logic and get tax amounts

Parameters
p_pohd_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
a cursor variable that will fetch the set of records of item tax and accounting tax.


f_po_posted

Function f_po_posted(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                     p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN BOOLEAN

Checks to see if a purchase order is posted.

Parameters
p_code   The purchase order code. VARCHAR2(8) Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
TRUE if posted, otherwise FALSE.


f_po_status

Function f_po_status(p_code           fpbpohd.fpbpohd_code%type default null,
                     p_doc_ref_Code   fpbpohd.fpbpohd_doc_ref_code%type default null,
                     p_change_seq_num number default null,
                     pohd_rec         fpbpohd%rowtype default NULL)
  return varchar2

Checks the purchase order status.

Parameters
p_code   The purchase order code. VARCHAR2(8).
p_doc_ref_code   Purchase order reference code.  VARCHAR2(20).
p_change_seq_num   The purchase order change sequence number. NUMBER(3).
pohd_rec   The purchase order header record. fpbpohd%ROWTYPE.

Returns
the status as CANCELLED, DISPATCHED or PENDING.


f_is_eproc_po

Function f_is_eproc_po(p_code fpbpohd.fpbpohd_code%type,
                       action varchar2 default null) return varchar2

Checks to see if the purchase order is an e-Procurement purchase order.

Parameters
p_code   The purchase order code. VARCHAR2(8).
action   The CREATE, UPDATE or DELETE action for the purchase order record.  VARCHAR2.

Returns
Y if it is, otherwise N.


f_doc_ref_code_exists

Function f_doc_ref_code_exists(p_doc_ref_code varchar2) RETURN BOOLEAN

Checks to see if a purchase order reference code exists.

Parameters
p_doc_ref_code   Purchase order reference code.  VARCHAR2(20)  Required..

Returns
TRUE if exists, otherwise FALSE.


f_doc_code_exists

Function f_doc_code_exists(p_doc_code varchar2) RETURN BOOLEAN

Checks to see if a purchase order code exists.

Parameters
p_code   The purchase order code. VARCHAR2(8)  Required.

Returns
TRUE if exists, otherwise FALSE.


f_document_ref_code_exists

Function f_document_ref_code_exists(p_doc_ref_code varchar2)
  RETURN VARCHAR2

Checks to see if a purchase order reference code exists.

Parameters
p_doc_ref_code   Purchase order reference code.  VARCHAR2(20)  Required..

Returns
TRUE as VARCHAR2 data type if exists, otherwise FALSE as VARCHAR2 data type.


f_get_doc_ref_code

Function f_get_doc_ref_code(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                            p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN VARCHAR2

Selects a purchase order reference code.

Parameters
p_code   The purchase order code. VARCHAR2(8)  Required.
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
purchase order reference code.


f_get_doc_code

Function f_get_doc_code(p_doc_ref_code   varchar2,
                        p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN VARCHAR2

Selects a purchase order code.

Parameters
p_doc_ref_code   Purchase order reference code.  VARCHAR2(20)  Required..
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
purchase order code.


f_get_cancel_mesg

Function f_get_cancel_mesg RETURN varchar2

Selects a purchase order cancellation message.

Returns
cancellation message.


f_get_status_code

Function f_get_status_code(which_status varchar2) RETURN varchar2

Selects a purchase order status code.

Returns
purchase order status code.


f_is_co_acceptable

Function f_is_co_acceptable(p_code           FPBPOHD.FPBPOHD_CODE%TYPE,
                            p_change_seq_num FPBPOHD.FPBPOHD_CHANGE_SEQ_NUM%TYPE DEFAULT NULL)
  RETURN VARCHAR2

Verifies change order is acceptable for the Purchase order number.

Parameters
p_code   Purchase order number.  VARCHAR2(8)  Required..
p_change_seq_num   The purchase order change sequence number. NUMBER(3).

Returns
error message if any.