Welcome To My BLOG

This site is to give a brief idea for the abap learners who are looking for some real time programs .It consists of collection of programs from my side . I hope these programs are very much used for all of the learners. Please check the links for any information in ABAP.
Please vote for my Blog. And please input me on this mail addrssess.Email me

Share this link with your friends

http://www.rebtel.com/u/15163104576

For every friend who signs up using this link and makes a payment, we'll give you 8 €!


Thursday, September 23, 2010

Oops basic prog 01 / 02

report zalv_sel_screen .

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.
----------------------------------------------------------------------------------
report zalv_sel_screen .

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.

No comments: