2006 Sep 14 4:14 PM
Hi All,
when i convert a file from excel to notepad there is a new character added which looks like this '[]'
when i upload this in my program '[]' is displayed as # .
I am not able to split the string because ABAP is not recognising this new '#' symbol . how do i split this string . Please help
Amit
Hi All,
when i convert a file from excel to notepad there is a new character added which looks like this '[]'
when i upload this in my program '[]' is displayed as # .
I am not able to split the string because ABAP is not recognising this new '#' symbol . how do i split this string . Please help
Amit
2006 Sep 14 4:23 PM
Hi
If you are on UNICODE system, check class: cl_abap_char_utilities. You will find methods for CARRIAGE RETURN and LINE FEED, use these to split the string. Am not on SAP system to give you the exact way.
Incase you are NON-UNICODE system, define a variable of X for Carriage return and use this for splitting.
Eg:
data: l_cr(1) type X value '13'.
Use this for splitting.
Try the above method and see if it works for you.
Kind Regards
Eswar
2006 Sep 14 4:23 PM
You could save your file as .CSV from Excel. This will create a comma-delimited text file which can be read into your ABAP program and split easily.
2006 Sep 14 4:24 PM
Hi,
Notepad file will not support some charaters in excel format. Y can't u upload excel file to SAP.
Use comma separated file(.CSV).
Download .CSV file and split it to internal table.
EX:
Assume u r downloading matnr matxt.
and records are downloaded to the structure say wa.
declare wa as "data: wa(1000) type c".
loop at wa.
split wa at , into
itab-matnr
itab-matxt.
append itab
endloop.
Regards
Divakar
2006 Sep 14 4:32 PM
You can also use function ALSM_EXCEL_TO_INTERNAL_TABLE to upload from Excel to internal table directly. Be sure to specify the begin and end row/columns. Empty cells will be left out of the internal table.
2006 Sep 14 4:41 PM
one suggestion here for you is,
you can upload directly an EXCEL file to an internal table.
if you want to go like this, check this link
http://www.sapdevelopment.co.uk/file/file_upexcel.htm
here we use the function module <b>TEXT_CONVERT_XLS_TO_SAP</b> instead of <b>GUI_UPLOAD</b>
Regards
srikanth
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |