<?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: Class Inheritance? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369552#M808762</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;While creating a new class you can find a button for 'Create Inheritance' at the right corner against the class name. Here you can input the super class name for inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subathra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2008 09:35:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-06T09:35:48Z</dc:date>
    <item>
      <title>Class Inheritance?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369547#M808757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I've created one class via SE24. Now I have a second class. This - second class - have to have an inheritance from first class. Where can I input it in SE24?&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:14:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369547#M808757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T09:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Class Inheritance?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369548#M808758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you create class there is a popup dialog.&lt;/P&gt;&lt;P&gt;Next to class name there is a button with inheritance symbol (triangle)&lt;/P&gt;&lt;P&gt;When you press it field for super class will appear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:30:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369548#M808758</guid>
      <dc:creator>former_member182670</dc:creator>
      <dc:date>2008-02-06T09:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Class Inheritance?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369549#M808759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,  &lt;/P&gt;&lt;P&gt;Please go through  this example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Example :&lt;/P&gt;&lt;P&gt;REPORT demo_inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS: set IMPORTING value(set_value) TYPE i,&lt;/P&gt;&lt;P&gt;increment,&lt;/P&gt;&lt;P&gt;get EXPORTING value(get_value) TYPE i.&lt;/P&gt;&lt;P&gt;PROTECTED SECTION . &lt;/P&gt;&lt;P&gt;DATA count TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD set.&lt;/P&gt;&lt;P&gt;count = set_value.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD increment.&lt;/P&gt;&lt;P&gt;ADD 1 TO count.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD get.&lt;/P&gt;&lt;P&gt;get_value = count.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter_ten DEFINITION INHERITING FROM counter. &lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS increment REDEFINITION . &lt;/P&gt;&lt;P&gt;DATA count_ten.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter_ten IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD increment.&lt;/P&gt;&lt;P&gt;DATA modulo TYPE I.&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;increment . &lt;/P&gt;&lt;P&gt;write / count.&lt;/P&gt;&lt;P&gt;modulo = count mod 10.&lt;/P&gt;&lt;P&gt;IF modulo = 0.&lt;/P&gt;&lt;P&gt;count_ten = count_ten + 1.&lt;/P&gt;&lt;P&gt;write count_ten.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: count TYPE REF TO counter,&lt;/P&gt;&lt;P&gt;number TYPE i VALUE 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT count TYPE counter_ten .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD count-&amp;gt;set EXPORTING set_value = number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 20 TIMES.&lt;/P&gt;&lt;P&gt;CALL METHOD count-&amp;gt;increment.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;persistance class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a way to avoid building a fully object-oriented program while still working with non-object-oriented relational database. The object services layer now provides a persistence framework that closes the object-relational gap. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You no longer need to write SQL code as objects are transparently loaded from the database when needed. You must create a persistent class. Choose transaction SE24 and create a persistent class; this class must be protected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;steps : &lt;/P&gt;&lt;P&gt;Go to se 24 - choose persistence class &lt;/P&gt;&lt;P&gt;it will be always protected class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next screen will give u the persistence button when u click on that it will ask u to &lt;/P&gt;&lt;P&gt;add the table or struture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now u can see two division of the screen where bottom portion of the screen will list uall the fields available and u need to double click and map to the top portion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save the persistence class and hit back button..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever u create persistence class zcl_example_persist - it will create two classes - zca_example_persist&lt;/P&gt;&lt;P&gt;and zcb_example_persist automatically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where zca_example_persist is the agent class and zcb_example_persist is base agent class..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save and activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activate the whole class. Now that we have a persistent object to access the database table SFLIGHT, we must access it in a program. Here is a small example to read/write data into SFLIGHT using persistent objects. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZPERSISTENCECLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : l_flight type ref to zcl_persist.&lt;/P&gt;&lt;P&gt;data : l_flight_agent type ref to zca_persist.&lt;/P&gt;&lt;P&gt;data : l_seatsfree type i.&lt;/P&gt;&lt;P&gt;data : l_seatsocc type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_flight_agent = zca_persist=&amp;gt;agent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH CX_OS_OBJECT_NOT_FOUND . &lt;/P&gt;&lt;P&gt;*ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD L_FLIGHT_AGENT-&amp;gt;GET_PERSISTENT&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;I_CARRID = 'LH'&lt;/P&gt;&lt;P&gt;I_CONNID = '0400'&lt;/P&gt;&lt;P&gt;I_FLDATE = '20060701'&lt;/P&gt;&lt;P&gt;RECEIVING&lt;/P&gt;&lt;P&gt;RESULT = l_flight&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH CX_OS_OBJECT_NOT_FOUND . &lt;/P&gt;&lt;P&gt;*ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_seatsfree = L_FLIGHT-&amp;gt;GET_SEATSMAX( ) - L_FLIGHT-&amp;gt;GET_SEATSOCC( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_seatsfree &amp;gt; 0.&lt;/P&gt;&lt;P&gt;l_seatsfree = L_FLIGHT-&amp;gt;GET_SEATSOCC( ) + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_flight-&amp;gt;set_seatsocc( l_seatsfree ).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward Points if found helpfull..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cheers,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chandra Sekhar.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369549#M808759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T09:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Class Inheritance?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369550#M808760</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;While creating the 1st class, we have to UBCHECK the FINAL check box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is checked, we cant inherit from this class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:34:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369550#M808760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T09:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Class Inheritance?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369551#M808761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.goto se24&lt;/P&gt;&lt;P&gt;2. Specify a class name and create&lt;/P&gt;&lt;P&gt;3. specify the object type as CLASS&lt;/P&gt;&lt;P&gt;4. now on the rt side of your class there is triangle button.clickon that &lt;/P&gt;&lt;P&gt;5. as soon as u click on that it will ask for a superclass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this how u can do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward pts if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369551#M808761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T09:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Class Inheritance?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369552#M808762</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;While creating a new class you can find a button for 'Create Inheritance' at the right corner against the class name. Here you can input the super class name for inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subathra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:35:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369552#M808762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T09:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Class Inheritance?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369553#M808763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first create class1 after that u create class2 and go to the properties tab of the class2 there u find three buttons subclass,super class and undo inheritance. here u select super class button. when ever u select SUPER CALSS button then automatically one text box appears there u enter the class1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the way we can set the super class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:42:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-inheritance/m-p/3369553#M808763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T09:42:14Z</dc:date>
    </item>
  </channel>
</rss>

