how use loop in from for two block [message #246252] |
Wed, 20 June 2007 07:34  |
mfa786
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
begin
if :voumaster.vno is null then
select NVL(MAX(VSNO),0)+1 INTO :tti
FROM VOUMASTER
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;*/
First_Record;
Loop
:voudetail.vno :=:voumaster.vno;
:UTILITYBILL.vno :=:voumaster.vno;
/*if :voudetail.vno is null then
end if;*/
Exit when :system.last_Record = 'TRUE' ;
Next_record;
End loop;
First_Record ;
end;
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
thakk's
aamir
|
|
|
|
|