35
AP INVOICE INTERFACE Document by: Priyanka Aggarwal Creation Date: Jan 19, 2012 1

AP Invoice Interface

Embed Size (px)

DESCRIPTION

AP Invoice Interface

Citation preview

Page 1: AP Invoice Interface

AP INVOICE INTERFACEDocument by: Priyanka Aggarwal

Creation Date: Jan 19, 2012

1

Page 2: AP Invoice Interface

CONTENTS:

AP Invoice Interface:………………………………………………………………………………………………………………………..3

Pre-Requisites:…………………………………………………………………………………………………………………………………3

Interface table for AP Invoices :……………………………………………………………………………………….…3

AP Base tables:…………………………………………………………………………………………………………………..3

Mandatory columns……………………………………………………………………………………………………………4

AP_invoices_interface:…………………………………………………………………………………………………….…4

AP_invoice_lines_interface:…………………………………………………………………………………………….…4

Validations:………………………………………………………………………………………………………………………..5

Concurrent program:……………………………………………………………………………………………………….15

Payables open interface import:………………………………………………………………………………………15

API for concurrent program:…………………………………………………………………………………………….18

How to register stored procedure in apps…………………………………………………………………………20

Setups in AP invoice interface :………………………………………………………………………………………..24

How to handle the error ?:……………………………………………………………………………………………… 25

References……………………………………………………………………………………………………………………….27

2

Page 3: AP Invoice Interface

AP INVOICE INTERFACE

This interface helps us to import vendor invoices into Oracle applications from external systems into Oracle Applications.

Data in the AP_INVOICES_INTERFACE table used in conjunction with AP_INVOICE_LINES_INTERFACE table to create Payables Invoice, Invoice lines, Distributions and Schedule payments. Data in this table can be viewed and edited using ‘Open Interface Invoices’ window. The Payables Open Interface program validates each record in this interface table selected for import, and if the record contains valid data then the program creates a Payables Invoice.

PRE-REQUISITES:

Set of Books Code combinations Employees Lookups

INTERFACE TABLE FOR AP INVOICES

AP_INVOICES_INTERFACE;

AP_INVOICE_LINES_INTERFACE;

AP BASE TABLES:

AP_INVOICES_ALL – (Header information)

AP_INVOICE_DISTRIBUTIONS_ALL—( Lines information)

3

Page 4: AP Invoice Interface

MANDATORY COLUMNSSome important columns that need to be populated in the interface tables:

AP_INVOICES_INTERFACE : This is the open interface table for importing AP Invoices from external sources and stores header information about invoices.

Important columns:

INVOICE_ID (Required) (Unique identifier for this invoice within this batch. Same value should be populated in invoice’s lines in the AP_INVOICE_LINES_INTERFACE table to identify the data as belonging to the same invoice.)

INVOICE_NUM (Required) (Enter the invoice number that needs to be assigned to the invoice created in Payables from this record.)

INVOICE_TYPE_LOOKUP_CODE (OPTIONAL) INVOICE_DATE (OPTIONAL) VENDOR_NUM AND VENDOR_NAME (Optional) VENDOR_ID & VENDOR_SITE_ID (Required) : VENDOR_ID is unique identifier

for a supplier and VENDOR_SITE_ID is Internal supplier site identifier. INVOICE_AMOUNT (Required) : Amount of the invoice. INVOICE_CURRENCY_CODE (Optional) EXCHANGE_RATE (Optional) EXCHANGE_RATE_TYPE (Optional) EXCHANGE_DATE (Optional) DESCRIPTION (Optional)

SOURCE (Required) (source of the invoice data) PO_NUMBER (OPTIONAL) PAYMENT_METHOD_LOOKUP_CODE PAY_GROUP_LOOKUP_CODE ATTRIBUTE1 TO 15 ORG_ID

