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

Dynamic classes and methods

TimVDB92
Participant
0 Likes
420

Hi,

In my following case I have a table with 3 columns: class and method and value.

Now I want to loop the table and call the method from the class.

Example:

ls_mapping-conv_class = ZCLASS_CONV

ls_mapping-conv_method = UPPERCASE

ls_mapping-conv_value = test

"Conversion

           data: cl_class like ref to ls_mapping-conv_class.

           call method cl_class->ls_mapping-conv_method changing result = ls_mapping-conv_value.

My result should be:

ls_mapping-conv_value = TEST


Regards

1 ACCEPTED SOLUTION
Read only

SimoneMilesi
Active Contributor
0 Likes
393

What's wrong with the help?

https://help.sap.com/abapdocu_70/en/ABAPCALL_METHOD_DYNAMIC.htm

The documentation is pretty clear and exaustive......

1 REPLY 1
Read only

SimoneMilesi
Active Contributor
0 Likes
394

What's wrong with the help?

https://help.sap.com/abapdocu_70/en/ABAPCALL_METHOD_DYNAMIC.htm

The documentation is pretty clear and exaustive......