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

Parsing ABAP Code

Former Member
0 Likes
1,161

Hi guys,

I have a wierd question. Where is the ABAP code stored? You can take a look at the ABAP program names through R3TR program ID in table TADIR, but where is the source code stored. Is it in the databse server, if yes which table?

8 REPLIES 8
Read only

Former Member
0 Likes
964

Hi Shiv,

You can get the entier program if you use the below command.

DATA: BEGIN OF REPTAB OCCURS 50,

LINE(100).

DATA: END OF REPTAB.

READ REPORT <Program name > INTO REPTAB.

Try,

Kasthuri Rangan Srinivasan.

Read only

Former Member
0 Likes
964

Hi Shiv Kasthala

Table 'trdir' holds some information about the program like program name.

and

Table 'trdirt'holds program code.

trdirt-text is the field that contains this information.

Cheers,

Vijay Raheja

Read only

0 Likes
964

Hi Vijay,

TRDIRT will have only the discription of the program. It will not have the code. For your information Please

Regards,

Kasthuri Rangan Srinivasan.

Read only

0 Likes
964

Thanks for correcting me Kasthuri Rangan Srinivasan.

Read only

0 Likes
964

Thanks guys.

That was a very helpful answer.

I have awarded points too.

Read only

0 Likes
964

The source code is stored in table REPOSRC but you will not be able to see it in SE16 as it is stored as RAWSTRING.

You can only read it using

READ REPORT <Program name > INTO ITAB.

Cheeers.

Read only

Former Member
0 Likes
964

Like long texts, programs are stored in database clusters. They are not visible through your normal data dictionary transactions. you have to use the commands provided by ABAP to read them like READ REPORT mentioned above.

Srinivas

Read only

andreas_mann3
Active Contributor
0 Likes
964

hi,

furthermore you can look f1 to abap command scan:

SCAN ABAP-SOURCE ...

regards Andreas