04-26-2012 7:34 PM
So I know about code_scanner for Reports, FMs, and classes.
Is there an equivalent for implicit enhancements?
As an alternative, what table is implicit enhancement code stored in?
Thanks
Bryan
03-19-2013 8:20 PM
For those of you that have been waiting with baited breath for an answer here (ha!):
I'm still working on web dynpro enhancements, but for report/FM/class based enhancements, you can find what you need in table:
ENHINCINX
Field ENHINCLUDE has an include name that can be read at runtime using the READ REPORT command.
I'll update again if I can find web dynpro enhancements.
04-26-2012 8:27 PM
Hi Bryan,
This information can help you, look at these tables, they contain enhancments.
Tables:
ENHOBJ - Enhancement Objects
ENHHEADER - Enhancement Header Table
Regards,
Jr Vieira
04-26-2012 8:52 PM
That's helpful, thanks.
Any idea how I can scan the actual code for keywords?
For reference, I am looking for places where a certain value was hard-coded. I can scan programs, FMs, and classes using code_scanner. I need a way to do it for implicit enhancements.
Thanks
04-26-2012 8:28 PM
Hello,
This is interesting question, is it not standard tool provided by SAP like code inspector, performacne analysis checking the code written in enhancement?
....Implicit enhancement provided by SAP as like plug in to insert custom logic and it treated and compiled as a single object where it is written; only managed throuhg enhancement framework...
.
So in my opinion all standards option should be available.
.
Regards
Krish
04-26-2012 8:50 PM
In theory, perhaps. But if I run code_scanner for a program I know has implicit enhancements using a search string I know is there, it finds no hits.
05-03-2012 3:43 PM
Anyone else have thoughts? I'm looking for a way to scan enhancements for a certain hard-coded value.
Thanks!
05-03-2012 4:43 PM
05-03-2012 6:35 PM
Hi,
take a look at function group ENH_EDT_HOOK, include LENH_EDT_HOOKF01,
seems that what you're looking for it's been done in the implementation of method 'handle_function_selected'.
05-03-2012 9:56 PM
03-19-2013 8:20 PM
For those of you that have been waiting with baited breath for an answer here (ha!):
I'm still working on web dynpro enhancements, but for report/FM/class based enhancements, you can find what you need in table:
ENHINCINX
Field ENHINCLUDE has an include name that can be read at runtime using the READ REPORT command.
I'll update again if I can find web dynpro enhancements.
06-19-2013 2:51 PM
Hi, I have a similar requirement, but the enhancement code to be searched is under webdynpro. Please let me know if you have a solution for scanning webdynpro enhancements.
06-24-2013 8:45 PM
Take a look at the class cl_wdy_wb_naming_service. It has a method for getting the generated class name of a WDY component. The implementation of that class is basically a list of includes. You can then use READ REPORT on each include.
I ended up cloning AFX_CODE_SCANNER and adding the ability to search enhancements & web dynpro components. It has been a very valuable tool for me and my team.
08-30-2013 10:30 AM
Hi Bryan,
thanks for your research and sharing.
one comment: i'm having the same needs to scan all the hard coded constants in our projects development object. i found that the program: RS_ABAP_SOURCE_SCAN is more powerful, coz it can search with regex, i don't think AFX_CODE_SCANNER can.
and could you share the report you've cloned?
Regards,
Aaron.
08-30-2013 2:02 PM
Aaron,
Thanks, I wasn't aware of that other code scanner. The code in that program is far more modularized; I may be able to plug into it using enhancements instead of needing to clone it.
I will check with my boss about sharing the code. If he's OK with it, I will probably do it as a blog post.
Bryan
09-02-2013 2:20 AM
Hi Bryan,
i did some research on enhancements, i found there're just too many types: badi, function group, class......
i'm wondering how did you achieve to scan the source code only about the enhancement implementation? i mean if we enhance a class method with a post exit, how can i just scan the post exit part without scan the complete standard method?
And how did you manage to scan the source code of all types of enhancements?
Regards,
Aaron.
09-03-2013 3:09 PM
Let me take a step back. AFX_CODE_SCANNER requires you to specify either a package or an object name. We run it by package. I look at packages Z*.
I was not trying to find a program that will only search enhancements; I was searching for a program that will search everything including enhancements.
AFX_CODE_SCANNER already covers function group enhancements (the include will show up as a report object) and classic BAdIs (the implementing class can be scanned). New Enhancements are not covered in either of these scenarios, so I went looking for a way to find them. The result of my research is above.
02-15-2023 12:38 PM
With SAP Standard report RS_ABAP_SOURCE_SCAN or the SAP Code Inspector (transaction SCI) it is not possible to do text based searches through Enhancement Implementations.
I put together below little ABAP code scanner for Enhancement implementations.
Report to search ABAP code in Enhancement implementations | SAP Blogs
Joris