Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

GUI_Download

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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,

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Solved

0 Kudos

Hi Mansi,

Can u please tell me,how u solved this problem.