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: 

How to find if a program really exists in the system?

Former Member

Hi,

I want to find the existing programs in the system by an abap program. Which table should I use? TADIR or TRDIR? I have seen that there can be cases like a program doesn't exist in the system (se38 says so) but there is an entry in TADIR table.

What about trdir? Should I use TRDIR?

Thanks in advance..

MERAL

6 REPLIES 6

former_member156446
Active Contributor
0 Kudos

mostly all the programs will be saved in a package is it... so along with the program name (Obj name) check for devclass as well...in TADIR

or

most programs are assigned with a transaction code... check TSTC table

Former Member
0 Kudos

Yes, TRDIR will contain the entry if the program exists else no.

MarcinPciak
Active Contributor
0 Kudos

TADIR is a table with all Repository Object

TRDIR is a table with all Programs

Using TADIR you can see all the programs as well. In SE16N you have to fill Program ID as R3TR and for Object Type use PROG

Former Member
0 Kudos

Thanks for your replies but my main problem is :

" I have seen that there can be cases like a program doesn't exist in the system (se38 says so) but there is an entry in TADIR table." .

In order to find an abap program really exists in the system, I plan to look at both tables, tadir and trdir, and if I find the program in both tables, I will decide that it really exists.

Is it a right approach? What do you think?

0 Kudos

Maybe you can check the DELFLAG field also in table TADIR.

SELECT * FROM TADIR INTO TABLE DATA(lt_tadir) WHERE DELFLAG EQ ABAP_TRUE.

0 Kudos