2007 May 16 10:58 AM
Hi Guys,
For the program, i need to download info to an excel file. Below is the scenario:
Value to be downloaded to file is <b>-1.00</b>. But in the downladed file, 2 decimals place has been omitted. It becomes <b>-1</b>. But i need the exact value <b>-1.00</b> to be downloaded to excel.
FYI, i'm 4.6C using FM WS_DOWNLOAD to perform the downloading with parameters:
filename = filename
filetype = 'DAT'
Pls comment on how can i get the exact value from SAP to be downloaded to excel.
Thanks in advance.
2007 May 16 12:35 PM
Hi,
You can use function module XXL_FULL_API too. There you can describe the "Semantic information on DATA columns".
Rgds,
JP
Hi Guys,
For the program, i need to download info to an excel file. Below is the scenario:
Value to be downloaded to file is <b>-1.00</b>. But in the downladed file, 2 decimals place has been omitted. It becomes <b>-1</b>. But i need the exact value <b>-1.00</b> to be downloaded to excel.
FYI, i'm 4.6C using FM WS_DOWNLOAD to perform the downloading with parameters:
filename = filename
filetype = 'DAT'
Pls comment on how can i get the exact value from SAP to be downloaded to excel.
Thanks in advance.
2007 May 16 11:09 AM
Hi,
Check if you have declared the internal table field as type F or P?
2007 May 16 11:11 AM
use this funtion module and download....
or directly save it(after getting excel sheet)
CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
EXPORTING
DATA_FILENAME = <b>'MARA.XL</b>S'
DATA_PATH_FLAG = 'W'
DATA_ENVIRONMENT =
DATA_TABLE = <b>ITAB[]</b>
MACRO_FILENAME =
MACRO_PATH_FLAG = 'E'
MACRO_ENVIRONMENT =
WAIT = 'X'
DELETE_FILE = 'X'
EXCEPTIONS
NO_BATCH = 1
EXCEL_NOT_INSTALLED = 2
INTERNAL_ERROR = 3
CANCELLED = 4
DOWNLOAD_ERROR = 5
NO_AUTHORITY = 6
FILE_NOT_DELETED = 7
OTHERS = 8
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
leave to list-processing.
endcase.
reward if it helps u
vijay pawar
2007 May 17 4:20 AM
Hi Vijay,
I have tried on FM 'RH_START_EXCEL_WITH_DATA', fyi I'm still can not get the decimals place to be downloaded to excel. For my case, susposedly <b>-1.00</b> to be downloaded but it is still <b>-1</b>. Below are the parameters that i used for the FM
CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
EXPORTING
DATA_NAME = 'test.xls'
DATA_PATH_FLAG = 'W'
DATA_TYPE = 'DAT'
WAIT = ''
TABLES
DATA_TAB = t_fld.
Please comment if i did something wrongly.
Thanks in advance.
2007 May 16 11:11 AM
hi,
use function module ws_download and gui_download.
file path : give the filepath .
Reward with points if helpful.
2007 May 16 11:15 AM
Hi,
This should be the problem with the excel file
select the column>right click>Format cells-->select number -->choose 2 decimals from drop down
2007 May 16 12:35 PM
Hi,
You can use function module XXL_FULL_API too. There you can describe the "Semantic information on DATA columns".
Rgds,
JP
2007 May 17 8:37 AM
Hi Joern,
Thanks for your suggestion, FM XXL_FULL_API works fine to me.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |