data: iIncludeLines type standard table of string with header line.
data: iTokens type standard table of stokes with header line.
data: iKeywords type standard table of text20 with header line.
data: iStatements type standard table of sstmnt with header line.
data: waTokens type stokes.
data: waInclude type tInclude.
data: waIncludeExists type tInclude.
data: maxLines type i.
data: nextLine type i.
data: castProgramName type program.
* Read the program code from the textpool.
castProgramName = programName.
read report castProgramName into iIncludeLines.
append INCLUDE to iKeywords.
scan abap-source iIncludeLines tokens into iTokens with includes statements into iStatements keywords from iKeywords.
clear iIncludeLines[].
maxLines = lines( iTokens ).
loop at iTokens where str = INCLUDE and type = 'I'.
"自己写处理逻辑
ENDLOOP.
ABAP根据程序去找INCLUDE程序
最新推荐文章于 2025-07-24 20:09:50 发布
这篇博客探讨了如何读取ABAP程序代码,并特别关注处理'INCLUDE'指令的过程。通过扫描源代码,提取出包含的文件并进行标记,然后进行关键词分析,主要涉及ABAP编程中的tokens、语句和关键字管理。博客内容适合熟悉ABAP语法和代码处理的读者。
4523

被折叠的 条评论
为什么被折叠?



