ren_bsi
28th August 2017, 07:02
Hi to All,

I'm newbie to LN Programming and i have the following Code :

select tdsls401.*
from tdsls401
where tdsls401.ptpa inrange {:orno.f} and {:orno.t}
and tdsls401.item inrange {:item.f} and {:item.t}
and tdsls401.qoor > 0
order by tdsls401.orno asc, tdsls401.item desc |# -> Sort Order No.1
selectdo
no.pabean = tdsls401.orno
tgl.pabean = tdsls401.prdt
no.seri = tdsls401.item
select tdsls400.*
from tdsls400
where tdsls400.orno = {:no.pabean}
selectdo
mata.uang = tdsls400.ccur
select tcibd001.*
from tcibd001
where tcibd001.item = {:no.seri}
and tcibd001.citg inrange {:citg.f} and {:citg.t}
selectdo
nama.barang = tcibd001.dsca
select tdsls406.*
from tdsls406
where tdsls406.orno = {:no.pabean}
and tdsls406.pono = {:tdsls401.pono}
and tdsls406.sqnb = {:tdsls401.sqnb}
and tdsls406.dldt inrange {:rcdt.f} and {:rcdt.t}
and tdsls406.ttyp <> ""
and tdsls406.invn <> 0
order by tdsls406.shpm desc |# -> Sort Order No.2
selectdo
nilai.barang = tdsls406.damt
jumlah = tdsls406.qidl
no.receipt = tdsls406.shpm
tgl.receipt = tdsls406.dldt
ship.line = tdsls406.shln
rprt_send()
endselect
selectempty
nama.barang = ""
endselect
endselect
endselect


The sort order no.1 is working fine but for sort order no.2 does not take effect.
Is there any other way to make the sort order no.2 working ?
Really appreciate your advice.
Thank you.

Best regards,
Rendy