data: begin of itab occurs 0,
name(20) type c,
age(2) type c,
end of itab,
num type i value 5.
class c1 definition.
public section.
methods: method .
data: i type i value '1',
j type i,
itab1 type standard table of itab,
wa_tab like line of itab.
endclass.
class c1 implementation.
method:method.
do 10 times.
if i <= 10.
j = i * i.
write:/ i , ' * ' , i ,'=', j.
i = i + 1.
endif.
enddo.
endmethod.
endclass.
start-of-selection.
data obj type ref to c1.
create object: obj. call method obj->method.
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.
Very nice examples for ABAP. In this example-oops basic prog 2 however, there is no need to create an internal table.
ReplyDeleteComment it and execute the program and it still works as the internal table is not being used anywhere.
Once again, thanks for all these programs.
Great Job. Keep going.
Warm regards,
Hari Kiran