The different ways to search any String or Hard Coded Value within SAP ABAP Code including Reports, Includes and Classes Explained !
Table of Contents
The different methods to find any String in SAP ABAP Code are:
The recommend Report to search any string in ABAP Programs in RPR_ABAP_SOURCE_SCAN.
But it is not available in all SAP Version like (CRM, SRM,…). 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 )
As RPR_ABAP_SOURCE_SCAN, you may not have the EWK1 Transaction codes in your system.
And my preference to search for String in ABAP source is for the standard Transaction Code CODE_SCANNER.
In fact, the CODE_SCANNER Tcodes is for “Scans Report/Funct. Group/Class Code” and it is based on the report AFX_CODE_SCANNER.
In the Search Criteria, the only parameters required are the package & the Search String 1.
You have also options to :
You can also restrict your string search to :
An alternative to find a String or any hard coded value in SAP ABAP code / programs is to create your own report and take the control.
The main algorithm is :
The TRDIR is based on SAP Table REPOSRC.
The main field for TRDIR are:
The SAP Tables D020S (System table D020S (screen sources)) stores the Screen Sources.
List of fields for D020S are:
Use the ABAP statement READ REPORT in order to read the ABAP sources into an internal Table.
for example: read report gv_RepName into gt_SrcCode.
For Screen and Dynpro, use rather IMPORT DYNPRO.
For example: import dynpro gs_DynHeader gt_DynFields gt_DynLines gt_DynParams id gs_DynPro.
You will find the whole Report here Search for Strings in ABAP Source Code
If you want to go further and learn more about ABAP Programming or even refresh your ABAP knowlege, I recommend the following Books:
SAP ISU Tables for Technical master data, for Billing Master Data, Billing and invoicing Tables?…
SAP Fiori 3 UX and Design of SAP Fiori Apps for SAP S/4HANA, SAP TechEd…
Dunning is the business practice of informing a customer of past due payment. Dunning letters…
SAP AP Tcodes & SAP AR Tcodes: House Banks Tcodes, Advance Payments or Down Payments,…
What are the main SAP Payment Terms Tables ? What are the related Tables in…
Work center consists of master data related to routing of products. It contains data related…