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

OO Abap Entry Point

Former Member
0 Likes
1,621

I am currently trying to get into OO Programming. I made some class definitions and implementations, but if i understand correctly, i have to put my "main" code / entry point between the definitions and implementations. Is there a better "entry point" for object oriented programming?

1 ACCEPTED SOLUTION
Read only

MateuszAdamus
Active Contributor
1,492

Hi Former Member

Generally speaking the main point of entry of any ABAP report is a START-OF-SELECTION event.
This is what gets executed when user hits F8 on the selection screen. This could be a good place to instantiate your objects and execute any methods/logic you want to run in the report.

That being said, there are other event, e.g.: INITIALIZATION, AT SELECTION-SCREEN (OUTPUT) which might also warrant an object instantiation and execution of instance (or static) methods.

It all depends on what you want to achieve and what does your logic do.

regards,
Mateusz

I am currently trying to get into OO Programming. I made some class definitions and implementations, but if i understand correctly, i have to put my "main" code / entry point between the definitions and implementations. Is there a better "entry point" for object oriented programming?

5 REPLIES 5
Read only

0 Likes
1,492

What you mean with "main code"? The implementation? The creation of the class instance?

Read only

Former Member
0 Likes
1,492

I mean the piece of Code that is executed when i hit F8 (in SE80 for example)

From there i can start a method in my class

Read only

MateuszAdamus
Active Contributor
1,493

Hi Former Member

Generally speaking the main point of entry of any ABAP report is a START-OF-SELECTION event.
This is what gets executed when user hits F8 on the selection screen. This could be a good place to instantiate your objects and execute any methods/logic you want to run in the report.

That being said, there are other event, e.g.: INITIALIZATION, AT SELECTION-SCREEN (OUTPUT) which might also warrant an object instantiation and execution of instance (or static) methods.

It all depends on what you want to achieve and what does your logic do.

regards,
Mateusz

Read only

0 Likes
1,492

Hey there, thanks for your answer!
START-OF-SELECTION was what i was looking for!

How do i link/tag you in a comment/answer btw?

Read only

0 Likes
1,492

You have to use @ sign and then enter the account name Former Member

PS: Glad my answered helped you! 🙂