class venkatesh definition.
public section .
data: publicdata(30) type c value 'this is the public data',
num1 type i value 2,
num2 type i value 3,
num3 type i.
methods: publicmethod.
protected section.
data: protecteddata(30) type c value 'this is the private data'.
private section.
data: privatedata(30) type c value 'this is the private data'.
endclass.
class venkatesh implementation.
method : publicmethod .
num3 = num1 + num2.
do num3 times.
write:/ 'this is venkatesh'.
enddo.
endmethod.
endclass.
start-of-selection.
data: venky type ref to venkatesh.
create object : venky .
call method: venky->publicmethod.
Here is a list of sample programs on ABAP:-
- Sample Programs On HR ABAP.
- Sample Report Programs On ALV List/ Grid Display.
- Sample Programs On Selection Screen.
- Sample Programs On BDC.
- Sample Programs On Uploading & Downloading Files.
- Sample Programs On OOPS Concept.
simple example to understand the oops abap to those who knows the oops concepts
ReplyDeleteregards
Guru...