08-11-2011 11:47 AM
I am making a tool to update our change log database with the objects that have been changed, based on the transports.
For BadI implementations I wish to also add the information about which method(s) are used, but this information does not exist in the transport, only the class and the implementation name.
Based on this I can of course find the names of the methods, but I cannot know which methods in the implementation have been used, since they are all active whether they have any content or not.
Therefore I am thinking that I need to find a way to read the number of code lines in a method, this way I will know which ones have been used.
I will appreciate any help on how to do this, or if you have any other suggestions on how to solve my problem.
Kind regards,
Claus Christensen
08-11-2011 12:41 PM
Hi,
did you check with read report statement it will read the program into one internal table.
Best Regards
Manoj
08-11-2011 1:01 PM
Hi Manoj,
Thank you for your input, but my understanding is that READ REPORT can only be used on reports, and my question concerns only methods.
Kind regards,
Claus
08-11-2011 1:13 PM
Hi Claus,
you can use READ REPORT statement for your requirement. I got a similar requirement couple of month ago - check the code below:
DATA gt_trdir TYPE TABLE OF trdir.
DATA gt_source TYPE string_table.
FIELD-SYMBOLS <gs_trdir> TYPE trdir.
FIELD-SYMBOLS <gs_source> TYPE string.
SELECT * FROM trdir INTO TABLE gt_trdir
WHERE name LIKE 'ZCL_YOUR_CLASS%'.
LOOP AT gt_trdir ASSIGNING <gs_trdir>.
READ REPORT <gs_trdir>-name INTO gt_source.
WRITE <gs_trdir>-name COLOR COL_GROUP.
LOOP AT gt_source ASSIGNING <gs_source>.
WRITE / <gs_source>.
ENDLOOP.
SKIP.
ULINE.
ENDLOOP.
08-11-2011 1:16 PM
You can make use of the CL_RECA_RS* classes to get the lines of the class method
@: I kept the promise of remembering these classes. Thanks
Edited by: Suhas Saha on Aug 11, 2011 5:50 PM
08-11-2011 1:52 PM
Hi Suhas,
Thank you, I think this will enable me to solve my problem.
KR, Claus