Find any String or Hard Coded Value in SAP ABAP Code

  • A+
所属分类:SAP

最近有个需求,要在用了十几年的系统里找到包含某个字符串的所有程序、函数、增强,由于自开发了大量(几千)程序且系统已经上线十几年,没有一个人能完全说清楚究竟哪些地方用到了这个字符串,因此需用技术手段分析所有程序,找出字符串。

Reports to find String in SAP ABAP Program

The different methods to find any String in SAP ABAP Code are:

  • Report RPR_ABAP_SOURCE_SCAN 
  • Report RSRSCAN1
  • Standard Report RKCTSEAR
  • Report AFX_CODE_SCANNER (it requires at least one package name)
  • Custom Report

The recommend Report to search any string in ABAP Programs in RPR_ABAP_SOURCE_SCAN.

But it is not available in all SAP Version. In this case, you may want to use RSRSCAN1.
( The RSRSCAN1 reachs its limits very quickly and may dumb, consider running it with a limited ABAP programs )

Transaction codes to find String in SAP ABAP Code

  • SE38 > Tools
  • Tcode CODE_SCANNER
  • and also Transaction Code EWK1

As RPR_ABAP_SOURCE_SCAN, you may not have the EWK1 Transaction codes in your system.

源文:https://sap4tech.net/find-string-sap-abap-code/

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: