Application Development and Automation 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: 
Read only

Detecting Code Used in Other Reports

Former Member
0 Likes
789

I have identified a number of Z custom programs that are obsolete and need to delete them.

However, I need to find out a way to detect if any code, for example SUBMITS or subroutine forms, is referenced from other programs.

Consider ABAP program ZABCDE and ZXYZcontains:

REPORT ZABCDE.

..

..

FORM Z1234.

..

..

ENDFORM

..

REPORT ZXYZ.

..

PERFORM Z1234(ZABCDE).

..

In this example if I delete ABAP program ZABCDE then execution of ZXYZ will fail since ZABCDE is no longer available.

Is there a way to check to avoid such a situation where I would not delete ZABCDE.

Thanks.

Soyab

1 ACCEPTED SOLUTION
Read only

Arun_Prabhu_K
Active Contributor
0 Likes
741

Hello Soyab Husein.

     Use the standard program RS_ABAP_SOURCE_SCAN to search any string across all ABAP programs.

Regards.

I have identified a number of Z custom programs that are obsolete and need to delete them.

However, I need to find out a way to detect if any code, for example SUBMITS or subroutine forms, is referenced from other programs.

Consider ABAP program ZABCDE and ZXYZcontains:

REPORT ZABCDE.

..

..

FORM Z1234.

..

..

ENDFORM

..

REPORT ZXYZ.

..

PERFORM Z1234(ZABCDE).

..

In this example if I delete ABAP program ZABCDE then execution of ZXYZ will fail since ZABCDE is no longer available.

Is there a way to check to avoid such a situation where I would not delete ZABCDE.

Thanks.

Soyab

4 REPLIES 4
Read only

Arun_Prabhu_K
Active Contributor
0 Likes
742

Hello Soyab Husein.

     Use the standard program RS_ABAP_SOURCE_SCAN to search any string across all ABAP programs.

Regards.

Read only

Former Member
0 Likes
741

Hi,

In fact it is not possible and even system also can't through the message at the time of deleting the program.

Before deleting the program you have to scan the variables, includes..need to check carefully.

Better to deletion should happen based on the scan the report and delete-- manual verification is required

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
741

One is you will have to souce code scan program as mentioned in previous post and in addition to it be careful and cross check whether report or subroutines are not gwtting called dynamically via config or something else.

Read only

Former Member
0 Likes
741

Use t-code 'code_scanner' by the package name for your custom programs/routines.