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

If I know a program name, how can I get the source code ?

Former Member
0 Likes
1,141

Have you ever read the code in cl_wb_source in SEDI?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,034

Hi,

Use FM RPY_PROGRAM_READ

it will return an internal table having the source code.

regards,

kartik

7 REPLIES 7
Read only

Former Member
0 Likes
1,034

Can you be li'l bit clear. Please elaborate.

Thanks,

Sai

Read only

0 Likes
1,034

for example , I wrote the following code

_______________________________________________

data : lv_tmp type string.

lv_tmp = 'aa'.

_______________________________________________

The source code is stored in the repository , i want to load the source code to an internal table, how can I do ?

Best regards,

Blake le

Read only

Former Member
0 Likes
1,034

Hi,

Just go to se38, then type your program name and then click om display.

If program entered by you exists, it will show you the source code.

Thanks

Read only

0 Likes
1,034

Hi Nitesh,

I know, but is it possible to get the information by code not se38?

Best regards,

Read only

0 Likes
1,034

Hi,

You can try this code to load program in an internal table...


DATA: itab TYPE yrfc_long WITH HEADER LINE,
      itab_inc TYPE yrfc_long, " yrfc_long is of type char length 1024
      prog_incl TYPE rs38m-programm,
      temp1(20) TYPE c,
      temp2(20) TYPE c.


data: prog TYPE rs38m-programm.


prog = 'YDEB_TEST1'. " give the program name.
READ REPORT prog INTO itab.
break-point.
LOOP AT itab WHERE text CP 'include*'.
  SPLIT itab-text AT space INTO temp1 prog_incl.
  REPLACE ALL OCCURRENCES OF '.' IN prog_incl WITH ' '.
  CONDENSE prog_incl.
  READ REPORT prog_incl INTO itab_inc.
  IF sy-subrc = 0.
    DELETE itab INDEX sy-tabix.
    INSERT LINES OF itab_inc INTO itab INDEX sy-tabix.
    REFRESH itab_inc.
  ENDIF.
ENDLOOP.

Read only

Former Member
0 Likes
1,035

Hi,

Use FM RPY_PROGRAM_READ

it will return an internal table having the source code.

regards,

kartik

Read only

0 Likes
1,034

Hi Katik,

Thanks very much. This is what I need.

Best regards,

Lament