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

Error: Class does not implement if_oo_adt_classrun~main method!

Former Member
12,694

Tutorials: https://developers.sap.com/tutorials/abap-environment-persistence.html
--------------------------

I followed the instructions to create an ABAP class after a database table was created and activated. The class was also activated before I run it. Eclipse then shows the error:

Error: Class does not implement if_oo_adt_classrun~main method!

The only change I made to the source code is to replace xxx with an arbitrary number of 901. The table is not updated when I verify with F8.

It must be something simple but I can't find anything.

Thanks/Morris.

11 REPLIES 11
Read only

Sandra_Rossi
Active Contributor
0 Likes
9,885

Yes, check again.

Read only

Former Member
0 Likes
9,885

Hi Sandra,

Yes, it works now. Thank you for the quick help. What happened if I may ask? I did restart Eclipse before trying.

Morris.

Read only

9,885

I don't know 🙂

Read only

hankatrading
Discoverer
0 Likes
9,885

Just activate the changes before trying to test it.

Read only

Rob_McNally
Participant
9,885
  • Just in case it is useful for someone searching for reasons for this error.
  • Here are the reasons i have seen:

.1. the cloud platform account / BTP has logged out due to inactivity while working in ADT/Eclipse. Log back into the cloud platform / BTP account, save & activate the class to fix this.

.2. when working on a single development object, the activation (Shift+F3) has left some part of the development inactive. When activating, choose Activate All (Ctl+Shift+F3) to ensure all objects are active.

Read only

0 Likes
9,885

Excellent, Thanks for "Remember Activate All Objects". Like a newes classic abapers

Regards,

Robert

Read only

ttt567890
Discoverer
0 Likes
9,885

You should active the class first.

Read only

damodara5590
Explorer
0 Likes
9,885

Hi morris_wang9,

If you have Used that Interface code, Could you Please Share the Sample Code,

am Trying to scheduling Back ground Job using this Interface, it will be helpful for me.

Read only

AnnePetteroe
Community Manager
Community Manager
0 Likes
9,885
Hello, While we're happy that you've come to SAP Community to get an answer to your question, you posted your question as an answer in an old thread.I've converted your answer to a comment, but even so -- posting in older threads is not the best way to get guidance.

If you're looking for help, you should ask a new question: https://answers.sap.com/questions/ask.html.

Best regards,
Anne

Read only

FKHAN123
Explorer
0 Likes
8,812

Hi I am doing the following tutorial and when I preview my service the data is blank. When try to activate the class I get the error message below Error: Class does not implement if_oo_adt_classrun~main method!

https://developers.sap.com/tutorials/abap-environment-rap100-generate-ui-service.html

Read only

JTK
Newcomer
0 Likes
4,487

Hello, 
Workaround I've used so far and it worked: 
 I have created an additional method namely "sub_methods_with_output" as private and moved group_id variable to public section.
Below is the code snippet : 

  PUBLIC SECTION.
    INTERFACES if_oo_adt_classrun.

    DATA:
  group_id   TYPE string VALUE 'xxx'.  

PRIVATE SECTION.

    METHODS:
      sub_methods_with_output
        IMPORTING
          io_out TYPE REF TO if_oo_adt_classrun_out.n_out.

METHOD if_oo_adt_classrun~main.
 sub_methods_with_output( out ).
ENDMETHOD.

 METHOD sub_methods_with_output.
    io_out->write( |[RAP100] Demo data generated for table ZRAP100_ATRAV{ group_id }. | ).
  ENDMETHOD.