View Single Post
  #1  
Old 28th August 2017, 06:02
ren_bsi ren_bsi is offline
Newbie
 
Join Date: Dec 2015
Posts: 1
ren_bsi is on a distinguished road
Baan: LN 10.3 - DB: SQL Server 2008 - OS: Win Server 2008 R2
Sort Order advice needed
Baan: ERP LN 6.1 FP9 (Infor ERP 10.3)
C/S: Both

Hi to All,

I'm newbie to LN Programming and i have the following Code :
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
Reply With Quote