AP_INVOICE_LINES_INTERFACE:This is the lines interface table for the AP Invoice Open Interface and it is used in conjunction with AP_INVOICE_INTERFACE table. AP_INVOICE_LINES_INTERFACE stores information used to create one or more invoice distributions. Note that one row in this table may create, during the import process, more than one invoice distribution.

4

Page 5: AP Invoice Interface

Important columns:

INVOICE_ID (Required) :Enter the INVOICE_ID of the corresponding invoice in the AP_INVOICES_INTERFACE table.

INVOICE_NUM INVOICE_LINE_ID (Optional): You can enter a unique number for each invoice line of

an invoice. LINE_TYPE_LOOKUP_CODE (Required) Enter the lookup code for the type of

invoice distribution that you want Payables Open Interface Import to create from this record. The code you enter must be ITEM, TAX, MISCELLANEOUS, or FREIGHT. These lookup codes are stored in the AP_LOOKUP_CODES table.

AMOUNT (Required) : The invoice distribution amount. If you are matching to a purchase order, the AMOUNT = QUANTITY_INVOICED x UNIT PRICE. If the total amount of all the invoice distributions does not equal the amount of the invoice that has the same INVOICE_ID, then Payables Open Interface Import will reject the invoice.

DESCRIPTION TAX_CODE PO_NUMBER PO_LINE_NUMBER PO_SHIPMENT_NUM PO_DISTRIBUTION_NUM PO_UNIT_OF_MEASURE QUANTITY_INVOICED DIST_CODE_CONCATENATED DIST_CODE_COMBINATION_ID ATTRIBUTE1 to 5 ORG_ID

VALIDATIONS:

CHECKING OF INVOICE SUPPLIER EXIST OR NOTCASE1:

BEGIN IF i.supplier_number IS NOT NULL THEN BEGIN SELECT pov.vendor_id INTO v_vendor_id FROM po_vendors pov WHERE pov.segment1 = i.supplier_number; -- AND POV.VENDOR_NAME = I.SUPPLIER_NAME;

5

Page 6: AP Invoice Interface

EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line (fnd_file.output, 'Vendor Id for Vendor Number :' || ' ' || i.supplier_number || ' ' || 'is not found' ); v_status := FALSE; v_error_flag := 1; END; ELSE fnd_file.put_line (fnd_file.output, 'Vendor Number cannot be null for invoice number :' || ' ' || i.invoice_number ); v_status := FALSE; v_error_flag :=1; END IF; END;

CHECKING OF SUPPLIER SITE EXIST OR NOTCASE2:

BEGIN IF i.supp_site IS NOT NULL and v_status = TRUE THEN BEGIN SELECT pvs.vendor_site_id INTO v_vendor_site_id FROM po_vendors pov, po_vendor_sites_all pvs WHERE pov.vendor_id = pvs.vendor_id AND pov.segment1 = i.supplier_number AND pov.vendor_name = i.supplier_name AND pvs.vendor_site_code = i.supp_site AND pvs.org_id = p_org_id; --p_org_id; EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line (fnd_file.output, 'Vendor site id cannot find for invoice number :' || ' ' || i.invoice_number ); v_status := FALSE;

6

Page 7: AP Invoice Interface

END; ELSE fnd_file.put_line (fnd_file.output, 'Vendor site cannot be null for invoice number :' || ' ' || i.invoice_number ); v_status := FALSE; END IF;

END;

CHECK OF INVOICE NUMBER ALREADY EXIST FOR PARTICULAR SUPPLIER OR NOT

CASE3:

BEGIN IF i.invoice_number IS NOT NULL and v_status = TRUE THEN SELECT COUNT (1) INTO v_invoice_count FROM ap_invoices_all WHERE invoice_num = i.invoice_number AND org_id = i.org_id AND vendor_id = v_vendor_id AND vendor_site_id = v_vendor_site_id;

IF v_invoice_count = 0 THEN v_status := TRUE; ELSE v_status := FALSE; fnd_file.put_line (fnd_file.output, 'Invoice no.' || ' ' || i.invoice_number || ' already exist in system for this supplier' ); END IF; END IF; END; END IF; END;

