<?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: Transfering the data from excel sheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350848#M518982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For uploading data we need to call the function module &lt;/P&gt;&lt;P&gt;ALSM_EXCEL_TO_INTERNAL_TABLE&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_file&lt;/P&gt;&lt;P&gt;            i_begin_col             = c_begcol&lt;/P&gt;&lt;P&gt;            i_begin_row             = c_begrow&lt;/P&gt;&lt;P&gt;            i_end_col               = c_endcol&lt;/P&gt;&lt;P&gt;            i_end_row               = c_endrow&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            intern                  = int_count&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;i think it is not possible to upload the fields in proper order&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2007 08:29:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-18T08:29:45Z</dc:date>
    <item>
      <title>Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350841#M518975</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;When you are passing the data from the excel sheet (With the first line containing the field names) to the internal table, how to ensure that the data be passed to the corresponding fields in the internal table even though its not in the order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;shekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350841#M518975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350842#M518976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shekhar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to call the below function module to upload the data from teh Excel sheer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' 
       EXPORTING 
            filename                = filename 
            i_begin_col             = begcol  " Start column where we want to pick the values
            i_begin_row             = begrow  " Start row where we want to pick the values

            i_end_col               = endcol  " end column where we want to pick the values

            i_end_row               = endrow    " End row where we want to pick the values
       TABLES 
            intern                  = intern   " You need to maintain the Correct fields accoring to the Excle sheet
       EXCEPTIONS 
            inconsistent_parameters = 1 
            upload_ole              = 2 
            OTHERS                  = 3.&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:24:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350842#M518976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350843#M518977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZV_EXCEL_UPLOAD .

TYPE-POOLS: TRUXS.

PARAMETERS: P_FILE TYPE  RLGRAP-FILENAME.

TYPES: BEGIN OF T_DATATAB,
      COL1(2)    TYPE C,
      COL2(2)    TYPE C,
      COL3(6)    TYPE C,
      COL4(255)    TYPE C,
      COL5(255)    TYPE C,
      COL6(255)    TYPE C,
      COL7(255)    TYPE C,
      COL8(255)    TYPE C,
      END OF T_DATATAB.
DATA: IT_DATATAB TYPE STANDARD TABLE OF T_DATATAB,
      WA_DATATAB TYPE T_DATATAB.

DATA: IT_RAW TYPE TRUXS_T_TEXT_DATA.

* At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
  CALL FUNCTION 'F4_FILENAME'
       EXPORTING
            FIELD_NAME = 'P_FILE'
       IMPORTING
            FILE_NAME  = P_FILE.


***********************************************************************
*START-OF-SELECTION.
START-OF-SELECTION.
  CLEAR: IT_DATATAB.
  REFRESH: IT_DATATAB.
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*     I_FIELD_SEPERATOR        =
*      I_LINE_HEADER            =  'X'
      I_TAB_RAW_DATA           =  IT_RAW       " WORK TABLE
      I_FILENAME               =  P_FILE
    TABLES
      I_TAB_CONVERTED_DATA     = IT_DATATAB[]    "ACTUAL DATA
   EXCEPTIONS
      CONVERSION_FAILED        = 1
      OTHERS                   = 2.

  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.


