<?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: write statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190410#M128392</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;This code is working fine for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;         x like mara-aenam,&lt;/P&gt;&lt;P&gt;      end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;        y like mara-aenam,&lt;/P&gt;&lt;P&gt;      end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*some where in the code i'm writing like this:&lt;/P&gt;&lt;P&gt;itab2-y = 'govind'.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2.&lt;/P&gt;&lt;P&gt; write itab2-y to itab1-x.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;clear itab1.&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;loop at itab1.&lt;/P&gt;&lt;P&gt;write itab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to change your code like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jan 2006 17:03:52 GMT</pubDate>
    <dc:creator>govind_seenivasan</dc:creator>
    <dc:date>2006-01-30T17:03:52Z</dc:date>
    <item>
      <title>write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190406#M128388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;I have a problem here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In one report, for example the scenario is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 occurs 0,&lt;/P&gt;&lt;P&gt;       x like mara-aenam,&lt;/P&gt;&lt;P&gt;      end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab2 occurs 0,&lt;/P&gt;&lt;P&gt;       y like mara-aenam,&lt;/P&gt;&lt;P&gt;      end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some where in the code i'm writing like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write itab2-y to itab1-x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i debug the code, i could see the values for &amp;lt;b&amp;gt;itab2-y&amp;lt;/b&amp;gt;, but not for the &amp;lt;b&amp;gt;itab1-x&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please tell me why it is happening like that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 16:56:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190406#M128388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T16:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190407#M128389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be there is a clear statement for &amp;lt;b&amp;gt;itab1&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and UR not appending itab1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 16:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190407#M128389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T16:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190408#M128390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will have to paste all of the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190408#M128390</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-01-30T17:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190409#M128391</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;In the Debug mode go to tables and enter the name of the itab to view its value instead of typing the values in the fields column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or the header might not be appended into the itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190409#M128391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T17:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190410#M128392</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;This code is working fine for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;         x like mara-aenam,&lt;/P&gt;&lt;P&gt;      end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;        y like mara-aenam,&lt;/P&gt;&lt;P&gt;      end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*some where in the code i'm writing like this:&lt;/P&gt;&lt;P&gt;itab2-y = 'govind'.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2.&lt;/P&gt;&lt;P&gt; write itab2-y to itab1-x.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;clear itab1.&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;loop at itab1.&lt;/P&gt;&lt;P&gt;write itab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to change your code like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190410#M128392</guid>
      <dc:creator>govind_seenivasan</dc:creator>
      <dc:date>2006-01-30T17:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190411#M128393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dev, &lt;/P&gt;&lt;P&gt;U need to check 2 things here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Are you populating the itab2 before writing it to itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 . Does the Scope of the program allow the data to be written to another table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its better that u can provide the code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mustameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190411#M128393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T17:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190412#M128394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dev,&lt;/P&gt;&lt;P&gt;  When you are moving values to another internal table you should append.&lt;/P&gt;&lt;P&gt; so use append itab1 after you move the value from itab2-y.&lt;/P&gt;&lt;P&gt; Also see that you are not clearing the internal table itab1 in your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190412#M128394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T17:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190413#M128395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;thanks for the reply.&lt;/P&gt;&lt;P&gt;but it is still not showing up the values.&lt;/P&gt;&lt;P&gt;is there anything other could be wrong with that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190413#M128395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T17:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190414#M128396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190414#M128396</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-01-30T17:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190415#M128397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dev,&lt;/P&gt;&lt;P&gt; Can you post the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:16:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190415#M128397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T17:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190416#M128398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;friends,&lt;/P&gt;&lt;P&gt;the code is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 occurs 0,&lt;/P&gt;&lt;P&gt;          matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;          appl  like a505-kappl,&lt;/P&gt;&lt;P&gt;          ..................&lt;/P&gt;&lt;P&gt;          ..................&lt;/P&gt;&lt;P&gt;      end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab2 occurs 0,&lt;/P&gt;&lt;P&gt;         appl like a505-kappl,&lt;/P&gt;&lt;P&gt;         ...................&lt;/P&gt;&lt;P&gt;         ...................&lt;/P&gt;&lt;P&gt;      end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here ther is a form to select the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr from mara into corresponding fields of table itab1 where mtart = 'FERT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select b~kappl into itab2-appl &lt;/P&gt;&lt;P&gt;      from a505 as b&lt;/P&gt;&lt;P&gt;   inner join mara as a &lt;/P&gt;&lt;P&gt;         on b&lt;SUB&gt;matnr = a&lt;/SUB&gt;matnr.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write itab2-appl to itab1-appl.&lt;/P&gt;&lt;P&gt;modify itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 17:28:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190416#M128398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T17:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190417#M128399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there anything to be deleted/added to that code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz let me know..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks much..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 18:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190417#M128399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T18:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190418#M128400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think all you need to do is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: mara, a505.

DATA: BEGIN OF itab1 OCCURS 0,
        matnr LIKE mara-matnr,
        appl LIKE a505-kappl,
      END OF itab1.

DATA: BEGIN OF itab2 OCCURS 0,
        matnr LIKE mara-matnr,
        appl LIKE mseg-kappl,
      END OF itab2.

SELECT matnr mblnr
  INTO CORRESPONDING FIELDS OF TABLE itab2
  FROM mseg
    JOIN mara
ON mseg~matnr = mara~matnr.