7

Page 8: AP Invoice Interface

CHECK PERIOD IS OPEN OR NOT IN WHICH INVOICE WILL BE ENTERED

CASE4:

BEGIN IF i.invoice_date IS NOT NULL and v_status = TRUE THEN SELECT COUNT (1) INTO v_period_status FROM gl_period_statuses gps WHERE gps.period_name = TO_CHAR (TO_DATE (i.invoice_date, 'DD-MON-YY'), 'Mon-YY') /*TO_CHAR(I.INVOICE_DATE, 'MON-YY')*/ /*BY SARATH*/ AND gps.closing_status in('O','F') AND gps.application_id = 200;

IF v_period_status = 0 THEN v_status := FALSE; fnd_file.put_line (fnd_file.output, 'AP Period is not open for invoice No.:' || i.invoice_number ); ELSE v_status := TRUE; END IF; ELSE v_invoice_date := SYSDATE; END IF;

END;

CHECK INVOICE TYPE IS CORRECT OR NOTCASE 5:

------------------------------------------------------------------- BEGIN IF i.invoice_type IS NOT NULL and v_status = TRUE THEN SELECT COUNT (1) INTO v_inv_type_count FROM fnd_lookup_values WHERE lookup_type = 'INVOICE TYPE' AND lookup_code = TRIM (UPPER (i.invoice_type)) /*BY SARATH*/ AND enabled_flag = 'Y';

IF v_inv_type_count = 0 THEN v_status := FALSE;

8

Page 9: AP Invoice Interface

fnd_file.put_line (fnd_file.output, 'Invoice Type Code is wrong for invoice no.' || i.invoice_number ); -- ELSE -- V_STATUS := TRUE; END IF; END IF;

END;

CHECK WHETHER INVOICE CURRENCY EXIST OR NOTCASE 6:

BEGIN IF i.invoice_currency IS NOT NULL and v_status = TRUE THEN SELECT COUNT (1) INTO v_curr_count FROM fnd_currencies WHERE currency_code = TRIM (i.invoice_currency);

IF v_curr_count = 0 THEN v_status := FALSE; fnd_file.put_line (fnd_file.output, 'Currency Code is wrong for invoice No.' || ' ' || i.invoice_number ); -- ELSE -- V_STATUS := TRUE; END IF; END IF; END;

CHECK WHETHER INVOICE SOURCE IS DEFINED OR NOTCASE 7:

BEGIN

9

Page 10: AP Invoice Interface

IF i.SOURCE IS NOT NULL and v_status = TRUE THEN SELECT COUNT (1) INTO v_source_count FROM fnd_lookup_values WHERE lookup_type = 'SOURCE' AND lookup_code = TRIM (UPPER (i.SOURCE)) AND enabled_flag = 'Y';

IF v_source_count = 0 THEN v_status := FALSE; fnd_file.put_line (fnd_file.output, 'Invoice Source Code is wrong for invoice no.' || i.invoice_number ); -- ELSE -- V_STATUS := TRUE; END IF; ELSE fnd_file.put_line (fnd_file.output, 'Invoice Source Code cannot be null invoice no.' || i.invoice_number ); END IF;

END;

CHECK WHETHER INVOICE EXCHANGE RATE TYPE IS DEFINED OR NOT

CASE 8:

BEGIN BEGIN SELECT DISTINCT currency_code INTO v_currency_code FROM gl_sets_of_books WHERE set_of_books_id = fnd_profile.VALUE ('GL_SET_OF_BKS_ID'); EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line (fnd_file.output,

10

Page 11: AP Invoice Interface

'Unable to find basic currency' ); END;

