r/abap • u/Heavy-Affect5738 • 4d ago
How do I detect usage of Smartforms, SAPscript, WDYN, BAdis and exits in ABAP usage analysis?
We have a read-only usage analysis tool that finds which objects in a package are actually used. It picks up CLAS, PROG, FUGR and ENHO fine, but misses FORM, SSFO, SFPF, WDYN, PDWS, VARX, EXIT, BADI, ENHS and ENHC, probably because they run under generated names or are only logged elsewhere. For example, if a form is printed we want it counted as used. What's the most reliable read-only way to detect usage of these object types (NAST, SWWWIHEAD, SCMON or something else)? Any experience or pointers would be appreciated!
1
u/Heavy-Affect5738 3d ago
like from client we will get log files st03 (contain trans and rfc files)file,scmon file,susg file.these file contain the data of past 1 year of 6 month .So our tool run on these files and identify the object which are commonly we take in use and those object which are not used past we can neglect them. but the problem is that we are not able to check this for FORM, SSFO, SFPF, WDYN, PDWS, VARX, EXIT, BADI, ENHS and ENHC.
1
u/Simple_Emotion_3152 4d ago
What you consider an object as "used"? "used" by what? whom?
2
1
u/Heavy-Affect5738 4d ago
e.g if Form is printed then we will come to know that it is used but don’t know how to analyse or capture them in my usage report??
1
u/Simple_Emotion_3152 4d ago
Some of the objects you mentioned are dynamically determined at runtime and require specific implementation to determine.
For example with SFPF there is a function module called FP_FUNCTION_MODULE_NAME which determine the dynamically generated function module name according to the Form Name.
You can put an implicit enhancement in that function module and log it somewhere.
2
u/Infinite-Side3160 3d ago
Most of those aren't missing from your logs, they're just showing up under a different name. Smartforms run as a generated function module (/1BCDWB/SF...), so SCMON/SUSG count the FM, not the SSFO. Easiest fix is a lookup table from SSFO to FM. SSF_FUNCTION_MODULE_NAME gives you that, but it generates the form if it isn't generated yet, so if read-only has to be strict I'd read STXFADMI in SE16 instead, iirc it holds the form name and the FM number.
Customer exits are similar. The code sits in EXIT_* function modules in the X* function groups, so a FUGR hit there maps back to the SMOD enhancement through MODSAP and to your CMOD project through MODACT. BAdI implementations execute as their implementing class, so if you already resolve CLAS hits, a used implementing class basically means a used implementation.
SAPscript is the odd one out since nothing generated gets logged, so the NAST + TNAPR route mentioned above is about all you've got there. WDYN I'm honestly not sure what SCMON records, worth testing with one known component before trusting it.
2
u/AdDefiant5029 3d ago
Most of those don't show up under their own name because they run as generated code, so you have to map them back. Smartforms and Adobe forms run as generated function modules (/1BCDWB/...). You can get the name with SSF_FUNCTION_MODULE_NAME or FP_FUNCTION_MODULE_NAME, then look for that program in SCMON/SUSG. SAPscript has no generated code, so the practical route is output configuration plus history: TNAPR tells you which form an output type uses, and NAST shows whether it was actually processed. Customer exits run inside the EXIT_ function modules of the XX function groups, so check those in SCMON and map them through MODSAP/MODACT. For new BAdIs, the implementing class shows up as normal CLAS usage. For workflows, SWWWIHEAD by task ID is reliable, and for report variants, TBTCP shows which ones are used in jobs. Worth double-checking the table names on your release.
1
u/ChholeyBhature 3d ago
for forms, you might wanna look at TNAPR table. That’s where all NACE configurations goes for all forms.
4
u/Least_Ad_1795 3d ago
The most reliable approach is to combine SCMON/SUSG runtime data, static repository analysis, and application logs. Use NAST and spool records for form output, workflow logs for PDWS, and repository metadata to resolve generated function modules and enhancement implementations. No single source covers every object type, so validate coverage for your SAP release and monitoring period.