ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【转贴】SAP B1格式化搜索例子

【转贴】SAP B1格式化搜索例子

原创 Linux操作系统 作者:sapwh 时间:2010-11-16 15:56:59 0 删除 编辑
“本文出自 “紫砂狐” 博客,请务必保留此出处http://38641581.blog.**.com/275705/287049“

谨此内容写给正在实施和已经实施SAPBO朋友们的,以下语句不见得都适用大家,不过举一反三稍加变通即可使用,不啰嗦了希望对大家有所帮助:

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]

采购订单当前仓库库存
_selectt0.onhand  FROM OITW T0 where t0.itemcode=$[$38.1.1] and t0.whscode=$[$38.24.1]

采购订单同一供应商同一物料历史最低价
_selectt1.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]

采购订单同一物料历史最低价
_selectmin(t0.price) from por1 t0 where  t0.itemcode=$[$38.1.1]

查询当天日期
_selectconvert(varchar(10),getdate(),120)

库存发货-当前仓库库存量
_selectt0.onhand  FROM OITW T0 where t0.itemcode=$[$13.1.1] and t0.whscode=$[$13.15.1]

库存发货科目自动
_declare@acctcode nvarchar(8) 
_select@acctcode=$[ige1.U_wouttype] 
_select@acctcode

库存收货科目自动
_declare@acctcode nvarchar(8)
_select@acctcode=$[ign1.U_wintype]
_select@acctcode

库存转储外协功能生产订单号选择
_selectt0.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]

库存转储源仓库库存
_selectt0.onhand  FROM OITW T0 where t0.itemcode=$[$23.1.1] and t0.whscode=$[$18.1.1]

请购单价格等级查询
_selectt0.SWW  FROM OITM T0 where t0.itemcode=$[$M1.c1.1]

请购单最小采购量
_selectt0.PURPACKUN  FROM OITM T0 where t0.itemcode=$[$M1.c1.1]

日记账个人名称显示
_selectT0.PrcName FROM OPRC T0 where t0.Prccode=$[$76.2006.1]

日记账个人名称显示
_selectT0.PrcName FROM OPRC T0 where t0.Prccode=$[$76.2003.1]

生产订单仓库库存
_selectt0.onhand  FROM OITW T0 where t0.itemcode=$[$37.4.1] and t0.whscode=$[$37.10.1]

退货利润中心自动连接
_selectu_lrzx from oslp where oslp.slpcode =$[ordn.slpcode]

物流费用
SELECT  T0.U_weight_*T0.U_price FROM ODLN T0

显示物料描述
_selectT0.ItemName FROM OITM T0 WHERE T0.ItemCode = $[OCLG.u_gfypyz5]

销售报价利润中心
_selectu_lrzx from oslp where oslp.slpcode =$[oqut.slpcode]

销售订单当前仓库存库
_selectt0.onhand  FROM OITW T0 where t0.itemcode=$[$38.1.1] and t0.whscode=$[$38.24.1]

销售订单利润中心自动连接
_selectu_lrzx from oslp where oslp.slpcode =$[ordr.slpcode]

销售项目名称自动连接
_selectt0.ocrname FROM OOCR T0 where t0.datasource=$[$7.v_9.1] and t0.ocrcode=$[$7.V_4.1]

销售项目显示
_selectT0.PrcName FROM OPRC T0 where t0.Prccode=$[$38.2002.1]

应收发票利润中心自动连接
_selectu_lrzx from oslp where oslp.slpcode =$[oinv.slpcode]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23503339/viewspace-678234/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-09-26

  • 博文量
    48
  • 访问量
    66185