"录入价格相关数据
SELECT SINGLE"通过销售组织 分销渠道获取到客户的定价过程 用于判断价格是用pr00 还是zpr1
t~vkorg,
t~vtweg,
t~spart,
t~kalsm,
t~kartv,
k~kalks,
k~kunnr,
t~kalvg
FROM t683v AS t
INNER JOIN knvv AS k ON t~vkorg = k~vkorg
AND t~kalks = k~kalks
INNER JOIN tvkov AS v ON v~vkorg = k~vkorg
AND v~vtwku = k~vtweg
INNER JOIN tvkos AS s ON s~vkorg = k~vkorg
AND s~spaku = k~spart
INNER JOIN tvak AS a ON t~kalvg = a~kalvg
INTO @DATA(ls_t683v)
WHERE t~vkorg = '1090'
AND t~vtweg = '30'
AND t~spart = '9A'
AND a~auart = 'ZOR4'
AND t~kalsm IN ('Z00002','Z00007')
AND k~kunnr = @lv_zcbf.
SELECT * INTO TABLE @DATA(lt_a305)
FROM a305
WHERE kschl = @ls_t683v-kartv
AND matnr = @lv_material.
IF lt_a305 IS INITIAL.
ls_sales_conditions_in-cond_type = ls_t683v-kartv."合同价
ENDIF.
标签:JOIN,spart,SALESDOCUMENT,vkorg,CREATE,ZPR1,t683v,ls,INNER From: https://www.cnblogs.com/LikZ-WM/p/16891434.html