效果:
上面的注释内容,是模板带出来的
利用的是表:TSE05
可以自己进入该表查看相关信息
上例实例代码:
ZLM_TEST_MOBAN .
*&---------------------------------------------------------------------*
*&变量定义
*&---------------------------------------------------------------------*
DATA
: wa_tse05
TYPE tse05
,
it_tse05
TYPE
TABLE
OF tse05
.
*&---------------------------------------------------------------------*
*&变量定义
*&---------------------------------------------------------------------*
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
"key
wa_tse05
-
position
=
1
.
"第一行
wa_tse05
-
line
=
'*&---------------------------------------------------------------------*'
.
APPEND wa_tse05
TO it_tse05
.
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
wa_tse05
-
position
=
2
.
"第二行
wa_tse05
-
line
=
'*& 程序名 :'
.
APPEND wa_tse05
TO it_tse05
.
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
wa_tse05
-
position
=
3
.
"第三行
wa_tse05
-
line
=
'*& 功能说明:'
.
APPEND wa_tse05
TO it_tse05
.
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
wa_tse05
-
position
=
4
.
wa_tse05
-
line
=
'**& 创建人 :'
.
APPEND wa_tse05
TO it_tse05
.
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
wa_tse05
-
position
=
5
.
wa_tse05
-
line
=
'*& 创建时间:'
.
APPEND wa_tse05
TO it_tse05
.
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
wa_tse05
-
position
=
6
.
wa_tse05
-
line
=
'*& 修改记录:'
.
APPEND wa_tse05
TO it_tse05
.
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
wa_tse05
-
position
=
7
.
wa_tse05
-
line
=
'*& 请求号|修改人|修改时间'
.
APPEND wa_tse05
TO it_tse05
.
wa_tse05
-app_obj
=
'ABAP'
.
wa_tse05
-keyword
=
'REPORT1'
.
wa_tse05
-
position
=
8
.
wa_tse05
-
line
=
'*&---------------------------------------------------------------------*'
.
APPEND wa_tse05
TO it_tse05
.
MODIFY tse05
FROM
TABLE it_tse05
.
这段代码执行完后,就没用了.
标签:自建,wa,tse05,Pattern,app,ABAP,keyword,APPEND,模板 From: https://blog.51cto.com/u_15680210/5751435