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: 

Tool to scan custom programs which update database tables

Former Member
0 Kudos

Hi All,

I have below requirement in my company and I have no clue how to achieve this. Please let me know if you have any ideas on this.

Auditors need a tool/program which can scan all the custom programs in the system which are used to update database tables(both standard & custom) and provide a report. This tool/program will be scheduled every night to get a report or could be run every night manually. Database update could be using BAPI ,modify,insert statements and anything else like that. Tool/Program should not consider custom programs which make a database read,it should only look for programs which updates database.

Any help is highly appreciated.

Thanks,

Jhansi

1 ACCEPTED SOLUTION

Kanagaraja_L
Active Contributor
0 Kudos

1. Write Select Qry to retrive all custom program from TADIR/TRDIR then Move to ITAB

2. Then Loop the ITAB and use syntax "READ REPORT prog INTO itab."

DATA : BEGIN OF itab OCCURS 100,
                                 rep TYPE char200,
                             END OF itab.

and Check each line with the string UPDATE/INSERT/MODIFY then if the program contains any one of the statement then you will get program name, Line number and Number <Update> statements

Finally you will get How many programs used UPDATE/INSERT/MODIFY to update DB table.

Kanagaraja L

5 REPLIES 5

martin_voros
Active Contributor
0 Kudos

Hi,

have a look at report RPR_ABAP_SOURCE_SCAN. It allows you to search for string in ABAP source code. For example you can run it for all custom packages. Basically, you need to look for all statements which are required by auditors. For example you can start with "UPDATE", "INSERT", "DELETE", "MODIFY" and "CALL 'BAPI_". You will have to exclude somehow statements related to the internal tables.

Cheers

0 Kudos

Hi All,

Thanks for the inputs. I will share these ideas with my manager and see what she feels about it.

Thank you once again.

Jhansi

0 Kudos

This has been asked here before. I believe there is no good way to meet your requirement.

Rob

Kanagaraja_L
Active Contributor
0 Kudos

1. Write Select Qry to retrive all custom program from TADIR/TRDIR then Move to ITAB

2. Then Loop the ITAB and use syntax "READ REPORT prog INTO itab."

DATA : BEGIN OF itab OCCURS 100,
                                 rep TYPE char200,
                             END OF itab.

and Check each line with the string UPDATE/INSERT/MODIFY then if the program contains any one of the statement then you will get program name, Line number and Number <Update> statements

Finally you will get How many programs used UPDATE/INSERT/MODIFY to update DB table.

Kanagaraja L

SuhaSaha
Advisor
Advisor
0 Kudos

>

> Database update could be using BAPI ,modify,insert statements and anything else like that.

There are FMs which are not BAPIs which perform a direct update on DB tables (e.g., the FMs which update User Role tables - AGR* tables). How do you plan to capture those ?

I am not user if any standard code scanning program can help either.

I think the requirement is weird. Anyways good luck with your endeavours.

BR,

Suhas