Application Development and Automation 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: 
Read only

Issue when download CSV file

Former Member
0 Likes
947

hi all ,

i have created a ALV report . and one of the column is 010 for example ,when i download it as a CSV file , i found this field is shown as 10 instead of 010 .

Is there a way to solve this ?

best regards

Kevin

hi all ,

i have created a ALV report . and one of the column is 010 for example ,when i download it as a CSV file , i found this field is shown as 10 instead of 010 .

Is there a way to solve this ?

best regards

Kevin

8 REPLIES 8
Read only

Former Member
0 Likes
921

Hi Kevin,

Check the type of value entered like character,integer etc

Pass the field as a character field to the internal table before calling 'GUI_DOWNLOAD'

Hope it helps

regards

Byju

Read only

0 Likes
921

hi Byju ,

The table which contain all the data in CSV is defined like ' DATA: gt_down1 TYPE truxs_t_text_data' .

it is already defined as char.

someone told me could use "field" to show all the contents . but it doesn't work , do u know how this works ?

regards

Kevin

Read only

0 Likes
921

Hi Kevin,

even i faced this kind of problem earlier.

You could control this through ABAP too.

i used

CONCATENATE '=REPLACE("' wa_abc-ordernumber '",1,14,"'

wa_abc-ordernumber '")' INTO lv_order number .

then pass lv_ordernumber to the fianl table..

Note: 14 is your sap field length.

lv_ordernumber(56) type c

Read only

0 Likes
921

hi Nihi ,

sorry , i ' m clear about what you described , could you explain further please ?

regards

Kevin

Read only

0 Likes
921

Hi,

you can control the outputs in Spread sheets with the help of Excel control statement like replace etc throug ABAP program itself....

ex: in XLS sheets you will get 00001 as 1.

but in xls sheet if you put ' 00001 you will get output as 00001without depleting zero's.

same we are applying through ABAP statement.

so, for the final Itab field(which ever) you want to retain 00001 use the mentioned statements in my earlier post.

Hope i am clear with my explanation. If you are in Doubt still get back to me..

Read only

0 Likes
921

hi Nihi ,

i got what you mean , and i have tried in my ALV . but it still show the same thing (without leading zero). does this because the old field and the new field are the same ?

by the way , what is the type of wa_abc-ordernumber ?

best regards

Kevin

Edited by: kevin wang on Oct 28, 2008 9:30 AM

Read only

0 Likes
921

hi

if old variable is 10..

new variable is 40---4 times the old one..and new should be of character..

Read only

Former Member
0 Likes
921

hi all

my issue is solved

Regards

Kevin