Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

creating module pool programming in abap objects

Former Member
0 Likes
1,418

Hello...

I just wanted to know how u create a give modulepool programming in classes and objects.Could anyone tell me the procedure how to do so.And i knew that module pool programming has become obsolete and now everyone are using object oriented concept in module pool programming.soo i want why r they using soo and what is the drawback in using the module pool programming instead of oops concepts.Could anyone give me the clear explanation..

6 REPLIES 6
Read only

sonu_p2
Active Participant
0 Likes
974

Hello Chadipriya,

You can create module pool program for both ABAP and ABAP OO(Object Oriented).

The thing is in OO u have to declare classes,objects and methods.

<b>Procedure oriented approach</b>

1. Emphasis on tasks

2. Large programs are divided into smaller programs known as functions

3. Most of the functions share global data

4. Data move openly around the system from function to function

<b>Object oriented approach</b>

Emphasis on things that does those tasks

Programs are divided into objects

3. Data structures are designed such that they characterized the objects

4. Functions that operate on the data of an object are tied together in the data structure

5. Data can be hidden and cannot be accessed by external functions

6. New data and functions can be easily added whenever necessary

Go to SE80 ---> Select Program ---> Give ur program name and type this code below :-

REPORT YSUBDEL LINE-SIZE 120.

CLASS parentclass DEFINITION .

PUBLIC SECTION.

DATA : commondata(30) type c value 'Accessible to all'.

METHODS : SHOWVAL.

PROTECTED SECTION.

DATA : protectdata(40) type c value 'Protected data'.

private section.

data : privatedata(30) type c value 'Private data'.

ENDCLASS.

CLASS parentclass IMPLEMENTATION.

METHOD : SHOWVAL.

write:/5 'All data from parentclass shown:-'.

write:/ sy-uline.

WRITE:/5 COMMONDATA,

/5 PROTECTDATA,

/5 PRIVATEDATA.

endmethod.

endclass.

CLASS childclass DEFINITION INHERITING FROM parentclass.

PUBLIC SECTION .

METHODS : subval.

ENDCLASS.

CLASS childclass IMPLEMENTATION.

method : subval.

skip 1.

write:/5 'Data of parent shown from child-'.

write:/5 sy-uline.

WRITE:/5 COMMONDATA,

/5 PROTECTDATA.

Commondata = 'Public data changed in subclass'.

Protectdata = 'Protected data changed in subclass'.

write:/5 sy-uline.

WRITE:/5 COMMONDATA,

/5 PROTECTDATA.

endmethod.

endclass.

You r using OOPs concepts in module pool program and not module pool programming instead of oops concepts.

<b>Reward points if helpful</b>

Thanks,

Sachin

Read only

Former Member
0 Likes
974

Hi Sachin,

Thanks for ure reply.

I understood the program what u have sent me.But i just wanted to know how will u relate this to modulepool programing.I heard that we can use oops concepts in modulepool programming and also we can write the modulepool programming from scrach in oops concepts.Actually i dont know both the procedures.I would like to appreciate if u could tell me in more detail ..like taking an example in modulepool program and tell write the same thing in oops concepts or atleast useing the oops concepts in that modulepool program.

Read only

athavanraja
Active Contributor
0 Likes
974

check this weblog

<a href="/people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming">OO ABAP Dynpro Programming</a>

Raja

Read only

0 Likes
974

Hi Raja,

Thanks for the reply.

I couldn't understand that exactly.Could u plz take an example of modulepool programming and relate that to oops concepts.

Read only

Former Member
0 Likes
974

hi

good

go through this link

http://en.wikipedia.org/wiki/ABAP

thanks

mrutyun^

Read only

0 Likes
974

Hi Mrutyunjaya,

Thanks for the reply.

Could u plz tell me in more detail taking an example of modulepool and writing the same logic in oops concepts or atleast using oops concepts in modulepool programming.