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: 

ABAP Code

herzelhaimharel_gilor
Participant
0 Kudos

Hi Folks !

dose someone know what is the table name which hold all the ABAP code in it ?

11 REPLIES 11

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I have never gone looking for the table itself, but you might want to look at the ABAP syntax READ REPORT.   This command lets you read into an internal table the source code for any program. This might do what you want.

0 Kudos

Also table trdir contains a list of program names.  Then you can use the READ REPORT like Thomas said to get the sourxe code.

0 Kudos

Table TRDIR contains the program names, but the actual code is sotored in the file server (UNIX for example), so it is not stored in any table for security and consistency purposes. You can use the suggestions from the previous notes if you want to get the code of a program dynamically, though it is not crear to my why you would want to have access to a table where the source code of programs would be.

Hope this helps.

0 Kudos

"actual code is sotored in the file server "

?????

The code is stored in a database table (don't remember the name), which cannot be displayed from SAP, SE11 says table does not exist, but you can reach this table on SQL level.

The content is encrypted somehow, so you can not read it directly from the database table itself, you have to use statement ' READ REPORT prog FROM itab.'.

View TRDIR contains only the attributes of the programs.

Incho

0 Kudos

>The code is stored in a database table (don't remember the name)

>which cannot be displayed from SAP

...and which won't be of much use either - AFAIR the ABAP code ist stored in encrypted (or at least compressed) form. Stick to READ REPORT

Former Member
0 Kudos

I think it is D010S.

And that's the reason why in SQL trace list they placed a default excluding selection for D010* on the popup.

Vili

0 Kudos

I agree with Vili. This is a cluster table, meaning that what appear as logical records (lines of source for example) are actually stored as one record in the database. Clusters are used when you want to get all lines/items at a time.

Scott

0 Kudos

Hi,

On 4.5 it was still stored in the DB table TRDIR. As from 4.6 the code is in a special cluster and can only be accessed via the read report statement.

koen

Former Member
0 Kudos

Hi Herzel,

I am working on 4.5B now, here it seems the best way using Func. mod. 'SCWB_GET_ABAP_CODE_OF_OBJECT'...

Check it.

Regards,

Peter

Former Member
0 Kudos

Hi,

for 6.XX systems you should take a look at the table REPOSRC.

Regards, Peter

0 Kudos

D010* and REPOSRC (depending of SAP release) are accessed through view TRDIR. This is compatible cross releases.

For code itself, in 4.6 it is even stored in database in compiled form. So you can't read it even with a SQL statement (once it has been activated).