四代增强
2种显示增强1种隐式增强
隐式增强
光标放在增强点或其中的代码点击修改即可修改代码
显示增强
1.ENHANCEMENT-POINT
在代码修改界面选择空行
光标所在位置
可以创建多个增强实施且激活后都会执行.
2.ENHANCEMENT-SECTION
1,选中程序中空行
2.编辑->创建选项
回车
可以直接写入代码.
3.点击增强按钮
创建实施->激活后会覆盖EN-SECTION原来的代码.
只能创建一个实施
程序代码:
*&---------------------------------------------------------------------*
*& Report ZTXYY_11118
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZTXYY_11118.
data:str type p DECIMALS 2 VALUE '56.03',
STR1 TYPE STRING,
STR2 TYPE STRING,
STR3 TYPE STRING.
STR3 = STR.
SPLIT str3 AT '.' INTO STR1 STR2.
WRITE: STR1,STR2.
ENHANCEMENT-SECTION ZTNN_01 SPOTS ZTM_01 .
write:11.
END-ENHANCEMENT-SECTION.
*$*$-Start: ZTNN_01-----------------------------------------------------------------------------$*$*
ENHANCEMENT 2 ZTM_STU_02. "active version
write:12.
ENDENHANCEMENT.
*$*$-End: ZTNN_01-----------------------------------------------------------------------------$*$*
ENHANCEMENT-POINT ZTM_01 SPOTS ZTM_01 .
*$*$-Start: ZTM_01------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZTM_STU_01. "active version
*
write: '第一次实施'.
ENDENHANCEMENT.
ENHANCEMENT 1 ZTM_STU_02. "active version
*
write: '第二次实施'.
ENDENHANCEMENT.
*$*$-End: ZTM_01------------------------------------------------------------------------------$*$*
ENHANCEMENT-POINT ZTM_02 SPOTS ZTM_01 .
ENHANCEMENT-POINT ZTEH_01 SPOTS ZTM_01 .
ENHANCEMENT-POINT ZTM_03 SPOTS ZTM_11 .
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Include ZTXYY_11118, End S
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZTXNG_01. "inactive version
*
write:'你想干嘛'.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
结果:
一个EN-SPOTS 可以有多个EN-POINT和多个EN-SECTION。
SAP的隐式增强 就是一个Enhancement point, 一个Enhancement point只有实施后才有效。
Enhancement section 直接插入代码,不需实施