IF v_currency_code <> TRIM (i.invoice_currency) and v_status = TRUE AND i.exchange_rate_type <> 'User' THEN BEGIN SELECT COUNT (1), conversion_type, user_conversion_type INTO v_ext_rate_type_count, v_ext_rate_type_code, v_user_con_type FROM gl_daily_conversion_types WHERE user_conversion_type <> 'User' AND user_conversion_type = TRIM (i.exchange_rate_type) GROUP BY conversion_type, user_conversion_type;

IF v_ext_rate_type_count <> 0 THEN IF v_ext_rate_type_code <> 'User' THEN BEGIN SELECT gdr.conversion_rate INTO v_conversion_rate FROM gl_daily_rates gdr WHERE gdr.from_currency = i.invoice_currency AND gdr.to_currency = v_currency_code AND gdr.conversion_date = TO_DATE (i.exchange_rate_date, 'DD-Mon-YY') AND gdr.conversion_type = v_ext_rate_type_code AND gdr.conversion_type <> 'User' AND gdr.status_code = 'C'; EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line (fnd_file.output, 'Conversion rate not define for Invoice no.' || i.invoice_number ); v_status := FALSE; END; ELSE v_conversion_rate := i.exchange_rate; END IF; END IF; EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line (fnd_file.output, 'Invoice Exchange rate type is wrong for Invoice No.' || i.invoice_number ); v_status := FALSE; END; END IF; END;

11

Page 12: AP Invoice Interface

CHECK WHETHER INVOICE PAYMENT TERMS IS CORRECT OR NOTCASE 9:

BEGIN IF i.payment_terms IS NOT NULL and v_status = TRUE THEN BEGIN SELECT a.term_id INTO v_term_id FROM ap_terms a WHERE a.NAME = TRIM (i.payment_terms) AND a.enabled_flag = 'Y'; EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line (fnd_file.output, 'Payment term is not defined in system for invoice no. ' || i.invoice_number ); v_status := FALSE; END; ELSE fnd_file.put_line (fnd_file.output, 'Payment term cannot be null for invoice no. ' || i.invoice_number ); END IF; END;

CHECK FOR DOC CATEGORY CODE IS CORRECT OR NOTCASE 10:

BEGIN IF i.doc_category_code IS NOT NULL and v_status = TRUE THEN BEGIN SELECT doc_category_code

12

Page 13: AP Invoice Interface

INTO v_doc_cat_code FROM fnd_doc_seq_categories_ap_v WHERE table_name IN ('AP_INVOICES', 'AP_INVOICES_ALL') AND UPPER (doc_category_code) LIKE TRIM (UPPER (i.doc_category_code)); EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line (fnd_file.output, 'Doc Category Code is not defined in system for invoice no. ' || i.invoice_number ); v_status := FALSE; END; ELSE fnd_file.put_line (fnd_file.output, 'Doc Category Code cannot be null for invoice no. ' || i.invoice_number ); END IF; END;

CHECK INVOICE HEADER ID IS TAKEN FROM SEQUENCECASE 11:

SELECT ap_invoices_interface_s.NEXTVAL INTO v_invoice_id FROM DUAL;

CHECK INVOICE LINE ID IS TAKEN FROM SEQUENCECASE 12:

SELECT ap_invoice_lines_interface_s.NEXTVAL INTO v_invoice_line_id FROM DUAL;

13

Page 14: AP Invoice Interface

CHECKING TAX CODESCASE 13:

IF j.tax_code IS NOT NULL THEN BEGIN SELECT NAME INTO v_tax_code FROM ap_tax_codes_all WHERE TRIM (NAME) = TRIM (j.tax_code) AND NVL (inactive_date, SYSDATE) >= SYSDATE AND set_of_books_id = fnd_profile.VALUE ('GL_SET_OF_BKS_ID') AND org_id = j.org_id; EXCEPTION WHEN OTHERS THEN fnd_file.put_line (fnd_file.output, 'Tax Code is wrong, Plz define tax code for invoice no. ' || i.invoice_number ); v_status := FALSE; END; END IF;

