Oracle Apps Notes

A collection of my random notes, primarily on Oracle Apps

Default parameter values in package subprograms

For a procedure (or function) in a package, you can assign default values only in the package specifications without assigning them in the package body:

1

2

The reverse is not allowed though:

3

4

Also, if the default value is specified in both the package specification and package body, they must match:

5

6

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
as
l_value varchar2(10):= 'TEST';
begin
return false
or p_param = l_value
or length(p_param) = 5 ;
end;
/
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 TemplateBuilder.dot file to the existing Startup file location but I haven’t tested this option.

Follow

Get every new post delivered to your Inbox.

Join 54 other followers