謹此內容寫給正在實施和已經實施SAPBO朋友們的,如下語句不見得都適用你們,不過觸類旁通稍加變通便可使用,不囉嗦了但願對你們有所幫助:ide
BOM損耗量計算
SELECT $[itt1.u_standqty]*(1+t1.u_consurate/100) from itt1 t0
inner join oitm t1 on t1.itemcode=t0.code
where t1.itemcode=$[$3.1.1]code
採購訂單當前倉庫庫存
SELECT t0.onhand FROM OITW T0 where t0.itemcode=$[$38.1.1] and t0.whscode=$[$38.24.1]get
採購訂單同一供應商同一物料歷史最低價
SELECT t1.cardcode,t0.itemcode,t0.price from por1 t0 inner join opor t1 on t1.donum=t0.docentry where t1.cardcode=$[$4.1.1] and t0.itemcode=$[$38.1.1]qt
採購訂單同一物料歷史最低價
SELECT min(t0.price) from por1 t0 where t0.itemcode=$[$38.1.1]it
查詢當天日期
select convert(varchar(10),getdate(),120)class
庫存發貨-當前倉庫庫存量
SELECT t0.onhand FROM OITW T0 where t0.itemcode=$[$13.1.1] and t0.whscode=$[$13.15.1]date
庫存發貨科目自動
declare @acctcode nvarchar(8)
select @acctcode=$[ige1.U_wouttype]
select @acctcodeselect
庫存收貨科目自動
declare @acctcode nvarchar(8)
select @acctcode=$[ign1.U_wintype]
SELECT @acctcode項目
庫存轉儲外協功能生產訂單號選擇
SELECT t0.docnum, t0.itemcode,t1.itemname,t0.plannedqty from owor t0 inner join oitm t1 on t1.itemcode=t0.itemcode where status='r'查詢
庫存轉儲外協功能生產訂單下父件選擇
SELECT t0.itemname from oitm t0 inner join owor t1 on t1.itemcode=t0.itemcode where t1.docum=$[owtr.address]
庫存轉儲外協功能生產訂單下物料數量選擇
SELECT t0.plannedqty from wor1 t0 inner join owor t1 on t1.docnum=t0.docentry where t1.docentry=$[owtr.address] and t0.itemcode=$[$23.1.1]
庫存轉儲外協功能生產訂單下物料選擇
SELECT t0.itemcode from wor1 t0 inner join owor t1 on t1.docnum=t0.docentry where t1.docentry=$[owtr.address]
庫存轉儲源倉庫庫存
SELECT t0.onhand FROM OITW T0 where t0.itemcode=$[$23.1.1] and t0.whscode=$[$18.1.1]
請購單價格等級查詢
SELECT t0.SWW FROM OITM T0 where t0.itemcode=$[$M1.c1.1]
請購單最小採購量
SELECT t0.PURPACKUN FROM OITM T0 where t0.itemcode=$[$M1.c1.1]
日記帳我的名稱顯示
SELECT T0.PrcName FROM OPRC T0 where t0.Prccode=$[$76.2006.1]
日記帳我的名稱顯示
SELECT T0.PrcName FROM OPRC T0 where t0.Prccode=$[$76.2003.1]
生產訂單倉庫庫存
SELECT t0.onhand FROM OITW T0 where t0.itemcode=$[$37.4.1] and t0.whscode=$[$37.10.1]
退貨利潤中心自動鏈接
Select u_lrzx from oslp where oslp.slpcode =$[ordn.slpcode]
物流費用
SELECT T0.U_weight * T0.U_price FROM ODLN T0
顯示物料描述
SELECT T0.ItemName FROM OITM T0 WHERE T0.ItemCode = $[OCLG.u_gfypyz5]
銷售報價利潤中心
Select u_lrzx from oslp where oslp.slpcode =$[oqut.slpcode]
銷售訂單當前倉庫存庫
SELECT t0.onhand FROM OITW T0 where t0.itemcode=$[$38.1.1] and t0.whscode=$[$38.24.1]
銷售訂單利潤中心自動鏈接
Select u_lrzx from oslp where oslp.slpcode =$[ordr.slpcode]
銷售項目名稱自動鏈接
SELECT t0.ocrname FROM OOCR T0 where t0.datasource=$[$7.v_9.1] and t0.ocrcode=$[$7.V_4.1]
銷售項目顯示
SELECT T0.PrcName FROM OPRC T0 where t0.Prccode=$[$38.2002.1]
應收發票利潤中心自動鏈接 Select u_lrzx from oslp where oslp.slpcode =$[oinv.slpcode]