Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

List of modified tables for a given Transaction

ishwarya_doss
Participant
0 Kudos

Hi Experts,

My Req : I need to get the list of tables which are modified/updated when I give the transaction code.

I have tried using RS_PROGRAM_TABLES. But it is giving run time error for some Tcodes saying lines exceeding 72 characters. I have nearly 2000 Tcodes for which the updated table names to be identified. I have tried ST05. But my client needs only the table name for all the Tcodes as we get output in RS_PROGRAM_TABLES.

Is there any other alternative to find this? Kindly help me.

5 REPLIES 5

Jelena
Active Contributor

The answer is 42. Seriously, you were given a practically impossible (and completely useless IMHO) task. For example, how would one even answer "what tables are updated by VA01?" Sure, there is VBAK/VBAP but what if there is a text added? Or VC? Or it's a third party scenario? There are tons of variations.

What exactly is the purpose of this exercise?

juan_suros
Contributor
0 Kudos

I suggest a system approach rather than a code analysis approach.

Use transaction ST05 to activate the "SQL Trace". Run a full set of data manipulation operations in the transaction of interest. Go back to ST05 and Deactivate & then Display the trace results.

All database tables that were modified by your actions will show up as INSERT/MODIFY/UPDATE commands in the trace.

There may be some issues with UPDATE TASK processing outside the scope of this trace. In general, this will work.

Oops, I see you mentioned ST05.

If you must solve this analytically, you will need to list and analyze all includes called directly and indirectly (through function groups, dynpro module pools, and class definitions).

I think you should try to run something like utility report RPR_ABAP_SOURCE_SCAN twice:

1) First, list all calls to INCLUDE, CALL FUNCTION, SUBMIT, CREATE OBJECT, maybe "->" and "=>" to find dependencies.

2) You will need to repeat the search for dependencies in step (1) for every dependent object, until the list stops growing

3) Then list all dependent code objects (programs), including the class definition sections

3) Then search for SQL commands (INSERT/UPDATE/MODIFY) in this list of programs (call RPR_ABAP_SOURCE_SCAN again)

I'd imagine you will need to create a modified version of RPR_ABAP_SOURCE_SCAN to do this in one step for each transaction.

The problem is complicated, but it can be approached logically using recursive expansion of the dependencies, and searching the complete results.

Hello,

If I had to do this, I would try same way as Juan.

But keep in mind that you can't anticipate dynamic update. For example in HCM programs, infotypes (tables PA*) are updated dynamically in chains depending on customizing. For example, if I call some methods / function module to update infotype '0424' (table PA0424) it will update too infotype '0080' (PA0080) and '2001' (PA2001) dynamically.

Best regards

Bertrand

pokrakam
Active Contributor
0 Kudos

I share Jelena's view, this is not a realistic requirement nor will you get much meaningful (or even accurate) info out of such an analysis.

Tell us what you actually need this info for, I am 99% certain that there is a better way than what you're asking here.