‎2007 Jul 03 8:23 PM
Thanks everyone for replying to my earlier question, seems that becoz of some issue, I couldnt see the left option to reward points to any of you... I am sorry for that.
I have seen people have replied saying do not use GUI_UPLOAD, Is there any reason on not using this FM?
My problem is still persistent, I think I have to move file and see that might help me.
‎2007 Jul 03 8:33 PM
Did you change the forward slash to a back slash?
FILENAME = 'C:\myfile.xls'
Rob
Message was edited by:
Rob Burbank
‎2007 Jul 03 8:26 PM
Hi Pranav,
GUI_UPLOAD is normally used to upload text files. For uploading excel file, its better to use <b>ALSM_EXCEL_TO_INTERNAL_TABLE</b>.
Regards
Aneesh.
‎2007 Jul 03 8:33 PM
Did you change the forward slash to a back slash?
FILENAME = 'C:\myfile.xls'
Rob
Message was edited by:
Rob Burbank
‎2007 Jul 03 8:38 PM
Yes Rob, I did that too and even I closed the file as well, but then also no success.
Do I need to put url into some variable and then use that ?
Here is what all I checked :
File is not open
I went to windows explorer and typed file name which i have given in function module and I can see the file with data into that.
‎2007 Jul 03 8:43 PM
‎2007 Jul 03 8:43 PM
‎2007 Jul 03 8:55 PM
In your original program using GUI_UPLOAD, were you getting a dump or an error message?
Rob
‎2007 Jul 03 9:43 PM
I have moved my code to another SAP system and there I am not getting error message for file not available but I am getting some absurd dump message...
have long chain of "###################################### sheet1 ............................ ########### sheet 2.........
something of this type...
When i am replacing the xsl to txt and create .txt file, it works ...
‎2007 Jul 03 9:49 PM
‎2007 Jul 03 10:03 PM
Does it mean that I need to use GUI_DOWNLOAD before GUI_UPLOAD ?
Message was edited by:
pranav .
‎2007 Jul 03 10:07 PM
If that is the requirement. But it could be that this file is not created by SAP, it could be some other system creating this file, right? In that case, it does not make sense to use GUI_DOWNLOAD. The idea here is that if you download the data to PC using GUI_DOWNLOAD and setting the parameter, WRITE_COLUMN_SEPERATOR(something like this), then the system will write the file in such a way that it is easily read back using GUI_UPLOAD and you would set the parameter HAS_COLUMN_SEPERATOR(i think that is the name). Otherwise, you need to upload the excel file using the said funciton module, or writing your OLE code.
REgards,
Rich HEilman
‎2007 Jul 03 9:22 PM
Hi,
You can not upload an XLS file using GUI_UPLOAD. Please use following FM to upload XLS files:\
FAA_FILE_UPLOAD_EXCEL
TEXT_CONVERT_XLS_TO_SAP
ALSM_EXCEL_TO_INTERNAL_TABLE
In ALSM_EXCEL_TO_INTERNAL_TABL, you have to format the uploaded date before using it. So, use FAA_FILE_UPLOAD_EXCEL which internally calls ALSM_EXCEL_TO_INTERNAL_TABL, formats data and gives back formatted data in an internal table.
<b>
Also, use '\' instead of '/' in C:/myfile.xls'.</b>
You can also call a FM 'F4_FILENAME' to get the file.
Reward points if the answer is helpful.
Regards,
Mukul