FND_FILE – create log and output file in Oracle Apps Concurrent Program

FND_FILE is built-in package provided in Oracle Apps/E-Business Suite to write log and output file in PL/SQL concurrent program. This is actually a wrapper on UTL_FILE to write files on the Unix server. You can open the log and output file using navigation View -> Requests -> Find. Select the respective request on the summary page and click View Log or View Output for check respective log or output file.

  • Log File – These are log files. Dump error message, debug message in this file.
  • Output File – This file you can have some output of processing of the concurrent program.


In this article, I will share how to use fnd_file to create log and output file.

To explain this API, we will use PL/SQL concurrent Program in Oracle Apps. It is simple PL/SQL procedure which just write dummy message in log and output file.


This package contains all the procedure and functions to write log and output file. Here I am just going to explain fnd_file.put_line procedure with example. You can refer below article from Oracle Apps Developer Guide to check all procedure and function available in fnd_file package. This article is very details and does contain working exampe.

Read:- PL/SQL APIs for Concurrent Processing

Below are global variables defined in package specification to denote log or output file.

Global Variables

FND_FILE.LOG – 1 – This is constant variable to denote log file

FND_FILE.OUTPUT – 2  – This is constant variable to denote log file


This procedure writes a line of text to a file including new line.


(which IN NUMBER,
buff	 IN VARCHAR2);
which - Log file or output file. Use either FND_FILE.LOG or FND_FILE.OUTPUT.
buff - Text to write.

Example 1

In this example, a concurrent program is defined on below procedure. This proceudure used fnd_file.put_line to log output and log. Depending on which parameter message are written. Even though it is wrapper on UTL_FILE, you do not have to explicit open and close file. It is completely manager by Concurrent manager.

o_chr_errbuf VARCHAR2 ,
o_chr_errcode VARCHAR2 )
--- Creating log mesage----
fnd_file.put_line(fnd_file.log,'This is log file ');
fnd_file.put_line(fnd_file.log,'You can put error, debug message here ' || SQLERRM);
fnd_file.put_line(fnd_file.log,'You can also use built in API ' || fnd_message.get);
---Creating output message
fnd_file.put_line(fnd_file.output,'This is output file');
fnd_file.put_line(fnd_file.output,'You can use it to put summary information');

Run the concurrent program and check log and output file generated.

Sample log file

Start of log messages from FND_FILE
This is log file 
You can put error, debug message here ORA-0000: normal, successful completion
You can also use built in API 
End of log messages from FND_FILE

Sample output file

This is output file
You can use it to put summary information

Other Public Procedures/APIs

FND_FILE.PUT – This procedure writes text to a file. There is no new line inserted. Multiple calls to FND_FILE.PUT will produce concatenated text.

FND_FILE.NEW_LINE – This procedure writes line terminators (new line characters) to a file. It should be used with fnd_file.put if you want to write message on different line.


Related Post