learner
12th January 2003, 10:59
Hi,
I am a new bie in baan . I am querying on a table Supplier Master in my program script, now in this i am checking the following field Line of Business i.e. tccom020.cbrn
now for a partcular supplier SP0002 , when i ran the session tccom2101m000 it showed me the Line of business for this supplier as blank.
Now when i execute my script in debug mode, i saw that for this supplier my tcom020.cbrn was showing as tccom020.cbrn = " "
how come the 6 spaces were there where as it is showing as blank in Maintain Supplier Session
Following code i wrote in my program script
***************** start of code *************************
|Function to get the Supplier Name and Lines of business
function select.tccom020()
{
select tccom020.nama:sup.name,
tccom020.cbrn:line.of.bus, tccom020.sust
from tccom020
where tccom020._index1 = {:sup.cd}
selectdo
if line.of.bus = " LB02" then
line.of.bus.desc = "Manufacturers"
else
if line.of.bus = " LB01" then
line.of.bus.desc = "Traders"
else
if line.of.bus <> " " and (line.of.bus <> " LB01" or line.of.bus <> " LB02") then
line.of.bus.desc = "Others"
else
if line.of.bus = " " then
line.of.bus.desc = "Not Defined"
endif
endif
endif
endif
selectempty
sup.name = ""
line.of.bus.desc = "Not Defined"
endselect
}
****************** end of code *********************
now my doubt is this 6 spaces i came to know only during debug mode please tell me how do i handle this situation ? Is there any fnction available ?
I am a new bie in baan . I am querying on a table Supplier Master in my program script, now in this i am checking the following field Line of Business i.e. tccom020.cbrn
now for a partcular supplier SP0002 , when i ran the session tccom2101m000 it showed me the Line of business for this supplier as blank.
Now when i execute my script in debug mode, i saw that for this supplier my tcom020.cbrn was showing as tccom020.cbrn = " "
how come the 6 spaces were there where as it is showing as blank in Maintain Supplier Session
Following code i wrote in my program script
***************** start of code *************************
|Function to get the Supplier Name and Lines of business
function select.tccom020()
{
select tccom020.nama:sup.name,
tccom020.cbrn:line.of.bus, tccom020.sust
from tccom020
where tccom020._index1 = {:sup.cd}
selectdo
if line.of.bus = " LB02" then
line.of.bus.desc = "Manufacturers"
else
if line.of.bus = " LB01" then
line.of.bus.desc = "Traders"
else
if line.of.bus <> " " and (line.of.bus <> " LB01" or line.of.bus <> " LB02") then
line.of.bus.desc = "Others"
else
if line.of.bus = " " then
line.of.bus.desc = "Not Defined"
endif
endif
endif
endif
selectempty
sup.name = ""
line.of.bus.desc = "Not Defined"
endselect
}
****************** end of code *********************
now my doubt is this 6 spaces i came to know only during debug mode please tell me how do i handle this situation ? Is there any fnction available ?