2012 Jul 05 11:37 AM
Hi All,
I have developed a Report Program which takes a Class name as Input and displays the methods of that class on the output screen. These method names would be in a HyperLink format( OnClick events ). Now my requirement is whenever i click any method name, I should be able to navigate directly from that screen to the method source code.
Please let me know If anyone has worked on this scenario or provide few pointers on how to do this.
2012 Jul 06 1:53 PM
Hi Sandesh,
I have also came across this kind of issue. If my understanding of question is right then Usage of FM 'RS_TOOL_ACCESS" itself will do the job. you can use this FM where you have written the code of HOTSPOT hyperlink event. Provide the inputs to FM as
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = 'Name of the class for what you need to find method'
object_type = 'CLAS'
this object type is nothing but the type of object may be CLAS, PROG, TABL, FUNC etc for class, program, table FM respectively. I guess you need to navigate to the class methods so provide 'CLAS' as object type else give required type as per your requirement.
It will directly take you the class builder of the object name provided in FM. From this place you can access source code of all the methods.
Regards
Atul
2012 Jul 05 11:46 AM
Hi Sandesh,
For showing the particular line of the code, we can use the FM RS_TOOL_ACCESS and pass operation as 'SHOW' , Object Name as 'class name' and line number as 'Position'.
Cheers
~Niranjan
2012 Jul 05 11:49 AM
You can create an ALV output with the methods and try writng a BDC to navigate to the method source code
2012 Jul 05 12:05 PM
Hi Sandesh,
You can call the FM 'RS_TOOL_ACCESS" in OnClick Event. This FM will take you the method of the class.
Cheers
~Niranjan
2012 Jul 06 1:53 PM
Hi Sandesh,
I have also came across this kind of issue. If my understanding of question is right then Usage of FM 'RS_TOOL_ACCESS" itself will do the job. you can use this FM where you have written the code of HOTSPOT hyperlink event. Provide the inputs to FM as
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = 'Name of the class for what you need to find method'
object_type = 'CLAS'
this object type is nothing but the type of object may be CLAS, PROG, TABL, FUNC etc for class, program, table FM respectively. I guess you need to navigate to the class methods so provide 'CLAS' as object type else give required type as per your requirement.
It will directly take you the class builder of the object name provided in FM. From this place you can access source code of all the methods.
Regards
Atul