- Create a BI report data model based on the below sql query.
- Create an EDI delimiter based eText BI template and create a BI Report.
- Create a BI report invoke soap connection in OIC
- In callback integration - invoke the BI report soap connection and pass the load request id parameter name value and the report path name etc.
- Decode the base 64 response and remove carriage return or next line using custom Javascript and store it into a variable for further use.
Monday, January 8, 2024
OIC ERP - Get Source Name for invoice callback | Fixed asset callback
Tuesday, January 2, 2024
OIC - ERP - Payables invoice callback - Custom report
Usecase: Here, we will customize the payable invoice callback and get a detailed report from ERP.
Implmentation steps:
- Subscribe the callback
- Check if jobname ="Load Interface File for Import" then
- save the load request id and load status
- Call a BI report to get the Source name based on Load request id (https://soalicious.blogspot.com/2024/01/oic-erp-get-source-name-for-invoice.html)
- Update path : Fetch FTP or S3 bucket path details from where we need to download the processed zip file or achive the processed file. We will use a simple Lookup like OIC_Interface_Path.dvm and store source name and path and from integration, fetch the path based on source name (fetched from previous step) using lookup() function.
- Get the Processed zip file from FTP or S3 Bucket processing directory invoking a child integration. (https://soalicious.blogspot.com/2023/11/oic-get-files-from-aws-s3-rest-service.html)
- Provide directory name
- filePattern as $loadRequestId
- Unzip flag = N
- Check Load status
- If Load status != SUCCEEDED then Archive the source zip file calling a child integration. With .Failed appended file name. (https://soalicious.blogspot.com/2023/12/oic-create-resuable-integration-to.html)
- Otherwise, if Jobname ="Import Payables Invoices" ans status = SUCCEEDED then,
- Validate the AP Invoice: Call ESS job and feed inputs parameters like business unit id, source, ledger id etc. JobPackageName: /oracle/apps/ess/financials/payables/invoices/trandactions/ and jobDefinitionName: APXAPRVL
- Monitor the AP invoice : Call a child integration and pass ess job run request id and get the status (https://soalicious.blogspot.com/2024/01/oic-erp-monitor-progress-of-ess-job-and.html)
- Initiate invoice approval: Call ESS job and feed inputs parameters like business unit id, source etc. JobPackageName: /oracle/apps/ess/financials/payables/invoices/trandactions/ and jobDefinitionName: APXIAWRE
- Archive the file.
- Get detailed BI report file (https://soalicious.blogspot.com/2024/01/oic-erp-invoice-bi-report-sql-query-to.html)
- Save the report to a ftp or S3 directory for further processing.
- Send a Notification with the report. Or we can call ESS job and send mail over BI bursting (https://soalicious.blogspot.com/2024/01/oic-erp-send-custom-invoice-report.html)
Saturday, December 30, 2023
OIC ERP - How to download Import Payables Invoices Report using ERP cloud Adapter from Oracle Integration
Usecase:
Here, we will see how we can download the import Payables Invoices report. That is we will download report equivalent .xml file which contains same details like the report.
Why do we need :
Note: By default, when we do import AP standard invoice and enabled callback, using import payable invoice process request id if we download ess job exec details, it will only give a .log file but not actual execution report.
High level steps:
- Create an app driven intregation and configure to subscribe callback event
- If summarystatus and import payables invoice succeeded, store the import payables invoices request id to a variable
- Call cloud ERP adapter and do submitESSJobRequest operation of ErpIntegrationService to run the report and get the request id as response.
- Take a while loop and check getESSJobStatus
- Once submitESSjob gets success, downloadESSJobExecutionDetails using cloud erp adapter
- Write the zipped file to stage location using opaque schema
- Unzip the files using stage
- Map the xml file(putting a predicate condition as fileType='xml' in xpath) to send as Notification attachment.
Monday, December 25, 2023
ODI 12C - How to clean Cache to start ODI studio
Sometimes when you will try to start odi studio from console or terminal, you will observe that its not getting started and in that situation, the simple solution is to clean the cache before starting odi studio.
Following command to clean the cache:
./odi.sh -clean -initialize
Path:
/u01/oracle/mwh/odi/studio
After cleaning the cache, if you run the following command it will start the odi
./odi.sh
Saturday, December 9, 2023
OIC ERP - When to use Fusion Accounting Hub (FAH) vs GL Journal integration?
When to use Fusion Accounting Hub (FAH) vs GL Journal integration?
When GL :
For the third party source system (such as Payroll or Treasury , etc.) which provides direct transformed accounting transactions or data, we can use GL Journal Import interface. We can build a custom integration by importing a periodic data file from the source system and insert the data validation and populate the GL journal fbdi template. We can then upload the template and import the GL Journal.
When FAH:
The source systems which are unable to provide transformed accounting data, we can use Fusion Accounting Hub (FAH) - create the subledger source for the 3rd party system and configure the account transformation rules. Then import the transaction data using the fbdi template.
Once transactions are accounted in FAH sub- ledger, there are 2 ways to transfer these accounted entries to Oracle General Ledger.
- One is to transfer at once by submitting the individual Journal Import.
- the other one is to submit it as part of the Create Accounting Process itself (Create Accounting => Accounting Program => Journal Import). With the second option, system submits journal import for each of the child accounting programs i.e. concurrency achieved at the journal import level. This can save up to 30% of total time and works within an interface.
Tuesday, December 5, 2023
OIC - ERP - Import AP Invoice to Cloud ERP using FBDI | Detailed steps to import AP Invoice to Cloud ERP
Usecase: Here, we will demonstrate the detailed implementation steps for AP Invoice FBD Import from polling the file from source >> create FBDI file >> to import to ERP >> to Subscribe Callback.
Source Invoice file structure:
https://soalicious.blogspot.com/2023/11/ap-invoice-source-file.html
Download the FBDI template:
oracle site https://docs.oracle.com/en/cloud/saas/index.html (ERP >>Financials >>select 23D or latest >>Administer >> Import data >>Get started with file-based data import >>payables >> payables standard Invoice Import >>xslm template section.
https://soalicious.blogspot.com/2023/03/oic-erp-import-acoount-payable-invoice.html
Implementarion steps:
- Poll the Invoice file from Source. We can poll from some SFTP server or calling a rest service or others. In this case, we are calling a child integration which will get the files using rest call. (https://soalicious.blogspot.com/2023/11/oic-get-files-from-aws-s3-rest-service.html). Put a switch and check If there is any failure , then throw new fault with exception code, reason and details to scope handler.
- Iterate over the polled files using loop action.(below all steps under a body scope)
- For each file, read file reference using stage, decodebase64ToReference() and Sample CSV file.
- Iterate over each record
- Take a assign to take line and amount counter for validation.
- If line counter >3 then(in the source file, 1st 3 records are only header fields that we will skip)
- Check If C1 = Invoice then
- Get unique Invoice id by calling BI Report. (How to create OTBI report: https://soalicious.blogspot.com/2022/03/cloud-erp-how-to-create-otbi-report.html) and how to call BI report from OIC (https://soalicious.blogspot.com/2021/05/oic-invoke-erp-bi-report.html)
- Add total invoice amount for each header. varInvoiceAmount = add(varInvoiceAmount,eachHeaderamount). This is required for file validation.Use this custom function to add numbers to have 2 decimal places. https://soalicious.blogspot.com/2021/03/oic-use-of-javascript-in-integration.html
- Write header file using FBDI Invoice header template. File name: ApInvoicesInterface.csv(Mandatory mapped fields: Invoice id(unique id generated from BI report), Business Unit, Source, Invoice Nunber, Invoice Amount, Invoice Date(YYYY/MM/DD format), supplier Name, Supplier Number, Supplier Site, Invoice Currency, Description, Invoice type, Legel entity, Payment terms, Pay Group, Payment reason code, payament reason comments)
- Check if C1 = Invoice Line then,
- Write Line FBDI File using template. File name: ApInvoiceLinesInterface.csv and Mandatory mapped fields: Invoice id (same BI fetches Unique and sequential Id), Line Number, Line Type like ITEM, Amount, Invoice Quantity, Unit Price, Description, Dustribution Combination, Tax Classification Code.
- Check if C1 =Invoice Trailer then
- Take file records count and total file amount which is needed for validation.
- Create a ZIP manifest file using a stage for invoice header and Line files.
- Properties file : This file contains import job package name, job definition, zip file prefix and job parameters to be passed. Check my below blog for details. How to get job details and parameters etc. There are two options: choose any one based on requirements.
- Generally we create this .property file and zip with the FBDI header and line files if we use import bulk of oracle cloud erp adapter. (https://soalicious.blogspot.com/2022/05/oic-understand-of-fbdi-properties-file.html)
- Map the comma separated job parameters while using CRUD erpIntegrationservice under Oracle Cloud ERP adapter. This case, we used 2nd option:
- Mapped job parameters: "#NULL,BusinessUnitID,N,#NULL,#NULL,#NULL,1000,SourceName,#NULL,N,N,LedgerId,#NULL,1"
- Job name: /oracle/apps/ess/financials/payables/invoices/transactions/,APXIIMPT
- File Validation:
- If Trailer record total lines count = total line counts and total trailer amount = total line amount then its a valid file then
- Encrypt and import.: there are generally two different methods using which we can import to ERP using oracle cloud ERP adapter: choose any one based on requirements.
- Using bulk import. (https://soalicious.blogspot.com/2021/05/oic-import-payables-invoices-using-erp.html)
- Using CRUD Service ErpIntegrationService>> importBulkData operation: Here we will create a reusable child integration to import. This case we used 2nd option (https://soalicious.blogspot.com/2021/05/oic-import-to-erp-technique-2-bulk-data.html)
- Get import job status using cloud erp adapter and erpIntegrationService (https://soalicious.blogspot.com/2021/07/oic-get-ess-job-status.html)
- Move source file as zip appedning with import or load ess request id to processing folder for further processing during callback. (Business specific requirement)
- Otherwise,
- Write the source file to Archive folder and delete from polling folder. (https://soalicious.blogspot.com/2023/12/oic-create-resuable-integration-to.html)
- Create logs and create incident and send email Notification (https://soalicious.blogspot.com/2021/06/oic-send-notification.html)
- Throw new fault to scope handler using tralier fault as code, incident short description as reason and log description as details.
- Callback part : We can follow any of the below methods - default or custom callback. This case we have used custom callback.
- Default callback subscribe:
- Prerequisite : https://soalicious.blogspot.com/2023/03/erp-register-csf-key.html
- Follow this blog to import and enable and subscribe callback (https://soalicious.blogspot.com/2021/05/oic-import-payables-invoices-using-erp.html)
- Download Import Payables Imvoices Report as .xml and send as notification attachemnt - https://soalicious.blogspot.com/2023/12/oic-erp-how-to-get-import-payables.html
- Custom report callback: Follow this blog: https://soalicious.blogspot.com/2024/01/oic-erp-payables-invoice-callback.html)
- Erp inbound integration callback subscribe: this below blog will show how to subscribe the events which are raised within the ERP. Will update more details later(?????) (https://soalicious.blogspot.com/2022/11/oic-subscribe-to-business-events-raised.html)
- Error handling:
- From body scope , after each invoke, put a switch condition and if exception exists, throw new fault (customized fault) to scope default fault handler. For example, after invoking get files , import, get ess job status etc.
- From scope fault handler:
- If import not failed(checking error code), Move file from source direcory to archive directory.
- Throw the fault to Global fault
- From Global fault:
- Send notification or email
- Log fault details to DB or File/FTP location
- Create an incident ticket.
- Rethtow fault.
Monday, December 4, 2023
OIC - Create a resuable integration to write or move and delete files from AWS S3 using Rest
Usecase: Here, we will create a reusable integration for example say OIC_FILE_Handler which will do move and delete file from a specified directory of AWS S3 bucket using rest feature.
It will perform the following operations:
- Write file
- Delete file
- Move file (mixed option 1 and option2)
- Create a AWS S3 rest connection
- Create a App driven orchestration pattern and configure rest to accept the base64 encoded file, source path, delete path, source and delete directories and different flags.
- Assign globals:
- varBasePathAndFile : Concat(deleteDirectory sourceFileName)
- varMovePathAndFile : concat(targetDirectory, targetFileName)
- varFileref: ""
- varMoveComplete : N
- varDeletecomplete: N
- varFileStatus : "error"
- varCounter : 0.0
- IF base64FileRef != empty, then decode base64 to file reference using decodebase64ToReference().
- If moveFileFlag = Y, call S3 rest service to place the file to the specified directory and map the decoded file ref to stream reference.
- Resource path: /{pathAndFileName}
- VERB: put
- Request payload as Binary - application/zip
- Also, put a retry logic to place the files to S3 3 times
- Take a scope
- While conditon: varFileStatus ="error" and varCounter <3.0
- If success, assign varFileStaus ="success"
- Under scope > default fault handler > increment counter +1
- Update that varMoveComplete = Y if it is success
- IF deleteSourceFileFlag = Y , Call S3 rest service nad configure below:
- Resource path: /{pathAndFileName}
- Verb: Delete
- Map the varBasePathandFileName
- If it is success, assign deleteComplete =Y
- Update the response of the rest - fileMoved, fileDeleted and jobStatus.
- Update the exception scope fault status from main scope fault handler
Featured Post
11g to 12c OSB projects migration points
1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper: File⇾Import⇾Service Bus Resources⇾ Se...
-
Please find the following links for OIC hands on and relevant information: Oracle Integration Cloud Introduction | Benefits | Services offer...
-
What is Throttling: Throttling is termed as "regulate the flow". Oracle Service Bus has throttling feature and by using that f...
-
OIC interview Q & A: 1. FBDI approach with an example https://soalicious.blogspot.com/2022/02/oic-erp-supplier-bulk-import-and.html 2. O...