jaycee99
18th June 2008, 04:50
Please refer to the attachment. Everything disappear after i choose the selection. Below is the coding that i used for it. Any solution for this?
CODE:
#include <bic_dal2>
table twhinh999 |Packing
domain tcpono last.pono
domain whinh.shpm last.shpm
function extern long set.object.defaults()
{
determine.next.pono()
last.shpm = whinh999.shpm
last.pono = whinh999.pono
return(0)
}
function extern long whinh999.pono.is.derived(long mode)
{
return(true)
}
function determine.next.pono()
{
if whinh999.shpm = last.shpm then
whinh999.pono = last.pono + 10
else
select whinh999.pono
from whinh999
where whinh999.shpm = :whinh999.shpm
order by whinh999.pono desc
as set with 1 rows
selectdo
whinh999.pono = whinh999.pono + 10
selectempty
whinh999.pono = 10
endselect
endif
}
CODE:
#include <bic_dal2>
table twhinh999 |Packing
domain tcpono last.pono
domain whinh.shpm last.shpm
function extern long set.object.defaults()
{
determine.next.pono()
last.shpm = whinh999.shpm
last.pono = whinh999.pono
return(0)
}
function extern long whinh999.pono.is.derived(long mode)
{
return(true)
}
function determine.next.pono()
{
if whinh999.shpm = last.shpm then
whinh999.pono = last.pono + 10
else
select whinh999.pono
from whinh999
where whinh999.shpm = :whinh999.shpm
order by whinh999.pono desc
as set with 1 rows
selectdo
whinh999.pono = whinh999.pono + 10
selectempty
whinh999.pono = 10
endselect
endif
}