CHECK FOR GETTING OR CREATING CODE COMBINATION ID CASE 14:

IF j.dist_account IS NOT NULL THEN BEGIN SELECT DISTINCT ood.chart_of_accounts_id INTO v_ccid FROM org_organization_definitions ood WHERE ood.operating_unit = p_org_id; EXCEPTION WHEN NO_DATA_FOUND THEN fnd_file.put_line

14

Page 15: AP Invoice Interface

(fnd_file.output, 'Chart of account ID not found for org id : ' || j.org_id ); END;

v_code_id := fnd_flex_ext.get_ccid (application_short_name => 'SQLGL', key_flex_code => 'GL#', structure_number => v_ccid, validation_date => TRUNC (SYSDATE ), concatenated_segments => j.dist_account ); --COMMIT; -- if combination is not exist; ELSE fnd_file.put_line (fnd_file.output, 'Distribution Cannot be not for invoice no. ' || i.invoice_number ); v_status := FALSE; END IF;

CHECK FOR PAYGROUP VALIDATION

CONCURRENT PROGRAM:

You can run Concurrent program either through frontend by calling the Open Interface concurrent program or by backend by dynamically passing the API(Application Programming Interface)

Payables Open Interface ImportIt is the Concurrent program run in frontend. The Payables Open Interface program validates each record in the interface table selected for import, and if the record contains valid data then the program creates a Payables Invoice.

Parameters:

Source: Choose the source of the invoices from the list of values.

15

Page 16: AP Invoice Interface

Group: To limit the import to invoices with a particular Group ID, enter the Group ID. The Group must exactly match the GROUP_ID in the Payables Open Interface tables.

Batch Name: Payables groups the invoices created from the invoices you import and creates an invoice batch with the batch name you enter. You can enter a batch name only if you have enabled the Use Batch Control Payables option, and if you have enabled the Use Batch Control Payables option, you must enter a batch name. If you use a batch name and some invoices are rejected during the import process, you can import the corrected invoices into the same batch if you enter the exact batch name during the subsequent import.

Hold Name: If you want to place all invoices on hold at the time of import, enter an Invoice Hold Reason. You can define your own hold reasons in the Invoice Approvals window.

Hold Reason: Payables displays the Invoice Hold Reason Description.

GL Date: If you want to assign a specific GL Date to all invoices, enter a GL Date. If you do not enter a value here, the system will assign a GL Date based on the GL Date Payables option.

Purge: Enter Yes if you want Payables to delete all successfully imported invoice records that match the Source and Group ID of this import. Payables does not delete any invoice data for which it has not yet created invoices. If you want to purge later, you can use the Payables Open Interface Purge Program.

STEPS:

1. Get a unique number to be used as INVOICE_ID to the invoice to be imported.

SELECT ap_invoices_interface_s.NEXTVAL INTO v_invoice_id FROM DUAL;

2. Create records in the Invoice Open Interface tables through SQL queries.

