1 *VA05报表添加字段
2 *三代增强 BADI_SDOC_WRAPPER
3
4 *报表添加字段
5 *IF_BADI_SDOC_WRAPPER~ADAPT_RESULT_COMP
6 METHOD if_badi_sdoc_wrapper~adapt_result_comp.
7
8 "table 参考的表
9 "field 参考表的字段
10 "name alv显示字段名
11 "text alv显示字段文本
12 INSERT VALUE #( table = 'VBPA' field = 'KUNNR' name = 'SDF' text = '送达方' ) INTO TABLE ct_result_comp.
13
14 ENDMETHOD.
15
16 *给添加的字段赋值
17 *IF_BADI_SDOC_WRAPPER~POST_PROCESSING
18 METHOD if_badi_sdoc_wrapper~post_processing.
19
20 ASSIGN COMPONENT 'VBELN' OF STRUCTURE cs_result TO FIELD-SYMBOL(<fs_vbeln>).
21 ASSIGN COMPONENT 'SDF' OF STRUCTURE cs_result TO FIELD-SYMBOL(<fs_sdf>).
22 SELECT SINGLE kunnr
23 INTO <fs_sdf>
24 FROM vbpa
25 WHERE vbeln = <fs_vbeln>
26 AND parvw = 'WE' .
27
28 ENDMETHOD.