<?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: moving data from one internal table to another in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018445#M713493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;   Chk this code.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh it_excel.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = p_flname&lt;/P&gt;&lt;P&gt;      i_begin_col             = 2&lt;/P&gt;&lt;P&gt;      i_begin_row             = 3&lt;/P&gt;&lt;P&gt;      i_end_col               = 18&lt;/P&gt;&lt;P&gt;      i_end_row               = 9999&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      intern                  = it_excel&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_parameters = 1&lt;/P&gt;&lt;P&gt;      upload_ole              = 2&lt;/P&gt;&lt;P&gt;      OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Filling Data into Internal Tables IT_ITAB From Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;it_excel.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR wa_itab.&lt;/P&gt;&lt;P&gt;  LOOP AT it_excel INTO wa_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       case wa_excel-col .&lt;/P&gt;&lt;P&gt;       when '1' .&lt;/P&gt;&lt;P&gt;      wa_itab-mptyp = wa_excel-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when '2' .&lt;/P&gt;&lt;P&gt;      MOVE wa_excel-value TO wa_itab-wstra.&lt;/P&gt;&lt;P&gt;    when '3' .&lt;/P&gt;&lt;P&gt;      wa_itab-pstxt = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '4' .&lt;/P&gt;&lt;P&gt;      wa_itab-tplnr = wa_excel-value.&lt;/P&gt;&lt;P&gt;     when '5' .&lt;/P&gt;&lt;P&gt;     wa_itab-equnr = wa_excel-value.&lt;/P&gt;&lt;P&gt;     when '6' .&lt;/P&gt;&lt;P&gt;     wa_itab-bautl = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '7' .&lt;/P&gt;&lt;P&gt;      wa_itab-iwerk = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '8' .&lt;/P&gt;&lt;P&gt;      wa_itab-wpgrp = wa_excel-value.&lt;/P&gt;&lt;P&gt;   when '9' .&lt;/P&gt;&lt;P&gt;      wa_itab-auart = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '10' .&lt;/P&gt;&lt;P&gt;      wa_itab-ilart = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '11' .&lt;/P&gt;&lt;P&gt;      wa_itab-gewerk = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '12' .&lt;/P&gt;&lt;P&gt;      wa_itab-wergw = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '13' .&lt;/P&gt;&lt;P&gt;      wa_itab-gsber = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '14' .&lt;/P&gt;&lt;P&gt;      wa_itab-plnty = wa_excel-value.&lt;/P&gt;&lt;P&gt;   when '15' .&lt;/P&gt;&lt;P&gt;      wa_itab-plnnr = wa_excel-value.&lt;/P&gt;&lt;P&gt;   when '16' .&lt;/P&gt;&lt;P&gt;      wa_itab-plnal = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '17' .&lt;/P&gt;&lt;P&gt;      wa_itab-priok = wa_excel-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT END OF row.&lt;/P&gt;&lt;P&gt;      CONDENSE: wa_itab-mptyp  , wa_itab-wstra,&lt;/P&gt;&lt;P&gt;      wa_itab-pstxt , wa_itab-tplnr , wa_itab-equnr,&lt;/P&gt;&lt;P&gt;      wa_itab-bautl , wa_itab-iwerk, wa_itab-wpgrp,&lt;/P&gt;&lt;P&gt;      wa_itab-auart , wa_itab-ilart , wa_itab-gewerk,&lt;/P&gt;&lt;P&gt;      wa_itab-wergw , wa_itab-gsber , wa_itab-plnty ,&lt;/P&gt;&lt;P&gt;      wa_itab-plnnr , wa_itab-plnal , wa_itab-priok.&lt;/P&gt;&lt;P&gt;      APPEND wa_itab TO it_itab.&lt;/P&gt;&lt;P&gt;      CLEAR wa_itab.&lt;/P&gt;&lt;P&gt;    ENDAT .&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;Shafi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Nov 2007 09:18:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-02T09:18:10Z</dc:date>
    <item>
      <title>moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018443#M713491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I have data in an internal table of the structure row, coloumn, value. i extracted it from an excel sheet. i have to move that data into another internal table of the structure itemcode, item description. the data in the excel sheet is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itemcode       itemdescription       &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;ABC               itemABCdesc&lt;/P&gt;&lt;P&gt;DEF               itemDEFdesc&lt;/P&gt;&lt;P&gt;GHI               itemGHIdesc&lt;/P&gt;&lt;P&gt;JKL               itemJKLdesc&lt;/P&gt;&lt;P&gt;MNO               itemMNOdesc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can someone help me out??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Seenu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018443#M713491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018444#M713492</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;&lt;/P&gt;&lt;P&gt;    Loop on first internal table and pass all the data to second internal table&lt;/P&gt;&lt;P&gt;n append it to second internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018444#M713492</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-11-02T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018445#M713493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;   Chk this code.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh it_excel.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = p_flname&lt;/P&gt;&lt;P&gt;      i_begin_col             = 2&lt;/P&gt;&lt;P&gt;      i_begin_row             = 3&lt;/P&gt;&lt;P&gt;      i_end_col               = 18&lt;/P&gt;&lt;P&gt;      i_end_row               = 9999&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      intern                  = it_excel&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_parameters = 1&lt;/P&gt;&lt;P&gt;      upload_ole              = 2&lt;/P&gt;&lt;P&gt;      OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Filling Data into Internal Tables IT_ITAB From Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;it_excel.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR wa_itab.&lt;/P&gt;&lt;P&gt;  LOOP AT it_excel INTO wa_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       case wa_excel-col .&lt;/P&gt;&lt;P&gt;       when '1' .&lt;/P&gt;&lt;P&gt;      wa_itab-mptyp = wa_excel-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when '2' .&lt;/P&gt;&lt;P&gt;      MOVE wa_excel-value TO wa_itab-wstra.&lt;/P&gt;&lt;P&gt;    when '3' .&lt;/P&gt;&lt;P&gt;      wa_itab-pstxt = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '4' .&lt;/P&gt;&lt;P&gt;      wa_itab-tplnr = wa_excel-value.&lt;/P&gt;&lt;P&gt;     when '5' .&lt;/P&gt;&lt;P&gt;     wa_itab-equnr = wa_excel-value.&lt;/P&gt;&lt;P&gt;     when '6' .&lt;/P&gt;&lt;P&gt;     wa_itab-bautl = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '7' .&lt;/P&gt;&lt;P&gt;      wa_itab-iwerk = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '8' .&lt;/P&gt;&lt;P&gt;      wa_itab-wpgrp = wa_excel-value.&lt;/P&gt;&lt;P&gt;   when '9' .&lt;/P&gt;&lt;P&gt;      wa_itab-auart = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '10' .&lt;/P&gt;&lt;P&gt;      wa_itab-ilart = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '11' .&lt;/P&gt;&lt;P&gt;      wa_itab-gewerk = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '12' .&lt;/P&gt;&lt;P&gt;      wa_itab-wergw = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '13' .&lt;/P&gt;&lt;P&gt;      wa_itab-gsber = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '14' .&lt;/P&gt;&lt;P&gt;      wa_itab-plnty = wa_excel-value.&lt;/P&gt;&lt;P&gt;   when '15' .&lt;/P&gt;&lt;P&gt;      wa_itab-plnnr = wa_excel-value.&lt;/P&gt;&lt;P&gt;   when '16' .&lt;/P&gt;&lt;P&gt;      wa_itab-plnal = wa_excel-value.&lt;/P&gt;&lt;P&gt;    when '17' .&lt;/P&gt;&lt;P&gt;      wa_itab-priok = wa_excel-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT END OF row.&lt;/P&gt;&lt;P&gt;      CONDENSE: wa_itab-mptyp  , wa_itab-wstra,&lt;/P&gt;&lt;P&gt;      wa_itab-pstxt , wa_itab-tplnr , wa_itab-equnr,&lt;/P&gt;&lt;P&gt;      wa_itab-bautl , wa_itab-iwerk, wa_itab-wpgrp,&lt;/P&gt;&lt;P&gt;      wa_itab-auart , wa_itab-ilart , wa_itab-gewerk,&lt;/P&gt;&lt;P&gt;      wa_itab-wergw , wa_itab-gsber , wa_itab-plnty ,&lt;/P&gt;&lt;P&gt;      wa_itab-plnnr , wa_itab-plnal , wa_itab-priok.&lt;/P&gt;&lt;P&gt;      APPEND wa_itab TO it_itab.&lt;/P&gt;&lt;P&gt;      CLEAR wa_itab.&lt;/P&gt;&lt;P&gt;    ENDAT .&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;Shafi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:18:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018445#M713493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018446#M713494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pass the values to another internal table based on offset of the first table. thats the only solution if the data in the first table is stored in fileds of type character.&lt;/P&gt;&lt;P&gt;i.e second_itb-item_code = first_itb_table+0( length ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else , use move-corresponding if you have corresponding fields in first table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Phani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:18:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018446#M713494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018447#M713495</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;Loop at the itab from excel  and move one field at a time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have header in excel sheet then discard the first row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_col_row  INTO wa_col_row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      v_value = wa_col_row-col.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CASE v_value.&lt;/P&gt;&lt;P&gt;        WHEN 1.&lt;/P&gt;&lt;P&gt;          wa_input-land1   = wa_col_row-value.&lt;/P&gt;&lt;P&gt;        WHEN 2.&lt;/P&gt;&lt;P&gt;          wa_input-mwskz   = wa_col_row-value.&lt;/P&gt;&lt;P&gt;        WHEN 3.&lt;/P&gt;&lt;P&gt;          wa_input-txjcd   = wa_col_row-value.&lt;/P&gt;&lt;P&gt;        WHEN 4.&lt;/P&gt;&lt;P&gt;          wa_input-text1   = wa_col_row-value.&lt;/P&gt;&lt;P&gt;        WHEN 5.&lt;/P&gt;&lt;P&gt;          wa_input-date    = wa_col_row-value.&lt;/P&gt;&lt;P&gt;        WHEN 6.&lt;/P&gt;&lt;P&gt;          wa_input-s_per   = wa_col_row-value.&lt;/P&gt;&lt;P&gt;        WHEN 7.&lt;/P&gt;&lt;P&gt;          wa_input-c_per   = wa_col_row-value.&lt;/P&gt;&lt;P&gt;        WHEN 8.&lt;/P&gt;&lt;P&gt;          wa_input-ct_per  = wa_col_row-value.&lt;/P&gt;&lt;P&gt;append wa_input to i_input&lt;/P&gt;&lt;P&gt;      ENDCASE."CASE v_value.&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;regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:18:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018447#M713495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018448#M713496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you be more clear..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABC itemABCdesc means it is row number, value, col number, value????????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if yes.. then you can directly move the data into ITAB by looping at this internal able.&lt;/P&gt;&lt;P&gt;itab fields as COL1, COL2, COL3, COL4..&lt;/P&gt;&lt;P&gt;loop at ITAB.&lt;/P&gt;&lt;P&gt;itab1-item = itab-col2. (2nd filed value)&lt;/P&gt;&lt;P&gt;itab1-desc = itab-col4. (4th field value)&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i think you are mssing some where...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018448#M713496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018449#M713497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Seenu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_tab into wa_tab.&lt;/P&gt;&lt;P&gt;Append wa_tab to it_tab2.&lt;/P&gt;&lt;P&gt;endloop.&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;Benedict&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018449#M713497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018450#M713498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
