cancel
Showing results for 
Search instead for 
Did you mean: 

class methods

Former Member
0 Kudos

I have created a local class method check_method,in one include.I am calling that method CALL METHOD main=>check_path in the main program.

when i click on check_path cursor is not going to method.when i click on main it going to definiton part,but when i click on check_path it is not going to implementation.plz.solve my problem.

Regards,

Sai Prasad

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Check for the correct method name, whether it is CHECK_PATH or CHECK_METHOD and write accordingly

see the sample code for calling localclass/methods:

REPORT YSUBOOPS17 .

class class1 definition.

public section.

methods : method1 .

endclass.

class class2 definition.

public section.

methods : method2 .

endclass.

class class1 implementation.

method :method1.

data : i_num type i value 2.

write:/5 i_num.

endmethod.

endclass.

class class2 implementation.

method : method2.

data : obj1 type ref to class1.

create object obj1.

call method obj1->method1.

endmethod.

endclass.

start-of-selection.

data : my_obj type ref to class2.

create object : my_obj.

call method my_obj->method2.

Reward points if useful

Regards

Anji

Former Member
0 Kudos

Hi Prasad,

You have created method <b>check_method</b> and u r calling method

<b>check_path</b> .How its is possible that cursor go to that method <b>check_method</b> .method name is incorrect in ur statement.use this statement

CALL METHOD main=>check_method.

Reward points if helpful.

Regards,

Hemant

Faaiez
Advisor
Advisor
0 Kudos

Hi Sai

You say you've created a local class method <b>check_method</b>. Then you call the method using CALL METHOD <b>main=>check_path</b>. You are using different names when you declare the method and when you use the method.

Regards