0

I am looking a SQL query which will help me to auto generate Voucher and Adjustment Entry records.

I did not able to locate tables for below values.

PrePay and Landed Cost

Please let me know if any one has idea or any one have data structure diagram of Dynamics SL.

Qiu
  • 5,651
  • 10
  • 49
  • 56

1 Answers1

0

Finally i find it for Pre-Pay

    SELECT APADJUST.adjdrefnbr,
    APADJUST.adjgrefnbr,
    APADJUST.adjamt    
       FROM   APADJUST,
   APDOC WITH (nolock)
       WHERE  
   APADJUST.adjddoctype = APDOC.doctype AND
   APDOC.refnbr = APADJUST.adjdrefnbr AND
   APADJUST.vendid = APDOC.vendid AND
   APADJUST.adjddoctype = 'pp' AND
   APADJUST.s4future11 <> 'v' AND
   APADJUST.adjamt > 0 AND
   APDOC.docbal <> APDOC.origdocamt AND
   APADJUST.vendid = 'E01181' AND
   APADJUST.adjdrefnbr LIKE '%'
       ORDER  BY APADJUST.adjdrefnbr
       OPTION(fast 500)