2010 May 31 11:51 AM
Hi Friends,
I have an EXCEL file on application server.I want to upload this file.
I used OPEN DATASET , READ DATASET , CLOSE DATASET for this.but the data coming into internal table is containing special characters.I also used the function module "TEXT_CONVERT_TEX_TO_SAP'" to convert this raw data to proper SAP format but it is not working.
Note : I uploaded my test file on application server using transaction 'CG3Z'. Because of this I am getting this error?If yes then please suggest the correct way to place an EXCEL file to application server.
Thanks in advance!
2010 Jun 01 3:20 AM
see, there are two things..
1. while uploading though CG3Z, you check what format you have used.. default is set as BIN.. and other is ASCII.. ex: you find '#' at the end of lines and tabs when kept in BIN mode.. which is not the same when you upload with ASCII format.
2. while getting data, you can use as suggested in the above post like in BINARY MODE
Hi Friends,
I have an EXCEL file on application server.I want to upload this file.
I used OPEN DATASET , READ DATASET , CLOSE DATASET for this.but the data coming into internal table is containing special characters.I also used the function module "TEXT_CONVERT_TEX_TO_SAP'" to convert this raw data to proper SAP format but it is not working.
Note : I uploaded my test file on application server using transaction 'CG3Z'. Because of this I am getting this error?If yes then please suggest the correct way to place an EXCEL file to application server.
Thanks in advance!
2010 May 31 9:37 PM
Hi Prashant
Probably your Excel file was stored in binary mode.
You can use OPEN DATASET IN binary mode and store it in a xstring variable inside the system
Kind regards
2010 Jun 01 3:20 AM
see, there are two things..
1. while uploading though CG3Z, you check what format you have used.. default is set as BIN.. and other is ASCII.. ex: you find '#' at the end of lines and tabs when kept in BIN mode.. which is not the same when you upload with ASCII format.
2. while getting data, you can use as suggested in the above post like in BINARY MODE
2010 Jun 01 3:34 AM
Hi Prashant,
You can use OPEN DATASET <FILE> FOR INPUT IN BINARY MODE to download any binary documents such as XLS, ZIP etc.,
Also transactions CG3Y and CG3Z are not available in systems such as CRM.
You can refer to my article below for a sample code-
http://divulgesap.com/blog.php?p=MTI1
Regards,
Ravi
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |