Recently Oracle has introduced EDI translate action in OIC integrations.
This helps us in translating the EDI files smoothly. The EDI translate action translates one document
instance at a time (for eg. One Invoice At a time).
It has provided standard EDI schemas which we can customize as per our need.
What if an EDI 810 invoice file contains multiple invoices?
We need to de-batch the file and then translate it.
We will see in detail how to de-batch an EDI 810 invoice file->Translate it-> Create FBDI files out of
it-> submit bulk import to Fusion.
We will be using :
Document Standard - X12
Document Version- 4010
Document Type - 810(Invoice)
Edi Character Encoding -UTF8
Document Definition- Here we are using custom(XXApinv) but we can use Standard as well.
The high level steps in the sample demo are as follows:
If needed create B2B document and customize Standard EDI schemas. Otherwise use the standard
Schema in EDI Translate action.
List All the EDI Files From SFTP Directory
Iterate for each file in the list
Download the current EDI input file
The EDI File is of Batch type i.e. it contains multiple invoices
So use stage operation to De-batch it( Here we have used read entire file which supports up to 10 Mb, For large files use Read file in segments)
After De-batching use EDI translate Action to translate Per Invoice per input file
if no error then write in the invoice header FBDI
- After header we eed to write in Line FBDI
- Initialize the line number var
- Dicard the 0$ amount lines
- Write in item Lines FBDI in loop
- Increase the line number
- Write in Tax Lines FBDI in loop
- Increase the line number
Check if the translation error was there or not using variable
If no error then
- proceed with creation of properties file
- Zip the data and Properties file
- upload the zip file to ucm
- call import bulk data
- Write the error details in a file
- Iterate for other errors in the same file
- check send notification with attachment having above file, one error file
Below are the screenshots of the above mentioned steps:
Complete Flow:
List EDI Files From SFTP
Iterate in For Each Loop for each File in the List
Download Current File:
De-Batch EDI File
Iterate For each Document Instance/Invoice
Now Use EDI Translate Action:
***Here we have used Definition as XXApinv(Customized), we can use Standard as well
Note: We can customize the XSL mapper and use it to write to header and lines files , this would increase the performance.
In the below example we have used separate For each action to show the process.
Write AP Invoice Header FBDI:
Here we have used XSD schema but we can use FBDI csv files as well for Schema.
The mapper is filtered to show only Mapped Values.
Now we need to write invoice line FBDI:
Initialize line number, for each loop to iterate item line and then switch to discard the 0$ amount lines.
*Note: We can either use external ForEach loop or we can add ForEeach inside the Mapper.
Here we have used for each loop outside the mapper.
Write Item line FBDI:
Here we have used XSD schema. We can use FBDI csv file as well for schema.
The mapper is Filtered to show only mapped fields.
Similarly Write Tax Line:
If there was error in translation using EDI Translate Action, then write error data in a csv file and send as attachment in notification:
Checking for Error vars, creating properties file, zipping data and properties file, uploading to UCM and Calling import bulk data.
What are the primary differences between Oracle FBDI and EDI? Was EDI a standard source system for EBS whereas FBDI is the preferred bulk source system for Oracle Cloud?
ReplyDeleteCan you please attach sample files and codes as well
ReplyDeleteFBDI refers to File Based Data Import, it is a standard followed in Oracle cloud for Bulk/batch import. Every objects like Invoice, journals,Asset,Suppliers etc have a predefined XLSM template file whose csv files maps to the corresponding interface tables in Oracle cloud(Tab/Sheet name in the excel file).
ReplyDeleteFor eg.
https://docs.oracle.com/en/cloud/saas/financials/21d/oefbf/payablesstandardinvoiceimport-3209.html#payablesstandardinvoiceimport-3209
EDI is a standard followed across industries in B2B communication with trading partners.