2022 Jul 15 1:41 AM
Hello SAP Experts,
Is there a way to find in an SAP system all customer programs (Z or Y) that update standard SAP tables?
Thanks in advance
D.
2022 Jul 15 6:26 AM
I guess you are only talking about direct updates using SQL, i.e. you are not looking for all BAPI create, update or delete calls.
You could start by using the program RS_ABAP_SOURCE_SCAN to scan all your Z or Y programs, by using a regular expression. It's a case insensitive search. The big limit is that it will search only on one line, e.g. if you have INSERT INTO dbtab on distinct lines, it can't work. One strategy is to increase the scope to select also the lines with orphan INSERT or INSERT INTO (+ all other possibilities), then analyze manually.
Example of regular expression:
^(?!\*)(?! *") *((INSERT +INTO|UPDATE|DELETE +FROM) +[^YZ]|INSERT +[^YZ ][^ ].*+FROM)
ABAP documentation explains more about regular expressions.
2022 Jul 15 6:26 AM
I guess you are only talking about direct updates using SQL, i.e. you are not looking for all BAPI create, update or delete calls.
You could start by using the program RS_ABAP_SOURCE_SCAN to scan all your Z or Y programs, by using a regular expression. It's a case insensitive search. The big limit is that it will search only on one line, e.g. if you have INSERT INTO dbtab on distinct lines, it can't work. One strategy is to increase the scope to select also the lines with orphan INSERT or INSERT INTO (+ all other possibilities), then analyze manually.
Example of regular expression:
^(?!\*)(?! *") *((INSERT +INTO|UPDATE|DELETE +FROM) +[^YZ]|INSERT +[^YZ ][^ ].*+FROM)
ABAP documentation explains more about regular expressions.
2022 Jul 15 1:55 PM
Table modifications in customer namespaces would also match this pattern.
2022 Jul 15 5:33 PM
If you mean names prefixed /NAMESPAC/, well it would be difficult to say which namespaces are for the client, which namespaces are for SAP partners (I guess we could consider that as standard), but we could adapt the regex to fit this requirement anyway.
2022 Jul 15 6:51 AM
Simplest solution, and it works better, by using Code Inspector/ATC.
NB: I guess you are only talking about direct updates using SQL, i.e. you are not looking for all BAPI create, update or delete calls.
In the Search Functions, there are 2 possible checks: