Other Guides:
如何提取单据的实际定价数据
VBAK,vbrk等表都有字段“KNUMV” 纪录了"单据条件数"
KONV 纪录单据的单价计算步骤(条件(事务数据))
示例:
select vbrk~fkart vbrp~posnr vbrk~sfakn vbrk~knumv vbrp~matnr vbrp~fkimg
into corresponding fields of wa_vbrk
from vbrk
inner join vbrp on vbrk~vbeln = vbrp~vbeln
where vbrk~vbeln = wa_bkpf-awkey+0(10).
if sy-subrc = 0.
select single kwert into (wa_vbrk-kwert)
from konv
where knumv = wa_vbrk-knumv
and kposn = wa_vbrk-posnr and kschl = 'ZPRS'."'VPRS'.
*..................................
endif.
endselect.
如何提取单价定价数据
首先从定价表(AXXX)中取出“KNUMH”条件记录号
select single knumh
into (l_knumh)
from a118
where matnr = wa_report-matnr and kschl = 'Z101'
and datab <= wa_report-fkdat and datbi >= wa_report-fkdat .
再根据条件记录号从KONP提取数据
select single kbetr kpein into (l_kbetr,l_kpein)
from konp where knumh = l_knumh and kschl = 'Z101'.
在根据配置计算定价数据