Execute Procedure using Forms Personalization [message #472803] |
Tue, 24 August 2010 00:41 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vittal_n
Messages: 10 Registered: July 2010 Location: Hyderabad
|
Junior Member |
|
|
Hi I have written a package in that package i have written a procedure. That procedure has two i/p and two o/p variables. I am calling the procedure using the below sytax.
in builtin type : Execute a Procedure
='Declare
v_customer_name varchar2(100);
v_id number;
v_out1 number;
v_out2 NUMBER;
begin
v_id := 1041;
XXFBI_OM_UTILITIES.XXFBI_CUSTOMER_CREDIT_DETAILS1(''' || ${item.order.SOLD_TO.value} || ''', v_id, v_out1, v_out2);
end'
Its working fine.
My question is how can i capture the value of out put variables v_out1 and v_out2 and assign to a DFF.
|
|
|
|
Re: Execute Procedure using Forms Personalization [message #492470 is a reply to message #490745] |
Mon, 31 January 2011 05:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/43055.jpg) |
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
I don't know whether you can use it in Forms (didn't try), but you can use binding to return values from dynamic pl/sql:
set serverout on
-- procedure will spell out numbers in plain English
Create Procedure orafaq_proc( ipar1 In Number
, ipar2 In Number
, opar1 Out Varchar2
, opar2 Out Varchar2
)
Is
Begin
opar1 := To_char(to_date(ipar1, 'J'),'Jsp');
opar2 := To_char(to_date(ipar2, 'J'),'Jsp');
End orafaq_proc;
/
Declare
vtest1 varchar2(20);
vtest2 varchar2(20);
vStatement Varchar2(250) :=
'Declare
v_id1 number;
v_id2 number;
v_out1 Varchar2(30);
v_out2 Varchar2(30);
begin
v_id1 := 1;
v_id2 := 2;
Orafaq_proc(v_id1, v_id2, v_out1, v_out2);
:1 := v_out1;
:2 := v_out2;
end;';
Begin
-- execute the procedure and return the bind variables
Execute Immediate vStatement using out vtest1, out vtest2;
-- output:
dbms_output.put_line('Output = "'||vtest1||'" and "'||vtest2||'"');
End;
/
Drop Procedure orafaq_proc
/
MHE
|
|
|