Oracle Apps Adapter 6.0 | webMethods Oracle Applications Adapter Documentation | webMethods Oracle Applications Adapter 12.2.7 Predefined Transaction Services Documentation | Financial Predefined Transaction Services | Receive Accounts Payable Invoice Service
 
Receive Accounts Payable Invoice Service
This service is in the WmOAFIN1227 package and has the following fully-qualified service name: payables1227.intoOA.APInvoice:receiveAPInvoice.
The invoice type can be either Credit or Standard depending on the invoice amount. You can create multiple distributions for an invoice line by populating the line interface table. You can also import an invoice matched to a purchase order.
Database Scripts
This service uses the following database scripts:
Database Script
Description
wm_install_into_apinvoice.sql
Runs all the scripts listed below, except the uninstall script.
wm_into_apinvoice_pkg.sql
Installs WM_AP_INV_IMP_HANDLER_PKG.
WM_HANDLE_OPENAP, which calls the WM_CONC_REQUEST.
WM_REQUEST_SUBMIT procedure to submit the Accounts Payable import process.
wm_into_apinvoice_seq.sql
Creates the following component:
WM_AP_GROUP_S, which creates the GROUP_ID
wm_drop_into_apinvoice.sql
Uninstalls all components created by wm_install_into_apinvoice.sql.
For more information about using database scripts, see Database Scripts.
Supporting Transaction Definitions
This service was built from the configured services defined in the following transaction definitions:
*setAPInvoiceTxn1227.txp
*APInvoiceTransactions1227.txp
For information about using the transaction definition files to customize this service, see Transaction Definitions.
Flow Control
The main flow executes as follows:
*specifyDefaultSettings specifies the default parameter settings required for service execution. You should change these settings accordingly.
*specifyConcProgParams specifies the default parameter settings required for concurrent program execution. You should change these settings accordingly.
*pickSequence generates the group ID from the custom sequence WM_AP_GROUP_S that is required in the interface table.
*bizDocMapping maps the incoming business document structure to the required Oracle Applications data structure (invoice interface table). This service uses the following services internally to provide required data feed during the mapping.
*pickSequence is a transformer for mapping the business document IData structure to the interface table IData structure. It uses the sequence AP_INVOICES_INTERFACE_S to generate the invoice ID. Each invoice that will be imported needs an Invoice ID.
*convertWorkFlow transforms workflow text to its code.
*getVendorSiteId is a transformer for mapping the business document IData structure to the interface table IData structure. It takes ADDRESS_LINE1, ADDRESS_LINE2, ADDRESS_LINE3, CITY, STATE, ZIP, COUNTRY, VENDOR_NAME, and ORG_NAME as the input parameters, queries the AP_SUPPLIER_SITES_ALL, AP_SUPPLIERS, and ORG_ORGANIZATION_DEFINITIONS tables, and gets the VENDOR_SITE_ID corresponding to the passed values.
*pickSequence generates the invoice line ID that requires inserting a line in the AP_INVOICE_LINES table. It uses sequence AP_INVOICES_INTERFACE_S to generate unique ID.
*getLineTypeLookUpCode is a transformer for mapping the business document IData structure to the line interface IData structure. It finds the lookup code from lookup type. For the invoice type, it finds the lookup code for the INVOICE DISTRIBUTION TYPE lookup code.
*getShipToLocationCode finds the ship to location code from the address provided incoming document.
*getProjectAndTaskId is a transformer for mapping the business document IData structure to the interface table IData structure. It takes Project Name and Task Name as input and returns Project ID and Task ID.
*getPACCInvoiceId gets the PA_CC_INVOICE_ID required for the line interface table. This service then calls the following services to select the required invoice ID from the database and feeds it to the interface table IData structure.
*getARInvoiceId is a transformer for mapping the business document IData structure to the interface table IData structure. It takes TRX_NUMBER AND ORG_ID as the input parameter to select the ARInvoice ID (that is, CUSTOMER_TRX_ID).
*getAwardId selects AWARD_ID from AWARD_FULL_NAME. This is a transformer for mapping business document to the interface table IData structure.
*setAPInvoiceTxn inserts data into the interface table AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE. It extracts data from the IData structure populated in the bizDocMapping service and puts the data into the interface table in Oracle Applications for APINVOICE.
*importAPInvoice imports data to the production table from the interface table. To monitor the import process, it then sequentially invokes the callImportPayablesInvoice, checkAPInvoiceImportStatus, and getAPInvoice_ERR services. If the status of execution is FAILED, it appends the dbErrorMsgRecordSet and concProgMsgRecordSet record list. Otherwise it checks for any data errors that occurred during the import process.
*execAPInvoiceConcProg inserts data into the production table. It picks up data from the AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE interface tables, and inserts data into the AP_INVOICES_ALL and AP_DISTRIBUTIONS_ALL production tables.
*checkAPInvoiceImportStatus queries the AP_INVOICES_INTERFACE table to find the number of rows for the passed request ID.
*getAPInvoiceImport_ERR gets the error message that occurs during the data import to the production table from interface table.
For more details on receive transactions, see Overview of Receive Service Transaction Processing.
Business Document Structure
This uses the business document APInvoiceBizDoc. Its structure is as follows:
*1.0 AP_INVOICE
*1.1 AP_INVOICE_LINES
1.0 AP_INVOICE (Maps to AP_INVOICES_INTERFACE)
Field Name
Maps to Column
Description
WEB_TRANSACTION_
ID
Not used to run this service.
DOCUMENT_TYPE
Not used to run this service.
DOCUMENT_STATUS
Not used to run this service.
INVOICE_ID
Not used to run this service.
INVOICE_NUM
INVOICE_NUM
Required. Invoice number.
INVOICE_TYPE_
LOOKUP_CODE
INVOICE_TYPE_
LOOKUP_CODE
The invoice type. Valid values are Standard and Credit Memo.
INVOICE_DATE
INVOICE_DATE
PO_NUMBER
PO_NUMBER
Purchase order number.
VENDOR_NUMBER
VENDOR_NUM
Vendor number.
VENDOR_NAME
VENDOR_NAME
ADDRESS_LINE1
ADDRESS_LINE2
ADDRESS_LINE3
COUNTY
CITY
STATE
ZIP
COUNTRY
VENDOR_SITE_ID
Address of the vendor site. Derives the Vendor Site ID from the interface table.
INVOICE_AMOUNT
INVOICE_AMOUNT
INVOICE_CURRENCY_
CODE
INVOICE_CURRENCY_
CODE
Currency of invoice.
EXCHANGE_RATE
EXCHANGE_RATE
Exchange rate for foreign currency invoices.
EXCHANGE_
RATE_TYPE
EXCHANGE_
RATE_TYPE
Rate type, such as Corporate or User.
EXCHANGE_DATE
EXCHANGE_DATE
Date on which the exchange rate has to be taken.
TERMS_NAME
TERMS_NAME
Payment terms name.
DESCRIPTION
DESCRIPTION
Description of invoice.
AWT_GROUP_NAME
AWT_GROUP_NAME
Withholding tax name.
SOURCE
SOURCE
Source of the invoice.
PAYMENT_CROSS_
RATE_TYPE
PAYMENT_CROSS_
RATE_TYPE
Cross currency payment rate type.
PAYMENT_CROSS_
RATE_DATE
PAYMENT_CROSS_
RATE_DATE
Cross currency payment rate date.
PAYMENT_CROSS_
RATE
PAYMENT_CROSS_
RATE
Exchange rate between invoice and payment. This value is 1 unless currencies are associated as fixed-rate.
PAYMENT_
CURRENCY_CODE
PAYMENT_
CURRENCY_CODE
Cross Currency Payment currency.
WORKFLOW
WORKFLOW
Indicates whether the payables open interface workflow should process the record. Use:
*Y for To be Processed
*S for Processing
*D for Processed
*NULL for Not Applicable
DOC_CATEGORY_
CODE
DOC_CATEGORY_
CODE
Defaults to Standard or Credit depending on the invoice type. You can assign a valid document category that exists in Accounts Payable.
VOUCHER_NUM
VOUCHER_NUM
Voucher number.
PAYMENT_METHOD_
LOOKUP_CODE
PAYMENT_METHOD_
LOOKUP_CODE
Name of payment method.
PAY_GROUP_
LOOKUP_CODE
PAY_GROUP_
LOOKUP_CODE
Name of pay group.
GOODS_RECEIVED_
DATE
GOODS_RECEIVED_
DATE
Date invoice items received.
INVOICE_RECEIVED_
DATE
INVOICE_RECEIVED_
DATE
Date invoice received.
GL_DATE
GL_DATE
Accounting date to default to invoice distributions.
LIABILITY_ACCOUNT
ACCTS_PAY_CODE_
COMBINATION_ID
Accounts payable liability GL code combination ID is derived from the Accounts Code Combination.
USSGL_
TRANSACTION_
CODE
USSGL_
TRANSACTION_
CODE
Default transaction code for creating US standard general ledger journal entries.
EXCLUSIVE_
PAYMENT_
FLAG
EXCLUSIVE_
PAYMENT_
FLAG
ORGANIZATION_
NAME
ORG_ID
Organization name that derives the ORG_ID from organizations definitions.
AMOUNT_
APPLICABLE_
TO_DISCOUNT
AMOUNT_
APPLICABLE_
TO_DISCOUNT
Amount of invoice applicable to a discount.
PREPAY_
INVOICE_NUM
PREPAY_NUM
The invoice number of an existing fully-paid prepayment to be applied to the imported invoice.
PREPAY_
APPLY_
AMOUNT
PREPAY_
APPLY_
AMOUNT
The amount of prepayment that you want to apply to the invoice. This amount must be a positive number.
PREPAY_GL_
DATE
PREPAY_GL_
DATE
The accounting date used for the prepayment application. If left null, it uses the invoice GL_DATE.
1.1 AP_INVOICE_LINES (Maps to AP_INVOICES_LINES_INTERFACE)
Field Name
Maps to Column
Description
INVOICE_ID
INVOICE_ID
DISTRIBUTION_
LINE_NUMBER
LINE_NUMBER
Invoice line number.
LINE_TYPE
LINE_TYPE_
LOOKUP_CODE
Type of invoice line. Valid values are Item, Freight, Tax, and Miscellaneous.
LINE_GROUP_
NUMBER
LINE_GROUP_
NUMBER
Prorates charges across a group of lines.
AMOUNT
AMOUNT
Line amount.
ACCOUNTING_DATE
ACCOUNTING_
DATE
DESCRIPTION
DESCRIPTION
AMOUNT_INCLUDES_
TAX
AMOUNT_
INCLUDES_
TAX_FLAG
Indicates whether the line amount includes tax.
TAX_CODE
TAX_CODE
Validated against AP_TAX_CODES.NAME.
PRORATE_ACCROSS_
FLAG
PRORATE_
ACROSS_
FLAG
Indicates whether charges should be prorated across a group of lines.
FINAL_MATCH_FLAG
FINAL_
MATCH_
FLAG
PO_NUMBER
PO_NUMBER
Purchase order number used for PO matching.
PO_LINE_NUMBER
PO_LINE_
NUMBER
Purchase order line number used for PO matching.
SHIPMENT_NUM
PO_SHIPMENT
_NUM
Purchase order shipment number used for PO matching.
DISTRIBUTION_NUM
PO_DISTRI
BUTION_NUM
Purchase order distribution line number used for PO matching.
ITEM_DESCRIPTION
ITEM_
DESCRIPTION
QUANTITY_INVOICED
QUANTITY_
INVOICED
Quantity invoiced against purchase order shipment.
ADDRESS_LINE1
ADDRESS_LINE2
ADDRESS_LINE3
CITY
COUNTY
STATE
POSTAL_CODE
COUNTRY
SHIP_TO_
LOCATION_
CODE
Derives the Location ID based on the Ship To Location Address.
UNIT_PRICE
UNIT_PRICE
Unit price for purchase order matched invoice items.
DISTRIBUTION_SET_
NAME
DISTRIBUTION_
SET_NAME
DIST_CODE_
CONCATENATED
DIST_CODE_
CONCATENATED
Account flexfield for account associated with distribution line.
AWT_GROUP_NAME
AWT_GROUP_
NAME
Withholding tax group name.
RELEASE_NUM
RELEASE_
NUM
Blanket purchase order release number used for PO matching.
ACCOUNT_SEGMENT
ACCOUNT_
SEGMENT
To override the balancing segment in the account.
BALANCING_SEGMENT
BALANCING_
SEGMENT
To override the balancing segment.
COST_CENTER_SEGMENT
COST_
CENTER_
SEGMENT
To override the cost center in the account.
PROJECT_NAME
PROJECT_ID
Project name validated against PA_PROJECTS_ALL_NAME.
TASK
TASK_ID
Project task name validated against PA_TASKS.
EXPENDITURE_TYPE
EXPENDITURE_
TYPE
Project expenditure type.
EXPENDITURE_
ITEM_DATE
EXPENDITURE_
ITEM_DATE
Project expenditure item date.
EXPENDITURE_
ORGANIZATION_NAME
EXPENDITURE_
ORGANIZATION_
ID
Project organization name.
PROJECT_ACCOUNTING_
CONTEXT
PROJECT_
ACCOUNTING_
CONTEXT
Project accounting context.
PA_ADDITION_FLAG
PA_
ADDITION_
FLAG
Indicates whether the invoice is for a project.
PA_QUANTITY
PA_QUANTITY
USSGL_TRANSACTION_
CODE
USSGL_
TRANSACTION_
CODE
USSGL transaction code for creating US standard general ledger journal entries.
STAT_AMOUNT
STAT_AMOUNT
Amount associated with distribution line for measuring statistical quantities.
TYPE_1099
TYPE_1099
INCOME_TAX_
REGION_NAME
INCOME_TAX_
REGION
Reporting region for distribution line for 1099 supplier.
ORGANIZATION_NAME
ORG_ID
Organization name validated against ORG_ORGANIZATION_DEFINITIONS.ORG_ID.
RECEIPT_NUMBER
RECEIPT_
NUMBER
Receipt number used for receipt matching.
RECEIPT_LINE_
NUMER
RECEIPT_LINE_
NUMBER
Receipt line number to which an invoice will be matched.
MATCH_OPTION
MATCH_OPTION
The value of the Invoice Match option on the PO shipment.
PACKING_SLIP
PACKING_SLIP
TAX_RECOVERY_
RATE
TAX_RECOVERY_
RATE
Tax recovery rate to be used in the tax calculation whenever recoverable tax is enable.
RCV_TRANSACTION_ID
RCV_
TRANSACTION_
ID
Transaction identifier from RCV_TRANSACTIONS.
PA_CC_AR_
INVOICE_NUMBER
PA_CC_AR_
INVOICE_ID
Project accounting invoice number validated against AR_CUSTOMER_TRX_ALL.TRX_NUMBER.
PA_CC_AR_
INVOICE_LINE_NUM
PA_CC_AR_
INVOICE_
LINE_NUM
Project accounting invoice line number.
PA_REFERENCE1
REFERENCE1
PA_REFERENCE2
REFERENCE2
TAX_RECOVERY_
OVERRIDE_FLAG
TAX_
RECOVERY_
OVERRIDE_
FLAG
Flag for tax override.
TAX_RECOVERABLE_
FLAG
TAX_
RECOVERABLE_
FLAG
TAX_OVERRIDE_
FLAG
TAX_CODE_
OVERRIDE_FLAG
PA_CC_
PROCESSED_CODE
PA_CC_
PROCESSED_
CODE
Processed code for Project Accounting.
AWARD_FULL_NAME
AWARD_ID
Finds the AWARD_ID.
CREDIT_CARD_TRX_ID
CREDIT_
CARD_TRX_ID
Credit card transaction identifier.
PRICE_CORRECT_
INV_NUM
PRICE_
CORRECT_
INV_NUM
Number of the invoice that this price correction invoice is correcting. Validated against AP_INVOICES_ALL.INVOICE_NUM.