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

“本文出自 “ 紫砂狐” 博客,请务必保留此出处 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博客 ” ,链接:http://blog.itpub.net/23503339/viewspace-678234/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23503339/viewspace-678234/

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值