2007 Jun 25 12:32 PM
Hi,
Could anybody tell me, if I have the number of sheets in the excel sheet, then how can I upload the data from excel sheet to internal table.
Thanks,
bsv,
Hi,
Could anybody tell me, if I have the number of sheets in the excel sheet, then how can I upload the data from excel sheet to internal table.
Thanks,
bsv,
2007 Jun 25 12:34 PM
Hi
You can use the fun module
GUI_DOWNLOAD or
ALSM_EXCEL_TO_INTERNAL_TABLE
Reward points for useful Answers
Regards
Anji
2007 Jun 25 12:36 PM
Hi
In this case only one funciton module can help you.
FM: <b>ALSM_EXCEL_TO_INTERNAL_TABLE</b>
Thanks and Regards,
Kunjal Patel
2007 Jun 25 12:45 PM
Hi,
<b>How can I download my internal table into an Excel file?</b>
Use the function module SAP_CONVERT_TO_XLS_FORMAT to download the internal table to an excel file.
PARAMETERS: p_file LIKE rlgrap-filename DEFAULT 'c:\tmp\test.xls'.
DATA: t100_Lines TYPE STANDARD TABLE OF t001 WITH DEFAULT KEY.
SELECT * FROM t001 INTO TABLE t100_Lines.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
i_filename = p_file
TABLES
i_tab_sap_data = t100_Lines.Or get much more control by creating an XML file
<b>How can I read an Excel file from presentation server?</b>
You can use the Function module ALSM_EXCEL_TO_INTERNAL_TABLE to read the Excel file into the internal table of type alsmex_tabline. From this internal table you can fill the target internal table.
TYPES:
BEGIN OF ty_upload,
field1 TYPE c length 12,
field2 TYPE c length 12,
field3 TYPE c length 12,
END OF ty_upload.
DATA it_upload TYPE STANDARD TABLE OF ty_upload WITH DEFAULT KEY.
DATA wa_upload TYPE ty_upload.
DATA itab TYPE STANDARD TABLE OF alsmex_tabline WITH DEFAULT KEY.
FIELD-SYMBOLS: <wa> type alsmex_tabline.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = filename
i_begin_col = 1
i_begin_row = 1
i_end_col = 3
i_end_row = 65535
TABLES
intern = itab.
LOOP AT itab ASSIGNING <wa>.
CASE <wa>-col.
WHEN '0001'.
wa_upload-field1 = <wa>-value.
WHEN '0002'.
wa_upload-field2 = <wa>-value.
WHEN '0003'.
wa_upload-field3 = <wa>-value.
ENDCASE.
APPEND wa_upload TO it_upload.
CLEAR wa_upload.
ENDLOOP.
Regards,
Ranjit Thakur.
<b>Please Mark The Helpful Answer.</b>
2007 Jun 25 1:13 PM
Hi bsv,
please try a forum search "excel to internal table" then ask remeining deteils.
Regards,
Clemens
2007 Jun 25 1:18 PM
Hi,
Use the FM <b>TEXT_CONVERT_XLS_TO_SAP</b>.
It will convert the excel to an internal table format.
After that use <b>GUI_DOWNLOAD </b>
For More Info,
Regards,
Padmam.
2007 Jun 25 1:21 PM
Hi..
to upload data of an Excel file into internal table
You can use the GUI_UPLOAD fUNCTION MODULE. Specify the filename as YourFile.xls
You can also try with FM KCD_EXCEL_OLE_TO_INT_CONVERT
Reward if it helps.
Regards.
2007 Jun 25 1:47 PM
hi,
u can use GUI_DOWNLOAD or
ALSM_EXCEL_TO_INTERNAL_TABLE Function Modules.
if useful reward some points.
with regards,
Suresh.A
2007 Jun 25 2:14 PM
Hi,
As per my understanding, u want to upload data frm Excel to internal table, if the excel sheet has more than one work sheet.
Check the link below:
Regards
Kannaiah
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |