<?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: Modifying internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124927#M986264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chidanand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         thansk for ur anser..Data is coming correctly to the header. When the cursor reaches the modify statemtn..its going to dump...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jul 2008 04:16:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-11T04:16:16Z</dc:date>
    <item>
      <title>Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124919#M986256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         I have internal table with 6 fields. it has already filled values for 5 fields. I am trying to fill the values for 6th field, by keeping in loop of another itab. after passing variable i used modify statement. But its going to short dump. Could any body help whats the error i made.I am givng the pice of code..pls help me...thanks in advance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at ictrl_tab where error = 'X'.&lt;/P&gt;&lt;P&gt;    it_error-e_mess  = ictrl_tab-e_mess.&lt;/P&gt;&lt;P&gt;    MODIFY it_error transporting e_mess.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          Shyam...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 03:50:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124919#M986256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T03:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124920#M986257</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;You need to use the following statement :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY it_error from it_error transporting e_mess&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As if your modify table statement is in  some other table loop it gives dump. Try to take value in some work area and then write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify itab from wa transporting XXXXX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;lalit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 03:53:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124920#M986257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T03:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124921#M986258</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;What is the Short dump Description .&lt;/P&gt;&lt;P&gt;could you describe little bit in detail about ur code.&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;Nikhil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 03:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124921#M986258</guid>
      <dc:creator>nikhil_chitre</dc:creator>
      <dc:date>2008-07-11T03:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124922#M986259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;declare an work area of the type similar to it_error .&lt;/P&gt;&lt;P&gt;say it is wa_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try the below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at ictrl_tab where error = 'X'.&lt;/P&gt;&lt;P&gt;wa_error-e_mess = ictrl_tab-e_mess.&lt;/P&gt;&lt;P&gt;MODIFY it_error from wa_error transporting e_mess.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 03:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124922#M986259</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-07-11T03:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124923#M986260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shyam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please tell us the text display in the short dump...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Modify &amp;lt;table  from &amp;lt;workarea&amp;gt; transporting...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 03:55:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124923#M986260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T03:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124924#M986261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that you have to modify only 1 record in it_error then you have to identify the exact record in table it_error before modifying it using the MODIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use the READ statement to identify the record  to be modified and use the additions TABLE and INDEX of the MODIFY statement to modify the exact record of the internal table it_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you have to modify all the entries in it_error then use the WHERE addition &lt;/P&gt;&lt;P&gt;to specify the records to be modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide the declarations of the internal tables to help you further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 03:58:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124924#M986261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T03:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124925#M986262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all thanks for your answers. I changed my statement as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY it_error from it_error transporting e_mess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though its going to dump again.&lt;/P&gt;&lt;P&gt;Dump message is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Error analysis                                                                    &lt;/P&gt;&lt;P&gt;     You attempted to change, delete or create a line in the                       &lt;/P&gt;&lt;P&gt;     internal table "\PROGRAM=YTV_TR_0150R\DATA=IT_ERROR[]", but no valid cursor   &lt;/P&gt;&lt;P&gt;      exists                                                                       &lt;/P&gt;&lt;P&gt;     for the table.                                                                &lt;/P&gt;&lt;P&gt;     Possible reasons:                                                             &lt;/P&gt;&lt;P&gt;     1. The relevent ABAP/4 statement does not include the addition                &lt;/P&gt;&lt;P&gt;        "...INDEX...", although the statement is not                               &lt;/P&gt;&lt;P&gt;        inside a "LOOP...ENDLOOP" loop processing this table.                      &lt;/P&gt;&lt;P&gt;     2. The relevent ABAP/4 statement was called from within a                     &lt;/P&gt;&lt;P&gt;        "LOOP...ENDLOOP" loop after a DELETE                                       &lt;/P&gt;&lt;P&gt;      "\PROGRAM=YTV_TR_0150R\DATA=IT_ERROR[]".                                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should i use work area mandatorily..because i need to change the logic in the program at some places again....Thanks...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: shyam prasad on Jul 11, 2008 6:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:06:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124925#M986262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124926#M986263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shyam,&lt;/P&gt;&lt;P&gt;If you are facing any problem in Modify statement. then the best way is to just debug the program at the runtime and check if the header value contains the data. If it contains then it should work in the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as I understand you are not able to put the value in the header . First check the header value is coming correct if it is coming then  do the modify statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY it_error transporting e_mess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;************&lt;STRONG&gt;Reward Point if helpful&lt;/STRONG&gt;***********&amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:14:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124926#M986263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124927#M986264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chidanand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         thansk for ur anser..Data is coming correctly to the header. When the cursor reaches the modify statemtn..its going to dump...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124927#M986264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124928#M986265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As explained before, please identify the record that has to be modified before modifying the internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the examples given below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS p_carrid TYPE scarr-carrid. 

