健康一贴灵,专注医药行业管理信息化

SAP abap 取单条SQL 结果

ABAP 在SQ02中写代码时,查询单条语句的结果写到变量中要用(@1,@2 .....)

DATA zsfhm(10) TYPE c.
CLEAR :zsf,zsfhm,zcs.
SELECT  SINGLE regio,ort01 INTO (@zsfhm,@zcs) FROM kna1
  WHERE kunnr = @vbak-kunnr .
**zsf = zsfhm.
SELECT SINGLE bezei INTO @zsf FROM t005u
  WHERE land1 = 'CN'
  AND spras = '1' and  bland = @ZsfHM .

 

posted @ 2021-11-05 16:16  一贴灵  阅读(309)  评论(0编辑  收藏  举报
学以致用,效率第一