<?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: ALSM_EXCEL_TO_INTERNAL_TABLE table INTERN-VALUE length problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623636#M602703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi parameswara,&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;*----&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;&amp;lt;b&amp;gt;12. Or u can use other FM like this :&lt;/P&gt;&lt;P&gt;TEXT_CONVERT_XLS_TO_SAP&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;TYPE-POOLS : truxs.&lt;/P&gt;&lt;P&gt;DATA : ws_rawdata TYPE truxs_t_text_data.&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_FIELD_SEPERATOR = 'X'&lt;/P&gt;&lt;P&gt;i_tab_raw_data = ws_rawdata&lt;/P&gt;&lt;P&gt;i_filename = filename&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;i_tab_converted_data = (your internal table)&amp;lt;/b&amp;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>Thu, 02 Aug 2007 16:13:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-02T16:13:31Z</dc:date>
    <item>
      <title>ALSM_EXCEL_TO_INTERNAL_TABLE table INTERN-VALUE length problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623633#M602700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPr's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Excel file containe 255 charcter and FM is taking only 50 chars.&lt;/P&gt;&lt;P&gt;Please help me how to read 255 charcter fields Excel files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, Urgent....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thakes in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Param.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 16:05:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623633#M602700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T16:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALSM_EXCEL_TO_INTERNAL_TABLE table INTERN-VALUE length problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623634#M602701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u need to copy the function module and relevant data variables and modify the FM and variables according to ur requirement and use it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 16:10:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623634#M602701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T16:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: ALSM_EXCEL_TO_INTERNAL_TABLE table INTERN-VALUE length problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623635#M602702</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;Could u please explain it clearly (elobrately)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 16:13:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623635#M602702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T16:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALSM_EXCEL_TO_INTERNAL_TABLE table INTERN-VALUE length problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623636#M602703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi parameswara,&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;*----&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;&amp;lt;b&amp;gt;12. Or u can use other FM like this :&lt;/P&gt;&lt;P&gt;TEXT_CONVERT_XLS_TO_SAP&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;TYPE-POOLS : truxs.&lt;/P&gt;&lt;P&gt;DATA : ws_rawdata TYPE truxs_t_text_data.&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_FIELD_SEPERATOR = 'X'&lt;/P&gt;&lt;P&gt;i_tab_raw_data = ws_rawdata&lt;/P&gt;&lt;P&gt;i_filename = filename&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;i_tab_converted_data = (your internal table)&amp;lt;/b&amp;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>Thu, 02 Aug 2007 16:13:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alsm-excel-to-internal-table-table-intern-value-length-problem/m-p/2623636#M602703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T16:13:31Z</dc:date>
    </item>
  </channel>
</rss>