IF v_status = TRUE THEN BEGIN --V_RECORD_INSERTED := 1; INSERT INTO ap_invoices_interface aii (aii.invoice_id, aii.invoice_num, aii.creation_date, aii.created_by, aii.last_update_date, aii.last_updated_by, aii.invoice_type_lookup_code, aii.invoice_date, aii.vendor_id, -- AII.VENDOR_NUM, -- AII.VENDOR_NAME, -- AII.VENDOR_SITE_CODE, aii.vendor_site_id, aii.invoice_amount, aii.invoice_currency_code,

16

Page 17: AP Invoice Interface

-- AII.PAYMENT_CURRENCY_CODE, aii.exchange_rate, aii.exchange_date, aii.exchange_rate_type, aii.terms_id, -- AII.TERMS_NAME, aii.terms_date, aii.description, aii.SOURCE, aii.org_id, aii.gl_date, aii.doc_category_code, aii.pay_group_lookup_code ) --------/*BY SARATH*/ VALUES (v_invoice_id, i.invoice_number, m_creation_date, m_created_by, m_last_updated_date, m_last_updated_by, i.invoice_type, i.invoice_date, v_vendor_id, -- '20TH CENTURY GEMS PVT LTD', -- 'JMU01', v_vendor_site_id, DECODE (i.invoice_type, 'STANDARD', i.invoice_amount, i.invoice_amount * -1 ), i.invoice_currency, --I.PAYMENT_CURRENCY, DECODE (i.exchange_rate_type, v_user_con_type, NULL, 'User', i.exchange_rate, 1 ), DECODE (i.exchange_rate, NULL, NULL, i.exchange_rate_date ), DECODE (i.exchange_rate_type, 'User', 'User', v_user_con_type, v_ext_rate_type_code, NULL ), v_term_id, -- 'Immediate', i.invoice_date, i.inv_description, -------------/*SARATH*/ --'Data Imported from Legacy System', i.SOURCE, i.org_id, i.invoice_date, i.doc_category_code, ----------/*BY SARATH*/ 'LORRYHIRE' ); EXCEPTION WHEN OTHERS THEN fnd_file.put_line (fnd_file.output, 'Error in Loading Data for invoice no.' || i.invoice_number ); v_status := FALSE;

UPDATE sfx_ext_ap_invoice_temp_tbl xep SET xep.status_flag = 'E' WHERE xep.invoice_number = i.invoice_number

17

Page 18: AP Invoice Interface

AND xep.org_id = i.org_id; END; END IF;

/* End of Inserting data in Ap_invoices_interface table*/ IF v_status = TRUE THEN FOR j IN cur_invoice_line (i.invoice_number, i.supplier_number, i.supp_site ) LOOP

3. Go to Payables > Invoices > Entry > Open Interface Invoices to check the details of Invoice and Invoice Lines from the front end.

4. Run the concurrent program “Payables Open Interface Import” to submit a request for Invoice Import.

API FOR CONCURRENT PROGRAMAPI refers to stored procedure driven interfaces, where you call a stored procedure to perform an action within an Oracle Module, and the data from your external application is passed through the stored procedure’s parameters.

It provide programatic access into the Oracle ERP database.

Concurrent Program API is:

FND_REQUEST.SUBMIT_REQUEST

TO RUN API’S YOU USE

BEGIN

FND_GLOBAL.APPS_INITIALIZE (USER_ID, RESPONSIBILTY ID, APPLICATION ID);

END;18

Page 19: AP Invoice Interface

CASE :

IF v_record_inserted > 0 THEN fnd_global.apps_initialize (user_id => fnd_profile.VALUE ('USER_ID'), resp_id => fnd_profile.VALUE ('RESP_ID'), resp_appl_id => fnd_profile.VALUE ('resp_appl_id') ); v_conc_request_id := fnd_request.submit_request ('SQLAP', 'APXIIMPT', '', '', FALSE, 'PROPEL', NULL, 'PROPEL_OPS-' || TO_CHAR (SYSDATE, 'DD-MON-YYYY'), '', -- Hold Name '', --Hold Reason '', -- GL DATE '', -- Purgae '', -- Trace Switch '', -- Debug Switch '', -- Summarize Report '', --Commit Batch Size '', --User ID '', -- Login ID '', '', '', '', '', '', '', '', '', '', '', '', '', '' ); COMMIT;

IF (v_conc_request_id = 0) THEN fnd_file.put_line (fnd_file.output, 'NOT Able TO Submit the Payable Interface Import Program' ); retcode := 3; erebuf := 'NOT Able TO Submit the Payable Interface Import Program'; END IF;

19

Page 20: AP Invoice Interface

END IF;EXCEPTION WHEN OTHERS THEN fnd_file.put_line (fnd_file.output, 'Unable to insert Data');

HOW TO REGISTER STORED PROCEDURE IN APPS

STEP1:

Define Executable with executable file name same as of validated procedure in System Administrator Resp. (SFX_AP_INVOICE_IMPORT)