"If your data is already extracted into internal table use this code.

Loop AT itab1.
MOVE-CORRESPONDING itab1 to itab2.
APPEND itab2.
ENDLOOP.

"OR

"If you want extract data from Excel file use follwoing code...

TABLES : ztab.
DATA: itab LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
TYPES: BEGIN OF t_record ,
     itemcode LIKE itab-value,
     itemdesc LIKE itab-value,
     END OF t_record.
DATA: BEGIN OF itb OCCURS 100,
 itemcode LIKE ztab-itemcode,
 kunnr LIKE ztab-itemdesc,
 END OF itb.

DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
      wa_record TYPE t_record.
DATA: gd_currentrow TYPE i.

*Selection Screen Declaration
PARAMETER p_infile LIKE rlgrap-filename DEFAULT 'C:TEMPweek10.xls'.

START-OF-SELECTION.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_infile
      i_begin_col             = '1'
      i_begin_row             = '1'
      i_end_col               = '2'
      i_end_row               = '28000'
    TABLES
      intern                  = itab
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE text-009 TYPE 'S'. "Problem uploading Excel Spreadsheet
    EXIT.
  ENDIF.




* Sort table by rows and colums
  SORT itab BY row col.

** Get first row retrieved
  READ TABLE itab INDEX 1.
