Monday, November 12, 2018

AP Invoice Interface

AP Invoice Interface

AP Invoice Interface:
select lookup_code
from ap_lookup_codes
where lookup_type='SOURCE'

INSERT
INTO ap_invoices_interface
(
invoice_id,
INVOICE_NUM,
DESCRIPTION,
invoice_type_lookup_code,
invoice_date,
vendor_id,
vendor_site_id,
invoice_amount,
INVOICE_CURRENCY_CODE,
source,
payment_method_code,
taxation_country
org_id
)
VALUES
(
AP_INVOICES_INTERFACE_S.NEXTVAL
, 'TESTINV01'
,'this is test invoice'
,'STANDARD'
,SYSDATE -40 --<invoice date>
,35028--<vendor_id validated against po_vendors.vendor_id>,
,2277--<vendor_site_id validated against po_vendor_sites.vendor_site_id>,
,100--<invoice_amount>
,'AED'
,'MANUAL INVOICE ENTRY'
,'CHECK'
, 'AE'
,81
);


INSERT
INTO ap_invoice_lines_interface
(
invoice_id,
invoice_line_id,
line_number,
line_type_lookup_code,
amount,
accounting_date,
dist_code_combination_id
)
VALUES
(
AP_INVOICES_INTERFACE_S.CURRVAL
,AP_INVOICE_LINES_INTERFACE_S.NEXTVAL
,1--<some unique_number>,
,'ITEM'--<ITEM>/<FREIGHT>/<TAX>
,100--<line_amount> sum of line_amount should always be equal to invoice_amount,
,SYSDATE -40
,4565 --'<account code>'—CC_ID
);

COMMIT;
After inserting, run the “PAYABLES OPEN INTERFACE IMPORT” program to load invoice

No comments:

Post a Comment

SQL Important Queries

  How to delete rows with no where clause The following example deletes  all rows  from the  Person.Person  the table in the AdventureWork...