zl程序教程

您现在的位置是:首页 >  前端

当前栏目

源代码增强的一点说明(souce code enhance )详解编程语言

code编程语言 详解 说明 增强 源代码 一点 Enhance
2023-06-13 09:11:51 时间

下面以显式创建为例子:

1、在ABAP编辑器中, 打开想要编辑的程序,切换到可编辑模式

2、在源代码中的指定位置右键,弹出菜单,选择 Enhancements #Create Option

此处说明一下:你需要进入Utilities》设置》ABAP Editor 中,将downwards-comp.Line Lngth(72)的复选框取消勾选,否则在创建源代码增强的的时候,会提示消息creating of enhancements supported only for line length 72 。

3、在弹出的对话框中,选择ENHANCEMENT-POINT(增强点) 或ENHANCEMENT-SECTION(增强部分),然后在后面填写名称,如 ZEH1 。

4、选择有条件调用还是无条件调用。

对于有条件调用和无条件调用的说明:

As an unconditional call (the enhancement option then receives in the source code the addition STATIC ):
In such static enhancements, data declarations for example can be added or replaced. The call of enhancements is independent of the client the choice of a static call should therefore be carefully thought out beforehand.
As a conditional call:
The enhancements implemented here are dynamic that is, they are called in connection with the switch settings.

5、创建增强点,并填入增强点名称,如 ZSP1 ,描述,pakage,如果有请求号,需要将请求号填入,还有开发类等。

说明:一个增强点名称下,可以分配多个增强点,既,这里可以创建多个增强点。

6、选择右下角的对号,回到abap编辑器中,你会发现光标位置出现类似如下代码ENHANCEMENT-POINT ZEH1 SPOTS ZSP1 ZSP2 .

 需要说明的时候,在创建的时候,注意命名的问题,需要以字符Z或Y开头

原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/19652.html

c