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

Call Method from other method defined in same class.

Former Member
0 Likes
8,493

Hi all,

I'm trying to call a method from other method defined in the same class using class object. But its showing error message saying class object is not defined. let me explain you with example

Inlucde xyz.

class c1 definition.

methods : a1,

b1.

endclass.

class c1 implementation.

method a1.

endmethod.

method b1.

call method obj->a1. -> Error is here Field OBJ is unknown not defined by DATA

endmethod.

endclass.

include abc.

data : obj type ref to c1.

create object obj.

call method obj->b1.

program klm.

include abc.

include xyz.

Can anybody please let me know how can i call one method from other method.

1 ACCEPTED SOLUTION
Read only

Former Member
3,249

When you reference the same instance, use 'me' keyword.

call method me->a1.

Or alternatively:

me->a1( ).

2 REPLIES 2
Read only

Former Member
3,250

When you reference the same instance, use 'me' keyword.

call method me->a1.

Or alternatively:

me->a1( ).

Read only

0 Likes
3,249

thanks Daniel