Saturday, August 7, 2010

Oracle Apps

1. $APPLCSF/$LOG -- store on apps server
2. Isn't something that Oracel stores in a DB.
3.FND_FILE.PUT_LINE() calls use the UTL_FILE package to write the line to a temporary file in the $APPLPTMP directory.
4. If you are using the FND_FILE.PUT_LINE() from within a concurrent program, the actual temporary files used can be found with the following query (directory, output temporary file, log temporary file):

select cp.plsql_dir, cp.plsql_out, cp.plsql_log
from fnd_concurrent_requests cr, fnd_concurrent_processes cp
where cr.request_id =
and cp.concurrent_process_id = cr.controlling_manager;

Once the concurrent request completes, the data in the temporary files is copied to the concurrent request output and log files (for example $APPLCSF/out/_/o.out and $APPLCSF/log/_/l.log)

If you are not using this from inside a concurrent request, you would need to be file handling yourself (ie set file names, open, fetch contents once complete, close, etc) - you would need to trawl through FND_FILE and FND_FILE_PRIVATE to work out exactly how to do that.

Sets the temporary log and out filenames and the temp directory to the user-specified values. DIR must be a directory to which the database can write. FND_FILE.PUT_NAMES should be called before calling any other FND_FILE function, and only once per session.

Attention: FND_FILE.PUT_NAMES is meant for testing and debugging from SQL*Plus; it does nothing if called from a concurrent program.

Arguments (input)
p_log Temporary log filename.
p_out Temporary output filename.
p_dir Temporary directory name.

Example
BEGIN
fnd_file.put_names('test.log', 'test.out',
'/local/db/8.0.4/db-temp-dir/');
fnd_file.put_line(fnd_file.output,'Called stored procedure');
/* Some logic here... */
fnd_file.put_line(fnd_file.output, 'Reached point A');
/* More logic, etc... */
fnd_file.close;
END;

6.
  

No comments:

Post a Comment