Technical Articles
How to find the specific ABAP Code that is updating any Logic in a Smart Way?
How to find the specific ABAP Code that is updating any Logic in a Smart Way?
Introduction.
After working with SAP for more than 15 years and travelling across the Globe for SAP Projects one issue I always use to have how can I find the exact enhancement or code where certain logic is getting updated. The below blog will do magic and you can find the exact place where certain enhancement is written.
Solution
Procedure 1
For SAP ECC and SAP S/4HANA
Go to Transaction Code SE38 and Execute Program RS_ABAP_SOURCE_SCAN
Provide the below Parameter and Execute
Wala below is the result
Procedure 2
Login to SAP S/4HANA and Go to Transaction Code CODE_SCANNER
Suppose I want to find all the Program/Enhancement that has mentioned the Check ” = ‘SAP_WFRT’ ”
In the below screenshot we are only restricting to Z Packages. Now Execute
Wala below is my result.
Conclusion
This can be used in both SAP ECC and SAP S/4HANA
Below is the video version
Wow... I do know about this transaction, but never crossed my mind to use it for this purpose. This is a brilliant discovery!
Thank you so much.
You are welcome.
Thanks
Arghadip
Thanks for sharing. BTW, it is also available in NetWeaver Systems.
Welcome Glad you liked it
Arghadip Kar
Thanks for the tip, Arghadip! I just tried CODE_SCANNER on our NW 7.50 EHP8 on HANA DB system and it's available there as well and runs amazingly fast!
Cheers
Bärbel
Welcome Glad you liked it
I've been using the report RS_ABAP_SOURCE_SCAN (or RPR_ABAP_SOURCE_SCAN, calling the same) up to now. It seems to show a bit more context and has more options.
Also that one is available both in the ECC and S/4HANA (on prem).
regards, Karl
Welcome Glad you liked it
Uhm, weird, it looks like this is a bit older than RS_ABAP_SOURCE_SCAN.
Still, thanks for the heads up!
Welcome Glad you liked it
This one is interesting. I honestly have never used this tcode. I'm using RS_ABAP_SOURCE_SCAN. I wonder if anyone can point out the advantage of using code_scanner?
Haha Good one.
The Layout looks a little easier to look
and you can exclude Search String in the new Transaction Code.
Thanks for pointing the old Program I forgot about it 🙂
I have updated the blog with both options.
Thank you! I'm going to try to use code_scanner the next time I search.
thanks, I will show to my team!
Welcome Glad you liked it
Thanks for this wonderful summary.
It seems as coding in enhancements seems to be a blind spot for both RS_ABAP_SOURCE_SCAN and CODE_SCANNER.
Example: I created the enhancement ZFI_MV45AOZZ in include MV45AOZZ. The coding in the enhancement cannot be searched.
Is there a way to search coding in enhancements?
Search with proper package filter. It should work.
Thanks
Arghadip
No, package filter won't work. In the meantime I found the following useful blogs on this issue:
Report to search ABAP code in Enhancement implementations | SAP Blogs
Code Search in Modifications and Enhancements (without HANA) | SAP Blogs
Just add that the transaction CODE_SCANNER doesn't work with local packages $....
Hi arghadip kar,
Thanks for the useful tip. its really useful.
Regards,
Srinivas
Hi arghadip kar,
Thanks for the info.. its really useful..
Regards,
Srinivas
Thank you! Arghadip for sharing this wonderful info.
Thank you for sharing such a unique knowledge. Its really amazing...!
Thank you! Arghadip for sharing this info.
As already pointed out, program - RS_ABAP_SOURCE_SCAN as well as transaction - CODE_SCANNER, dont list the results from Enhancements.
There is another Transaction available in S/4 - EWK1, which does the job pretty well.
Here to couple of challenges and multiple searches might be required to get most of the desired results -
Output - Searches for Programs, Enhancements, Classes (including AMDP)
However, does not search for Module Pools (RF transactions), FMs, Forms (Interface code), UI5 Apps, CDS views
Output - Searches for form (interface code) (Can be a bit slow as it will search through all the form interface code)
Output - Searches for FMs
Output - Searches for Module Pool programs