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

download a source code with abap program

0 Likes
2,195

hi

i have a problem when i take a source code abap

when is a program, works, just like this code bellow, but when i went take a function code or another source code ex: class , its doesn't work

someone hows a different mode ?

data: v_PROGRAMA      TYPE  PROGNAME,
      v_CODIGO_FONTE  type  CFX_BI_TS_NAME_1000.

READ REPORT v_programa INTO v_codigo_fonte.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,251

check these FMs

RPY_PROGRAM_READ

RPY_MESSAGE_READ

RPY_INCLUDE_READ

RPY_FUNCTIONALMODULE_READ

кu03B1ятu03B9к

6 REPLIES 6
Read only

matt
Active Contributor
0 Likes
1,251

You have to give it the abap program name - not the class name or function module/pool name. Function groups and classes are made up of a number of different includes with very specific names. E.g. the include that is a function module will always be of the form LfngroupnameUnn, where fngroupname is the name of the function group, and nn is a number.

matt

Read only

Former Member
0 Likes
1,251

think the READ REPORT reads the source text of only the programs specified in program name.

Read only

Former Member
0 Likes
1,251

Hi,

TO read the Function Module Code,

Copy this code and put it into your code,

**Declaration part,

types:begin of it_func,

GV_PROG_NAME TYPE TRDIR-name,

func_name type TFDIR-FUNCNAME,

end of it_func.

data:wt_func type STANDARD TABLE OF it_func,

wa_func type it_func.

parameter: name1 LIKE tfdir-funcname.

**Logic part

SELECT * FROM TFDIR into table wt_tfdir WHERE funcname = name1.

loop at wt_tfdir into wa_tfdir.

CONCATENATE wa_TFDIR-pname 'U' wa_tfdir-include INTO wa_func-GV_PROG_NAME.

wa_func-GV_PROG_NAME = wa_func-gv_prog_name+3(30).

wa_func-func_name = wa_tfdir-funcname.

append wa_func to wt_func.

clear wa_func.

ENDLOOP.

Here, wt_func internal table will have all function module names.

Edited by: Tharani on Feb 3, 2009 3:17 PM

Read only

Former Member
0 Likes
1,252

check these FMs

RPY_PROGRAM_READ

RPY_MESSAGE_READ

RPY_INCLUDE_READ

RPY_FUNCTIONALMODULE_READ

кu03B1ятu03B9к

Read only

0 Likes
1,251

thanks ,

one problem about take a FM source code is resolved but

have one more problem ,

if i have a class ex: ZCL_EX_SDV

how i can take the source code inside? ( interfaces ,methods,)

Read only

0 Likes
1,251

SEO_METHOD_GET_SOURCE - this will get code for class

also check this thread whr code for a program is given

кu03B1ятu03B9к