Monday, May 27, 2013

Oracle R12 – How To Turn Off Low-Level Diagnostic Logging




“Low-level Diagnostic Logging is turned on. This may temporarily reduce performance”
How can this be disabled / turned off?
Disable diagnostic logging with the following steps:
1. Login as a user with System Administrator responsibility and then navigate to:  Profile > System.
Set the following profile option at the User level:
FND: Debug Log Enabled = No
2. Logout of the application. You may also want to clear the browser’s cache.
3. Login again and confirm that the message no longer appears.

Tuesday, May 14, 2013

PLSQL LIMIT


declare
 cursor a_cur is
  select program_id
 from airplanes;
 type myarray is table of a_cur%rowtype;
 cur_array myarray;
begin
  open a_cur;
  loop
    fetch a_cur bulk collect into cur_array limit 1000;
    exit when a_cur%notfound;
  end loop;
  close a_cur;
end;

/

FOR More info Please go through the URL:  http://psoug.org/reference/array_processing.html

PL/SQL EXTEND

PL/SQL EXTEND

Definition:

EXTEND is one of the Oracle PL/SQL collection methods which is used with nested tables and VARRAYS to append single or multiple elements to the collection. Note that EXTEND cannot be used with associative arrays. EXTEND has three forms:

    EXTEND, which adds a single NULL instance.
    EXTEND(n) which adds multiple NULL instances. The number of instances is specified by n.
    EXTEND(n,m) which appends n copies of instance m to the collection.

Note that forms one and two cannot be used for NOT NULL specified collections.

Example Usage:

The PL/SQL block below declares a PL/SQL table collection and appends the first cell at the end of the collection.

DECLARE

       type psoug_tab is table of number;
       ptab psoug_tab;

BEGIN

        ptab := psoug_tab();
        ptab.extend;
        ptab(1) := 100;
        dbms_output.put_line('value at index(1) is '||ptab(1));
        ptab.extend(5,1);
        dbms_output.put_line('value at index(4) is '||ptab(4));

END;



value at index(1) is 100

value at index(4) is 100



PL/SQL procedure successfully completed.

PL/SQL Normal Insert and Bulk Insert

PL/SQL NORMAL INSERT AND BULK INSERT

create table forall_test (
  id           number(10),
  code         varchar2(10),
  description  varchar2(50));

alter table forall_test add (
  constraint forall_test_pk primary key (id));

alter table forall_test add (
  constraint forall_test_uk unique (code));

set serveroutput on


declare
  type t_forall_test_tab is table of forall_test%rowtype;

  l_tab    t_forall_test_tab := t_forall_test_tab();
  l_start  number;
  l_size   number            := 10000;
begin
  -- populate collection.
  for i in 1 .. l_size loop
    l_tab.extend;

    l_tab(l_tab.last).id          := i;
    l_tab(l_tab.last).code        := to_char(i);
    l_tab(l_tab.last).description := 'description: ' || to_char(i);
  end loop;

--  execute immediate 'truncate table forall_test';

  -- time regular inserts.
  l_start := dbms_utility.get_time;

  for i in l_tab.first .. l_tab.last loop
    insert into forall_test (id, code, description)
    values (l_tab(i).id, l_tab(i).code, l_tab(i).description);
  end loop;
 

  dbms_output.put_line('normal inserts: ' ||
                       (dbms_utility.get_time - l_start));
 
  execute immediate 'truncate table forall_test';

  -- time bulk inserts.
  l_start := dbms_utility.get_time;

  forall i in l_tab.first .. l_tab.last
    insert into forall_test values l_tab(i);

  dbms_output.put_line('bulk inserts  : ' ||
                       (dbms_utility.get_time - l_start));

  commit;
end;

/

Monday, May 6, 2013

how to find values set values

select * from fnd_flex_value_sets where flex_value_set_name='p_conv_opt'--flex_value_set_id=1015234

 select flex_value          ,
  flex_value_meaning        ,
  description               ,
  enabled_flag              ,
  start_date_active         ,
  end_date_active           ,
  summary_flag              ,
  hierarchy_level           ,
  flex_value_set_id         ,
  parent_flex_value_low     ,
  parent_flex_value_high    ,
  flex_value_id             ,
  last_update_date          ,
  last_updated_by           ,
  structured_hierarchy_level,
  compiled_value_attributes ,
  value_category            ,
  attribute1                ,
  attribute2                ,
  attribute3                ,
  attribute4                ,
  attribute5                ,
  attribute6                ,
  attribute7                ,
  attribute8                ,
  attribute9                ,
  attribute10               ,
  created_by                ,
  creation_date             ,
  last_update_login         ,
  attribute11               ,
  attribute12               ,
  attribute13               ,
  attribute14               ,
  attribute15               ,
  attribute16               ,
  attribute17               ,
  attribute18               ,
  attribute19               ,
  attribute20               ,
  attribute21               ,
  attribute22               ,
  attribute23               ,
  attribute24               ,
  attribute25               ,
  attribute26               ,
  attribute27               ,
  attribute28               ,
  attribute29               ,
  attribute30               ,
  attribute31               ,
  attribute32               ,
  attribute33               ,
  attribute34               ,
  attribute35               ,
  attribute36               ,
  attribute37               ,
  attribute38               ,
  attribute39               ,
  attribute40               ,
  attribute41               ,
  attribute42               ,
  attribute43               ,
  attribute44               ,
  attribute45               ,
  attribute46               ,
  attribute47               ,
  attribute48               ,
  attribute49               ,
  attribute50               ,
  attribute_sort_order      ,
  row_id
   from fnd_flex_values_vl
  where ((''                   is null)
or (structured_hierarchy_level in
  (select hierarchy_id
     from fnd_flex_hierarchies_vl h
    where h.flex_value_set_id = 1015234
  and h.hierarchy_name like ''
  )))
and (flex_value_set_id=1015234)
rder by flex_value

Enable or Disable Help Diagnostics Examine


Profile Option:
Utilities:Diagnostics - Yes (if you set to YES at site level the Help -> Diagnostics -> Examine can access without passwork asking)
Utilities:Diagnostics - No (If you set to NO at site level no one can access the Help -> Diagnostics -> Examine and other optoins)

Go to System Administrator Responsibility=>profile=>system=>on which level you want to set =>Utilities:Diagnostics - Yes

Record History is not available here


Record History is not available here ?
Sol."FND:Record History Enabled" could be set to Yes


Go to System Administrator =>Profile => System=>user --Give Your Users Name
and 
find FND:Record History Enabled

set yes at User Level.

Friday, May 3, 2013

Document Category Override Payables option is disabled


Applies to:

Internet Expenses - Version: 12.0.4
This problem can occur on any platform.

Symptoms

Expense Report Export is rejecting an expense report with the
Rejection Description:
Document Category Override Payables option is disabled

Cause

Oracle Payables Responsibility
Navigation:  Setup -> Options -> Payables
Invoice tab -> Main Section
Allow Document Category Override was unchecked.

Solution

1)  Access the appropriate Oracle Payables Responsibility
2)  Navigation: Setup -> Options -> Payables
     Invoice tab -> Main Section
3)  Check:  Allow Document Category Override