<?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: error in uploading excel sheet data into internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701690#M1295056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check out this wiki written by me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/prog%252bto%252bupload%252bfrom%252bxl%252bto%252bddic%252btable" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/prog%252bto%252bupload%252bfrom%252bxl%252bto%252bddic%252btable&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2009 08:31:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-03T08:31:35Z</dc:date>
    <item>
      <title>error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701682#M1295048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am facing problem when uploading data from excel. i used KD_GET_FILENAME_ON_F4.i select the file and pass on to ALSM_EXCEL_INTO_INTERNAL_TABLE.and i get the ERROR....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;Illegal type when transferring an internal table to a FORM&lt;/STRONG&gt;. this is my code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_mm01,&lt;/P&gt;&lt;P&gt;        matnr like rmmg1-matnr,&lt;/P&gt;&lt;P&gt;        mbrsh like rmmg1-mbrsh,&lt;/P&gt;&lt;P&gt;        mtart like rmmg1-mtart,&lt;/P&gt;&lt;P&gt;        maktx like makt-maktx,&lt;/P&gt;&lt;P&gt;        meins like mara-meins,&lt;/P&gt;&lt;P&gt;        matkl like mara-matkl,&lt;/P&gt;&lt;P&gt;        bismt like mara-bismt,&lt;/P&gt;&lt;P&gt;        spart like mara-spart,&lt;/P&gt;&lt;P&gt;        mtpos like mara-mtpos_mara,&lt;/P&gt;&lt;P&gt;        end of ty_mm01.&lt;/P&gt;&lt;P&gt;data :  tt_mm01 type standard table of ty_mm01,&lt;/P&gt;&lt;P&gt;        wa_mm01 like TT_MM01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : t_bdcdata like standard table of bdcdata,&lt;/P&gt;&lt;P&gt;       t_bdcmsgcoll like standard table of bdcmsgcoll.&lt;/P&gt;&lt;P&gt;constants:  begcol TYPE i value 1 ,&lt;/P&gt;&lt;P&gt;            begrow TYPE i value 1,&lt;/P&gt;&lt;P&gt;            endcol TYPE i value 100,&lt;/P&gt;&lt;P&gt;            endrow TYPE i value 32000.&lt;/P&gt;&lt;P&gt;selection-screen : begin of block bdc with frame.&lt;/P&gt;&lt;P&gt;parameter : tfile like rlgrap-filename obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen : end of block bdc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for tfile.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   PROGRAM_NAME        = 'ZMM_MAT_MAS_BASIC_DATA'&lt;/P&gt;&lt;P&gt;   DYNPRO_NUMBER       = '1000'&lt;/P&gt;&lt;P&gt;   FIELD_NAME          = 'TFILE'&lt;/P&gt;&lt;P&gt;   STATIC              = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MASK                = ',*.xls,'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    FILE_NAME           = tfile&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;start-of-selection.&lt;/STRONG&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;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                      = tfile&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                        = tt_mm01&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INCONSISTENT_PARAMETERS       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UPLOAD_OLE                    = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                        = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 06:07:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701682#M1295048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T06:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701683#M1295049</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 these FM : &lt;STRONG&gt;KCD_EXCEL_OLE_TO_INT_CONVERT&lt;/STRONG&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;Report ZPSP_TEST.&lt;/P&gt;&lt;P&gt;data: bdc_DATA like bdcdata occurs 0 with header line,&lt;/P&gt;&lt;P&gt;mess_tab like bdcmsgcoll occurs 0 with header line.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0 ,&lt;/P&gt;&lt;P&gt;tcnt TYPE i, "Table Counter &amp;amp;H0D&lt;/P&gt;&lt;P&gt;WERKS LIKE T001W-WERKS,&lt;/P&gt;&lt;P&gt;BNFPO LIKE EBAN-BNFPO,&lt;/P&gt;&lt;P&gt;MATNR LIKE MARA-MATNR,&lt;/P&gt;&lt;P&gt;MENGE LIKE EBAN-MENGE,&lt;/P&gt;&lt;P&gt;END OF ITAB.&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;P&gt;PERFORM upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'EBAN-BSART'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-BSART'&lt;/P&gt;&lt;P&gt;'NB'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RM06B-LPEIN'&lt;/P&gt;&lt;P&gt;'T'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-WERKS'&lt;/P&gt;&lt;P&gt;ITAB-WERKS.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0106'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RM06B-EKGRP'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RM06B-BNFPO'&lt;/P&gt;&lt;P&gt;ITAB-BNFPO.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0106'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'EBAN-MENGE(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-MATNR(01)'&lt;/P&gt;&lt;P&gt;ITAB-MATNR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-MENGE(01)'&lt;/P&gt;&lt;P&gt;ITAB-MENGE.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0102'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'EBAN-MENGE'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;*perform bdc_field using 'RM06B-EEIND'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-EEIND_010.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'RM06B-LPEIN'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-LPEIN_011.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-EKGRP'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-EKGRP_012.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-BADAT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-BADAT_013.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-FRGDT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-FRGDT_014.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-PREIS'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-PREIS_015.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-WAERS'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-WAERS_016.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-PEINH'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-PEINH_017.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-REPOS'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-REPOS_018.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0106'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'EBAN-MENGE(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;*perform bdc_field using 'RM06B-BNFPO'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-BNFPO_019.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-MATNR(02)'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-MATNR_02_020.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-MENGE(02)'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-MENGE_02_021.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0102'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'EBAN-MENGE'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;*perform bdc_field using 'EBAN-MENGE'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ITAB-MENGE_023.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'RM06B-EEIND'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-EEIND_024.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'RM06B-LPEIN'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-LPEIN_025.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-EKGRP'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-EKGRP_026.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-BADAT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-BADAT_027.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-FRGDT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-FRGDT_028.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-PREIS'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-PREIS_029.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-WAERS'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-WAERS_030.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-PEINH'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-PEINH_031.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*perform bdc_field using 'EBAN-REPOS'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;record-REPOS_032.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform bdc_field using 'EBAN-TXZ01'&lt;/P&gt;&lt;P&gt;'BEARING 2"X2"'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-MENGE'&lt;/P&gt;&lt;P&gt;'65'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RM06B-EEIND'&lt;/P&gt;&lt;P&gt;'2005/01/03'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RM06B-LPEIN'&lt;/P&gt;&lt;P&gt;'D'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-EKGRP'&lt;/P&gt;&lt;P&gt;'M11'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-BADAT'&lt;/P&gt;&lt;P&gt;'2005/01/03'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-FRGDT'&lt;/P&gt;&lt;P&gt;'2005/01/03'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-PREIS'&lt;/P&gt;&lt;P&gt;' 1,120.00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-WAERS'&lt;/P&gt;&lt;P&gt;'EUR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-PEINH'&lt;/P&gt;&lt;P&gt;'1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-REPOS'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0102'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'EBAN-MENGE'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-TXZ01'&lt;/P&gt;&lt;P&gt;'DRILLING PIPE 10"'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-MENGE'&lt;/P&gt;&lt;P&gt;'75'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RM06B-EEIND'&lt;/P&gt;&lt;P&gt;'2005/01/03'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RM06B-LPEIN'&lt;/P&gt;&lt;P&gt;'D'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-EKGRP'&lt;/P&gt;&lt;P&gt;'M11'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-BADAT'&lt;/P&gt;&lt;P&gt;'2005/01/03'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-FRGDT'&lt;/P&gt;&lt;P&gt;'2005/01/03'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-PREIS'&lt;/P&gt;&lt;P&gt;' 0.53'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-WAERS'&lt;/P&gt;&lt;P&gt;'EUR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-PEINH'&lt;/P&gt;&lt;P&gt;'1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'EBAN-REPOS'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMM06B' '0106'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RM06B-BNFPO'&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'&amp;amp;H3DBU'.&lt;/P&gt;&lt;P&gt;*perform bdc_field using 'RM06B-BNFPO'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL TRANSACTION 'ME51' USING BDC_DATA MODE 'A'.&lt;/P&gt;&lt;P&gt;endLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM upload_data.&lt;/P&gt;&lt;P&gt;*local variable declaration&lt;/P&gt;&lt;P&gt;DATA : lv_index TYPE i,&lt;/P&gt;&lt;P&gt;l_count TYPE i.&lt;/P&gt;&lt;P&gt;*local constants declaration&lt;/P&gt;&lt;P&gt;CONSTANTS:&lt;/P&gt;&lt;P&gt;lc_start_col TYPE i VALUE '1' ,&lt;/P&gt;&lt;P&gt;lc_start_row TYPE i VALUE '2' ,&lt;/P&gt;&lt;P&gt;lc_end_col TYPE i VALUE '256' ,&lt;/P&gt;&lt;P&gt;lc_end_row TYPE i VALUE '65536'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*local field symbol declaration&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;lf_s&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*loacal internal table declaration&lt;/P&gt;&lt;P&gt;DATA : li_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*refresh internal table for each loop&lt;/P&gt;&lt;P&gt;CLEAR: li_intern,&lt;/P&gt;&lt;P&gt;l_count .&lt;/P&gt;&lt;P&gt;REFRESH li_intern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;to upload the data in excel on the presentation server this function&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;module converts the data from excel file into an internal table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;containing row no col no and value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 &amp;amp;H3D 'Give file location here'&lt;/P&gt;&lt;P&gt;i_begin_col &amp;amp;H3D lc_start_col&lt;/P&gt;&lt;P&gt;i_begin_row &amp;amp;H3D lc_start_row&lt;/P&gt;&lt;P&gt;i_end_col &amp;amp;H3D lc_end_col&lt;/P&gt;&lt;P&gt;i_end_row &amp;amp;H3D lc_end_row&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;intern &amp;amp;H3D li_intern&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;inconsistent_parameters &amp;amp;H3D 1&lt;/P&gt;&lt;P&gt;upload_ole &amp;amp;H3D 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;checking for data in internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CHECK NOT li_intern[] IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;sorting internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SORT li_intern 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;collecting data into an internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT li_intern.&lt;/P&gt;&lt;P&gt;MOVE: li_intern-col TO lv_index.&lt;/P&gt;&lt;P&gt;lv_index &amp;amp;H3D lv_index + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT lv_index OF STRUCTURE itab TO &amp;lt;lf_s&amp;gt;.&lt;/P&gt;&lt;P&gt;MOVE : li_intern-value TO &amp;lt;lf_s&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT END OF row.&lt;/P&gt;&lt;P&gt;l_count &amp;amp;H3D l_count + 1.&lt;/P&gt;&lt;P&gt;itab &amp;amp;H3D l_count.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;ENDAT. " at end of row&lt;/P&gt;&lt;P&gt;ENDLOOP. " loop at li_intern&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Siva Prasad on Jun 1, 2009 8:41 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Siva Prasad on Jun 1, 2009 4:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 06:41:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701683#M1295049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T06:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701684#M1295050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;try to use this fm 'TEXT_CONVERT_XLS_TO_SAP' for uploading excel data to SAP internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An Example for ur reference&lt;/P&gt;&lt;P&gt;  REPORT  zgui_upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPE-POOLS truxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;         sname(15) TYPE c,&lt;/P&gt;&lt;P&gt;         scity(20) TYPE c,&lt;/P&gt;&lt;P&gt;         sage(3) TYPE c,&lt;/P&gt;&lt;P&gt;         END OF itab.&lt;/P&gt;&lt;P&gt;  DATA : it_type   TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PARAMETER p_file TYPE rlgrap-filename.&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;    CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        field_name    = 'P_FILE'&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;  START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    i_tab_raw_data = it_type&lt;/P&gt;&lt;P&gt;    i_filename     = p_file&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    i_tab_converted_data = ITAB[]&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    conversion_failed = 1&lt;/P&gt;&lt;P&gt;    OTHERS            = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 06:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701684#M1295050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T06:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701685#M1295051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; now i dont get any short dump.............. but my internal table is not filled with data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and sy-subrc = 1 after calling FM TEXT_CONVERT_XLS_TO_SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;help me in this regard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 10:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701685#M1295051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T10:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701686#M1295052</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 have header information in the excel file, the FM  should be written this way &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="Code"&gt;&lt;/SPAN&gt;      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_field_seperator    = c_x&lt;/P&gt;&lt;P&gt;          i_line_header        = c_x&lt;/P&gt;&lt;P&gt;          i_tab_raw_data       = fe_raw&lt;/P&gt;&lt;P&gt;          i_filename           = fe_file&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          i_tab_converted_data = i_valuemapld&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          conversion_failed    = 1&lt;/P&gt;&lt;P&gt;          OTHERS               = 2. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 11:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701686#M1295052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T11:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701687#M1295053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if the format of your excel sheet is in 2003 i.e .xls(you might have used .xlsx which is not supported by the function module) or not.And secondly make a provision in your program for exception handling by uncommenting the exceptions part in the fm used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 11:35:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701687#M1295053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T11:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701688#M1295054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       def_filename     = '&lt;STRONG&gt;.&lt;/STRONG&gt;'&lt;/P&gt;&lt;P&gt;       def_path         = 'D:\'&lt;/P&gt;&lt;P&gt;       mask             = ',&lt;STRONG&gt;.txt,&lt;/STRONG&gt;.txt.,*.xls.'&lt;/P&gt;&lt;P&gt;       mode             = 'O'&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       filename         = upfile&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       inv_winsys       = 1&lt;/P&gt;&lt;P&gt;       no_batch         = 2&lt;/P&gt;&lt;P&gt;       selection_cancel = 3&lt;/P&gt;&lt;P&gt;       selection_error  = 4&lt;/P&gt;&lt;P&gt;       OTHERS           = 5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 07:41:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701688#M1295054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-02T07:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701689#M1295055</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 the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: tb_file_data TYPE TABLE OF text4096.

  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
      i_line_header        = ''
      i_tab_raw_data       = tb_file_data
      i_filename           = &amp;lt;file path&amp;gt;
    TABLES
      i_tab_converted_data = &amp;lt;final internal table&amp;gt;
    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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 03:12:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701689#M1295055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T03:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: error in uploading excel sheet data into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701690#M1295056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check out this wiki written by me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/prog%252bto%252bupload%252bfrom%252bxl%252bto%252bddic%252btable" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/prog%252bto%252bupload%252bfrom%252bxl%252bto%252bddic%252btable&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 08:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-uploading-excel-sheet-data-into-internal-table/m-p/5701690#M1295056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T08:31:35Z</dc:date>
    </item>
  </channel>
</rss>

