<?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: internal table modifications in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322125#M1226650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmaja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1[ ] = itab[ ].&lt;/P&gt;&lt;P&gt;sort itab1 comparing date name.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab1.--&amp;gt;itab1 will contain 3 records and itab will contain 5 records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;clear: wa_itab2, wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_itab where date = wa_itab1-date&lt;/P&gt;&lt;P&gt;                                 name = ' '.&lt;/P&gt;&lt;P&gt;if wa_itab-state is not initial.&lt;/P&gt;&lt;P&gt;wa_itab2-state = wa_itab-state.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_itab-country is not initial.&lt;/P&gt;&lt;P&gt;wa_itab2-country = wa_itab-country.&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;wa_itab2-name = wa_itab1-name.&lt;/P&gt;&lt;P&gt;wa_itab2-date = wa_itab1-date.&lt;/P&gt;&lt;P&gt;wa_itab2-sl_no = wa_itab1-sl_no.&lt;/P&gt;&lt;P&gt;append wa_itab2 to itab2.&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;And in the internal table itab2 , u will have the required output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2009 04:35:13 GMT</pubDate>
    <dc:creator>keerthy_k</dc:creator>
    <dc:date>2009-03-09T04:35:13Z</dc:date>
    <item>
      <title>internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322119#M1226644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got output of a report as bellow.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;.
sl no       date                name           state         contry
 1            10.10.2009                         mtm
 1             10.10.2009     A1                    
 1            10.10.2009                                               abc  
 1            10.10.2009    b1 
 1            10.10.2009    c1


but my required output is.
sl no       date                name           state         contry
 1            10.10.2009      A1                   mtm     ABC
 1             10.10.2009    B1                    
 1            10.10.2009     C1                                            
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;can any body tell me how to change the format.&lt;/P&gt;&lt;P&gt;my internal table data contains  as displayed output only.&lt;/P&gt;&lt;P&gt;so i need to do operations at internal table level to get the required output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;padmaja.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: padmaja vaddi on Mar 9, 2009 5:09 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:08:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322119#M1226644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T04:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322120#M1226645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmaja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while filling your final internal table you need to separate the State and Country fields only based on your date..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prasanth on Mar 9, 2009 9:44 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:11:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322120#M1226645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T04:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322121#M1226646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmaja,&lt;/P&gt;&lt;P&gt;  Make use of &lt;STRONG&gt;text elements&lt;/STRONG&gt; if your problem is to align them.&lt;/P&gt;&lt;P&gt;Create a text element and write the required field under it like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write w_country under text-004.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where text-004 is 'Country'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much Regards,&lt;/P&gt;&lt;P&gt;Amuktha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:18:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322121#M1226646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T04:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322122#M1226647</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;One alternative is to create another internal table (say it_temp) with fields &lt;STRONG&gt;name, state and country&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the details in this internal table and take another internal table same as you have declared already with five fields (say it_final) and select only fields &lt;STRONG&gt;sl no, date and name&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use code:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort it_final by sl_no date name.
sort it_temp by name.

loop at it_final.
  read table it_temp with key name = it_final-name.
  if sy-subrc eq 0.
    it_final-state = it_temp-state.
    it_final-country = it_temp-country.
    modify it_final index sy-tabix.
  endif.
  clear it_temp.
  clear it_final.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322122#M1226647</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-03-09T04:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322123#M1226648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello padma ,&lt;/P&gt;&lt;P&gt;while writing the output allocate necessary space for each table of internal table ,&lt;/P&gt;&lt;P&gt;based on number of characters in internal table for each  column reserve the space using write statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it solves problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:20:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322123#M1226648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T04:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322124#M1226649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmaja,&lt;/P&gt;&lt;P&gt;the following procedure woulld help in getting the reqd output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: w_idx type i.&lt;/P&gt;&lt;P&gt;loop at itab where state = 'mtm'.&lt;/P&gt;&lt;P&gt;w_idx = sy-tabix.&lt;/P&gt;&lt;P&gt;itab-name = 'A1'.&lt;/P&gt;&lt;P&gt;itab-contry = 'ABC'.&lt;/P&gt;&lt;P&gt;modify table itab index w_idx.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mdi.Deeba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:25:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322124#M1226649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T04:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322125#M1226650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmaja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1[ ] = itab[ ].&lt;/P&gt;&lt;P&gt;sort itab1 comparing date name.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab1.--&amp;gt;itab1 will contain 3 records and itab will contain 5 records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;clear: wa_itab2, wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_itab where date = wa_itab1-date&lt;/P&gt;&lt;P&gt;                                 name = ' '.&lt;/P&gt;&lt;P&gt;if wa_itab-state is not initial.&lt;/P&gt;&lt;P&gt;wa_itab2-state = wa_itab-state.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_itab-country is not initial.&lt;/P&gt;&lt;P&gt;wa_itab2-country = wa_itab-country.&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;wa_itab2-name = wa_itab1-name.&lt;/P&gt;&lt;P&gt;wa_itab2-date = wa_itab1-date.&lt;/P&gt;&lt;P&gt;wa_itab2-sl_no = wa_itab1-sl_no.&lt;/P&gt;&lt;P&gt;append wa_itab2 to itab2.&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;And in the internal table itab2 , u will have the required output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:35:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322125#M1226650</guid>
      <dc:creator>keerthy_k</dc:creator>
      <dc:date>2009-03-09T04:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322126#M1226651</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;Check your logic while you are populating your internal table. There is some mistake there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise if you want to operations at the internal table only you can do something like this:&lt;/P&gt;&lt;P&gt;while displaying the ouput you will be looping at the internal table. instead of directly displaying it you use variables corresponding to the specific fields, and then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;V_DATE = WA_ITAB-date.&lt;/P&gt;&lt;P&gt;V_NAME = WA_ITAB-name.&lt;/P&gt;&lt;P&gt;V_STATE = WA_ITAB-state.&lt;/P&gt;&lt;P&gt;V_COUNTRY = WA_ITAB-country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF V_DATE IS NOT INITIAL AND V_NAME IS NOT INITIAL AND V_STATE IS NOT INITIAL AND V_COUNTRY IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / &lt;/P&gt;&lt;P&gt;  V_DATE UNDER 'date',&lt;/P&gt;&lt;P&gt;  V_NAME UNDER 'name'&lt;/P&gt;&lt;P&gt;  V_STATE UNDER 'state',&lt;/P&gt;&lt;P&gt;  V_COUNTRY UNDER 'country'.&lt;/P&gt;&lt;P&gt;&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;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: rajan roy on Mar 9, 2009 5:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:41:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322126#M1226651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T04:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322127#M1226652</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;How are you getting data into the internal table, we cannot give any code before knowing how the data is populated as it may lead to problems in future by just writing code with respect to the output you have provided us....&lt;/P&gt;&lt;P&gt;hence if you can let us know how you are populating data into the internal table then probably can help you with getting the required output...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 05:03:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322127#M1226652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T05:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322128#M1226653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 04:21:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322128#M1226653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T04:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: internal table modifications</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322129#M1226654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 04:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-modifications/m-p/5322129#M1226654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T04:21:49Z</dc:date>
    </item>
  </channel>
</rss>

