<?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: Problem with modifying dynamic internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352614#M1399111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudharsana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It is possible to use TRANSPORTING options with dynamic internal tables.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case1:&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;fs_itab&amp;gt; INDEX sy-tabix&lt;/P&gt;&lt;P&gt;                  FROM  &amp;lt;fs_wa&amp;gt;&lt;/P&gt;&lt;P&gt;                  TRANSPORTING  ('OV2')&lt;/P&gt;&lt;P&gt;                                               ('CF2').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You need to use brackets and quotes, if you know field name in advance.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;fs_itab&amp;gt; INDEX sy-tabix&lt;/P&gt;&lt;P&gt;                  FROM  &amp;lt;fs_wa&amp;gt;&lt;/P&gt;&lt;P&gt;                  TRANSPORTING  (w_column).    "assuming w_column is dynamically populated with the column name.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You need to use brackets, if you determine the fieldname at run time.&lt;/STRONG&gt;&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;Nisha Vengal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Nov 2009 07:44:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-30T07:44:22Z</dc:date>
    <item>
      <title>Problem with modifying dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352611#M1399108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im populating a dynamic internal table from the static internal table where the dynamic internal table has columns that repeats based on the selection criteria. Eg: static internal table columns - ov,cf,... dynamic internal table columns - ov1,cf1, ov2,cf2,...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While populating value to dynamic structure, im changing the column names ov1,ov2,cf1,cf2... to ov,cf,.. so that the corresponding fieldname will be recognized in the static internal table otherwise the 'assign component' statement fails because dynamic fieldname will not match exactly with static fieldname. Now the field-symbol pointing to the dynamic internal table is fetching the correct value but while modifying the internal table, its modifying all the rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say, the value for column ov1 = '1', ov2 = '2'. The structure captures these values one at a time, so it becomes ov1 = '0' and ov2 = '2'. and it wrongly modifies both the columns for a particular row and the value for ov1 becomes '0' instead of required value '1' when i need to modify only the column 'ov2'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use 'TRANSPORTING' functionality with the dynamic internal table for modifying the required column alone? Note: the no of rows in my alv output is fixed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 05:06:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352611#M1399108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T05:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with modifying dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352612#M1399109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm lost, maybe you can give an example here with both internal tables including some coding. It sounds like your pointer is not correct since it points to a whole internal table and not just a row (or even field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer your question: I don't know of way of using TRANSPORTING combined with ASSIGNING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 06:48:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352612#M1399109</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-11-30T06:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with modifying dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352613#M1399110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;After studying your problem I want to give some logic like below :&lt;/P&gt;&lt;P&gt;Suppose your static table say s_itab and your dynamic table say d_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols : &amp;lt;dyn_wa&amp;gt;, &amp;lt;FIELD1 &amp;gt; &amp;lt; FIELD2&amp;gt;, &amp;lt;key1&amp;gt;.&lt;/P&gt;&lt;P&gt;DATA : WA LIKE S_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA IT_LINE LIKE LINE OF &amp;lt;D_ITAB&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN IT_LINE-&amp;gt;* TO &amp;lt;DYN_WA&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT S_ITAB.&lt;/P&gt;&lt;P&gt;  move-corresponding S_ITAB TO &amp;lt;DYN_WA&amp;gt;.&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT 'KEY_CODE' OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;KEY1&amp;gt;. "uSE KEY FOR READ STATIC TABLE&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT FN1 OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;field1&amp;gt;. " WHERE FN1 = 'OV'&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT FN2 OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;field2&amp;gt;. " WHERE FN2 = 'OC' etc&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT FN3 OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;field3&amp;gt;.&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT FN4 OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;field4&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE S_ITAB WITH KEY KEY_CODE = &amp;lt;KEY1&amp;gt;  INTO WA.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  CLEAR WA.&lt;/P&gt;&lt;P&gt;  READ TABLE IT_TRANS WITH KEY KEY_CODE = &amp;lt;KEY1&amp;gt;  INTO WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;field1&amp;gt; = WA-PRODUCTION.&lt;/P&gt;&lt;P&gt;  &amp;lt;field2&amp;gt; = WA-LOCAL_SALE.&lt;/P&gt;&lt;P&gt;  &amp;lt;field3&amp;gt; = WA-EXPORT.&lt;/P&gt;&lt;P&gt;  &amp;lt;field4&amp;gt; = WA-LOCAL_SALE + WA-EXPORT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    MODIFY &amp;lt;D_ITAB&amp;gt; FROM &amp;lt;DYN_WA&amp;gt; INDEX CNT.  "tAKE A VARIABLE FOR INDEXING&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE THIS WILL RESOLVE YOUR PROBLEM.&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: CONTACTSANKU on Nov 30, 2009 1:10 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 07:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352613#M1399110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T07:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with modifying dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352614#M1399111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudharsana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It is possible to use TRANSPORTING options with dynamic internal tables.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case1:&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;fs_itab&amp;gt; INDEX sy-tabix&lt;/P&gt;&lt;P&gt;                  FROM  &amp;lt;fs_wa&amp;gt;&lt;/P&gt;&lt;P&gt;                  TRANSPORTING  ('OV2')&lt;/P&gt;&lt;P&gt;                                               ('CF2').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You need to use brackets and quotes, if you know field name in advance.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;fs_itab&amp;gt; INDEX sy-tabix&lt;/P&gt;&lt;P&gt;                  FROM  &amp;lt;fs_wa&amp;gt;&lt;/P&gt;&lt;P&gt;                  TRANSPORTING  (w_column).    "assuming w_column is dynamically populated with the column name.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You need to use brackets, if you determine the fieldname at run time.&lt;/STRONG&gt;&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;Nisha Vengal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 07:44:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-modifying-dynamic-internal-table/m-p/6352614#M1399111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T07:44:22Z</dc:date>
    </item>
  </channel>
</rss>

