Oracle Apps Notes

A collection of my random notes, primarily on Oracle Apps

Logical operators in RETURN clause of a function

Here is what I learnt today.

You can use logical operators in the RETURN clause of a function whose return type is BOOLEAN. So for example, you can write a function with the following structure:

create or replace function test_fn(p_param varchar2)
return boolean
l_value varchar2(10):= 'TEST';
return false
or p_param = l_value
or length(p_param) = 5 ;
show errors;

The logical truth table is used to evaluate the expression in the RETURN clause and hence this function will return TRUE if the value passed to it is either TEST or any five-characters long string. For all other cases it will return FALSE.

Of course, the same logic could have been coded in lots of different ways but the example was just to show that this was one of the ways.

BI Publisher Desktop – MS Word add-in not visible

If the MS Word add-in is not visible after installing BI Publisher Desktop, the following steps might help:

  1. In MS Word, go to File > Options > Advanced > General section > Click on the File Locations button
  2. Modify the location for Startup files and point it to your BI Publisher installation directory

Alternatively, you can also try copying the file to the existing Startup file location but I haven’t tested this option.

Prevent users from uploading specific files in Oracle EBS

Oracle EBS provides a way to restrict the type of files which can be uploaded though the front end. This will, for example, prevent users from uploading specific file types through the Generic File Manager or from uploading XML report files (which is how I came across this feature).
The two main parts to this feature is the Attachment File Upload Restriction Default profile option and the FILE_MIME_TYPES table.
The FILE_MIME_TYPES table lists the various file types and specifies whether they are allowed to be uploaded or not. The Attachment File Upload Restriction Default profile option controls those file types which have not been explicitly allowed or disallowed in the FILE_MIME_TYPES. Attachment File Upload Restriction Default can have a value of Yes or No. If it is set to Yes, a file type can be uploaded from the front-end even if it has not been explicitly allowed or disallowed in FILE_MIME_TYPES. Setting this value to No will prevent the user from uploading any file type which has not been explicitly allowed in FILE_MIME_TYPES.
When this feature prevents users from uploading a file, they will see this message on the screen: This file type is not allowed. Please choose another file
For more details please check Metalink Note#1357849.1: Security Configuration Mechanism in the Attachments Feature in Oracle E-Business Suite.