<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: tell be abap objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342747#M801414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;The Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your existing knowledge of procedural programming with ABAP, we will&lt;/P&gt;&lt;P&gt;explain the object-oriented approach and encourage you to use it. The main emphasis&lt;/P&gt;&lt;P&gt;will be on explanation. At this stage, it is important that you understand the subject&lt;/P&gt;&lt;P&gt;and its concepts so that we can build on this knowledge later.&lt;/P&gt;&lt;P&gt;For now, it would not make sense to try to argue a conclusive point for or against the&lt;/P&gt;&lt;P&gt;object-oriented approach. Before you can make a qualified decision, you need to&lt;/P&gt;&lt;P&gt;know object-oriented concepts and their advantages and disadvantages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Moving from the Procedural to the Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Object-oriented programming was developed at approximately the same time as&lt;/P&gt;&lt;P&gt;logical and procedural programming models, for example, the programming language&lt;/P&gt;&lt;P&gt;Simula 67. In the past, COBOL and the procedural programming model as expressed&lt;/P&gt;&lt;P&gt;in languages like C or Pascal were dominant in enterprise application development.&lt;/P&gt;&lt;P&gt;Before ABAP, SAP originally used a macro assembler.&lt;/P&gt;&lt;P&gt;Even today, many developers still have more experience with procedural programming&lt;/P&gt;&lt;P&gt;than object-oriented programming. Therefore, this introduction to object-oriented&lt;/P&gt;&lt;P&gt;programming also uses references to the procedural model in its explanations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;History of Selected Programming Languages&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP was created with the intention of improving reporting. It was developed&lt;/P&gt;&lt;P&gt;relatively independently as an in-house programming language, although it was&lt;/P&gt;&lt;P&gt;influenced by other programming languages like COBOL and Pascal. ABAP/4&lt;/P&gt;&lt;P&gt;was then extended to form ABAP Objects. Therefore, ABAP Objects unites&lt;/P&gt;&lt;P&gt;object-oriented and procedural elements in one programming language.&lt;/P&gt;&lt;P&gt;For the object-oriented part, only those object-oriented concepts that had proved&lt;/P&gt;&lt;P&gt;their worth for enterprise application development in other languages, such as Java,&lt;/P&gt;&lt;P&gt;C++, and Smalltalk, were adopted. ABAP Objects, like ABAP/4, also contains some&lt;/P&gt;&lt;P&gt;unique, very advantageous concepts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Characteristics of the Procedural Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data and functions are usually kept separate in the procedural programming model.&lt;/P&gt;&lt;P&gt;Global variables for a program contain data, while subroutines contain functions.&lt;/P&gt;&lt;P&gt;Essentially, every subprogram can access every variable. This means that the&lt;/P&gt;&lt;P&gt;programming model itself does not support consistent access to some related parts of&lt;/P&gt;&lt;P&gt;the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Typical Procedural ABAP Program&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A typical procedural ABAP program consists of type definitions and data declarations,&lt;/P&gt;&lt;P&gt;which describe the structure of the data used by the program when it is executed.&lt;/P&gt;&lt;P&gt;Modularization units (for example, subroutines or function modules) can be&lt;/P&gt;&lt;P&gt;encapsulated. On the main program level, however, there is no special protection for&lt;/P&gt;&lt;P&gt;the data objects: any variables can be accessed by any means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Encapsulating Data Using Function Groups&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every time a function module is called in a main program, its function group is loaded&lt;/P&gt;&lt;P&gt;into the internal session. The function group remains active until the main program&lt;/P&gt;&lt;P&gt;is finished. The main program and the function groups that were called in it are all&lt;/P&gt;&lt;P&gt;stored in separate memory areas. Even if their data objects have the same names,&lt;/P&gt;&lt;P&gt;they are not shared.&lt;/P&gt;&lt;P&gt;Only function modules of the function groups can be called from the main program.&lt;/P&gt;&lt;P&gt;In turn, the function modules can access the other components &amp;amp;#150; particularly the&lt;/P&gt;&lt;P&gt;global data &amp;amp;#150; of the function groups. In other words, it is not possible to access the&lt;/P&gt;&lt;P&gt;function group's global data directly from the main program.&lt;/P&gt;&lt;P&gt;Encapsulation also incorporates the idea that the implementation of a service can be&lt;/P&gt;&lt;P&gt;hidden from the system's other components, so that these cannot and do not make&lt;/P&gt;&lt;P&gt;assumptions about the internal status of the modularization unit. This way, the design&lt;/P&gt;&lt;P&gt;of these other components is not dependent on a specific implementation of the other&lt;/P&gt;&lt;P&gt;modularization units.&lt;/P&gt;&lt;P&gt;Therefore, a function group is a unit of data and functions that manages this&lt;/P&gt;&lt;P&gt;data. Encapsulated access to data and services &amp;amp;#150; a concept of the object-oriented&lt;/P&gt;&lt;P&gt;programming model &amp;amp;#150; can therefore be supported in the procedural part of ABAP&lt;/P&gt;&lt;P&gt;Objects. This meant that BAPIs could be implemented as function modules and&lt;/P&gt;&lt;P&gt;Business Objects could be implemented as function groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The ABAP Objects Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The object-oriented concepts of ABAP Objects are essentially the same as those of&lt;/P&gt;&lt;P&gt;other modern object-oriented languages such as C++ or Java. A small number of&lt;/P&gt;&lt;P&gt;concepts that did not prove to be successful in these other languages were not included&lt;/P&gt;&lt;P&gt;in ABAP Objects. On the other hand, ABAP Objects also has helpful language&lt;/P&gt;&lt;P&gt;elements that C++ and Java do not offer.&lt;/P&gt;&lt;P&gt;Some specific features of ABAP Objects only exist because of the guaranteed upward&lt;/P&gt;&lt;P&gt;compatibility of older ABAP language elements.&lt;/P&gt;&lt;P&gt;Major differences in comparison to other object-oriented languages are in the&lt;/P&gt;&lt;P&gt;development environment. You can use the ABAP Workbench's entire range of&lt;/P&gt;&lt;P&gt;functions with ABAP Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ABAP Objects as a Compatible Extension of ABAP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Objects is not a new language, but has been designed as a systematic extension&lt;/P&gt;&lt;P&gt;of ABAP. All of the extensions, including the old procedural parts, are upwardly&lt;/P&gt;&lt;P&gt;compatible.&lt;/P&gt;&lt;P&gt;Type checks in the object-oriented contexts of ABAP Objects are stricter than those in&lt;/P&gt;&lt;P&gt;the procedural contexts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;object-oriented contexts. This means that obsolete statements lead to syntax errors.&lt;/P&gt;&lt;P&gt;However, it is also advisable to avoid obsolete statements in the purely procedural&lt;/P&gt;&lt;P&gt;environment, as this creates source texts that are safer and more flexible. Nevertheless,&lt;/P&gt;&lt;P&gt;as the language is upwardly compatible, it is not possible to entirely prevent the use&lt;/P&gt;&lt;P&gt;of such statements.&lt;/P&gt;&lt;P&gt;For a list of obsolete language elements, refer to the ABAP keyword documentation.&lt;/P&gt;&lt;P&gt;Every obsolete statement is also specifically noted as forbidden in the object-oriented&lt;/P&gt;&lt;P&gt;context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Client/Server Relationships Between Objects&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Objects behave like client/server systems. When one object sends a message to&lt;/P&gt;&lt;P&gt;another object, telling it to behave in a certain way, the first object can be seen as a&lt;/P&gt;&lt;P&gt;client and the other as a server.&lt;/P&gt;&lt;P&gt;To separate requests and deliveries of services, the following must be true:&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Theclient object must adhere to the server object's protocol.&lt;/P&gt;&lt;P&gt;&amp;amp;#149; The protocol must be clearly described so that a potential client can follow it&lt;/P&gt;&lt;P&gt;without any problems.&lt;/P&gt;&lt;P&gt;In principle, objects can perform both roles simultaneously; they can offer services to&lt;/P&gt;&lt;P&gt;other objects while requesting services at the same time.&lt;/P&gt;&lt;P&gt;In object-oriented programming, the services are distributed among the objects in&lt;/P&gt;&lt;P&gt;such a way as to avoid redundancies and so that each object offers exactly those&lt;/P&gt;&lt;P&gt;services that are within its area of responsibility. If an object needs any other services,&lt;/P&gt;&lt;P&gt;it requests these from other objects. This is known as the principle of delegation.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For example&lt;/STRONG&gt;, the common task &amp;amp;#147;data retrieval and output&amp;amp;#148; should be distributed over&lt;/P&gt;&lt;P&gt;at least two objects: one is responsible for data retrieval and one for output. As long&lt;/P&gt;&lt;P&gt;as the data retrieval object does not change its protocol, its internal implementation&lt;/P&gt;&lt;P&gt;can be altered without any necessary changes to the output object. Alternately, the&lt;/P&gt;&lt;P&gt;data retrieval object could be replaced by a different object, providing that the new&lt;/P&gt;&lt;P&gt;object uses the same protocol. These exchanges can also take place at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Additional Concepts of the Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;inheritance&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Inheritance defines the implementation relationships between classes. One class&lt;/P&gt;&lt;P&gt;(the subclass) adopts the structure and behavior of another class (superclass),&lt;/P&gt;&lt;P&gt;possibly also adapting or extending it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Polymorphism&lt;/STRONG&gt;Polymorphism is when instances of different classes respond differently to the&lt;/P&gt;&lt;P&gt;same messages.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Event control&lt;/STRONG&gt;Instead of sending messages directly to specific objects, objects can also trigger&lt;/P&gt;&lt;P&gt;events. Events can be triggered if it is not yet known at the time of development&lt;/P&gt;&lt;P&gt;if and how objects will react.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To summarize, the object-oriented programming model of ABAP Objects has the&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;following key characteristics:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Objects are a direct abstraction of the real world.&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Objects are units made up of data and the functions belonging to that data.&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Processes can be implemented realistically.&lt;/P&gt;&lt;P&gt;The model has the following advantages:&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Improved software structure and consistency in the development process&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Reduced maintenance effort and less susceptibility to errors&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Better integration of the customer/user into the analysis, design, and maintenance&lt;/P&gt;&lt;P&gt;processes&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Options for extending the software are simpler and more secure&lt;/P&gt;&lt;P&gt;A standardized language is used in the various phases of software development&lt;/P&gt;&lt;P&gt;(analysis, specification, design, and implementation). Communication is much easier&lt;/P&gt;&lt;P&gt;when changing between phases.&lt;/P&gt;&lt;P&gt;In object-oriented programming, analysis and design decisions have an even greater&lt;/P&gt;&lt;P&gt;effect on implementation than they do in procedural programming. Therefore, you&lt;/P&gt;&lt;P&gt;should already structure and formally standardize the analysis and design phase. You&lt;/P&gt;&lt;P&gt;can use modeling languages to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2008 21:49:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-04T21:49:35Z</dc:date>
    <item>
      <title>tell be abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342743#M801410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;               pls tell me how i can learn quickly oops in abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              and give me some material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;vikas saini.'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:39:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342743#M801410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: tell be abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342744#M801411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;normal ABAP is process oriented, where is OOP-ABAP is a new methodology in ABAP which uses object oriented programming.&lt;/P&gt;&lt;P&gt;we have C++, java, C#, etc as OOP languages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP has also implemented the OOP technology.&lt;/P&gt;&lt;P&gt;it uses classes, methods and interfaces instead of functiongroups and function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As part of SAP&amp;#146;s long-standing commitment to object technology, Release 4.0&lt;/P&gt;&lt;P&gt;of R/3 will contain object-oriented enhancements to the ABAP programming&lt;/P&gt;&lt;P&gt;language. SAP&amp;#146;s object strategy is based on SAP Business Objects and now&lt;/P&gt;&lt;P&gt;covers modeling, programming, interfacing, and workflow. By using principles&lt;/P&gt;&lt;P&gt;like encapsulation, inheritance, and polymorphism, the object-oriented&lt;/P&gt;&lt;P&gt;extensions of ABAP will support real object-oriented development. This will&lt;/P&gt;&lt;P&gt;result in improvements in the areas of reusability, maintenance, and quality of&lt;/P&gt;&lt;P&gt;code. SAP offers an evolutionary approach toward objects which leverages&lt;/P&gt;&lt;P&gt;SAP&amp;#146;s own and its customers&amp;#146; investments in existing business processes,&lt;/P&gt;&lt;P&gt;functionality and data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer these basics&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OO ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/eg.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/eg.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/syntax.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/syntax.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/defn.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/defn.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Detailed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OOPS &amp;#150; OO ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt" target="test_blank"&gt;http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf" target="test_blank"&gt;http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt" target="test_blank"&gt;http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8" target="test_blank"&gt;http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:54:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342744#M801411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: tell be abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342745#M801412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap_ood.html" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap_ood.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.brabandt.de/html/abap_oo.html" target="test_blank"&gt;http://www.brabandt.de/html/abap_oo.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this cool weblog:&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/" target="test_blank"&gt;http://www.allsaplinks.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/" target="test_blank"&gt;http://www.sap-img.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/" target="test_blank"&gt;http://www.sapgenie.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com" target="test_blank"&gt;http://help.sap.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/controls/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/controls/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these links &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For funtion module to class&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for classes&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for methods&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for inheritance&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for interfaces&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Materials:&lt;/P&gt;&lt;P&gt;1) &lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf&lt;/A&gt; -- Page no: 1291&lt;/P&gt;&lt;P&gt;2) &lt;A href="http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3) &lt;A href="http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;4) &lt;A href="http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;5) &lt;A href="http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt" target="test_blank"&gt;http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;6) &lt;A href="http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf" target="test_blank"&gt;http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;7) &lt;A href="http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt" target="test_blank"&gt;http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; &lt;A href="http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8" target="test_blank"&gt;http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;A href="http://www.erpgenie.com/sap/abap/OO/index.htm" target="test_blank"&gt;http://www.erpgenie.com/sap/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2) &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 12:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342745#M801412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T12:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: tell be abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342746#M801413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vikas, this will guide u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OOPs ABAP uses Classes and Interfaces which uses Methods and events.&lt;/P&gt;&lt;P&gt;If you have Java skills it is advantage for you.&lt;/P&gt;&lt;P&gt;There are Local classes as well as Global Classes.&lt;/P&gt;&lt;P&gt;Local classes we can work in SE38 straight away.&lt;/P&gt;&lt;P&gt;But mostly it is better to use the Global classes.&lt;/P&gt;&lt;P&gt;Global Classes or Interfaces are to be created in SE24.&lt;/P&gt;&lt;P&gt;SAP already given some predefined classes and Interfaces.&lt;/P&gt;&lt;P&gt;This OOPS concepts very useful for writing BADI's also.&lt;/P&gt;&lt;P&gt;So first create a class in SE 24.&lt;/P&gt;&lt;P&gt;Define attributes, Methods for that class.&lt;/P&gt;&lt;P&gt;Define parameters for that Method.&lt;/P&gt;&lt;P&gt;You can define event handlers also to handle the messages.&lt;/P&gt;&lt;P&gt;After creation in each method write the code.&lt;/P&gt;&lt;P&gt;Methods are similar to ABAP PERFORM -FORM statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the creation of CLass and methods come to SE38 and create the program.&lt;/P&gt;&lt;P&gt;In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;REPORT sapmz_hf_alv_grid .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type pool for icons - used in the toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPE-POOLS: icon.&lt;/P&gt;&lt;P&gt;TABLES: zsflight.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To allow the declaration of o_event_receiver before the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;lcl_event_receiver class is defined, decale it as deferred in the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;start of the program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS lcl_event_receiver DEFINITION DEFERRED.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;G L O B A L I N T E R N A L T A B L E S&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*DATA: gi_sflight TYPE STANDARD TABLE OF sflight.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To include a traffic light and/or color a line the structure of the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;table must include fields for the traffic light and/or the color&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF st_sflight.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE zsflight.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field for traffic light&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: traffic_light TYPE c.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field for line color&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;types: line_color(4) type c.&lt;/P&gt;&lt;P&gt;TYPES: END OF st_sflight.&lt;/P&gt;&lt;P&gt;TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.&lt;/P&gt;&lt;P&gt;DATA: gi_sflight TYPE tt_sflight.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;G L O B A L D A T A&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;DATA: ok_code LIKE sy-ucomm,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work area for internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_wa_sflight TYPE st_sflight,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ALV control: Layout structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gs_layout TYPE lvc_s_layo.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare reference variables to the ALV grid and the container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;go_grid TYPE REF TO cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;go_custom_container TYPE REF TO cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;o_event_receiver TYPE REF TO lcl_event_receiver.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work area for screen 200&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_screen200 LIKE zsflight.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data for storing information about selected rows in the grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gi_index_rows TYPE lvc_t_row,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Information about 1 row&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_selected_row LIKE lvc_s_row.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;C L A S S E S&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;CLASS lcl_event_receiver DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;e_object e_interactive,&lt;/P&gt;&lt;P&gt;handle_user_command FOR EVENT user_command OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;IMPORTING e_ucomm.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLASS lcl_event_receiver IMPLEMENTATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_event_receiver IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD handle_toolbar.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Event handler method for event toolbar.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CONSTANTS:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Constants for button type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;c_button_normal TYPE i VALUE 0,&lt;/P&gt;&lt;P&gt;c_menu_and_default_button TYPE i VALUE 1,&lt;/P&gt;&lt;P&gt;c_menu TYPE i VALUE 2,&lt;/P&gt;&lt;P&gt;c_separator TYPE i VALUE 3,&lt;/P&gt;&lt;P&gt;c_radio_button TYPE i VALUE 4,&lt;/P&gt;&lt;P&gt;c_checkbox TYPE i VALUE 5,&lt;/P&gt;&lt;P&gt;c_menu_entry TYPE i VALUE 6.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;ls_toolbar TYPE stb_button.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append seperator to the normal toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR ls_toolbar.&lt;/P&gt;&lt;P&gt;MOVE c_separator TO ls_toolbar-butn_type..&lt;/P&gt;&lt;P&gt;APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append a new button that to the toolbar. Use E_OBJECT of&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This class has one attribute MT_TOOLBAR which is of table type&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TTB_BUTTON. The structure is STB_BUTTON&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR ls_toolbar.&lt;/P&gt;&lt;P&gt;MOVE 'CHANGE' TO ls_toolbar-function.&lt;/P&gt;&lt;P&gt;MOVE icon_change TO ls_toolbar-icon.&lt;/P&gt;&lt;P&gt;MOVE 'Change flight' TO ls_toolbar-quickinfo.&lt;/P&gt;&lt;P&gt;MOVE 'Change' TO ls_toolbar-text.&lt;/P&gt;&lt;P&gt;MOVE ' ' TO ls_toolbar-disabled.&lt;/P&gt;&lt;P&gt;APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_user_command.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Handle own functions defined in the toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CASE e_ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'CHANGE'.&lt;/P&gt;&lt;P&gt;PERFORM change_flight.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LEAVE TO SCREEN 0.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;S T A R T - O F - S E L E C T I O N.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;SET SCREEN '100'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;CASE ok_code.&lt;/P&gt;&lt;P&gt;WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For parameter IS_VARIANT that is sued to set up options for storing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the grid layout as a variant in method set_table_for_first_display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_layout TYPE disvariant,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Utillity field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_lines TYPE i.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;After returning from screen 200 the line that was selected before&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;going to screen 200, should be selected again. The table gi_index_rows&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;was the output table from the GET_SELECTED_ROWS method in form&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CHANGE_FLIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DESCRIBE TABLE gi_index_rows LINES l_lines.&lt;/P&gt;&lt;P&gt;IF l_lines &amp;gt; 0.&lt;/P&gt;&lt;P&gt;CALL METHOD go_grid-&amp;gt;set_selected_rows&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;it_index_rows = gi_index_rows.&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_cfw=&amp;gt;flush.&lt;/P&gt;&lt;P&gt;REFRESH gi_index_rows.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read data and create objects&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF go_custom_container IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read data from datbase table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM get_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create objects for container and ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT go_custom_container&lt;/P&gt;&lt;P&gt;EXPORTING container_name = 'ALV_CONTAINER'.&lt;/P&gt;&lt;P&gt;CREATE OBJECT go_grid&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_parent = go_custom_container.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create object for event_receiver class&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and set handlers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_event_receiver.&lt;/P&gt;&lt;P&gt;SET HANDLER o_event_receiver-&amp;gt;handle_user_command FOR go_grid.&lt;/P&gt;&lt;P&gt;SET HANDLER o_event_receiver-&amp;gt;handle_toolbar FOR go_grid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Layout (Variant) for ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_layout-report = sy-repid. "Layout fo report&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setup the grid layout using a variable of structure lvc_s_layo&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set grid title&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gs_layout-grid_title = 'Flights'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection mode - Single row without buttons&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(This is the default mode&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gs_layout-sel_mode = 'B'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Name of the exception field (Traffic light field) and the color&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field + set the exception and color field of the table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gs_layout-excp_fname = 'TRAFFIC_LIGHT'.&lt;/P&gt;&lt;P&gt;gs_layout-info_fname = 'LINE_COLOR'.&lt;/P&gt;&lt;P&gt;LOOP AT gi_sflight INTO g_wa_sflight.&lt;/P&gt;&lt;P&gt;IF g_wa_sflight-paymentsum &amp;lt; 100000.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Value of traffic light field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_wa_sflight-traffic_light = '1'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Value of color field:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;C = Color, 6=Color 1=Intesified on, 0: Inverse display off&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_wa_sflight-line_color = 'C610'.&lt;/P&gt;&lt;P&gt;ELSEIF g_wa_sflight-paymentsum =&amp;gt; 100000 AND&lt;/P&gt;&lt;P&gt;g_wa_sflight-paymentsum &amp;lt; 1000000.&lt;/P&gt;&lt;P&gt;g_wa_sflight-traffic_light = '2'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;g_wa_sflight-traffic_light = '3'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;MODIFY gi_sflight FROM g_wa_sflight.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Grid setup for first display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD go_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING i_structure_name = 'SFLIGHT'&lt;/P&gt;&lt;P&gt;is_variant = l_layout&lt;/P&gt;&lt;P&gt;i_save = 'A'&lt;/P&gt;&lt;P&gt;is_layout = gs_layout&lt;/P&gt;&lt;P&gt;CHANGING it_outtab = gi_sflight.&lt;/P&gt;&lt;P&gt;*-- End of grid setup -&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Raise event toolbar to show the modified toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD go_grid-&amp;gt;set_toolbar_interactive.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set focus to the grid. This is not necessary in this&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;example as there is only one control on the screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD cl_gui_control=&amp;gt;set_focus EXPORTING control = go_grid.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE. " STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_0200 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0200 INPUT.&lt;/P&gt;&lt;P&gt;CASE ok_code.&lt;/P&gt;&lt;P&gt;WHEN 'EXIT200'.&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN 100.&lt;/P&gt;&lt;P&gt;WHEN'SAVE'.&lt;/P&gt;&lt;P&gt;PERFORM save_changes.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_0200 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form get_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read data from table SFLIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM zsflight&lt;/P&gt;&lt;P&gt;INTO TABLE gi_sflight.&lt;/P&gt;&lt;P&gt;ENDFORM. " load_data_into_grid&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form change_flight&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reads the contents of the selected row in the grid, ans transfers&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the data to screen 200, where it can be changed and saved.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM change_flight.&lt;/P&gt;&lt;P&gt;DATA:l_lines TYPE i.&lt;/P&gt;&lt;P&gt;REFRESH gi_index_rows.&lt;/P&gt;&lt;P&gt;CLEAR g_selected_row.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read index of selected rows&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD go_grid-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;et_index_rows = gi_index_rows.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if any row are selected at all. If not&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;table gi_index_rows will be empty&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DESCRIBE TABLE gi_index_rows LINES l_lines.&lt;/P&gt;&lt;P&gt;IF l_lines = 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;textline1 = 'You must choose a line'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read indexes of selected rows. In this example only one&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;row can be selected as we are using gs_layout-sel_mode = 'B',&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;so it is only ncessary to read the first entry in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;table gi_index_rows&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT gi_index_rows INTO g_selected_row.&lt;/P&gt;&lt;P&gt;IF sy-tabix = 1.&lt;/P&gt;&lt;P&gt;READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Transfer data from the selected row to screenm 200 and show&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;screen 200&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR g_screen200.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING g_wa_sflight TO g_screen200.&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN '200'.&lt;/P&gt;&lt;P&gt;ENDFORM. " change_flight&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form save_changes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Changes made in screen 200 are written to the datbase table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;zsflight, and to the grid table gi_sflight, and the grid is&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;updated with method refresh_table_display to display the changes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM save_changes.&lt;/P&gt;&lt;P&gt;DATA: l_traffic_light TYPE c.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Update traffic light field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Update database table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODIFY zsflight FROM g_screen200.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Update grid table , traffic light field and color field.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Note that it is necessary to use structure g_wa_sflight&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for the update, as the screen structure does not have a&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;traffic light field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.&lt;/P&gt;&lt;P&gt;IF g_wa_sflight-paymentsum &amp;lt; 100000.&lt;/P&gt;&lt;P&gt;g_wa_sflight-traffic_light = '1'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;C = Color, 6=Color 1=Intesified on, 0: Inverse display off&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_wa_sflight-line_color = 'C610'.&lt;/P&gt;&lt;P&gt;ELSEIF g_wa_sflight-paymentsum =&amp;gt; 100000 AND&lt;/P&gt;&lt;P&gt;g_wa_sflight-paymentsum &amp;lt; 1000000.&lt;/P&gt;&lt;P&gt;g_wa_sflight-traffic_light = '2'.&lt;/P&gt;&lt;P&gt;clear g_wa_sflight-line_color.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;g_wa_sflight-traffic_light = '3'.&lt;/P&gt;&lt;P&gt;clear g_wa_sflight-line_color.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Refresh grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD go_grid-&amp;gt;refresh_table_display.&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_cfw=&amp;gt;flush.&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN '100'.&lt;/P&gt;&lt;P&gt;ENDFORM. " save_changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this blog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid &lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regs,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 15:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342746#M801413</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T15:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: tell be abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342747#M801414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;The Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your existing knowledge of procedural programming with ABAP, we will&lt;/P&gt;&lt;P&gt;explain the object-oriented approach and encourage you to use it. The main emphasis&lt;/P&gt;&lt;P&gt;will be on explanation. At this stage, it is important that you understand the subject&lt;/P&gt;&lt;P&gt;and its concepts so that we can build on this knowledge later.&lt;/P&gt;&lt;P&gt;For now, it would not make sense to try to argue a conclusive point for or against the&lt;/P&gt;&lt;P&gt;object-oriented approach. Before you can make a qualified decision, you need to&lt;/P&gt;&lt;P&gt;know object-oriented concepts and their advantages and disadvantages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Moving from the Procedural to the Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Object-oriented programming was developed at approximately the same time as&lt;/P&gt;&lt;P&gt;logical and procedural programming models, for example, the programming language&lt;/P&gt;&lt;P&gt;Simula 67. In the past, COBOL and the procedural programming model as expressed&lt;/P&gt;&lt;P&gt;in languages like C or Pascal were dominant in enterprise application development.&lt;/P&gt;&lt;P&gt;Before ABAP, SAP originally used a macro assembler.&lt;/P&gt;&lt;P&gt;Even today, many developers still have more experience with procedural programming&lt;/P&gt;&lt;P&gt;than object-oriented programming. Therefore, this introduction to object-oriented&lt;/P&gt;&lt;P&gt;programming also uses references to the procedural model in its explanations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;History of Selected Programming Languages&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP was created with the intention of improving reporting. It was developed&lt;/P&gt;&lt;P&gt;relatively independently as an in-house programming language, although it was&lt;/P&gt;&lt;P&gt;influenced by other programming languages like COBOL and Pascal. ABAP/4&lt;/P&gt;&lt;P&gt;was then extended to form ABAP Objects. Therefore, ABAP Objects unites&lt;/P&gt;&lt;P&gt;object-oriented and procedural elements in one programming language.&lt;/P&gt;&lt;P&gt;For the object-oriented part, only those object-oriented concepts that had proved&lt;/P&gt;&lt;P&gt;their worth for enterprise application development in other languages, such as Java,&lt;/P&gt;&lt;P&gt;C++, and Smalltalk, were adopted. ABAP Objects, like ABAP/4, also contains some&lt;/P&gt;&lt;P&gt;unique, very advantageous concepts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Characteristics of the Procedural Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data and functions are usually kept separate in the procedural programming model.&lt;/P&gt;&lt;P&gt;Global variables for a program contain data, while subroutines contain functions.&lt;/P&gt;&lt;P&gt;Essentially, every subprogram can access every variable. This means that the&lt;/P&gt;&lt;P&gt;programming model itself does not support consistent access to some related parts of&lt;/P&gt;&lt;P&gt;the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Typical Procedural ABAP Program&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A typical procedural ABAP program consists of type definitions and data declarations,&lt;/P&gt;&lt;P&gt;which describe the structure of the data used by the program when it is executed.&lt;/P&gt;&lt;P&gt;Modularization units (for example, subroutines or function modules) can be&lt;/P&gt;&lt;P&gt;encapsulated. On the main program level, however, there is no special protection for&lt;/P&gt;&lt;P&gt;the data objects: any variables can be accessed by any means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Encapsulating Data Using Function Groups&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every time a function module is called in a main program, its function group is loaded&lt;/P&gt;&lt;P&gt;into the internal session. The function group remains active until the main program&lt;/P&gt;&lt;P&gt;is finished. The main program and the function groups that were called in it are all&lt;/P&gt;&lt;P&gt;stored in separate memory areas. Even if their data objects have the same names,&lt;/P&gt;&lt;P&gt;they are not shared.&lt;/P&gt;&lt;P&gt;Only function modules of the function groups can be called from the main program.&lt;/P&gt;&lt;P&gt;In turn, the function modules can access the other components &amp;amp;#150; particularly the&lt;/P&gt;&lt;P&gt;global data &amp;amp;#150; of the function groups. In other words, it is not possible to access the&lt;/P&gt;&lt;P&gt;function group's global data directly from the main program.&lt;/P&gt;&lt;P&gt;Encapsulation also incorporates the idea that the implementation of a service can be&lt;/P&gt;&lt;P&gt;hidden from the system's other components, so that these cannot and do not make&lt;/P&gt;&lt;P&gt;assumptions about the internal status of the modularization unit. This way, the design&lt;/P&gt;&lt;P&gt;of these other components is not dependent on a specific implementation of the other&lt;/P&gt;&lt;P&gt;modularization units.&lt;/P&gt;&lt;P&gt;Therefore, a function group is a unit of data and functions that manages this&lt;/P&gt;&lt;P&gt;data. Encapsulated access to data and services &amp;amp;#150; a concept of the object-oriented&lt;/P&gt;&lt;P&gt;programming model &amp;amp;#150; can therefore be supported in the procedural part of ABAP&lt;/P&gt;&lt;P&gt;Objects. This meant that BAPIs could be implemented as function modules and&lt;/P&gt;&lt;P&gt;Business Objects could be implemented as function groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The ABAP Objects Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The object-oriented concepts of ABAP Objects are essentially the same as those of&lt;/P&gt;&lt;P&gt;other modern object-oriented languages such as C++ or Java. A small number of&lt;/P&gt;&lt;P&gt;concepts that did not prove to be successful in these other languages were not included&lt;/P&gt;&lt;P&gt;in ABAP Objects. On the other hand, ABAP Objects also has helpful language&lt;/P&gt;&lt;P&gt;elements that C++ and Java do not offer.&lt;/P&gt;&lt;P&gt;Some specific features of ABAP Objects only exist because of the guaranteed upward&lt;/P&gt;&lt;P&gt;compatibility of older ABAP language elements.&lt;/P&gt;&lt;P&gt;Major differences in comparison to other object-oriented languages are in the&lt;/P&gt;&lt;P&gt;development environment. You can use the ABAP Workbench's entire range of&lt;/P&gt;&lt;P&gt;functions with ABAP Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ABAP Objects as a Compatible Extension of ABAP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Objects is not a new language, but has been designed as a systematic extension&lt;/P&gt;&lt;P&gt;of ABAP. All of the extensions, including the old procedural parts, are upwardly&lt;/P&gt;&lt;P&gt;compatible.&lt;/P&gt;&lt;P&gt;Type checks in the object-oriented contexts of ABAP Objects are stricter than those in&lt;/P&gt;&lt;P&gt;the procedural contexts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;object-oriented contexts. This means that obsolete statements lead to syntax errors.&lt;/P&gt;&lt;P&gt;However, it is also advisable to avoid obsolete statements in the purely procedural&lt;/P&gt;&lt;P&gt;environment, as this creates source texts that are safer and more flexible. Nevertheless,&lt;/P&gt;&lt;P&gt;as the language is upwardly compatible, it is not possible to entirely prevent the use&lt;/P&gt;&lt;P&gt;of such statements.&lt;/P&gt;&lt;P&gt;For a list of obsolete language elements, refer to the ABAP keyword documentation.&lt;/P&gt;&lt;P&gt;Every obsolete statement is also specifically noted as forbidden in the object-oriented&lt;/P&gt;&lt;P&gt;context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Client/Server Relationships Between Objects&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Objects behave like client/server systems. When one object sends a message to&lt;/P&gt;&lt;P&gt;another object, telling it to behave in a certain way, the first object can be seen as a&lt;/P&gt;&lt;P&gt;client and the other as a server.&lt;/P&gt;&lt;P&gt;To separate requests and deliveries of services, the following must be true:&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Theclient object must adhere to the server object's protocol.&lt;/P&gt;&lt;P&gt;&amp;amp;#149; The protocol must be clearly described so that a potential client can follow it&lt;/P&gt;&lt;P&gt;without any problems.&lt;/P&gt;&lt;P&gt;In principle, objects can perform both roles simultaneously; they can offer services to&lt;/P&gt;&lt;P&gt;other objects while requesting services at the same time.&lt;/P&gt;&lt;P&gt;In object-oriented programming, the services are distributed among the objects in&lt;/P&gt;&lt;P&gt;such a way as to avoid redundancies and so that each object offers exactly those&lt;/P&gt;&lt;P&gt;services that are within its area of responsibility. If an object needs any other services,&lt;/P&gt;&lt;P&gt;it requests these from other objects. This is known as the principle of delegation.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For example&lt;/STRONG&gt;, the common task &amp;amp;#147;data retrieval and output&amp;amp;#148; should be distributed over&lt;/P&gt;&lt;P&gt;at least two objects: one is responsible for data retrieval and one for output. As long&lt;/P&gt;&lt;P&gt;as the data retrieval object does not change its protocol, its internal implementation&lt;/P&gt;&lt;P&gt;can be altered without any necessary changes to the output object. Alternately, the&lt;/P&gt;&lt;P&gt;data retrieval object could be replaced by a different object, providing that the new&lt;/P&gt;&lt;P&gt;object uses the same protocol. These exchanges can also take place at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Additional Concepts of the Object-Oriented Programming Model&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;inheritance&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Inheritance defines the implementation relationships between classes. One class&lt;/P&gt;&lt;P&gt;(the subclass) adopts the structure and behavior of another class (superclass),&lt;/P&gt;&lt;P&gt;possibly also adapting or extending it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Polymorphism&lt;/STRONG&gt;Polymorphism is when instances of different classes respond differently to the&lt;/P&gt;&lt;P&gt;same messages.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Event control&lt;/STRONG&gt;Instead of sending messages directly to specific objects, objects can also trigger&lt;/P&gt;&lt;P&gt;events. Events can be triggered if it is not yet known at the time of development&lt;/P&gt;&lt;P&gt;if and how objects will react.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To summarize, the object-oriented programming model of ABAP Objects has the&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;following key characteristics:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Objects are a direct abstraction of the real world.&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Objects are units made up of data and the functions belonging to that data.&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Processes can be implemented realistically.&lt;/P&gt;&lt;P&gt;The model has the following advantages:&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Improved software structure and consistency in the development process&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Reduced maintenance effort and less susceptibility to errors&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Better integration of the customer/user into the analysis, design, and maintenance&lt;/P&gt;&lt;P&gt;processes&lt;/P&gt;&lt;P&gt;&amp;amp;#149; Options for extending the software are simpler and more secure&lt;/P&gt;&lt;P&gt;A standardized language is used in the various phases of software development&lt;/P&gt;&lt;P&gt;(analysis, specification, design, and implementation). Communication is much easier&lt;/P&gt;&lt;P&gt;when changing between phases.&lt;/P&gt;&lt;P&gt;In object-oriented programming, analysis and design decisions have an even greater&lt;/P&gt;&lt;P&gt;effect on implementation than they do in procedural programming. Therefore, you&lt;/P&gt;&lt;P&gt;should already structure and formally standardize the analysis and design phase. You&lt;/P&gt;&lt;P&gt;can use modeling languages to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 21:49:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tell-be-abap-objects/m-p/3342747#M801414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T21:49:35Z</dc:date>
    </item>
  </channel>
</rss>

