1.Append structure 到两个主要控制显示的结构中:
1.1定义Append structure
最好先定义data element, 并且对这些data element维护好label, 这样在ALV中就不用去管field name了.
在线英语补习1.2增强结构 SHP_VL10_ITEM
注意将定义好的structure 添加到需要增强的结构中
1.3增强结构 SHP_VL10_INDX
北京计算机培训学校
步骤同上, 不再累述.
2.对程序LV50R_VIEWG02进行增强
(该增强用于给item中的自己定义的字段赋值)
新建Ehancement spot:虚拟现实培训>ated
synthetic注: 在上面我选择了Composite Enhancement Implementation, 你也可以skip这个的创建过程, 不影响其他步骤
3.编程: LV50R_VIEWG02的增强
carry是什么意思英语ENHANCEMENT 123 ZLV50R_VIEWG02.
FIELD-SYMBOLS <fs> type SHP_VL10_ITEM.
data: zvbpa like VBPAVB .
data: zvbap like VBAPVB .
assign CS_POSTAB to <fs>.
* Get Final customer number
read table IX_SD_ORDER-VBPA into zvbpa with key vbeln = <fs>-vbelv parvw = 'ZE'.
if sy-subrc = 0.
她一定是疯了用英语怎么说
lect single name1
from adrc into <fs>-ZFINAL_CUST_NAME
齿轮传动的类型where ADDRNUMBER = zvbpa-adrnr.
endif.
* Get Product Hierarchy
read table IX_SD_ORDER-vbap into zvbap with key vbeln = <fs>-vbelv posnr = <fs>-posnv.
if sy-subrc = 0.
<fs>-PRODH = zvbap-PRODH.
endif.
* Get ATO codes
lect single ZATOCODE from vbap into <fs>-ZATO_CODE
where vbeln = <fs>-vbelv and posnr = <fs>-posnv.
* Get ASAP Indicator
data: name like THEAD-TDNAME.
data: line like TABLE OF TLINE WITH HEADER LINE.
concatenate <fs>-vbelv <fs>-posnv INTO name
in CHARACTER MODE.
CALL FUNCTION 'READ_TEXT'
internal是什么意思
EXPORTING
ID = 'Z409'
LANGUAGE = sy-langu
NAME = name
OBJECT = 'VBBP'
pullin
TABLES
LINES = line
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
IF SY-SUBRC = 0.
read table line index 1.
<fs>-ZASAP_IND = line-TDLINE.
ENDIF.
ENDENHANCEMENT.
4.对LV50R_VIEWG11进行增强:
这个增强用于修改VL10C的fieldcatlog
ENHANCEMENT 124 ZLV50R_VIEWG11. "active version
delete ct_fkat where ( fieldname = 'ZATO_CODE' or fieldname = 'ZASAP_IND' or fieldname = 'PRODH' )
and tabname = 'CT_HEAD'.
delete ct_fkat where fieldname = 'ZFINAL_CUST_NAME'
and tabname = 'CT_ITEM'.
ENDENHANCEMENT.