*
** Set first row retrieved to current row
  gd_currentrow = itab-row.

  LOOP AT itab.
*   Reset values for next row
    IF itab-row NE gd_currentrow.
      APPEND wa_record TO it_record.
      CLEAR wa_record.
      gd_currentrow = itab-row.
    ENDIF.

    CASE itab-col.
      WHEN '0001'.                              "item code
        wa_record-itemcode = itab-value.
      WHEN '0002'.                              "item desc
        wa_record-itemdesc = itab-value.
    ENDCASE.
  ENDLOOP.
  APPEND wa_record TO it_record.
*Excel data is now contained within the internal table IT_RECORD

  LOOP AT it_record INTO wa_record.
    itb-itemcode       = wa_record-itemcode.
    itb-itemdesc       = wa_record-itemdesc.
    APPEND itb.
  ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Perez C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:32:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018450#M713498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018451#M713499</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;  If you want to move the data from one internal table to another. &lt;/P&gt;&lt;P&gt;1.First make sure that both the table have same structure .&lt;/P&gt;&lt;P&gt;2. Then, you can do the following.&lt;/P&gt;&lt;P&gt;   itab2[] = itab1[].&lt;/P&gt;&lt;P&gt;3.Simply you are assinging the contents of itab1 to itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; But if the structure of both the table is different, the &lt;/P&gt;&lt;P&gt; 1. loop itab1 into w_itab1.&lt;/P&gt;&lt;P&gt;     w_ itab2-itemcode = w_itab1-itemcode.&lt;/P&gt;&lt;P&gt;      w_itab2-itendesc  = w_itab2-itemdesc.&lt;/P&gt;&lt;P&gt;   append  w_itab2 to itab2.&lt;/P&gt;&lt;P&gt;   clear w_itab2.&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; Subha.&lt;/P&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;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:32:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018451#M713499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018452#M713500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello RamaJyothi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABC is the item code and itemABC descrition is the description of that particular item as given in the excel sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first internal table contains the data as follows&lt;/P&gt;&lt;P&gt;row-coloumn-value&lt;/P&gt;&lt;P&gt;1-1-ABC&lt;/P&gt;&lt;P&gt;1-2-itemABCdescription&lt;/P&gt;&lt;P&gt;2-1-DEF&lt;/P&gt;&lt;P&gt;2-2-itemDEFdescription&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;5-1-MNO&lt;/P&gt;&lt;P&gt;5-2-itemMNOdescription&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the data in the interal table of above format has to be brought to internal table with first coloumn as itemcode and second coloumn as item description.  how can it be done&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Seenu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:38:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018452#M713500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018453#M713501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anymore???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seenu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 09:57:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018453#M713501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T09:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: moving data from one internal table to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018454#M713502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Seenu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab = 2 columns table.&lt;/P&gt;&lt;P&gt;it_tab = 2 columns table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_flag = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_tab into wa_tab.&lt;/P&gt;&lt;P&gt;if lv_flag = 1.&lt;/P&gt;&lt;P&gt;lv_code = column1.&lt;/P&gt;&lt;P&gt;lv_flag = 2.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;lv_desc = column1.&lt;/P&gt;&lt;P&gt;lv_flag = 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if lv_code is not initial and&lt;/P&gt;&lt;P&gt;lv_desc is not initial.&lt;/P&gt;&lt;P&gt;wa_tab-column1 = lv_code.&lt;/P&gt;&lt;P&gt;wa_tab-column2 = lv_desc.&lt;/P&gt;&lt;P&gt;append wa_tab to it_tab.&lt;/P&gt;&lt;P&gt;clear lv_code.&lt;/P&gt;&lt;P&gt;clear lv_desc.&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;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Benedict&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 10:49:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another/m-p/3018454#M713502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T10:49:15Z</dc:date>
    </item>
  </channel>
</rss>