DATA scarr_tab TYPE SORTED TABLE OF scarr 
               WITH UNIQUE KEY carrid. 

DATA scarr_wa TYPE scarr. 

SELECT * 
       FROM scarr 
       INTO TABLE scarr_tab. 

READ TABLE scarr_tab INTO scarr_wa 
     WITH TABLE KEY carrid = p_carrid. 

scarr_wa-currcode = 'EUR'. 

MODIFY TABLE scarr_tab FROM scarr_wa 
       TRANSPORTING currcode. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS p_carrid TYPE scarr-carrid. 

DATA scarr_tab TYPE SORTED TABLE OF scarr 
               WITH UNIQUE KEY carrid. 

DATA: idx      TYPE sy-tabix, 
      scarr_wa TYPE scarr. 

SELECT * 
       FROM scarr 
       INTO TABLE scarr_tab. 

READ TABLE scarr_tab 
     WITH TABLE KEY carrid   = p_carrid 
     TRANSPORTING NO FIELDS. 

idx = sy-tabix. 

scarr_wa-currcode = 'EUR'. 

MODIFY scarr_tab INDEX idx FROM scarr_wa 
       TRANSPORTING currcode. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124928#M986265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124929#M986266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at ictrl_tab where error = 'X'.&lt;/P&gt;&lt;P&gt;    it_error-e_mess = ictrl_tab-e_mess.&lt;/P&gt;&lt;P&gt;    MODIFY it_error transporting e_mess.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is because you should give the INDEX addition for modifying the value like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODIFY it_error transporting e_mess index 1. 0r&lt;/P&gt;&lt;P&gt;    MODIFY it_error transporting e_mess index sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have a linking field between the two internal tables, you can READ the it_error with that field and modify it_error using INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;because after read statement correct SY-TABIX would be returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if u find this helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124929#M986266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124930#M986267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The syntax that you are using is only supported with the WHERE addition of the MODIFY statement as shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS: p_carrid TYPE sflight-carrid, 
            p_connid TYPE sflight-connid, 
            p_plane1 TYPE sflight-planetype, 
            p_plane2 TYPE sflight-planetype. 

DATA sflight_tab TYPE SORTED TABLE OF sflight 
                 WITH UNIQUE KEY carrid connid fldate. 

DATA sflight_wa TYPE sflight. 

SELECT * 
       FROM sflight 
       INTO TABLE sflight_tab 
       WHERE carrid = p_carrid AND 
             connid = p_connid. 

sflight_wa-planetype = p_plane2. 

MODIFY sflight_tab FROM sflight_wa 
       TRANSPORTING planetype WHERE planetype = p_plane1. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the conclusion is either to use WHERE addition(with the current syntax that you are using ) or to identify the exact record using the READ statement as shown in the previous post and then use the MODIFY statment specifying the INDEX of the internal table record to be modified.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124930#M986267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124931#M986268</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;You are looping ictrl_tab and modifying it_error, by your code you can modify only ictrl_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By this you are encountering the dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:23:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124931#M986268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124932#M986269</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;&lt;/P&gt;&lt;P&gt;         Thanks for you answes. Problem solved now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 04:28:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-internal-table/m-p/4124932#M986269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T04:28:20Z</dc:date>
    </item>
  </channel>
</rss>

