Thursday 13 September 2012

Oracle Procurement Cards Interface (OR) Government Purchase Card (GPC) Program

Create a staging Table XX_EXPNESE_FEED_LINES_ALL and load the card information using SQL Loader
Required columns for interface

COMPANY_NUMBER
INTERNAL_REFERENCE
CARD_NUMBER
CUSTOMER_REFERENCE_NUMBER
CARD_HOLDER_NAME
TRANSACTION_DATE
SPEND_CATEGORY
TRANSACTION_TYPE
MERCHANT_NAME
CARD_CODE_VALUE
AMOUNT
VAT_DATA
TAX_AMOUNT
POSTED_DATE



Then create a package or procedure to load the data in to standard interface table AP_EXPNESE_FEED_LINES_ALL

FOR r_procurement_card_records IN c_procurement_card_records LOOP

--
-- Insert row into ap_expense_feed_lines
--
INSERT INTO ap_expense_feed_lines
( attribute1
, attribute2
, attribute3
, card_number
, attribute4
, transaction_date
, attribute5
, attribute6
, merchant_name
, card_code_value
, amount
, attribute7
, tax_amount
, posted_date
, posted_currency_code
, feed_line_id
, create_distribution_flag
, attribute_category
, creation_date
, created_by
, last_update_date
, last_updated_by
, reference_number
, card_program_id
)
VALUES
( RTRIM (r_procurement_card_records.merchant_name)
, RTRIM (r_procurement_card_records.card_code_value)
, RTRIM (r_procurement_card_records.company_number)
, RTRIM (REPLACE (r_procurement_card_records.card_number, '-', ''))
, RTRIM (r_procurement_card_records.card_holder_name)
, RTRIM (r_procurement_card_records.transaction_date)
, RTRIM (r_procurement_card_records.spend_category)
, RTRIM (r_procurement_card_records.transaction_type)
, RTRIM (r_procurement_card_records.merchant_name)
, RTRIM (r_procurement_card_records.card_code_value)
, RTRIM (r_procurement_card_records.amount)
, RTRIM (r_procurement_card_records.vat_data)
, RTRIM (r_procurement_card_records.tax_amount)
, RTRIM (r_procurement_card_records.posted_date)
, 'USD'
, ap_expense_feed_lines_s.NEXTVAL
, 'Y'
, P_DffContext
, TRUNC (SYSDATE)
, -1
, TRUNC (SYSDATE)
, -1
, TRUNC (SYSDATE) '-' ap_expense_feed_lines_s.CURRVAL
, P_CCProgramId
);
END LOOP; -- r_procurement_card_records

Then Run standard program Procurement Card Transactions Validation Program which will load the data in to ap_expense_feed_lines_all,ap_expense_feed_dists_all.

Then run standard program Create Procurement Card Issuer Invoice which loads into Invoices, Lines in to the Invoice Interface Tables ap_invoice_lines_interface,AP_INVOICES_INTERFACE

Finally run Payables Open Interface Import to create Invoice.
Invoice will creates with Source as ‘PCARD’

No comments:

Post a Comment