Tuesday, 10 July 2012

Fibbonacci Series

Declare
x number;
y number;
z number;
ctr number;
q number;

begin
q:=&q;
x:=0;
y:=1;
ctr :=2;
dbms_output.put_line('........FIBBONACCI SERIES........'||sysdate);
dbms_output.put_line(x);
dbms_output.put_line(y);
for ctr in 1..q
loop
z:=x+y;
dbms_output.put_line(z);
x:=y;
y:=z;
end loop;
end;

Monday, 9 July 2012

How to eliminate particular rows in RTF

<?for-each:G_ICODE?><?if: CF_OPENING_QTY !=0 and RECEIPT_QTY !=0 and ISSUE_QTY !=0?>
<?CF_OPENING_QTY?>
<?RECEIPT_QTY?>
<?ISSUE_QTY?>
<?end if?>
<?end for-each?>
 

How to Call stored procedure from Forms Personalization



1. Personalize the form
2. Create an action of type "BuiltIn"
3. BuiltIn Type for Action should be "Execute a Procedure"
4. Argument should be as below 


='declare
   v_field_value VARCHAR2(200) ;
   begin
       plsql_package.procedurenameHere ;
  end'



or alternately

='declare
   v_field_value VARCHAR2(200) ;
   begin
       apassi_prc ('''||${item.PO_CONTROL_RULES.OBJECT_CODE_DISPLAYED_VALUE.value}||''');
   end'


Note the syntax, after =, entire declare begin end is within single quote.
Also, there is no semi colon after "end"

You can pass field values as
'''||${item.BLOCKNAME.FIELDNAME.value}||'''