2009 Jul 01 2:46 PM
Hi All,
I have one internal table it_final whose data i have to download in
excel file .I am using GUI_DOWNLOAD for that .
In my internal table i have fields having decimals data. Like
1,444.25-. in the ALV output. But when i download that internal table
in excel it comes like 1444.25-. My requirement is those negative values
on download should be left aligned in the excel file and should come
like 1,444.25 and not 1444.25.
Kindly Help
Mansi
2009 Jul 02 4:20 PM
Hi Manasi,
You can do it in two ways
Using function module CLOI_PUT_SIGN_IN_FRONT.
OR
concatenate the sign.
e.g.
data: int type i,
char(10).
int = -4.
int = int * -1.
write int to char.
concatenate '-' char into char.
Hi All,
I have one internal table it_final whose data i have to download in
excel file .I am using GUI_DOWNLOAD for that .
In my internal table i have fields having decimals data. Like
1,444.25-. in the ALV output. But when i download that internal table
in excel it comes like 1444.25-. My requirement is those negative values
on download should be left aligned in the excel file and should come
like 1,444.25 and not 1444.25.
Kindly Help
Mansi
2009 Jul 01 2:56 PM
they are being stored as 1442.45- as a general number format
try FM : C14W_NUMBER_CHAR_CONVERSION
it will convert the num to char.
then u can download it as ur requirement,
2009 Jul 01 2:57 PM
I faced the same problem
but for what I have seen, is not a reporting problem but excel problem that format numeric fields as "he" wants.
Time ago I solved converting number to string and adding manually dot and comma on the number and giving it to excel like a string.
I think you can solve also with ole2object, but you need to handle all file in this way ...
hope this helps
gabriele
2009 Jul 02 6:38 AM
Hi Mansi,
Only character type (Text) fields are left aligned in an excel sheet. So one way is convert all the numbers in ur internal table to character format and then download them (As soumya explained) or if you have downloaded the number format itself, you must select that column in the excel sheet, go to format option, select number type . You have an option of selectingthe number of decimal places and and the thousands separator too.
ex. if downloaded file has no :1235465.26
after manual formatting of the excel colum ift becomes :1,235,465.26
Hope this answers your query.
2009 Jul 02 4:20 PM
Hi Manasi,
You can do it in two ways
Using function module CLOI_PUT_SIGN_IN_FRONT.
OR
concatenate the sign.
e.g.
data: int type i,
char(10).
int = -4.
int = int * -1.
write int to char.
concatenate '-' char into char.
2009 Jul 02 4:47 PM
Hi,
After downloading the excel sheet contents into the internal tables, take another internal table, which contains the value fileld of different format.
Looping on first internal table, move the contents to second internal table by changing it to the resulttant format.
Regards,
Nangunoori.
2012 Mar 09 6:00 AM
2013 Aug 28 8:56 AM