REPORT Zactexitfun .
data ztfdir like tfdir .
* select single * from tfdir into ztfdir
* where FUNCNAME =
* ‘EXIT_SAPMM06E_013‘.
* ztfdir-MAND = ‘C‘ .
* update tfdir from ztfdir.
* 将EXIT_SAPMM06E_013换成实际所需exit函数名
update tfdir set MAND = ‘C‘.
where FUNcname = ‘EXIT_SAPMM06E_013‘.
如何查找
*判断是否存在相应增强的定义(SMOD)
select single name
from modsapa
into mod0-name
where name = ‘PPCO0002‘.
if sy-subrc = 0.
endif.
select single *
from tadir
into ps_tadir_db
where pgmid = ‘R3TR‘
and object = ‘SMOD‘
and obj_name = ‘PPCO0002‘.
*判断是否存在相应增强项目的定义(CMOD)
SELECT SINGLE name FROM MODATTR into mod0-name
WHERE NAME = ‘PPCO0002‘..
*提取增强的定义的组件 (可以用此反查增强定义)
select * from modsap
where name = ‘PPCO0002‘.
*判断该增强是否移植到BADI实现
*Enhancement & has already been migrated in Business Add-In definition
select single migrated badi_def into (migrated, exit_name)
from modsapa where name = modname.
if sy-subrc = 0 and migrated = seex_true.
message s621 with modname exit_name.
check mode ne ‘CHAM‘.
endif.
MODTYP 类型:
E : 功能退出
S : 屏幕
T : 表
C : GUI代码
sap增强存在MODSAP表内
*获取增强组件的参见函数MOD_SAP_MEMBER_TEXT
*获得退出功能模块的信息
select single * from tftit
where "SPRAS" = ‘1‘ AND "FUNCNAME" = ‘EXIT_SAPLCORE_001‘
if sy-subrc = 0.
endif.