Muhammad Ali
19th March 2008, 09:11
help....
when i run session read.main.table() it is not working, kindly help, see below script
thanks
Ali
declaration:
table ttdlra010 | IDno Data
table ttiitm001 |Item Master
| extern domain tdlra.leno leno.f
| extern domain tdlra.leno leno.t
extern domain tcdsca path,m.path
string txt_string1(100)
long fp1
string txt_string2(100)
long fp2
|****************************** form section **********************************
form.1:
init.form:
get.screen.defaults()
|****************************** choice section ********************************
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
|if rprt_open() then
read.main.table()
message("Text File Is Ready.......")
| rprt_close()
| else
| choice.again()
| endif
|****************************** field section *********************************
| field.path:
| when.field.changes:
| path = path
|****************************** function section ******************************
functions:
function read.main.table()
{
|************************** Data Retrive From IDno
m.path=path&"tdlra010.txt"
message("test...... %s",m.path)
| fp1=seq.open("d:\baan4\phyinv\tdlra010.txt","w")
fp1=seq.open(m.path,"w")
select tdlra010.leno,tdlra010.item,tiitm001.cuni,tdlra010.stoc
from tdlra010, tiitm001
where tdlra010.item=tiitm001.item
order by tdlra010.leno
selectdo
txt_string1=str$(tdlra010.leno)&"|"&tdlra010.item&"|"&tiitm001.cuni&"|"&str$(tdlra010.stoc)&chr$(13)
seq.puts(txt_string1,fp1)
endselect
seq.close(fp1)
|************************** Data Retrive From Item Master
m.path=" "
m.path=path&"tiitm001.txt"
fp2=seq.open(m.path,"w")
select tiitm001.item,tiitm001.dsca,tiitm001.cuni,tiitm001.citg
from tiitm001
order by tiitm001.item
selectdo
txt_string2=tiitm001.item&"|"&tiitm001.dsca&"|"&tiitm001.cuni&"|"&tiitm001.citg&chr$(13)
seq.puts(txt_string2,fp2)
endselect
seq.close(fp2)
}
when i run session read.main.table() it is not working, kindly help, see below script
thanks
Ali
declaration:
table ttdlra010 | IDno Data
table ttiitm001 |Item Master
| extern domain tdlra.leno leno.f
| extern domain tdlra.leno leno.t
extern domain tcdsca path,m.path
string txt_string1(100)
long fp1
string txt_string2(100)
long fp2
|****************************** form section **********************************
form.1:
init.form:
get.screen.defaults()
|****************************** choice section ********************************
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
|if rprt_open() then
read.main.table()
message("Text File Is Ready.......")
| rprt_close()
| else
| choice.again()
| endif
|****************************** field section *********************************
| field.path:
| when.field.changes:
| path = path
|****************************** function section ******************************
functions:
function read.main.table()
{
|************************** Data Retrive From IDno
m.path=path&"tdlra010.txt"
message("test...... %s",m.path)
| fp1=seq.open("d:\baan4\phyinv\tdlra010.txt","w")
fp1=seq.open(m.path,"w")
select tdlra010.leno,tdlra010.item,tiitm001.cuni,tdlra010.stoc
from tdlra010, tiitm001
where tdlra010.item=tiitm001.item
order by tdlra010.leno
selectdo
txt_string1=str$(tdlra010.leno)&"|"&tdlra010.item&"|"&tiitm001.cuni&"|"&str$(tdlra010.stoc)&chr$(13)
seq.puts(txt_string1,fp1)
endselect
seq.close(fp1)
|************************** Data Retrive From Item Master
m.path=" "
m.path=path&"tiitm001.txt"
fp2=seq.open(m.path,"w")
select tiitm001.item,tiitm001.dsca,tiitm001.cuni,tiitm001.citg
from tiitm001
order by tiitm001.item
selectdo
txt_string2=tiitm001.item&"|"&tiitm001.dsca&"|"&tiitm001.cuni&"|"&tiitm001.citg&chr$(13)
seq.puts(txt_string2,fp2)
endselect
seq.close(fp2)
}