Use of OO ABAP

Hi all,
I have recently completed studing OO ABAP.Can some body tell me exactly where these concepts are used.For ex. used in OO ALV.Like this where else its used so that i can decide how much to focus on this concept.
Thanks.

In the past, information systems used to be defined primarily by their functionality: data and functions were kept separate and linked together by means of input and output relations.
The object-oriented approach, however, focuses on objects that represent abstract or concrete things of the real world. These objects are first defined by their character and their properties which are represented by their internal structure and their attributes (data). The behaviour of these objects is described by methods (functionality).
Objects form a capsule which combines the character to the respective behaviour. Objects should enable programmers to map a real problem and its proposed software solution on a one-to-one basis.
Typical objects in a business environment are, for example, ‘Customer’, ‘Order’, or ‘Invoice’. From Release 3.1 onwards, the Business Object Repository (BOR) of SAP Web Applicaton Server ABAP has contained examples of such objects. The BOR object model will be integrated into ABAP Objects in the next Release by migrating the BOR object types to the ABAP class library.
A comprehensive introduction to object orientation as a whole would go far beyond the limits of this introduction to ABAP Objects. This documentation introduces a selection of terms that are used universally in object orientation and also occur in ABAP Objects. In subsequent sections, it goes on to discuss in more detail how these terms are used in ABAP Objects. The end of this section contains a list of further reading, with a selection of titles about object orientation.
Objects
Objects are instances of classes. They contain data and provides services. The data forms the attributes of the object. The services are known as methods (also known as operations or functions). Typically, methods operate on private data (the attributes, or state of the object), which is only visible to the methods of the object. Thus the attributes of an object cannot be changed directly by the user, but only by the methods of the object. This guarantees the internal consistency of the object.
Classes
Classes describe objects. From a technical point of view, objects are runtime instances of a class. In theory, you can create any number of objects based on a single class. Each instance (object) of a class has a unique identity and its own set of values for its attributes.
Object References
In a program, you identify and address objects using unique object references. Object references allow you to access the attributes and methods of an object.
In object-oriented programming, objects usually have the following properties:
Encapsulation
Objects restrict the visibility of their resources (attributes and methods) to other users. Every object has an interface, which determines how other objects can interact with it. The implementation of the object is encapsulated, that is, invisible outside the object itself.
Inheritance
You can use an existing class to derive a new class. Derived classes inherit the data and methods of the superclass. However, they can overwrite existing methods, and also add new ones.
Polymorphism
Identical (identically-named) methods behave differently in different classes. In ABAP Objects, polymorphism is implemented by redefining methods during inheritance and by using constructs called interfaces.
Uses of Object Orientation
Below are some of the advantages of object-oriented programming:
· Complex software systems become easier to understand, since object-oriented structuring provides a closer representation of reality than other programming techniques.
· In a well-designed object-oriented system, it should be possible to implement changes at class level, without having to make alterations at other points in the system. This reduces the overall amount of maintenance required.
· Through polymorphism and inheritance, object-oriented programming allows you to reuse individual components.
· In an object-oriented system, the amount of work involved in revising and maintaining the system is reduced, since many problems can be detected and corrected in the design phase.
Achieving these goals requires:
· Object-oriented programming languages
Object-oriented programming techniques do not necessarily depend on object-oriented programming languages. However, the efficiency of object-oriented programming depends directly on how object-oriented language techniques are implemented in the system kernel.
· Object-oriented tools
Object-oriented tools allow you to create object-oriented programs in object-oriented languages. They allow you to model and store development objects and the relationships between them.
· Object-oriented modeling
The object-orientation modeling of a software system is the most important, most time-consuming, and most difficult requirement for attaining the above goals. Object-oriented design involves more than just object-oriented programming, and provides logical advantages that are independent of the actual implementation.
Further Reading
There are many books about object orientation, object-oriented programming languages, object-oriented analysis and design, project management for OO projects, patterns and frameworks, and so on. This is a small selection of good books covering the most important topics:
· Scott Ambler, The Object Primer, SIGS Books & Multimedia (1996), ISBN: 1884842178
A very good introduction to object orientation for programmers. It provides comprehensive explanations of all essential OO concepts, and contains a procedure model for learning OO quickly and thoroughly. It is easy to read and practical, but still theoretically-founded.
· Grady Booch, Object Solutions: Managing the Object-Oriented Project, Addison-Wesley Pub Co (1995), ISBN: 0805305947
A good book about all of the non-technical aspects of OO that are equally important for effective object-oriented programming. Easy to read and full of practical tips.
· Martin Fowler, UML Distilled: Applying the Standard Object Modeling Language, Addison-Wesley Pub Co (1997), ISBN: 0201325632
An excellent book about UML (Unified Modeling Language - the new standardized OO language and notation for modeling). Assumes knowledge and experience of object orientation.
· Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, Design Patterns. Elements of Reusable Object-Oriented Software, Addison-Wesley Pub Co (1998), ISBN: 0201634988
Provides a pattern, showing how recurring design problems can be solved using objects. This is the first big pattern book, containing many examples of good OO design.
· James Rumbaugh, OMT Insights: Perspectives on Modeling from the Journal of Object-Oriented Programming, Prentice Hall (1996), ISBN: 0138469652
A collection of articles addressing the many questions and problems of OO analysis and design, implementation, dependency management, and so on. Highly recommended.
Notes
If you are new to object-orientation, you should read Scott Ambler’s ‘The Object Primer’ and then acquire some practical experience of your own. You should definitely use the CRC techniques described by Ambler and Fowler for object-oriented analysis and design. After this, you should learn UML, since this is the universal OO analysis and design notation. Finally, you should read at least one book about patterns.
At the beginning of a large OO project, the question immediately arises as to the sequence in which things should be done, which phases should be finished at what time, how to divide up and organize the development work, how to minimize risks, how to assemble a good team, and so on and so forth. Many of the best practices of project management have had to be redefined for the object-oriented world, and the opportunities that this has produced are significant. For further information about how to use OO in project management, see Grady Brooch’s book ‘Object solutions’, or the chapter entitles ‘An outline development process’ from Martin Fowler’s book.
There are, of course, many other good books about object orientation. The above list does not claim either to be complete, or necessarily to recommend the best books available.
Thanks&regards,
sravani

