ABAP-S4的VA05销售清单报表添加字段增强
作者:互联网
*VA05报表添加字段
*BADI_SDOC_WRAPPER
*报表添加字段
*IF_BADI_SDOC_WRAPPER~ADAPT_RESULT_COMP
METHOD if_badi_sdoc_wrapper~adapt_result_comp.
"table 参考的表
"field 参考表的字段
"name alv显示字段名
"text alv显示字段文本
INSERT VALUE #( table = 'VBPA' field = 'KUNNR' name = 'SDF' text = '送达方' ) INTO TABLE ct_result_comp.
ENDMETHOD.
*给添加的字段赋值
*IF_BADI_SDOC_WRAPPER~POST_PROCESSING
METHOD if_badi_sdoc_wrapper~post_processing.
ASSIGN COMPONENT 'VBELN' OF STRUCTURE cs_result TO FIELD-SYMBOL(<fs_vbeln>).
ASSIGN COMPONENT 'SDF' OF STRUCTURE cs_result TO FIELD-SYMBOL(<fs_sdf>).
SELECT SINGLE kunnr
INTO <fs_sdf>
FROM vbpa
WHERE vbeln = <fs_vbeln>
AND parvw = 'WE' .
ENDMETHOD.
标签:报表,WRAPPER,SDOC,ABAP,添加,result,VA05,S4,BADI 来源: https://www.cnblogs.com/TigerMan/p/16287272.html