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 a Abap Program is Stored ?

Former Member
0 Kudos

Hi,

Can anyone tell me how a Abap Program is stored. Is that also in the form of table.If so in which table can i see the Source code.

Regards,

Gowtham Kuchipudi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Gowtham,

The source code is stored in table <b>REPOSRC</b> field <b>DATA</b>. But it is in compressed form . You can however get the source in an internal table using Read Report statement.

Cheers.

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I don't that I ever found the actual table. But I think it is stored in some kind of table. You can access this code in an ABAP program in the following way.



report zrich_0001
       no standard page heading
       line-size 300.

parameters: p_prog(30) type c.

data: begin of s occurs 0,
      txt(300) type c,
      end of s.

clear s. refresh s.
read report p_prog into s.           "Get source into table S

loop at s.
  write:/ s-txt.
endloop.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Gowtham,

The source code is stored in table <b>REPOSRC</b> field <b>DATA</b>. But it is in compressed form . You can however get the source in an internal table using Read Report statement.

Cheers.

0 Kudos

Hi Sanjay,

When tried display the Table Data Field it is showing nothing , why?

Regards,

Gowtham Kuchipudi.

0 Kudos

I mentioned earlier that it is compressed and can be only accesed through READ REPORT . See the data type . Its raw string.

On you other query , a report width is by default 72 .

Check in Se38 -> Utilities -> Settings.

Maximum can be 256 , so safer side define 256 or above in the internal table as some reports have 72 chars and some may have more.

Be specific what your problem is ?

Cheers

0 Kudos

Hi Thank u Sanjay.

Regards,

Gowtham Kuchipudi.

Former Member
0 Kudos

Hi,

But if i take only 72 characters length instead of 300 that u have specified , it's throwing an error that "READ_REPORT_LINE_TOO_LONG". But i think in the report program also the maximum length of a line is 71. Then why it is throwing that error.

Regards,

Gowtham Kuchipudi.