Application Development 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: 

ABAP Objects - real example

Former Member
0 Kudos

Hello everybody,

can someone please navigate me to some "real example" of using abap objects?

I went through demos in sap (I am using SAP R/3 4.6C) in <i>transaction ABAPDOCU, I have a book Horst Keller: Abap Objects (where partially the object orientation is written), I am reading articles in SAP professional journal or on web www.erpsapgenie.com, etc.

This is all nice, but no real example can I find.

What I mean with real example:

For example report, where I select data from database ("select *.." or "get ..." etc.), put this data to internal table, maintenance these data, output these data.

Or: in dialog programming write simple dialog, get data from PBO/PAI, put to into it, write data to database table, etc.

I have tryed the first case: simple, but meaningfull report, and I start to struggle with problems - if I will have internal table it should be variable of given class, and the table will be in interfase? Or it should be in some "global class main" - but - it is recomended to have as possible protected/private data - so if I will have global data it is worse programming behaviour the to use old procedural approach...

So generally, WHERE are some examples, where all standard behaviour of procedural programming is shown? - like

<i>- put data to internal table/get if from it,

- communication with dialog modules/calling selection screen,

<i>- open text file in present. server, </i>

<i>- preparing data for batch input processing, </i>

<i>- exist abap objects equivalent of logical databases or (we, application programmers) have to write it by ourselves? </i>

<i>- where are some real programs in R/3 4.6C, which are written fully object oriented? (but please not in HR module )</i>

<i>- etc.</i></i></i>

Are these things available to use in version R/3 4.6C?

Thanks a lot,

Alexander Talac.

1 ACCEPTED SOLUTION

thomasalexander_ritter
Active Contributor
0 Kudos

Hi Alexander,

did you read Igor's blogs?

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520</a>

They show OO at its best and all of them contain real code.

cheers

Thomas

5 REPLIES 5

Former Member
0 Kudos

Hi,

the link to "general oop" is not valit (?).

I was asking for something a little bit different - not topics of how to use Controls - I use them already, and they can be used also in procedural programming. But how to write COMPLETELY OOP programs. Everywhere a lot of "tutorial" programs, not above mentioned real examples.

How the internal tables are maintaned in OOP, how should be written correctly communication between objects, etc. But real complete code, no just a few rows, etc. or powerpoint tutorial of basic syntax.....

thank you,

Alex.

thomasalexander_ritter
Active Contributor
0 Kudos

Hi Alexander,

did you read Igor's blogs?

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520</a>

They show OO at its best and all of them contain real code.

cheers

Thomas

0 Kudos

Looks like you are interested more in the programming style and conventions than creating the classes. If you havent already done, in SE24 do a wildcard search on CL* and there are ton's of standard classes which might help you in what you are trying to accomplish.

hith

Sunil Achyut

Former Member
0 Kudos

Thank you for your answers,

I will look for patterns and standard objects, whether these help to understand how to put to life my future oop abap programs.

Alex.