Similar Messages

  • How to save file in km using web dynpro abap

    Hi Experts,
    We have a requirement that file should be saved in a folder in km, the name of the folder should be the employee number.
    Could you please tell me how to create folder with employee number in KM and store file in it using web dynpro abap.
    Thanks and Regards,
    Santhoshi.

    Thanks Naga Raju Meesala.
    How come all these methods are deprecated...getEP5User
    Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
    Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
    u2022 \lib\prtapi.jar The portal runtime APIs
    u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
    u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
    u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
    u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
    u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities

  • Why and how to use events in abap objects

    Dear all,
      Please explain me why and how to use events in abap objects with real time example
    regards
    pankaj giri

    Hi Pankaj,
    I will try to explain why to use events... How to use is a different topic.. which others have already answered...
    This is same from your prev. post...
    Events :
    Technically speaking :
    " Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
    Lets say you have an ALV - An editable one ...
    Lats say - Once you press some button  you want some kind of validation to be done.
    How to do this ?
    Raise an Event - Which is handled by a method and write the validation code.
    Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
    Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
    Where is the function code here ? No function code... But there is an event here - The data changed event.
    So you can raise a data changed event that can be handled and will do the validation.
    It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
    The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
    Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
    Advantage with events : Event handlers can be in a separate class also.
    e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
    In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
    So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
    Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
    And these different classes for different Operation systems will have different code to raise a pop-up.
    Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac  they will catch this event and process accordingly.
    May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
    Cheers.
    Varun.

  • Is it possible to call a class method using pattern in ABAP editor.

    Hi,
         Is it possible to call a class method using pattern in ABAP editor.
    Thank U for Ur time.
    Cheers,
    Sam

    Yes,
    Click patterns.
    Then choose Abap objects patterns.
    Click on the Tick
    It will give a new screen
    Here Give the name of the class first.
    Then the object (instance of the calss)
    And finally the method ..
    it will give you the pattern
    Hope this helps.

  • Adobe form to save data using Web Dynpro ABAP

    Hi. I am pretty new to SAP world and trying to learn and work on a task given to me relate to
    creating Adobe offline form using Web Dynpro ABAP same time.
    I have several questions and hopefully, many gurus like you will provide answers.
    I noticed there are many examples creating and using Adobe interactive forms (though not many newer version),
    but I didn't see (at least I didn't find any) any detail example on saving data to an internal table (such as fixed assets, vendor master, etc)
    using interactive form. Is there any detail explanation/example on this?
    I have ask this question in another forum (before I found this forum) but didnu2019t get the answer yet.
    2. When I tried to see graphic layout and modify the layout from Web Dynpro, I can't see the graphic layout.
    All I see is text list of fields/buttons that I created, but can't see section for graphic layout where I can modify layout.
    I am sure I didn't install/configure something correctly.
    Anyone has any idea what I didn't do?
    I have another question, but I will wait till later after I figure out above ones first.
    Thanks for all your help in advance.
    John

    Hi John,
    In the WD4A view, there is a button "Show/Hide Layout Preview".
    Click on that button to be able to see the Layout.
    Note that this button is next to the Pretty Print button.
    regards,
    Reema.

  • How to use wildcards in ABAP query where condition?

    Hi,
    Please tell me how to use wildcards in ABAP qurey where condition.
    e.g. select * from mara where matnr = * (wildcard we need to use.
    Thanks & Regards,
    Gaurav T

    Do you want to query asterix * ?
    select * from mara where matnr = '*'.  "then just put it in apstrophes
    or you want certain part of string be used as * ?
    select * from mara where matnr like '%*'  "then use % sign before it
    or maybe you want something like this
    select * from mara where matnr like '%1' . "then it will look for all materials having '1' inside it
    Regards
    Marcin

  • Sales order creation using webdynpro in ABAP

    Plz give the process how to create sales order creation using webdynpro in ABAP. if not possible plz let me know how to create in JAVA.
    It is very urgent. I hope i will get it very soon.
    Thanks all
    Sai

    In your WDA application,  all you need to do is call the BAPI BAPI_SALESORDER_CREATEFROMDAT2 when the user clicks some button.  Most likely, you can put the code for this BAPI call in the onAction method for your button. 
    Regards,
    Rich Heilman

  • How to create interactive forms using Webdynpro for ABAP

    Hi All,
             I have worked on Webdynpro for ABAP, and now I want to start creating adobe interactive forms using Webdynpro for ABAP. Please provide me with basic examples to start.
    Also Please provide me introduction as how interactive forms are related to ISR senarios.
    Thanks in Advance.
    Phani

    Hi Varun!,
    Can you please send me also the above said step by step tutorial on [email protected]
    and can you please also guide me any configurations to be done on Sneak Preview SP12 before developing the interactive forms.
    Thank you in advance.
    regards
    Ravi

  • How to create a table to use in webdynpro ABAP

    Hi Guys,
    Can anybody let me know how to create a table to use in webdynpro ABAP. I am new to ABAP. It would appreciable if i get useful answer.  Thanks In Advance
    Regards
    Ravi

    Hi! You can use transaction code SE11.  Please refer to http://help.sap.com/saphelp_nw70/helpdata/en/6c/f2934259a5c66ae10000000a155106/frameset.htm
    Please note that table name should start with 'Y' or 'Z' - by SAP naming conventions object names starting with 'Y' and 'Z' are reserved for customer application development.
    Please reward points if helpful

  • Do we need to be in unicode to use webdynpro for abap in ECC6 ?

    Hello,
    we study migration to SAPR3 46C SR2 to ECC6.
    a question is: Do we need to be in unicode to use webdynpro for abap in ECC6 ?
    Our SAPR3 are in non unicode
    thanks

    The problem, if you backend system is not unicode, can be, that user with the browser accessing the Webdynpro page, can enter data of any codepage (because browser is Unicode), the data will then be stored with a wrong codepage in the system and will be destroyed.
    Additionally all successor versions of ERP will be Unicode only.
    And on top of that, if you plan to use Java components (such as a portal), the backend must be Unicode (see Note 975768 - Deprecation of Java features with non-Unicode Backend).
    Markus

  • Portal using Webdynpro for ABAP

    Hi Gurus!
        I am using one portal using 'Webdynpro For ABAP'. It contains Contextual Panel as well as ViewUIContainer. Contextual Panel contains all the reqd options available for user; while ViewUIContainer contains diff views as requested.
       Now, I'm trying to make a copy of that Webdynpro with some other name. What happens is --
    Application is not there and when I try to make one - it says
    "Interface View Does Not Exists."
    Further, when I try to make an Interface View with the new name - it says
    "Interface View Does Not Exists."
       Therefore, what I could conclude about the case is -- may be Interface View is default to certain Webdynpro components/interface. Hence, my question is how can I make use of same webdynpro application with some other name. This requirement arises due to the fact that we have to add some more functionalities to that and I dont want to play with the efforts made so far.
    Kumar Saurav.

    Issue Resolved.
    Kumar Saurav.

  • RFC (using AAE) vs IDoc (Using IE) vs ABAP Proxy (using IE) in PI7.1

    Hi All,
    In previous versions of SAP PI, SAP recommends the use of IDoc or Proxy over RFC mainly due to performance reasons, but with PI 7.1, RFCs can use AAE which significantly boost its processing.
    So the question is, with PI 7.1, is the performance of RFC adapter using AAE good enough that is should be considered over IDocs (using IE) & Proxies (using IE)? Please provide elaborate reply.
    Thanks,
    Rahul

    >>>>>So the question is, with PI 7.1, is the performance of RFC adapter using AAE good enough that is should be considered over IDocs (using IE) & Proxies (using IE)? Please provide elaborate reply.
    Answer: If your major objective is only the performance factor then you can go for AAE using RFC. But RFC's individual processing performance is slightly lower than idocs and proxy.
    Though AAE monitoring is just only in RWB,  But due to less persistence steps involved in the entire processing, RFC with AAE supercede other options.
    IDOc using IE vs Abap Proxy using IE --- I would recommend only Abap Proxy using IE. Plus you get all the monitoring features here.

  • Reading HTML Content using Web Dynpro ABAP

    Hello,
    I was wondering if it is possible to read the content (HTML) behind a given URL using Web Dynpro ABAP.  If so, are there any functions available to parse the HTML ?   I have been asked to develop an application that requires going to a URL, reading the content, and formatting a table from that content for presentaion within Web Dynpro ABAP.  The HTML of the URL is nothing more than a "Table of Contents" to existing documentation ( Word Documents )
    Thank you for any help / advice you can provide
    Larry

    You can get the HTML returned in a table using fm RSFO_HTML_REQUEST2.
    Once you have that, you can convert it to a string using any number of methods. CL_RSR_WWW_RENDERER=>TABLE_TO_STRING should work fine.
    One option for parsing it would be to get it converted into an iXML object, but you might have to do quite a bit of manipulation first depending on what the html looks like. You can see more info here on iXML classes: [http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm]
    Otherwise I would just make use of find statements with regex patterns to sort through the html.

  • Can we use Union in ABAP???

    Can we use Union in ABAP???
    I have scenario like,
    in an internal table i have entrie like this,
    comp code     field1       field2       field3        field4       field5
    0A1                   ABC        BCD          00             00              00
    0A1                    00            00            CDE           00              00      
    0A1                    00            00            00              EFG           IJK
    but i need a single entry like this,
    comp code     field1       field2       field3        field4       field5
    0A1               ABC        BCD         CDE           EFG             IJK
    how to do this????

    You cannot use SELECT on internal tables so the question of UNION does not arise. Also, you cannot use UNION in ABAP. You need to code it to get the desired output
    Move the first line of your internal table to a new int table i_ftab.
      DATA: num TYPE char1.
      num = 2.
      DO.
        READ TABLE i_tab -> initial internal table
          INTO wa_tab INDEX num.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        IF wa_tab-code NE '000'.
          MODIFY i_ftab INDEX 1 FROM wa_tab TRANSPORTING code.
        ELSEIF wa_tab-field1 NE '000'.
          MODIFY i_ftab INDEX 1 FROM wa_tab TRANSPORTING field1.
        ENDIF.
        num = num + 1.
      ENDDO.

  • Standard program to display which tables are used by Webdynpro ABAP program

    Hi Gurus,
    I am working on a couple of enhancements in SAP Promotion Management for Retail (SAP PMR) which works on the principle of Floor Plan Management.
    I was wondering if anyone would know of a standard program to display the tables used by Webdynpro ABAP?
    (or)
    Where can I get info of SAP Tables associated to SAP PMR?

    Hi,
    I am not aware of any standard reports that displays the tables.
    If I have to view the tables, I would go to se80, give the package and view all the tables in the package.
    Regards,
    Daz.

  • How to display the data of CJ2C(T-CODE) using web dynpro abap

    Hi all:
        How to display the data of CJ2C(T-CODE) using web dynpro abap.
        CJ2C used to display a Gantt Chart.
        Thanks.

    Hi,
    Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
    On action place the code and Deploy the application
    byte[] bytes = new byte[ 1024];
    FileOutputStream out = new FileOutputStream( new File( <path in server>));
    InputStream in = resource.read( true);
    int len;
    while( ( len = in.read( bytes)) > 0)
         out.write( bytes, 0, len);
    in.close();
    out.close();
    Regards
         Vinod V

Maybe you are looking for