04-25-2006 4:40 PM
Hi,
I am looking for a function that is able to determine the name of a method by its include name.
Here is an example for the class CL_GUI_ALV_GRID
include name: CL_GUI_ALV_GRID===============CM002
method name: ACTIVATE_REPREP_INTERFACE
Thank you for your help,
Fabian
04-25-2006 6:46 PM
There isn´t such FM, But you can access table TMDIR with class name and method index, you can obtain this values spliting the report name by '='.
Reward points if helps.
Regards.
04-25-2006 6:46 PM
There isn´t such FM, But you can access table TMDIR with class name and method index, you can obtain this values spliting the report name by '='.
Reward points if helps.
Regards.
04-25-2006 7:22 PM
Hi,
I dont think that there is any such function module...
Also, more than one method can have same include.
But consider this scenario..
when you try to delete an include, i guess it shows warning that some report or method uses it..
Debugging that piece of code can give you your answer.
Regards,
Tanveer.
Mark helpful answers.
04-26-2006 7:44 AM
Hi,
I found the class cl_oo_include_naming. You can use this class to determine the method name for an include. Here is a part of my coding:
lr_include_naming ?= cl_oo_include_naming=>get_instance_by_include( progname = lv_incl_name ).
lv_method_name = lr_include_naming->get_mtdname_by_include( progname = lv_incl_name ).
Best regards,
Fabian
10-19-2006 7:15 PM
U can also try this static method:
data: l_source TYPE trdir-name value 'CL_WB_SOURCE_REQ_DISPATCHER===CM008',
l_obj_name TYPE rseuap-obj_name,
l_obj_type TYPE rseuap-obj_type.
CALL METHOD cl_wb_source_req_dispatcher=>get_ta_object_from_sourcename
EXPORTING
p_source_name = l_source
IMPORTING
p_object_type = l_obj_type
p_object_name = l_obj_name
EXCEPTIONS
no_objecttype_found = 1
OTHERS = 2.
Walter