ncgjiju
8th August 2008, 07:00
Hi,
How to convert the string value into double type variable. Here is the code i have tried -
function readisissue()
|-------------------------------------------------------------------------------
|read the transfer table to check for issue of material for workorder no
|-------------------------------------------------------------------------------
select whinh200.*,whinh220.*
from whinh200,whinh220
where whinh200.oorg = whinh.oorg.transfer.man
and whinh200.ittp = whinh.ittp.transfer
and (whinh200.stco = "WIPFT2" or whinh200.stco = "WIPFT3")
and whinh200.sfty = whinh.type.warehouse
and whinh200.stty = whinh.type.warehouse
and whinh220.item = :tibom010.sitm
and whinh200.oorg = whinh220.oorg
and whinh200.orno = whinh220.orno
and whinh200.oset = whinh220.oset
and whinh220.lsta = whinh.lstb.shipped
and whinh220.qshp > 0
selectdo
txt.num = 0
|------------------------------------------------------------------
txt.num = int(whinh220.txtn) -> part that failing
|------------------------------------------------------------------
orno.a = ""
orno.a = strip$(str$(whinh220.txtn))
txt.num = int(orno.a)
if ( not isdigit(orno.a) ) then
message( "'%s' is not a number", whinh220.txtn )
else
message("'%s' is a number", whinh220.txtn )
endif
endselect
|-------------------------------------------------------------------------------
|read the transfer table to check for issue of material for workorder no
|-------------------------------------------------------------------------------
}
How to convert the string value into double type variable. Here is the code i have tried -
function readisissue()
|-------------------------------------------------------------------------------
|read the transfer table to check for issue of material for workorder no
|-------------------------------------------------------------------------------
select whinh200.*,whinh220.*
from whinh200,whinh220
where whinh200.oorg = whinh.oorg.transfer.man
and whinh200.ittp = whinh.ittp.transfer
and (whinh200.stco = "WIPFT2" or whinh200.stco = "WIPFT3")
and whinh200.sfty = whinh.type.warehouse
and whinh200.stty = whinh.type.warehouse
and whinh220.item = :tibom010.sitm
and whinh200.oorg = whinh220.oorg
and whinh200.orno = whinh220.orno
and whinh200.oset = whinh220.oset
and whinh220.lsta = whinh.lstb.shipped
and whinh220.qshp > 0
selectdo
txt.num = 0
|------------------------------------------------------------------
txt.num = int(whinh220.txtn) -> part that failing
|------------------------------------------------------------------
orno.a = ""
orno.a = strip$(str$(whinh220.txtn))
txt.num = int(orno.a)
if ( not isdigit(orno.a) ) then
message( "'%s' is not a number", whinh220.txtn )
else
message("'%s' is a number", whinh220.txtn )
endif
endselect
|-------------------------------------------------------------------------------
|read the transfer table to check for issue of material for workorder no
|-------------------------------------------------------------------------------
}