***********************************************************************
* END-OF-SELECTION.
END-OF-SELECTION.
*  SORT IT_DATATAB BY COL1.
*  DELETE ADJACENT DUPLICATES FROM IT_DATATAB COMPARING COL1.
  LOOP AT IT_DATATAB INTO WA_DATATAB.
    NEW-LINE.
    WRITE:  WA_DATATAB-COL1,
            WA_DATATAB-COL2,
            WA_DATATAB-COL3,
            WA_DATATAB-COL4,
            WA_DATATAB-COL5,
            WA_DATATAB-COL6,
            WA_DATATAB-COL7,
            WA_DATATAB-COL8.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:31:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350843#M518977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350844#M518978</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;Thanks for the replies..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the problem i'm facing is fields can be in any order in the excel sheet. Whichever is the order, i need to assign the data to the proper fields...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we do that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:41:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350844#M518978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350845#M518979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the example program and which uploads data from xls file to internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZLWMI151_UPLOAD no standard page heading&lt;/P&gt;&lt;P&gt;                       line-size 100 line-count 60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*tables : zbatch_cross_ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of t_text occurs 0,&lt;/P&gt;&lt;P&gt;       werks(4) type c,&lt;/P&gt;&lt;P&gt;       cmatnr(15) type c,&lt;/P&gt;&lt;P&gt;       srlno(12) type n,&lt;/P&gt;&lt;P&gt;       matnr(7) type n,&lt;/P&gt;&lt;P&gt;       charg(10) type n,&lt;/P&gt;&lt;P&gt;       end of t_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of t_zbatch occurs 0,&lt;/P&gt;&lt;P&gt;      werks like zbatch_cross_ref-werks,&lt;/P&gt;&lt;P&gt;      cmatnr like zbatch_cross_ref-cmatnr,&lt;/P&gt;&lt;P&gt;      srlno like zbatch_cross_ref-srlno,&lt;/P&gt;&lt;P&gt;      matnr like zbatch_cross_ref-matnr,&lt;/P&gt;&lt;P&gt;      charg like zbatch_cross_ref-charg,&lt;/P&gt;&lt;P&gt;      end of t_zbatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : g_repid like sy-repid,&lt;/P&gt;&lt;P&gt;       g_line like sy-index,&lt;/P&gt;&lt;P&gt;       g_line1 like sy-index,&lt;/P&gt;&lt;P&gt;       $v_start_col         type i value '1',&lt;/P&gt;&lt;P&gt;       $v_start_row         type i value '2',&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;       gd_currentrow type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;data : t_final like zbatch_cross_ref occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen : begin of block blk with frame title text.&lt;/P&gt;&lt;P&gt;parameters : p_file like rlgrap-filename obligatory.&lt;/P&gt;&lt;P&gt;selection-screen : end of block blk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;  g_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            PROGRAM_NAME = g_repid&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            FILE_NAME    = p_file.&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Uploading the data into Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform modify_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top-of-page.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'Z_HEADER'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FLEX_TEXT1       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FLEX_TEXT2       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FLEX_TEXT3       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;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;      Form  upload_data&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM upload_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_file&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                  = 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;    write:/10 'File '.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    read table itab index 1.&lt;/P&gt;&lt;P&gt;    gd_currentrow = itab-row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if itab-row ne gd_currentrow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        append t_text.&lt;/P&gt;&lt;P&gt;        clear t_text.&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'.&lt;/P&gt;&lt;P&gt;          t_text-werks = itab-value.&lt;/P&gt;&lt;P&gt;        when '0002'.&lt;/P&gt;&lt;P&gt;          t_text-cmatnr = itab-value.&lt;/P&gt;&lt;P&gt;        when '0003'.&lt;/P&gt;&lt;P&gt;          t_text-srlno = itab-value.&lt;/P&gt;&lt;P&gt;        when '0004'.&lt;/P&gt;&lt;P&gt;          t_text-matnr = itab-value.&lt;/P&gt;&lt;P&gt;        when '0005'.&lt;/P&gt;&lt;P&gt;          t_text-charg = itab-value.&lt;/P&gt;&lt;P&gt;      endcase.&lt;/P&gt;&lt;P&gt;&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;  append t_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " upload_data&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;      Form  modify_table&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Modify the table ZBATCH_CROSS_REF&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&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;FORM modify_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_final-werks = t_text-werks.&lt;/P&gt;&lt;P&gt;    t_final-cmatnr = t_text-cmatnr.&lt;/P&gt;&lt;P&gt;    t_final-srlno = t_text-srlno.&lt;/P&gt;&lt;P&gt;    t_final-matnr = t_text-matnr.&lt;/P&gt;&lt;P&gt;    t_final-charg = t_text-charg.&lt;/P&gt;&lt;P&gt;    t_final-erdat = sy-datum.&lt;/P&gt;&lt;P&gt;    t_final-erzet = sy-uzeit.&lt;/P&gt;&lt;P&gt;    t_final-ernam = sy-uname.&lt;/P&gt;&lt;P&gt;    t_final-rstat = 'U'.&lt;/P&gt;&lt;P&gt;    append t_final.&lt;/P&gt;&lt;P&gt;    clear t_final.&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;  delete t_final where werks = ''.&lt;/P&gt;&lt;P&gt;  describe table t_final lines g_line.&lt;/P&gt;&lt;P&gt;  sort t_final by werks cmatnr srlno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Deleting the Duplicate Records&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform select_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe table t_final lines g_line1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  modify zbatch_cross_ref from table t_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    write:/ 'Updation failed'.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    Skip 1.&lt;/P&gt;&lt;P&gt;    Write:/12 'Updation has been Completed Sucessfully'.&lt;/P&gt;&lt;P&gt;    skip 1.&lt;/P&gt;&lt;P&gt;    Write:/12 'Records in file ',42 g_line .&lt;/P&gt;&lt;P&gt;    write:/12 'Updated records in Table',42 g_line1.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  delete from zbatch_cross_ref where werks = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " modify_table&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;      Form  select_data&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Deleting the duplicate records&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM select_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select werks&lt;/P&gt;&lt;P&gt;         cmatnr&lt;/P&gt;&lt;P&gt;         srlno from zbatch_cross_ref&lt;/P&gt;&lt;P&gt;         into table t_zbatch for all entries in t_final&lt;/P&gt;&lt;P&gt;         where werks = t_final-werks&lt;/P&gt;&lt;P&gt;         and  cmatnr = t_final-cmatnr&lt;/P&gt;&lt;P&gt;         and srlno = t_final-srlno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  sort t_zbatch by werks cmatnr srlno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_zbatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    read table t_final with key werks = t_zbatch-werks&lt;/P&gt;&lt;P&gt;                                cmatnr = t_zbatch-cmatnr&lt;/P&gt;&lt;P&gt;                                srlno = t_zbatch-srlno.&lt;/P&gt;&lt;P&gt;    if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;      delete table t_final .&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear: t_zbatch,&lt;/P&gt;&lt;P&gt;           t_final.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " select_data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 14:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350845#M518979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T14:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350846#M518980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sekhar, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Dynamically i think its not possible findout the columns in the excel. Just we need to create the internal table as per the source file and need to import the data through any standard FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     If you have different order in internal table, we wont get thecorrect data in to internal tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards, &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Dj &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;reward if its useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 17:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350846#M518980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T17:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350847#M518981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;take the internal table same as excel file order then u will get correct population .&lt;/P&gt;&lt;P&gt;if u eant to check the populated data then download it into another file using gui_download there u can check the data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:26:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350847#M518981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering the data from excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350848#M518982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For uploading data we need to call the function module &lt;/P&gt;&lt;P&gt;ALSM_EXCEL_TO_INTERNAL_TABLE&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_file&lt;/P&gt;&lt;P&gt;            i_begin_col             = c_begcol&lt;/P&gt;&lt;P&gt;            i_begin_row             = c_begrow&lt;/P&gt;&lt;P&gt;            i_end_col               = c_endcol&lt;/P&gt;&lt;P&gt;            i_end_row               = c_endrow&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            intern                  = int_count&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;i think it is not possible to upload the fields in proper order&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 08:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-the-data-from-excel-sheet/m-p/2350848#M518982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T08:29:45Z</dc:date>
    </item>
  </channel>
</rss>

