<?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 Assign Component with dynamic structure. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-component-with-dynamic-structure/m-p/6675981#M1448786</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;I like to get a field from a structure which i read from a customizing table. I think with a snippet it is easy to understand:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS:  &amp;lt;fs_value&amp;gt;         TYPE  Any.&lt;/P&gt;&lt;P&gt; DATA: lv_field type text30,&lt;/P&gt;&lt;P&gt;       lv_structure type  but000,&lt;/P&gt;&lt;P&gt;       lv_Structure_name type text30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single *&lt;/P&gt;&lt;P&gt;  into lv_structure&lt;/P&gt;&lt;P&gt;  from but000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_field = 'PARTNER'.&lt;/P&gt;&lt;P&gt;lv_Structure_name = 'LV_STRUCTURE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT lv_field OF STRUCTURE lv_Structure_name TO &amp;lt;fs_value&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this doesn't wok, because it seems, that this statement try to get the fieldname from the variable 'lv_Structure_name'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i replace lv_Structure_name with lv_Structure than it works, but this is not what I like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Mar 2010 11:43:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-03T11:43:52Z</dc:date>
    <item>
      <title>Assign Component with dynamic structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-component-with-dynamic-structure/m-p/6675981#M1448786</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;I like to get a field from a structure which i read from a customizing table. I think with a snippet it is easy to understand:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS:  &amp;lt;fs_value&amp;gt;         TYPE  Any.&lt;/P&gt;&lt;P&gt; DATA: lv_field type text30,&lt;/P&gt;&lt;P&gt;       lv_structure type  but000,&lt;/P&gt;&lt;P&gt;       lv_Structure_name type text30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single *&lt;/P&gt;&lt;P&gt;  into lv_structure&lt;/P&gt;&lt;P&gt;  from but000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_field = 'PARTNER'.&lt;/P&gt;&lt;P&gt;lv_Structure_name = 'LV_STRUCTURE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT lv_field OF STRUCTURE lv_Structure_name TO &amp;lt;fs_value&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this doesn't wok, because it seems, that this statement try to get the fieldname from the variable 'lv_Structure_name'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i replace lv_Structure_name with lv_Structure than it works, but this is not what I like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 11:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-component-with-dynamic-structure/m-p/6675981#M1448786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Component with dynamic structure.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-component-with-dynamic-structure/m-p/6675982#M1448787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;with a little addition of a second fs:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;fs_value&amp;gt; TYPE ANY.
FIELD-SYMBOLS: &amp;lt;fs_struc&amp;gt; TYPE ANY.
DATA: lv_field TYPE text30,
lv_structure TYPE but000,
lv_structure_name TYPE text30.

SELECT SINGLE *
INTO lv_structure
FROM but000.

lv_field = 'PARTNER'.
lv_structure_name = 'LV_STRUCTURE'.
ASSIGN (lv_structure_name) TO &amp;lt;fs_struc&amp;gt;.
ASSIGN COMPONENT lv_field OF STRUCTURE &amp;lt;fs_struc&amp;gt; TO &amp;lt;fs_value&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Jörg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 11:54:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-component-with-dynamic-structure/m-p/6675982#M1448787</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2010-03-03T11:54:26Z</dc:date>
    </item>
  </channel>
</rss>

