<?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: populating base structure from persistent object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017924#M960029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't believe that a method that will return all fields will be generated for you.  If you want something like that, you can create your own custom method in the class that will just call the necessary GET methods for you and return the values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2008 01:54:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-12T01:54:23Z</dc:date>
    <item>
      <title>populating base structure from persistent object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017921#M960026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say I create a peristent class, ZCL_PWIDGET.&lt;/P&gt;&lt;P&gt;ZCA_PWIDGET and ZCB_PWIDGET are created on my behalf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I map data in all the fields from table ZWIDGET .&lt;/P&gt;&lt;P&gt;ZWIDGET has 1 Key field, KEY1, and five data fields, C1-C5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I can retrieve data from the tables and create a runtime instance of my class using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:  this_widget TYPE REF TO zcl_pwidget.
this_widget=&amp;gt;agent-&amp;gt;get_persistent( I_KEY1= '1234' ). 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone tell me how to populate wa_widget ( I think I can use a map attributes call, but I don't quite understand how).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data : wa_widget type zwidget.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;...Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 21:25:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017921#M960026</guid>
      <dc:creator>mike_mcinerney</dc:creator>
      <dc:date>2008-06-10T21:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: populating base structure from persistent object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017922#M960027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your persistence class you must have the SET_ and GET_ methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use GET_C1 method to get the value of the field C1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;P&gt;wa_widget-c1 = this_widget=&amp;gt;agent-&amp;gt;get_c1( ).&lt;/P&gt;&lt;P&gt;&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>Tue, 10 Jun 2008 21:49:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017922#M960027</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-06-10T21:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: populating base structure from persistent object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017923#M960028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but I'm looking for a way to populate wa_widget in one fell swoop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to populate all (or most) of the fields of wa_widget at one time, like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
wa_widget = this_widget-&amp;gt;get_ALL_fields_from_persistent_mapping
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do folks do this in practice ?&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>Wed, 11 Jun 2008 12:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017923#M960028</guid>
      <dc:creator>mike_mcinerney</dc:creator>
      <dc:date>2008-06-11T12:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: populating base structure from persistent object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017924#M960029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't believe that a method that will return all fields will be generated for you.  If you want something like that, you can create your own custom method in the class that will just call the necessary GET methods for you and return the values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 01:54:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-base-structure-from-persistent-object/m-p/4017924#M960029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T01:54:23Z</dc:date>
    </item>
  </channel>
</rss>

