Application Development 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: 

Regarding OOABAP

What is singleton class ? what will be the real time example or scenario for singleton class related to OOABAP.

3 REPLIES 3

p190355
Active Contributor
0 Kudos

Single class is a class that can have only one instance. Such classes are declared private.

A real time example, a simulation of logon instance. Its almost like a static instance. But only one logon is allowed. Multiple scenarios can be searched up. These patterns are used extensively in models that use FPM.

Heres one blog, that will be help better understand : Singleton Patterns/WDP. Pl read the comments, they are pretty interesting.

nmirandaghn
Participant
0 Kudos

Hi, I posted an answer about what is Singleton class and how to implement it.

You can check the answer here. https://answers.sap.com/questions/13192809/singleton-design-pattern-in-oo-abap.html?childToView=1319...

Hope it helps.

0 Kudos