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

Access Dynamic Method

Former Member
0 Likes
737

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

6 REPLIES 6
Read only

Former Member
0 Likes
693

Hi abap_begin

Please provide the detail example!

Class definition for ME reference and variable lf_call_method definition and initialization.

Read only

anup_deshmukh4
Active Contributor
0 Likes
693

You can try using Field Symbols

Read only

jyotheswar_p2
Active Participant
0 Likes
693

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

Read only

Former Member
0 Likes
693

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

Read only

Former Member
0 Likes
693

i had find out, the string lf_call_method must be write in upper case.

Thx alll............................ for help

'TAG_PRINTOBJS_PRINTOBJ_ID_1

Read only

Former Member
0 Likes
693

solution is post