* Then if you still need to
itab1[] = itab2[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not entirely sure what you are trying to do. I tried to simplify what I think you are trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table A505 doesn't exist in our system, so this code hasn't even passed a syntax check. You'll have to test it thoroughly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 19:23:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190418#M128400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T19:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190419#M128401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the modify statement, you need to tell which record you are trying to modify either implied(if done in a loop) or using the where condition or index option. I don't see any of them here. I think what you are looking for is something like this&lt;/P&gt;&lt;P&gt;loop at itab2.&lt;/P&gt;&lt;P&gt;write itab2-appl to itab1-appl.&lt;/P&gt;&lt;P&gt;modify itab1 transporting appl where matnr = itab2-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is no link between itab2 and itab1, then I don't think this is possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 19:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190419#M128401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T19:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190420#M128402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks srinivas,&lt;/P&gt;&lt;P&gt;my only concern is i'm not getting the values for itab1.&lt;/P&gt;&lt;P&gt;where as i could see the value for itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz tell me whether i'm doing it in the right way or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 19:51:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190420#M128402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T19:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190421#M128403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is your code(actually it will help if you can post your entire FORM code here).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
form get_data.

select matnr from mara &amp;lt;u&amp;gt;into corresponding fields of table itab1&amp;lt;/u&amp;gt; where mtart = 'FERT'.

&amp;lt;u&amp;gt;append itab1&amp;lt;/u&amp;gt;.

select b~kappl into itab2-appl 
from a505 as b
inner join mara as a 
on b~matnr = a~matnr.
append itab2.
endselect.

write itab2-appl to itab1-appl.
modify itab1.

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the underlined code. If you are using "into table" option, then you don't need the "append itab1". Also, when you do a "into corresponding fields", you should have fields with the same name in your select field list and your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 19:59:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190421#M128403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T19:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190422#M128404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as not seeing any values in itab1 is concerned, I don't see anything wrong with your select statement for itab1. Do you actually have FERT material type materials in your system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 20:02:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190422#M128404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T20:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190423#M128405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srinivas,&lt;/P&gt;&lt;P&gt;I have 2 internal tables: &lt;/P&gt;&lt;P&gt;MATERIAL_DATA.&lt;/P&gt;&lt;P&gt;I_MATERIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following is the code i have written in FORM.&lt;/P&gt;&lt;P&gt;Plz have a look on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_awp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select matnr from mara into corresponding fields of table material_data&lt;/P&gt;&lt;P&gt;              where mtart = 'FERT' or mtart = 'HAWA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        append material_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select c~kbetr into i_material-rate&lt;/P&gt;&lt;P&gt;           from konp as c&lt;/P&gt;&lt;P&gt;          inner join a505 as b&lt;/P&gt;&lt;P&gt;                on c&lt;SUB&gt;knumh = b&lt;/SUB&gt;knumh&lt;/P&gt;&lt;P&gt;          inner join mara as a&lt;/P&gt;&lt;P&gt;                on b&lt;SUB&gt;matnr = a&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;          for all entries IN material_data&lt;/P&gt;&lt;P&gt;              where a~matnr = material_data-matnr&lt;/P&gt;&lt;P&gt;                and b~kappl = 'V'&lt;/P&gt;&lt;P&gt;                and b~kschl = 'ZR10'&lt;/P&gt;&lt;P&gt;                and b~vkorg = '1000'&lt;/P&gt;&lt;P&gt;                and b~pltyp = '01'&lt;/P&gt;&lt;P&gt;                and b~datbi &amp;gt; sy-datum&lt;/P&gt;&lt;P&gt;                and b~datab &amp;lt; sy-datum.&lt;/P&gt;&lt;P&gt;         append i_material.&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;    loop at i_material.&lt;/P&gt;&lt;P&gt;        write i_material-rate to material_data-awp.&lt;/P&gt;&lt;P&gt;        modify material_data transporting awp.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;endform.                               "get_awp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 20:07:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190423#M128405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T20:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190424#M128406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt; 
form get_awp.

  select matnr from mara 
               into corresponding fields of table material_data
              where mtart = 'FERT'  
                 or mtart = 'HAWA'.

* append material_data. &amp;lt;-- You don't need this

  select b~matnr &amp;lt;-- you have to add this
         c~kbetr into ( i_material-matnr, i_material-rate )
                 from konp as c
           inner join a505 as b
                   on c~knumh = b~knumh
           inner join mara as a
                   on b~matnr = a~matnr
   for all entries IN material_data
                where a~matnr = material_data-matnr
                  and b~kappl = 'V'
                  and b~kschl = 'ZR10'
                  and b~vkorg = '1000'
                  and b~pltyp = '01'
                  and b~datbi &amp;gt; sy-datum
                  and b~datab &amp;lt; sy-datum.
    append i_material.
  endselect.
  loop at i_material.
    write i_material-rate to material_data-awp.
    modify material_data transporting awp 
     where matnr = i_material-matnr.
  endloop.
endform. "get_awp&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are doing the modify of material_data inside the loop of i_material. But you are not specifying which record of material_data you want to modify. That is why it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 20:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190424#M128406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T20:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190425#M128407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you very much Srinivas,&lt;/P&gt;&lt;P&gt;Now I could see the values are getting displayed for &amp;lt;b&amp;gt;i_material-rate&amp;lt;/b&amp;gt; properly for each &amp;lt;b&amp;gt;i_material-matnr&amp;lt;/b&amp;gt;. But the problem is still persisting.&lt;/P&gt;&lt;P&gt;I am still unalbe to see the values for &amp;lt;b&amp;gt;material_data-awp&amp;lt;/b&amp;gt;. Actually this is the value I have to display in the List. U told that ther shd be a link between &amp;lt;b&amp;gt;i_material&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;mateial_data&amp;lt;/b&amp;gt; internal talbes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now there is one field common for both of the Itabs. i.e, matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could u tell me where shd I link them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2006 20:41:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/1190425#M128407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-30T20:41:49Z</dc:date>
    </item>
  </channel>
</rss>

