2010 Sep 29 1:50 PM
Hi,
i hve a req where in the excel sheet contains some columns having multi line data eg tabs, newline, etc for a single row/record. for eg.
123 xyz sweden
belgium
124 abc finland
dutch
so in the abve case 3rd column contains multi line data like tabs, newline, etc. So need to know any function module which can be used to upload the same in the sap internal table.
Thanks,
Punit Raval.
Hi,
i hve a req where in the excel sheet contains some columns having multi line data eg tabs, newline, etc for a single row/record. for eg.
123 xyz sweden
belgium
124 abc finland
dutch
so in the abve case 3rd column contains multi line data like tabs, newline, etc. So need to know any function module which can be used to upload the same in the sap internal table.
Thanks,
Punit Raval.
2010 Sep 29 2:00 PM
Hi!
For uploading the excel, you can use the ALSM_EXCEL_TO_INTERNAL_TABLE fm.
Unfortunately you have to handle the specialities within your excel, during uploading.
Regards
Tamá
2010 Sep 29 2:00 PM
Hi Punit,
Try the function module 'GUI_UPLOAD'.
Thanks & Regards,
vallamuthu.M
2010 Sep 29 3:52 PM
Hello,
You can use FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload an Excel file with cells that contain multiple lines.
e.g. you have an Excel file in which the first Cell (A1) has the following content:
ONE
TWO
THREE
When you use the mentioned FM, the content of that cell in the TABLES parameter will be:
ROW - 0001
COL - 0001
VALUE - "ONE#TWO#THREE"
You have to be careful, because the VALUE field only stores 50 characters, so the information in each cell of the Excel file can't exceed that or the remaining characters will be ignored.
Best regards,
Mário Espinheira
2010 Sep 29 7:55 PM
u try like this...
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = 'c:/.....xls'
i_begin_col = 1
i_begin_row = 2 ( 1st row u writing columms titles)
i_end_col = 50
i_end_row = 100 ( end of record)
tables
intern = it_table
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2010 Oct 06 9:59 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |