<?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 Persistent Objects and Inheritance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/persistent-objects-and-inheritance/m-p/4358099#M1037521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question about peristent objects and inheritance. &lt;/P&gt;&lt;P&gt;I've watered down an example.&lt;/P&gt;&lt;P&gt;Lets say I have  two tables for doc headers and their line items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HEADERS&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Client		Key	MANDT		MANDT	CLNT
DocNumber	Key	DOC		BELNR_D	CHAR
HeaderText		DTEXT		BKTXT	CHAR
DocDate			DDATE		BLDAT	DATS
User Name		DOWNER		USNAM	CHAR
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE ITEMS&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Client		Key	MANDT		MANDT	CLNT
DocNumber	Key	DOC		BELNR_D	CHAR
LineItem	Key	LINEITEM	BUZEI	NUMC
Date			IDATE		DATUM	DATS
ItemText		ITEXT		SGTXT	CHAR
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create theses as persistent objects, and I want the detail object to inherit from the header object so that I can call doc related methods from the line item object.   &lt;/P&gt;&lt;P&gt;Is this doable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intuitively, I tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create ZCL_HEADER  as persistent (with actor and base class)&lt;/P&gt;&lt;P&gt;Do the Peristence Mapping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create ZCL_DETAIL as persistent (with actor and base class)&lt;/P&gt;&lt;P&gt;Set SUperclass&lt;/P&gt;&lt;P&gt;Do the persistence mapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an easy way to do this?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Aug 2008 19:21:52 GMT</pubDate>
    <dc:creator>mike_mcinerney</dc:creator>
    <dc:date>2008-08-25T19:21:52Z</dc:date>
    <item>
      <title>Persistent Objects and Inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/persistent-objects-and-inheritance/m-p/4358099#M1037521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question about peristent objects and inheritance. &lt;/P&gt;&lt;P&gt;I've watered down an example.&lt;/P&gt;&lt;P&gt;Lets say I have  two tables for doc headers and their line items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HEADERS&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Client		Key	MANDT		MANDT	CLNT
DocNumber	Key	DOC		BELNR_D	CHAR
HeaderText		DTEXT		BKTXT	CHAR
DocDate			DDATE		BLDAT	DATS
User Name		DOWNER		USNAM	CHAR
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE ITEMS&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Client		Key	MANDT		MANDT	CLNT
DocNumber	Key	DOC		BELNR_D	CHAR
LineItem	Key	LINEITEM	BUZEI	NUMC
Date			IDATE		DATUM	DATS
ItemText		ITEXT		SGTXT	CHAR
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create theses as persistent objects, and I want the detail object to inherit from the header object so that I can call doc related methods from the line item object.   &lt;/P&gt;&lt;P&gt;Is this doable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intuitively, I tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create ZCL_HEADER  as persistent (with actor and base class)&lt;/P&gt;&lt;P&gt;Do the Peristence Mapping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create ZCL_DETAIL as persistent (with actor and base class)&lt;/P&gt;&lt;P&gt;Set SUperclass&lt;/P&gt;&lt;P&gt;Do the persistence mapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an easy way to do this?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 19:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/persistent-objects-and-inheritance/m-p/4358099#M1037521</guid>
      <dc:creator>mike_mcinerney</dc:creator>
      <dc:date>2008-08-25T19:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent Objects and Inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/persistent-objects-and-inheritance/m-p/4358100#M1037522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think the approch, you have taken, will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can Create presistence classes for both the tables individually.&lt;/P&gt;&lt;P&gt;Now, create a wrapper class which can take care of all the GET and SET methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like in your wrapper class, you have methods like INSERT_DATA, READ_DATA. Both the methods will have the Header and ITEM tables as the parameters. In the method implementation, you can call the GET and SET methods from the both persisitence class to insert or retrieve data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 19:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/persistent-objects-and-inheritance/m-p/4358100#M1037522</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-25T19:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent Objects and Inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/persistent-objects-and-inheritance/m-p/4358101#M1037523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;withdrawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 20:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/persistent-objects-and-inheritance/m-p/4358101#M1037523</guid>
      <dc:creator>mike_mcinerney</dc:creator>
      <dc:date>2008-12-16T20:52:26Z</dc:date>
    </item>
  </channel>
</rss>

