‎2010 Feb 02 10:15 AM
Hi all
how i can dynamic access method?
i try this, but i became a dump...
call method me->(lf_call_method)
the value from lf_call_method, that the name from method tag_printobjs_printobj_id_1
the method implementation is
method tag_printobjs_printobj_id_1.
break-point.
endmethod. "tag_printobjects_printobject_id_1
thx abap_begin
‎2010 Feb 02 12:53 PM
Hi abap_begin
Please provide the detail example!
Class definition for ME reference and variable lf_call_method definition and initialization.
‎2010 Feb 02 12:59 PM
‎2010 Feb 02 1:07 PM
Hi
If you are calling adynamic method then lf_call_method should be a variable.
You can only call this call method me->(lf_call_method)
in the implementation part of the class or else if you want to call the method some where else then u should create an object for that and you can call the method.
Thanks & Regards
Jyotheswar
‎2010 Feb 02 2:42 PM
lf_call_method is a variable and contain the name from method
data lf_call_method type string value 'tag_printobjs_printobj_id_1'.
now i have try this
ls_method_param-name = 'CRF_IXML_NODE_LIST'.
ls_method_param-kind = cl_abap_objectdescr=>changing.
get reference of lif_ixml_children_list into ls_method_param-value.
insert ls_method_param into table lt_method_param.
call method me->(co_call_method)
parameter-table
lt_method_param.
but the program is going to dump.
Edited by: abap_begin on Feb 2, 2010 3:42 PM
‎2010 Feb 02 2:57 PM
i had find out, the string lf_call_method must be write in upper case.
Thx alll............................ for help
'TAG_PRINTOBJS_PRINTOBJ_ID_1
‎2010 Feb 02 2:57 PM