Home » Developer & Programmer » Forms » how use loop in from for two block
how use loop in from for two block [message #246252] Wed, 20 June 2007 07:34 Go to next message
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
hi master
sir i have one form and three block
one master and two detail

all detail join with master direclty master.vno=de1.vno
and master.vno=de2.vno

i use one this code

if :voumaster.vno is null then
select NVL(MAX(VSNO),0)+1 INTO :tti
WHERE VTYPE=:VTYPE AND to_number(to_char(ENTdate,'YYYY'))=to_number(to_char(:ENTDATE,'YYYY')) AND to_number(to_char(ENTdate,'MM'))=to_number(to_char(:ENTDATE,'MM')) ;

/*:VOUMASTER.VNO := :VTYPE||SUBSTR(to_char(:ENTDATE,'YYYY'),3,2)||to_char(:ENTDATE,'MM')||'0'||:VOUMASTER.VSNO||'K';*/
:tty := :VTYPE||SUBSTR(to_char(:ENTDATE,'YYYY'),3,2)||to_char(:ENTDATE,'MM')||'0'||:tti||'K';
:voumaster.vno :=:tty;
:vsno :=:tti;
:sdate :=sysdate;
end if;

/*select nvl(max(ASSSNO),0) into ttq from ASSTRAN;*/



:voudetail.vno :=:voumaster.vno;
:UTILITYBILL.vno :=:voumaster.vno;
/*if :voudetail.vno is null then
end if;*/

Exit when :system.last_Record = 'TRUE' ;
End loop;
First_Record ;


this code replace onle de1.vno with master.vno not pass de2.vno and form not save the de2 from data

how i use loop for other detail block

when i use go_block('de2') that give me error

please give me idea how i use for loop for two other detail block


Re: how use loop in from for two block [message #246397 is a reply to message #246252] Wed, 20 June 2007 15:33 Go to previous messageGo to next message
Messages: 20847
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Read the sticky topic in this Forum which will guide you how to get a quick answer to your question.

Format your code so that it is readable and remove unnecessary code.

BTW, you should have learnt all that in the last year and a half.
Re: how use loop in from for two block [message #247201 is a reply to message #246252] Mon, 25 June 2007 00:59 Go to previous message
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Why are you writing your own code? Search this forum for 'master detail' and build the form so that it uses the default forms behaviour.

Previous Topic: Got Error ORA-00028 When Form 6i's Process Going on (merged)
Next Topic: Help Help Help Help Plzzzz?
Goto Forum:

Current Time: Tue Oct 25 13:09:33 CDT 2016

Total time taken to generate the page: 0.10228 seconds