<?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: Modify Fieldsymbol Table from Work Area in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553969#M1563721</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your syntax is fine, but you may miss one stuff. As per my understanding you want to update the dynamic &lt;STRONG&gt;internal table&lt;/STRONG&gt;  &amp;lt;gfs_tabtable&amp;gt; with work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want update an internal table with in the loop then you no need to specify &lt;STRONG&gt;index or where clause.&lt;/STRONG&gt; But seems you try to update outside loop. Then you need to add index or where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For details just F1 help of &lt;STRONG&gt;Modify&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jan 2011 22:16:25 GMT</pubDate>
    <dc:creator>Subhankar</dc:creator>
    <dc:date>2011-01-13T22:16:25Z</dc:date>
    <item>
      <title>Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553963#M1563715</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 have seen the following append statement work perfectly, at runtime &amp;lt;gfs_tabtable&amp;gt; is assigned to be a type of SFLIGHT -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;gfs_tabtable&amp;gt;        TYPE STANDARD TABLE.
APPEND wa_sflight TO &amp;lt;gfs_tabtable&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to achieve the following but it does not seem to work (sy-subrc = 4), could you tell me where am I going wrong -&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;gfs_tabtable&amp;gt;        TYPE STANDARD TABLE.
MODIFY &amp;lt;gfs_tabtable&amp;gt; FROM  wa_sflight&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 18:57:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553963#M1563715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-13T18:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553964#M1563716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;gfs_tabtable&amp;gt;        TYPE STANDARD TABLE.
* ASSIGN GT_SFLIGHT TO &amp;lt;gfs_tabtable&amp;gt;.
APPEND wa_sflight TO &amp;lt;gfs_tabtable&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use field-symbols only if they are assigned to an existing data object.  A field-symbol represents the data that it is assigned to. You can check the condition IS ASSIGNED to mal sure you can use the field-symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY &amp;lt;gfs_tabtable&amp;gt; FROM  wa_sflight&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there was an &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN gt_sflight to &amp;lt;gfs_tabtable&amp;gt; .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and if gt_sflight is a table of SFLIGHT rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check [field-symbol documentation|http://help.sap.com/abapdocu_702/en/index.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 19:38:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553964#M1563716</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-01-13T19:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553965#M1563717</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;The system searches the internal table for the line whose table key corresponds to the key fields in wa, if no line is found, the sy-subrc is 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Paulo Carvalho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 19:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553965#M1563717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-13T19:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553966#M1563718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the statement  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY &amp;lt;gfs_tabtable&amp;gt; FROM  wa_sflight&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is valid, I suspect that the following is the issue according to the SAP Help for Modify:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return code of 0  -&amp;gt;    At least one line was changed. &lt;/P&gt;&lt;P&gt;retrun code 0f 4  -&amp;gt;    No lines were changed, since no suitable line was found for the insertion using the table key, or the &lt;/P&gt;&lt;P&gt;                                   specified index was greater than the current number of lines for the insertion using the table index. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 20:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553966#M1563718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-13T20:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553967#M1563719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Grame&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Assuming that everything else is fine(assigning and populating data to the field-symbol(table) and the work area), I would also&lt;/P&gt;&lt;P&gt;expect to see the keyword TABLE after MODIFY.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE &amp;lt;gfs_tabtable&amp;gt; FROM  wa_sflight.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 21:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553967#M1563719</guid>
      <dc:creator>rajesh_paruchuru</dc:creator>
      <dc:date>2011-01-13T21:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553968#M1563720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field symbol table is populated correctly and the assignments are also correct as far as I see from the debug screen. I have used the       &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE &amp;lt;gfs_tabtable&amp;gt; FROM wa_sflight&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; but it still returns a sy-subrc 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I declare a field symbol work area &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;gfs_tabtableline&amp;gt;    TYPE ANY&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; and try to use the modify statement ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553968#M1563720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-13T22:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553969#M1563721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your syntax is fine, but you may miss one stuff. As per my understanding you want to update the dynamic &lt;STRONG&gt;internal table&lt;/STRONG&gt;  &amp;lt;gfs_tabtable&amp;gt; with work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want update an internal table with in the loop then you no need to specify &lt;STRONG&gt;index or where clause.&lt;/STRONG&gt; But seems you try to update outside loop. Then you need to add index or where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For details just F1 help of &lt;STRONG&gt;Modify&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:16:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553969#M1563721</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2011-01-13T22:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Fieldsymbol Table from Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553970#M1563722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just did the same. &lt;/P&gt;&lt;P&gt;You are right, looks like the row number is mandatory to modify a dynamic internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT &amp;lt;gfs_tabtable&amp;gt; ASSIGNING &amp;lt;gfs_tabtableline&amp;gt;.
        ASSIGN COMPONENT 'FIELD1' OF STRUCTURE &amp;lt;gfs_tabtableline&amp;gt; TO &amp;lt;lcl_id&amp;gt;.
        IF &amp;lt;lcl_id&amp;gt; = wa_sflight-field1.
          MODIFY &amp;lt;gfs_tabtable&amp;gt; FROM wa_sflight INDEX sy-tabix.
        ENDIF.
      ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-fieldsymbol-table-from-work-area/m-p/7553970#M1563722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-13T22:26:31Z</dc:date>
    </item>
  </channel>
</rss>

