<?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: Create DATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data/m-p/4020259#M960629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Rose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Doesn't it consider that I declared &amp;lt;l_fs_po&amp;gt; as of type ANY?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes it does, this is why you get the error message. The exact structure of &amp;lt;l_fs_po&amp;gt; will only be known at runtime and NOT at compiler time. So this &amp;lt;l_fs_po&amp;gt;-fieldname1 = 'valuehere'. have no chance to wrok, you have to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'field' OF STRUCTURE &amp;lt;l_fs_po&amp;gt; TO &amp;lt;field_symbol&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2008 07:43:30 GMT</pubDate>
    <dc:creator>JozsefSzikszai</dc:creator>
    <dc:date>2008-06-23T07:43:30Z</dc:date>
    <item>
      <title>Create DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data/m-p/4020258#M960628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a similar code as this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:  dref TYPE REF TO data.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;l_fs_po&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE i_datasource.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'case1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CREATE DATA dref TYPE struct_1.&lt;/P&gt;&lt;P&gt;      ASSIGN dref-&amp;gt;* TO &amp;lt;l_fs_po&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     WHEN 'case2'.&lt;/P&gt;&lt;P&gt;      CREATE DATA dref TYPE struct_1.&lt;/P&gt;&lt;P&gt;      ASSIGN dref-&amp;gt;* TO &amp;lt;l_fs_po&amp;gt;.&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;     ' more cases here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;  &amp;lt;l_fs_po&amp;gt;-fieldname1 = 'valuehere'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a compilation error message that &amp;lt;l_fs_po&amp;gt; has no structure and therefore does not have &lt;/P&gt;&lt;P&gt;a component fieldname1.  Doesn't it consider that I declared &amp;lt;l_fs_po&amp;gt; as of type ANY?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;did I miss anything here?  or is there another alternative so I could change my code and achieve&lt;/P&gt;&lt;P&gt;the same objective.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My objective is to assign the structure at runtime to a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 07:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data/m-p/4020258#M960628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T07:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data/m-p/4020259#M960629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Rose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Doesn't it consider that I declared &amp;lt;l_fs_po&amp;gt; as of type ANY?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes it does, this is why you get the error message. The exact structure of &amp;lt;l_fs_po&amp;gt; will only be known at runtime and NOT at compiler time. So this &amp;lt;l_fs_po&amp;gt;-fieldname1 = 'valuehere'. have no chance to wrok, you have to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'field' OF STRUCTURE &amp;lt;l_fs_po&amp;gt; TO &amp;lt;field_symbol&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 07:43:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data/m-p/4020259#M960629</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-06-23T07:43:30Z</dc:date>
    </item>
  </channel>
</rss>