STEP 2:

Define Concurrent Program and attach the previous executable

20

Page 21: AP Invoice Interface

STEP 3:

Define parameters (Org_id) in the concurrent program

21

Page 22: AP Invoice Interface

STEP 4:

Define the executable with main procedure name as executable file name in System Administrator Resp. (sfx_ap_staging_dump)

STEP 5:

Define Concurrent Program and attach the previous executable

22

Page 23: AP Invoice Interface

STEP 6:

Define parameters (Org_id) in the concurrent program

23

Page 24: AP Invoice Interface

STEP 7:

Run the concurrent program of the main procedure in Payables Vision Operation Resp.

SETUPS IN AP INVOICE INTERFACE

VOUCHER NUMBERIf you use automatic sequential numbering, then the import program populates the AP_INVOICES.DOC_SEQUENCE_ID and AP_INVOICES.DOC_VALUE columns, and enters STD INV as the AP_INVOICES.DOC_CATEGORY_CODE.

DOCUMENT SEQUENCING

1. Create sequence to generate voucher no.

Define Document Sequencing

Go to SYSTEM ADMINISTRATOR RESP. -> APPLICATION

-> DOCUMENT -> DEFINE

2. Define Document Categories

24

Page 25: AP Invoice Interface

DOCUMENT -> CATEGORIES

3. Assign Document with Category Name and Sequence

DOCUMENT -> ASSIGN

SEQUENTIAL NUMBERING

Go to SYSTEM ADMINISTRATOR RESP.-> PROFILE ->SYSTEM –RESP: PAYABLES VISION OPERATION

PROFILES: Sequential Numbering (Partially Used)

Go in PAYABLES VISION OPERATION RESP CHECK SETUP->OPTIONS->PAYABLES->INVOICE TABCheck the ALLOW DOCUMENT OVERRIDE option

DEFINE PAYGROUPGo in PAYABLES VISION OPERATION RESP-> SETUP ->LOOKUP-> PURCHASING -> DEFINE PAYGROUPCheck the paygroup in table:FND_LOOKUP_VALUES;

BATCH NUMBERINGEnable the batch control sequence in the system ADMINISTRATOR RESP -> SYSTEM -> PROFILE : PAYABLE VISION OPERATION

DATABASE LINK Create Database Link :DATABASE -> CREATE DB LINKTo connect one database to other oracle database:TABLENAME@DBLINK

SOURCE SETUP Go in PAYABLES VISION OPERATION RESP. ->SETUP ->LOOKUP ->PAYABLES

25

Page 26: AP Invoice Interface

Search SourceAdd new source in this setup.

HOW TO HANDLE THE ERROR ?

Check the table and see Error_Code and resolve the error accordingly to the error explanation:

AP_INTERFACE_REJECTIONS

PARENT_TABLE : Reference to table in which the rejection occurred (AP_INVOICES_INTERFACE or AP_INVOICE_LINES_INTERFACE) PARENT_ID NUMBER : Reference to invoice or invoice line identifier which was rejected (INVOICE_ID or INVOICE_LINE_ID) REJECT_LOOKUP_CODE : Invoice rejection reason Description: AP_INTERFACE_REJECTIONS stores information about invoice data from the AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE tables which could not be processed by Payables Open Interface Import.

If you use Oracle e-Commerce Gateway, you can pass information from this table to your suppliers by submitting the Payables Open Interface Outbound Advice for rejected data.

You can purge data in this table by using the Payables Open Interface Purge.Check the status of error in table:

SELECT STATUS,INVOICE_ID FROM AP_INVOICES_ALL WHERE TRUNC(CREATION_DATE)=TRUNC(SYSDATE);

26

Page 27: AP Invoice Interface

REFERENCES

Main-Procedure

Scott_table_creation_script

Staging_table_script

Steps

Validation Procedure

27

Page 28: AP Invoice Interface

28