<?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: function module -upload(excel sheet) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121857#M109129</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;USE THIS FM&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                = filename &lt;/P&gt;&lt;P&gt;            i_begin_col             = begcol &lt;/P&gt;&lt;P&gt;            i_begin_row             = begrow &lt;/P&gt;&lt;P&gt;            i_end_col               = endcol &lt;/P&gt;&lt;P&gt;            i_end_row               = endrow &lt;/P&gt;&lt;P&gt;       TABLES &lt;/P&gt;&lt;P&gt;            intern                  = intern &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;P&gt;    WRITE:/ 'Upload Error ', SY-SUBRC. &lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEE THE SAMPLE PROGRAM IN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/upload-direct-excel.htm" target="test_blank"&gt;http://www.sap-img.com/abap/upload-direct-excel.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Harikishore Sreenivasulu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Feb 2006 08:05:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-01T08:05:56Z</dc:date>
    <item>
      <title>function module -upload(excel sheet)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121856#M109128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the excel sheet is in presentation server ineed to upload that in application server.what is function module for 4.5 version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2006 08:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121856#M109128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-01T08:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: function module -upload(excel sheet)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121857#M109129</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;USE THIS FM&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                = filename &lt;/P&gt;&lt;P&gt;            i_begin_col             = begcol &lt;/P&gt;&lt;P&gt;            i_begin_row             = begrow &lt;/P&gt;&lt;P&gt;            i_end_col               = endcol &lt;/P&gt;&lt;P&gt;            i_end_row               = endrow &lt;/P&gt;&lt;P&gt;       TABLES &lt;/P&gt;&lt;P&gt;            intern                  = intern &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;P&gt;    WRITE:/ 'Upload Error ', SY-SUBRC. &lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEE THE SAMPLE PROGRAM IN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/upload-direct-excel.htm" target="test_blank"&gt;http://www.sap-img.com/abap/upload-direct-excel.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Harikishore Sreenivasulu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2006 08:05:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121857#M109129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-01T08:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: function module -upload(excel sheet)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121858#M109130</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 can use ws_upload.&lt;/P&gt;&lt;P&gt;or you canuse this &amp;lt;b&amp;gt;KCD_EXCEL_OLE_TO_INT_CONVERT&amp;lt;/b&amp;gt; in 4.5 it is there&lt;/P&gt;&lt;P&gt;check that..&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>Wed, 01 Feb 2006 08:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121858#M109130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-01T08:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: function module -upload(excel sheet)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121859#M109131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi franklin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The problem with the standard Excel FMs is :&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   The data is uploaded CELL Wise  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Row - Col - Value&lt;/P&gt;&lt;P&gt;   Row - Col - Value&lt;/P&gt;&lt;P&gt;   Row - Col - Value&lt;/P&gt;&lt;P&gt;   Row - Col - Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  It does not function like GUI_UPLOAD&lt;/P&gt;&lt;P&gt;  (Straight away in to the table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. So, we need to ALSO CONVERT the &lt;/P&gt;&lt;P&gt;   above format of data,&lt;/P&gt;&lt;P&gt;   into our normal internal table.&lt;/P&gt;&lt;P&gt;   (using some abap code/syntax/logic)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. use this code (just copy paste in new program)&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   IT uploades an EXCEL File.&lt;/P&gt;&lt;P&gt;   It converts the data into T001 format&lt;/P&gt;&lt;P&gt;  (any format can be handled by it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&gt;&lt;P&gt;DATA : ex LIKE TABLE OF alsmex_tabline WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : cmp LIKE TABLE OF rstrucinfo WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : col TYPE i.&lt;/P&gt;&lt;P&gt;DATA : col1 TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;fs&amp;gt; .&lt;/P&gt;&lt;P&gt;DATA : fldname(50) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&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                = 'd:\def.xls'&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               = 100&lt;/P&gt;&lt;P&gt;    i_end_row               = 100&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    intern                  = ex&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;BREAK-POINT.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_COMPONENT_LIST'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    program    = sy-repid&lt;/P&gt;&lt;P&gt;    fieldname  = 'T001'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    components = cmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  AT NEW row.&lt;/P&gt;&lt;P&gt;    IF sy-tabix &amp;lt;&amp;gt; 1.&lt;/P&gt;&lt;P&gt;      APPEND t001.&lt;/P&gt;&lt;P&gt;      CLEAR t001.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  col =  ex-col.&lt;/P&gt;&lt;P&gt;  col1 = col + 1.&lt;/P&gt;&lt;P&gt;  READ TABLE cmp INDEX col.&lt;/P&gt;&lt;P&gt;  CONCATENATE 'T001-' cmp-compname INTO fldname.&lt;/P&gt;&lt;P&gt;  ASSIGN (fldname) TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;  &amp;lt;fs&amp;gt; = ex-value.&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;BREAK-POINT.&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;&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;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2006 08:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121859#M109131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-01T08:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: function module -upload(excel sheet)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121860#M109132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Franklin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You can use the func 'KCD_EXCEL_OLE_TO_INT_CONVERT'&lt;/P&gt;&lt;P&gt;  in 4.5B version.See my below sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DATA TO CREATE AND HOLD INTERNAL TABLE FROM EXCEL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : $I_INTERN TYPE  KCDE_CELLS OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : $V_INDEX TYPE I.&lt;/P&gt;&lt;P&gt;DATA : $V_START_COL TYPE I VALUE '1',&lt;/P&gt;&lt;P&gt;       $V_START_ROW TYPE I VALUE '1',&lt;/P&gt;&lt;P&gt;       $V_END_COL   TYPE I VALUE '256',&lt;/P&gt;&lt;P&gt;       $V_END_ROW   TYPE I VALUE '65536'.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;$FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  P_RC LIKE SY-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF P_TAB OCCURS 0,&lt;/P&gt;&lt;P&gt;        PERNR(8) TYPE C,&lt;/P&gt;&lt;P&gt;      END OF P_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  Q-BEGDA LIKE SY-DATUM,&lt;/P&gt;&lt;P&gt;       Q-ENDDA LIKE SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            FILENAME                = FNAME-S&lt;/P&gt;&lt;P&gt;            I_BEGIN_COL             = $V_START_COL&lt;/P&gt;&lt;P&gt;            I_BEGIN_ROW             = $V_START_ROW&lt;/P&gt;&lt;P&gt;            I_END_COL               = $V_END_COL&lt;/P&gt;&lt;P&gt;            I_END_ROW               = $V_END_ROW&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            INTERN                  = $I_INTERN&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;  MOVE : SY-SUBRC TO P_RC.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;    WRITE:&lt;/P&gt;&lt;P&gt;    'FILE CANNOT BE OPENED. REASON: FILE OR DIRECTORY DOES NOT EXIST'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    CHECK NOT $I_INTERN[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SORT $I_INTERN BY ROW COL.&lt;/P&gt;&lt;P&gt;    LOOP AT $I_INTERN.&lt;/P&gt;&lt;P&gt;      MOVE : $I_INTERN-COL TO $V_INDEX.&lt;/P&gt;&lt;P&gt;      ASSIGN COMPONENT $V_INDEX OF STRUCTURE P_TAB TO &amp;lt;$FS&amp;gt;.&lt;/P&gt;&lt;P&gt;      MOVE : $I_INTERN-VALUE TO &amp;lt;$FS&amp;gt;.&lt;/P&gt;&lt;P&gt;      AT END OF ROW.&lt;/P&gt;&lt;P&gt;        APPEND P_TAB.&lt;/P&gt;&lt;P&gt;        CLEAR P_TAB.&lt;/P&gt;&lt;P&gt;      ENDAT.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;Siri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2006 08:48:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-upload-excel-sheet/m-p/1121860#M109132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-01T08:48:52Z</dc:date>
    </item>
  </channel>
</rss>

