2010 Dec 24 10:08 AM
data : var type p decimal 2.
var = 11000.00.
while downloading var its showing 11,000.00. i need to download only 11000.00 with out converting var to character field.
How to remove special character ',' without changing data type while downloading to XLS.
Please help.
Moderator message: duplicate post.
Edited by: Thomas Zloch on Dec 25, 2010 4:53 PM
2010 Dec 24 10:25 AM
Hi,
This depends on the excel sheet cell attributes.
In Format cells instead of currency select 'General' or 'Number'.
Regards,
Srini.
2010 Dec 24 10:29 AM
2010 Dec 24 10:44 AM
Sunil,
That is not possible if you use VAR of type P.
You need to convert your field to CHAR type OR else use excel settings.
2010 Dec 24 11:50 AM
Try using submit statement. Not sure weather this will solve your problem..
Create one report ZREP1with the desired output. Get the output into Memory.
Create one more report where you can call ZREP1 by SUBMIT statement. Download it to Excel.
2010 Dec 24 10:19 PM
Hey Sunil,
This is not possible with out changing the format of the cell. This is excel natural features. Forget about SAP, can you do manipulation of large number in excel with out changing the format and comma's will not come?? suppose you have a number
123123213 and it will come as 1.23E+08. To make it proper we did format as numeric or text etc..
So if you want make the format as text and then download it.
You can take reference to make the format text.
CALL METHOD iref_spreadsheet->set_format
EXPORTING
rangename = 'PRANGE'
typ = 0
currency = 'USD'
no_flush = 'X'
IMPORTING
error = iref_error.
Thanks
Subhankar
2010 Dec 25 9:44 AM
TRY THIS CODE:
DATA L_MSTRING(480).
Pass value to L_MSTRING.
IF L_MSTRING CS ','.
REPLACE ',' WITH SPACE INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
Now you can download to excel using L_MSTRING.