"If we pass by value..Inside the subroutine if you change the value it will not have effect (means it will not change the value) in the calling place..
If we pass by reference...Inside the subroutine if you change the value it will change in the calling place..Means it will share the same memory.."
Static methods cannot access instance variables and methods however instance methods can access static methods.
By concept of OOPS it is required however in SAP its not required. We have tried that.
"This variant of the statement CLASS is used to make the class class known, regardless of the location of the actual definition of the class in the program. It does not introduce a declaration part and must not be ended using ENDCLASS.
Example: CLASS c1 DEFINITION DEFERRED.
One example of using the addition DEFERRED PUBLIC would be a type group in which a reference type is declared with a reference to a global class, which itself contains components with references to this reference type. In this situation, the entire class cannot be loaded before the type group, since the types are not yet known. After the statement DEFERRED PUBLIC, however, the class name can be specified after REF TO without the class having been loaded previously."
Example: CLASS c1 DEFINITION DEFERRED.
One example of using the addition DEFERRED PUBLIC would be a type group in which a reference type is declared with a reference to a global class, which itself contains components with references to this reference type. In this situation, the entire class cannot be loaded before the type group, since the types are not yet known. After the statement DEFERRED PUBLIC, however, the class name can be specified after REF TO without the class having been loaded previously."
A filter dependent BADI can have multiple implementation which can be triggered based on the filter value
No, we can have an inline declaration of the new variable on LHS and just mention the method call on RHS without writing RETURNING parameters to directly capture the returning parameter from the method.
Static methods are methods which can be called irrespective of the class instance. Only static attributes and static events can be accessed within the Static method. Memory is allocated once. Instance methods are methods which can be ONLY called using the object reference. Instance methods can access instance attributes and instance events. Memory is allocated for each object instance.
By default the visibility of Interface Methods is Private. We can change this using ALIAS.
Singleton class is a class which can have one active instance of the class at a time. Singleton Class can be created as: Create a Private Class, Create a private static attribute of type Class, have a public static method which returns the instance of the class.
1. Create a Private Class
2. Declare a private attribute with reference to the same class, in which it is being declared.
3. Create a public static method with returning parameter, having a reference of the same class.
2. Declare a private attribute with reference to the same class, in which it is being declared.
3. Create a public static method with returning parameter, having a reference of the same class.