Hot Search: recover remote distribution point is DVI compatible with vga drivers anything expression is of wrong type VVR4 select.view?id= import and export forms mail email
Home >Default > Shifting from procedural to object oriented

Shifting from procedural to object oriented

-0001-11-30 | Default
Hi people,
I've been programming in ABAP in a procedural fashion since I started, because that's the way I was taught. Now I want to slowly shift to object oriented development. I know and understand all object oriented concepts (please don't copy paste OOP explanations or links merely to get points). Problem is, in the projects i'm involved everything is done in the old fashion. There's no use of UML whatsoever. I believe it's very difficult to shift my mind to OOP (an already difficult task for someone programming procedural for years) if the analisys and design is not done with OO as the base, as additionally I have very little practical experience with OOP (using ALV classes and such). If every other programmer does things in procedural way, when the time comes to integrate programs, problems arise.
I've been experimenting with OOP in my safe minisap at home, but in day to day work as pressure is put to finish programs on time, always procedural solutions come to mind.
Do you have any advice on how to cope with this? Can you post your experience on this subject? Has someone gone through this same problems?
Many thanks.

Latest answer

Hello Alejandro
When I started with object-oriented ABAP programming about 2 years ago I made horrible mistakes in my classes and interfaces. However, I have my lessons learnt from these mistakes and improved my skills and knowledge step by step.
I have 3 recommendations for you:
<b>(1) Start now!</b>
Do not expect to develop perfect interfaces and classes from the very beginning. Understanding Object-Orientation takes its time.
<b>(2) Start with simple objects.</b>
Interfaces (or classes) can be used to define globally visible constants. Your first classes may contain only static methods. Yet while developing these "simple" objects you will get familiar with the class builder (SE24).
(3) Make heavy use of SAP standard classes.</b>
Before creating your own class(es) make a comprehensive search for available standard classes (of course, if you are dealing with custom-developed business objects you have to create your own classes).
For example, if you have to work with purchase orders have a look at the following classes:
If you create an instance of CL_PO_HEADER_HANDLE_MM you will have thousands of coding lines at your fingertip (e.g. method IF_PURCHASE_ORDER_MMGET_DATA returns the header data, method IF_PURCHASE_ORDER_MMGET_ITEMS returns the  order items -> no need of coding, just CALLING).
Finally, you may have a look at the following examples:
<a href="">Understanding ABAP Objects</a>
<a href="">Message Handling - Finding the Needle in the Haystack</a>
<a href="">Unified Access to All HR Infotypes</a>

Related recommended

Shifting from procedural to object oriented

Hi people, I've been programming in ABAP in a procedural fashion since I started, because that's the way I was taught. Now I want to slowly shift to object oriented development. I know and understand all object oriented concepts (please don't copy pa [More]

-0001-11-30 Default

Converting sample Procedural ABAP code in Object oriented code...

Hello Gurus, I am learning object oriented ABAP. The best way to learn it is do it practically. If I want to change the following code in OO code , how can it be done ? TABLES : gb01. Data Declaration DATA : BEGIN OF i_mid OCCURS 0,         mid(2),   [More]

2015-10-11 Default

Expose Object Oriented Service code as Web Services?

Hello All, I would appreciate for your insight on this matter! Web Services are basically RPC (Procedure Oriented) over Soap. Each service invocation by a client results a procedure execution on the server side (In many case, a service class may need [More]

2015-10-11 Default

Trying to understand the basic concept of object oriented programming.

I am trying to understand the basic concept of object oriented programming. Object - a region of storage that define is defined by both state/behavior. ( An object is the actual thing that behavior affects.) State - Represented by a set of variables [More]

2015-10-11 Default

Object oriented programming aspects in Oracle

Dear All, Can you one explain me the aspects of Object Oriented Programming in Oracle. How to use oops concepts in Oracle Procedures, functions, packages, etc. Thanks, Moorthy.GSOracle 9i introduces support for inheritance, method overriding and dyna [More]

2015-10-11 Default

Field symbols in Object Oriented ALV

Hi Friends....Can somebody explain me what is the significance of field symbols in OO ALV. Why it is assigned to Field catalog. Also explain me the basic steps to do Object Oriented ALV. Thanks in advance...Hi Satyesh, Field symbols are symbolic name [More]

-0001-11-30 Default

Object-oriented APEX. Best practices.

Hello, in my company we are developing quite big application in Apex. At the beginning we saw Apex as a very developer friendly application, but now we have problem with it. Our application has about 100 pages, most of them are not only reports but a [More]

-0001-11-30 Default

Object Oriented vs Context Oriented Programming

A few weeks ago, I submitted a Paradigm Shift: the WDP Model & the Power to Bind in which I tried to argue for a more object oriented approach to the structuring of WDP Components by using the javabean model as an abstraction layer for the WDP Contex [More]

-0001-11-30 Default

Help with object oriented concepts

I am a senior highschool student and although I know Java syntax, I learned with Pascal and other procedural languages so I have a difficult time thinking in OOP concepts (which I will have to learn for college classes). So for practice I went to my [More]

-0001-11-30 Default

Object Orientated Programming

I am just picking Java up and have a couple grey areas of OOP that I don't quite understand. Here is my current understanding-(Correct me in the errors/Help clarify the book): Class-Everything needs a class, used as templates for objects. Method- Boo [More]

-0001-11-30 Default

Click Ranking

  • STRING field in a table

    I have a table in SAP(PLM) where I need to change the existing 255 CHAR fields to 1250 CHAR long.  There are six fields in the table that I need to change.  All the BAPIs using the table are all created and so using LCHAR data type is not going to be

  • National characters (code page) problem

    I made JSP page with code page 1250 with characters specific to this code page. In JDeveloper everything looks OK. Compiled page (Java file) also shows good, but when I open it in Web browser all national characters are lost (question marks instead o

  • Unlock codes

    I have a blacberry curve 8520, it was purchased from virgin mobile as a reconditioned phone in June 2011, I need to unlock it so that my daughter can use it with her vodafone sim card, but virgin are saying the phone was not purchased from them as th

  • Where to buy a new battery

    Hello, Im in need of a new batter for my Macbook pro. I have a service battery icon on my battery time. Would you get a new battery from apple or is there another place that I can get it cheaper? Just curious where the best place would be to get a ne

  • Validation for parking the FI document

    Dear All, Can we set any validation or BTE or User Exit for the duplication of documents in Parking based on same reference and vendor? regards, MuraliHello Murali, You can create a Validation for this. 1. GoTo transaction GGB0 (Change Validation). 2

  • Upgrade path and docs from to

    Can someone point me what's the upgrade path from to and related docs? I did search in my metalink for upgrade patch from above ... but it doesn't show anything for my Oracle version and platform (Linux x86). Where should I

  • Change code in ABAP debugger mode ?

    Hello ABAP Experts, How to change the code in the abap Debugger mode. Suggestions appreciated. Thanks, BWerYou can not change the code in ABAP debugger. But you can change the value of variable/ internal table / structure in ABAP Debugger. Also you c

  • Checking Status of Analog Output operation on DAQ6731

    I am using the DAQ6731 board to output an analog signal. My program reads in a file which contains pre-calculated data values, and uses the following series of NIDAQ functions to do the outputting: WFM_Group_Setup WFM_Load WFM_Rate WFM_ClockRate WFM_

  • Moving to CM from non-cm

    We are currently tsting moving applications which use Headstart 6i from a non-versioned to a versioned repository. Is there a difference between non-cm and cm headstart application? If so, how do we reconcile the two headstart applications?Or is the

  • Sequence of approvals

    Could you tell me, what is the best way to organize sequence of approvals? For example, when the user have been created, this process must be approved by Manager1 and after that it must be approved by Manager2 (or Manager3). Should i modify current w