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

read a methods code

Valeck
Participant
0 Likes
623

hi guru,

hi need to read a custom mathods cose like a FM "ZRPY_FUNCTIONMODULE_READ" for function module Or instruction "read report program into itab.", but for a method custom.

u know in wich mode can i read this code?

thanks in advances.

Valerio

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
568

Hi Valerio,

You can use FM SEO_METHOD_GET_SOURCE.

Best regards,

Samuel

3 REPLIES 3
Read only

Former Member
0 Likes
569

Hi Valerio,

You can use FM SEO_METHOD_GET_SOURCE.

Best regards,

Samuel

Read only

0 Likes
568

thanks,

but i'm sorry!!!!

what are the parameters of launch? i don't understand!

V.

Read only

0 Likes
568

Here is an example of code :

DATA : ls_mtdkey     TYPE seocpdkey,
         lt_source     TYPE TABLE OF edpline,
         lt_source_exp TYPE rswsourcet,
         ld_incname    TYPE program.
 
" Name of your class
  ls_mtdkey-clsname = 'CL_ABAP_STRUCTDESCR'.

" Name of your method
  ls_mtdkey-cpdname = 'CREATE'.
 
  CALL FUNCTION 'SEO_METHOD_GET_SOURCE'
    EXPORTING
      mtdkey          = ls_mtdkey
      state           = 'A'  " A means method is activated...
    IMPORTING
      SOURCE          = lt_source
      source_expanded = lt_source_exp
      incname         = ld_incname
    EXCEPTIONS
      OTHERS          = 1.

Hope it will help you!

Samuel