<?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 dynamic assign in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assign/m-p/5178366#M1198808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;searched a long time, but didn't find anything. My problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I receive a table with following structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_struc-tabname&lt;/P&gt;&lt;P&gt;ls_struc-fieldname &lt;/P&gt;&lt;P&gt;ls_struc-value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, i need to save this value in given tab and field, e.g. the table consists this data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_struc-tabname = 'SFLIGHT'.&lt;/P&gt;&lt;P&gt;ls_struc-fieldname = 'CARRID'.&lt;/P&gt;&lt;P&gt;ls_struc-value = 'AA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_struc-tabname = 'SFLIGHT'.&lt;/P&gt;&lt;P&gt;ls_struc-fieldname = 'CONNID'.&lt;/P&gt;&lt;P&gt;ls_struc-value = '1234'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this data i have to fill the structure ls_sflight (type sflight) (table name is known, only field/value can be different/change):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_sflight-carrid = 'AA'.&lt;/P&gt;&lt;P&gt;ls_sflight-connid = '1234'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get this data in this structure? Tried it with field symbols, but can't define the field dynamically&lt;/P&gt;&lt;P&gt;assign value of structure ls_struc to &amp;lt;fs_sflight&amp;gt;-[ls_struc-fieldname] ??? something like this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Feb 2009 14:52:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-20T14:52:25Z</dc:date>
    <item>
      <title>dynamic assign</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assign/m-p/5178366#M1198808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;searched a long time, but didn't find anything. My problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I receive a table with following structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_struc-tabname&lt;/P&gt;&lt;P&gt;ls_struc-fieldname &lt;/P&gt;&lt;P&gt;ls_struc-value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, i need to save this value in given tab and field, e.g. the table consists this data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_struc-tabname = 'SFLIGHT'.&lt;/P&gt;&lt;P&gt;ls_struc-fieldname = 'CARRID'.&lt;/P&gt;&lt;P&gt;ls_struc-value = 'AA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_struc-tabname = 'SFLIGHT'.&lt;/P&gt;&lt;P&gt;ls_struc-fieldname = 'CONNID'.&lt;/P&gt;&lt;P&gt;ls_struc-value = '1234'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this data i have to fill the structure ls_sflight (type sflight) (table name is known, only field/value can be different/change):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_sflight-carrid = 'AA'.&lt;/P&gt;&lt;P&gt;ls_sflight-connid = '1234'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get this data in this structure? Tried it with field symbols, but can't define the field dynamically&lt;/P&gt;&lt;P&gt;assign value of structure ls_struc to &amp;lt;fs_sflight&amp;gt;-[ls_struc-fieldname] ??? something like this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 14:52:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assign/m-p/5178366#M1198808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-20T14:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic assign</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assign/m-p/5178367#M1198809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christopher&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: ls_sflight type sflight,
        field(50) type c.

field-symbols &amp;lt;fs&amp;gt; type any.
 
concatenate 'LS_SFLIGHT-' ls_struc-fieldname into field.
condense field.

assing (field) to &amp;lt;fs&amp;gt;.
&amp;lt;fs&amp;gt; = ls_struc-value.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 15:27:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assign/m-p/5178367#M1198809</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-02-20T15:27:32Z</dc:date>
    </item>
  </channel>
</rss>

