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: 

how to download alv to excel but translate char to number ?

Former Member
0 Kudos

i have alv report that the user want to download the

result to excel , ok you have two ways :

1) excel inplace , its work good but in big amount of

data the option is working slow and the user

dont want to use it .

2) download it as local file , the problem is that

the fields that contain the amount is char format

due to using dynamic columnes,

so how can i convert the field that it will be download

to excel as number ?

i tried to change the fieldcatalog to :

LS_FCAT-DATATYPE = 'QUAN'.

LS_FCAT-INTTYPE = 'P' .

but its not help .

thanks .

2 REPLIES 2

Former Member
0 Kudos

Try to download the data into a local file, .txt format, this will make all fields into a character. But when openning the file in excel, excel will do some conversion, you can declare the column that you wanted to convert as a number.

Former Member
0 Kudos

hi dakota,

you could make your own download-routine.

before downloading you move the data in an internal table where all fields have the wanted format.

then download it with function module "GUI_DOWNLOAD" name the file ".xls" and use filetype "DBF".

this way you get an excel with formatted rows as you like.

br,

matthias