Learn Object Oriented Pogramming ( OOPS )

Definitions Public attributes Private attributes Instance attributes Static attributes Public methods Private methods Constructor method Static constructor Protected components Polymorphism Public attributes Public attributes are defined in the PUBLIC section and can be viewed and changed from outside the class. There is direct access to public attributes. As a general rule, as few public attributes … Read more

How to assign Variable type at run time?

Dynamic programing can save a lot of ‘superfluous’ coding. To assign a variable a type at runtime, use the ABAP statement ASSIGN with the option TYPE. For instance: DATA: D_TYPE,D_FIELD(35).DATA: D_TEST TYPE P.FIELD-SYMBOLS: .D_FIELD = ‘D_TEST’.D_TYPE = ‘P’.ASSIGN (D_FIELD) TO TYPE D_TYPE. Additionally you can use the option DECIMALS of the ASSIGN statement if your … Read more