<?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: excel upload program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372332#M183079</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 this also..&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_upexcel.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_upexcel.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 May 2006 17:17:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-19T17:17:41Z</dc:date>
    <item>
      <title>excel upload program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372330#M183077</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;can any one give me coding for uploading data from excel to data table [it should be helpful where it can if i copy n paste this code]it should work &lt;/P&gt;&lt;P&gt;that means when i look in db table data should exist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&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, 19 May 2006 17:10:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372330#M183077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T17:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: excel upload program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372331#M183078</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 that data in your DB then you should do this way...&lt;/P&gt;&lt;P&gt;first upload to itab from file,&lt;/P&gt;&lt;P&gt;loop the itab and update the DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link .&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_updown.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_updown.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 17:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372331#M183078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T17:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: excel upload program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372332#M183079</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 this also..&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_upexcel.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_upexcel.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 17:17:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372332#M183079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T17:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: excel upload program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372333#M183080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USE this FM to upload data from excel to interbal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;====================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_data occurs 10.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE  alsmex_tabline.&lt;/P&gt;&lt;P&gt;data: end of it_data.&lt;/P&gt;&lt;P&gt;&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_f_name&lt;/P&gt;&lt;P&gt;        i_begin_col             = '1'&lt;/P&gt;&lt;P&gt;        i_begin_row             = '1'&lt;/P&gt;&lt;P&gt;        i_end_col               = '10'&lt;/P&gt;&lt;P&gt;        i_end_row               = '32000'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        intern                  = it_data&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;&lt;/P&gt;&lt;P&gt;=====================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where p_f_name is the file name of excel sheet and it_data is the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then do a loop on this it_data to retrieve the data to your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vicky&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Award points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 17:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372333#M183080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T17:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: excel upload program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372334#M183081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome to &amp;lt;b&amp;gt;SDN&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZEXCEL_TO_INTERNAL . &lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      name(20) type c, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      addre(20) type c, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      end of itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB1 LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : B1 TYPE I VALUE 1, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       C1 TYPE I VALUE 1, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       B2 TYPE I VALUE 100, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       C2 TYPE I VALUE 9999. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  EXPORTING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    FILENAME                   = &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    'C:\Documents and Settings\administrator\Desktop\ppcon001bd_24.xls' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I_BEGIN_COL                   = B1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I_BEGIN_ROW                   = C1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I_END_COL                     = B2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I_END_ROW                     = C2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TABLES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    INTERN                        = itab1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; EXCEPTIONS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   INCONSISTENT_PARAMETERS       = 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   UPLOAD_OLE                    = 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   OTHERS                        = 3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &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;loop at itab1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ itab1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endlop. &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;if u find useful mark the points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 17:22:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372334#M183081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T17:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: excel upload program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372335#M183082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example that uploads the excel sheet into a dynamically built internal table and writes it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0002.

type-pools: slis.

field-symbols: &amp;lt;dyn_table&amp;gt; type standard table,
               &amp;lt;dyn_wa&amp;gt;,
               &amp;lt;dyn_field&amp;gt;.

data: it_fldcat type lvc_t_fcat,
      wa_it_fldcat type lvc_s_fcat.

type-pools : abap.

data: new_table type ref to data,
      new_line  type ref to data.

data: xcel type table of alsmex_tabline with header line.

selection-screen begin of block b1 with frame title text .
parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
parameters: p_flds type i.
selection-screen end of block b1.

start-of-selection.

* Add X number of fields to the dynamic itab cataelog
  do p_flds times.
    clear wa_it_fldcat.
    wa_it_fldcat-fieldname = sy-index.
    wa_it_fldcat-datatype = 'C'.
    wa_it_fldcat-inttype = 'C'.
    wa_it_fldcat-intlen = 10.
    append wa_it_fldcat to it_fldcat .
  enddo.
  .
* Create dynamic internal table and assign to FS
  call method cl_alv_table_create=&amp;gt;create_dynamic_table
               exporting
                  it_fieldcatalog = it_fldcat
               importing
                  ep_table        = new_table.

  assign new_table-&amp;gt;* to &amp;lt;dyn_table&amp;gt;.

* Create dynamic work area and assign to FS
  create data new_line like line of &amp;lt;dyn_table&amp;gt;.
  assign new_line-&amp;gt;* to &amp;lt;dyn_wa&amp;gt;.

* Upload the excel
  call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       exporting
            filename                = p_file
            i_begin_col             = '1'
            i_begin_row             = '1'
            i_end_col               = '200'
            i_end_row               = '5000'
       tables
            intern                  = xcel
       exceptions
            inconsistent_parameters = 1
            upload_ole              = 2
            others                  = 3.

* Reformt to dynamic internal table
  loop at xcel.
    assign component xcel-col of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;dyn_field&amp;gt;.
    if sy-subrc = 0.
     &amp;lt;dyn_field&amp;gt; = xcel-value.
    endif.

    at end of row.
      append &amp;lt;dyn_wa&amp;gt; to &amp;lt;dyn_table&amp;gt;.
      clear &amp;lt;dyn_wa&amp;gt;.
    endat.
  endloop.

* Write out data from table.
  loop at &amp;lt;dyn_table&amp;gt; into &amp;lt;dyn_wa&amp;gt;.
    do.
      assign component  sy-index  of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;dyn_field&amp;gt;.
      if sy-subrc &amp;lt;&amp;gt; 0.
        exit.
      endif.
      if sy-index = 1.
        write:/ &amp;lt;dyn_field&amp;gt;.
      else.
        write: &amp;lt;dyn_field&amp;gt;.
      endif.
    enddo.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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>Fri, 19 May 2006 17:28:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372335#M183082</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-05-19T17:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: excel upload program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372336#M183083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Shiva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZK_REPORT                                                   *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZK_REPORT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;internal table declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;      NAME(20) TYPE C,&lt;/P&gt;&lt;P&gt;      ADDR(20) TYPE C,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ITAB1 LIKE ALSMEX_TABLINE  OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: K1 TYPE I VALUE 1,&lt;/P&gt;&lt;P&gt;      M1 TYPE I VALUE 1,&lt;/P&gt;&lt;P&gt;      K2 TYPE I VALUE 100,&lt;/P&gt;&lt;P&gt;      M2 TYPE I VALUE 9999.&lt;/P&gt;&lt;P&gt;****************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;use FM for uploading data from EXCEL to internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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                      = 'C:\book1.xls'&lt;/P&gt;&lt;P&gt;              I_BEGIN_COL                   = K1&lt;/P&gt;&lt;P&gt;              I_BEGIN_ROW                   = M1&lt;/P&gt;&lt;P&gt;              I_END_COL                     = K2&lt;/P&gt;&lt;P&gt;              I_END_ROW                     = M2&lt;/P&gt;&lt;P&gt;            TABLES&lt;/P&gt;&lt;P&gt;               INTERN                        = ITAB1&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;                       .&lt;/P&gt;&lt;P&gt;             IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             ENDIF.&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;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2006 05:22:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload-program/m-p/1372336#M183083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-22T05:22:13Z</dc:date>
    </item>
  </channel>
</rss>

