2009 Feb 03 1:28 PM
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.
2009 Feb 03 2:21 PM
check these FMs
RPY_PROGRAM_READ
RPY_MESSAGE_READ
RPY_INCLUDE_READ
RPY_FUNCTIONALMODULE_READ
кu03B1ятu03B9к
2009 Feb 03 1:46 PM
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
2009 Feb 03 1:49 PM
think the READ REPORT reads the source text of only the programs specified in program name.
2009 Feb 03 2:17 PM
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
2009 Feb 03 2:21 PM
check these FMs
RPY_PROGRAM_READ
RPY_MESSAGE_READ
RPY_INCLUDE_READ
RPY_FUNCTIONALMODULE_READ
кu03B1ятu03B9к
2009 Feb 03 4:46 PM
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,)
2009 Feb 03 6:43 PM