vincent
10th June 2003, 16:20
Hello All,
I have a "lis" file which has a list of part nos.
i want to write a SELECT query which will be based on the partno fetched from the "lis" file.
The foll is the code i have written but it fails.
declaration:
table ttiitm001
long file_point
extern domain tcitem item.f
form.1:
init.form:
file_point = seq.open("/tmp/part.lis","r")
function read.main.table()
{
while not seq.gets(item.f,1024,file_point)
| message("%s",item.f)
get_data()
endwhile
}
function get_data()
{
select tiitm001.* from tiitm001
where tiitm001.item = :item.f
selectdo
rprt_send()
endselect
}
The WHILE loop prints the contents of the "lis" file properly, but the SELECT give " no data found".
Can any one tell me what is going wrong in the above ?
Any help is most welcome
Thanks in advance.
I have a "lis" file which has a list of part nos.
i want to write a SELECT query which will be based on the partno fetched from the "lis" file.
The foll is the code i have written but it fails.
declaration:
table ttiitm001
long file_point
extern domain tcitem item.f
form.1:
init.form:
file_point = seq.open("/tmp/part.lis","r")
function read.main.table()
{
while not seq.gets(item.f,1024,file_point)
| message("%s",item.f)
get_data()
endwhile
}
function get_data()
{
select tiitm001.* from tiitm001
where tiitm001.item = :item.f
selectdo
rprt_send()
endselect
}
The WHILE loop prints the contents of the "lis" file properly, but the SELECT give " no data found".
Can any one tell me what is going wrong in the above ?
Any help is most welcome
Thanks in advance.