<?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: problem in excel sheet data upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297680#M157375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just copy and  paste and  see the output...&lt;/P&gt;&lt;P&gt;when u  fil excel sheet just leave blank 1st row....&lt;/P&gt;&lt;P&gt;give the file path in parameter&lt;/P&gt;&lt;P&gt;ex---C:\Documents and Settings\singkish\Desktop\kis.xls.&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  ZNEGI6                                                      *&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  ZNEGI6                                  .&lt;/P&gt;&lt;P&gt;data: itab like alsmex_tabline occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: Begin of t_record,&lt;/P&gt;&lt;P&gt;    name1 like itab-value,&lt;/P&gt;&lt;P&gt;    name2 like itab-value,&lt;/P&gt;&lt;P&gt;    age   like itab-value,&lt;/P&gt;&lt;P&gt;    End of t_record.&lt;/P&gt;&lt;P&gt;DATA: it_record type standard table of t_record initial size 0,&lt;/P&gt;&lt;P&gt;      wa_record type t_record.&lt;/P&gt;&lt;P&gt;DATA: gd_currentrow type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Selection Screen Declaration&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------" /&gt;&lt;P&gt;PARAMETER p_infile like rlgrap-filename .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*START OF SELECTION&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_infile&lt;/P&gt;&lt;P&gt;            i_begin_col             = '1'&lt;/P&gt;&lt;P&gt;            i_begin_row             = '2'  "Do not require headings&lt;/P&gt;&lt;P&gt;            i_end_col               = '14'&lt;/P&gt;&lt;P&gt;            i_end_row               = '31'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            intern                  = itab&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 e010(zz) with text-001. "Problem uploading Excel Spreadsheet&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sort table by rows and colums&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  sort itab by row col.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get first row retrieved&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  read table itab index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set first row retrieved to current row&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_currentrow = itab-row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Reset values for next row&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if itab-row ne gd_currentrow.&lt;/P&gt;&lt;P&gt;      append wa_record to it_record.&lt;/P&gt;&lt;P&gt;      clear wa_record.&lt;/P&gt;&lt;P&gt;      gd_currentrow = itab-row.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    case itab-col.&lt;/P&gt;&lt;P&gt;      when '0001'.                              "First name&lt;/P&gt;&lt;P&gt;        wa_record-name1 = itab-value.&lt;/P&gt;&lt;P&gt;      when '0002'.                              "Surname&lt;/P&gt;&lt;P&gt;        wa_record-name2 = itab-value.&lt;/P&gt;&lt;P&gt;      when '0003'.                              "Age&lt;/P&gt;&lt;P&gt;        wa_record-age   = itab-value.&lt;/P&gt;&lt;P&gt;    endcase.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  append wa_record to it_record.&lt;/P&gt;&lt;P&gt;*!! Excel data is now contained within the internal table IT_RECORD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display report data for illustration purposes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at it_record into wa_record.&lt;/P&gt;&lt;P&gt;    write:/     sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-name1, sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-name2, sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-age, sy-vline.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 May 2006 06:03:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-25T06:03:24Z</dc:date>
    <item>
      <title>problem in excel sheet data upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297678#M157373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello every one,&lt;/P&gt;&lt;P&gt;i m trying to upload data from excel sheet , into sap system , i m having the following problem . plz refer the following code and c if u can help me............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.DATA : BEGIN OF ITAB OCCURS 1,&lt;/P&gt;&lt;P&gt;	LIFNR TYPE LIFNR,&lt;/P&gt;&lt;P&gt;	KTOKK TYPE KTOKK,&lt;/P&gt;&lt;P&gt;	EKROG TYPE EKORG,&lt;/P&gt;&lt;P&gt;	NAME1 TYPE NAME1,&lt;/P&gt;&lt;P&gt;	SORTL TYPE SORTL,&lt;/P&gt;&lt;P&gt;	LAND1 TYPE LAND1,&lt;/P&gt;&lt;P&gt;	WAERS TYPE WAERS,&lt;/P&gt;&lt;P&gt;     END OF ITAB. (THIS IS FOR MK01 TRANASACTION)&lt;/P&gt;&lt;P&gt;2.DATA : JTAB LIKE ALSMEX_TABLINE OCCURS 1 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;3.DATA : BDCDATA TYPE BDCDATA OCCURS 1 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;4.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;P&gt;5.CALL FUNCTION ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;6.PASS VALUES TO THIS FUNCTION IN WHICH THE FILENAME IS (C:\BOOK1.XLS)&lt;/P&gt;&lt;P&gt;7.IN THE FM PASS INTERN = JTAB.(WHICH IS LIKE ALSMEX_TABLINE)&lt;/P&gt;&lt;P&gt;8.CHECK THE VALUES FOR JTAB.IT SHOWS THE CONTENTS OF THE EXCEL SHEET DATA LIKE FOLLOWS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	0001000115406&lt;/P&gt;&lt;P&gt;	000100020001&lt;/P&gt;&lt;P&gt;	000100030001&lt;/P&gt;&lt;P&gt;	00010004RAVI&lt;/P&gt;&lt;P&gt;	00010005RV&lt;/P&gt;&lt;P&gt;	00010006IN&lt;/P&gt;&lt;P&gt;	00010007INR&lt;/P&gt;&lt;P&gt;PROBLEM : PROBLEM IS THAT I DONT WANT ROW AND COL NO , I ONLY WANT THE VALUE . I CAN GET IT THORGH USING ONLY vALUE FOR JTAB.BUT THW SYSTEM CAN NOT DIFFERENTIATE    BETWEEN THE VALUE AND THE ROW AND COL NUMBER,SO IT TAKES THE WHOLE VALUE WHILE ENTERNIG THE TRANSACTION.&lt;/P&gt;&lt;P&gt;	PLZ HELP ME , HOW I SHOULD TAKE ONLY VALUE OF JTAB INTO AN INTERNAL TABLE SO THAT&lt;/P&gt;&lt;P&gt;	I CAN THEN PASS IT IN TO PERFORM STATEMENTS FOR ENTRY IN MK01.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2006 05:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297678#M157373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-25T05:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: problem in excel sheet data upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297679#M157374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi aafaqhusain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. U want to upload data from EXCEL &lt;/P&gt;&lt;P&gt;into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. and u are using ALSM_EXCEL_TO_INTERNAL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. But We cannot do this direclty !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. In this FM,&lt;/P&gt;&lt;P&gt;there is one TABLES &lt;/P&gt;&lt;P&gt;INTERN = t_upload1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The definition of this t_upload1&lt;/P&gt;&lt;P&gt;should be as per&lt;/P&gt;&lt;P&gt;INTERN LIKE ALSMEX_TABLINE&lt;/P&gt;&lt;P&gt;and not as per your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Hence, it is giving error here .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;For uploading purpose :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. There are TWO options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) either save the excel to TAB Delimited file, &lt;/P&gt;&lt;P&gt;and use GUI_UPLOAD to upload the data in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) use FM for excel purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. a) is easy and recommended&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. b) there is a FM for it,&lt;/P&gt;&lt;P&gt;but we have to apply some more logic&lt;/P&gt;&lt;P&gt;bcos the FM uploads data of excel&lt;/P&gt;&lt;P&gt;in the intenal table, &lt;/P&gt;&lt;P&gt;CELL BY CELL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. afTER THAT , we have to convert this cell by cell data,&lt;/P&gt;&lt;P&gt;into our format of internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. use this code (just copy paste in new program)&lt;/P&gt;&lt;P&gt;(it is tried wit T001 structure data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(it will AUTOMATICALLY based upon the&lt;/P&gt;&lt;P&gt;fields of internal table,&lt;/P&gt;&lt;P&gt;convert data from cell by cell,&lt;/P&gt;&lt;P&gt;to that of internal table fields)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2006 05:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297679#M157374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-25T05:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: problem in excel sheet data upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297680#M157375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just copy and  paste and  see the output...&lt;/P&gt;&lt;P&gt;when u  fil excel sheet just leave blank 1st row....&lt;/P&gt;&lt;P&gt;give the file path in parameter&lt;/P&gt;&lt;P&gt;ex---C:\Documents and Settings\singkish\Desktop\kis.xls.&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  ZNEGI6                                                      *&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  ZNEGI6                                  .&lt;/P&gt;&lt;P&gt;data: itab like alsmex_tabline occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: Begin of t_record,&lt;/P&gt;&lt;P&gt;    name1 like itab-value,&lt;/P&gt;&lt;P&gt;    name2 like itab-value,&lt;/P&gt;&lt;P&gt;    age   like itab-value,&lt;/P&gt;&lt;P&gt;    End of t_record.&lt;/P&gt;&lt;P&gt;DATA: it_record type standard table of t_record initial size 0,&lt;/P&gt;&lt;P&gt;      wa_record type t_record.&lt;/P&gt;&lt;P&gt;DATA: gd_currentrow type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Selection Screen Declaration&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------" /&gt;&lt;P&gt;PARAMETER p_infile like rlgrap-filename .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*START OF SELECTION&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_infile&lt;/P&gt;&lt;P&gt;            i_begin_col             = '1'&lt;/P&gt;&lt;P&gt;            i_begin_row             = '2'  "Do not require headings&lt;/P&gt;&lt;P&gt;            i_end_col               = '14'&lt;/P&gt;&lt;P&gt;            i_end_row               = '31'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            intern                  = itab&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 e010(zz) with text-001. "Problem uploading Excel Spreadsheet&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sort table by rows and colums&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  sort itab by row col.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get first row retrieved&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  read table itab index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set first row retrieved to current row&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_currentrow = itab-row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Reset values for next row&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if itab-row ne gd_currentrow.&lt;/P&gt;&lt;P&gt;      append wa_record to it_record.&lt;/P&gt;&lt;P&gt;      clear wa_record.&lt;/P&gt;&lt;P&gt;      gd_currentrow = itab-row.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    case itab-col.&lt;/P&gt;&lt;P&gt;      when '0001'.                              "First name&lt;/P&gt;&lt;P&gt;        wa_record-name1 = itab-value.&lt;/P&gt;&lt;P&gt;      when '0002'.                              "Surname&lt;/P&gt;&lt;P&gt;        wa_record-name2 = itab-value.&lt;/P&gt;&lt;P&gt;      when '0003'.                              "Age&lt;/P&gt;&lt;P&gt;        wa_record-age   = itab-value.&lt;/P&gt;&lt;P&gt;    endcase.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  append wa_record to it_record.&lt;/P&gt;&lt;P&gt;*!! Excel data is now contained within the internal table IT_RECORD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display report data for illustration purposes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at it_record into wa_record.&lt;/P&gt;&lt;P&gt;    write:/     sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-name1, sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-name2, sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-age, sy-vline.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2006 06:03:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297680#M157375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-25T06:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem in excel sheet data upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297681#M157376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following Code&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;&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>Thu, 25 May 2006 06:09:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297681#M157376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-25T06:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: problem in excel sheet data upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297682#M157377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thankx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 12:27:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-excel-sheet-data-upload/m-p/1297682#M157377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T12:27:40Z</dc:date>
    </item>
  </channel>
</rss>

