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: 

Format for excel cell after downloading .....

Former Member
0 Kudos
146

Hi all,

yet another frustrating thing with excel.. kindly shed some light on this ...

situation is : in one of our R/3 system i'm downloading the ALV report to excel and one of the value fields are mis-aligned like few numbers are right-aligned and few others are left-aligned.... coincidentally all left-aligned numbers are < 1 (like 0.3 ....). user setting for point notation is 'DOT' for thousand separator.

In other R/3 system (our test server) this situation is not happening...all 'values' are fine i.e. right-aligned....

Should be to do some thing with system setting but not able to point out exactly.... spent lots of time in debugging standard xcel download thing...that's driving me crazy.....

kindly help me out....

Thanks in advance

7 REPLIES 7

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
90

Are the systems at the same support pack level?

Regards,

Rich Heilman

0 Kudos
90

In the field catalog, what is the data type of the field that is causing the issue? You hopefully have it declared as a numeric-based field.

0 Kudos
90

Hi Rich,

Both systems are at same support pack levels ....

Thanks

0 Kudos
90

Hi John,

all such fields are being referred to custom table fields which are of type CURR 15 (standard quantity types). Any kind of clue would be highly helpful.

Thanks

Former Member
0 Kudos
90

Use file type as <b>DAT</b>


CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
            filename                = v_fnam
            <b>filetype                = 'DAT'</b>
       IMPORTING
            filelength              = lv_size
       TABLES
            data_tab                = p_output
       EXCEPTIONS
            file_open_error         = 1
            file_write_error        = 2
            invalid_filesize        = 3
            invalid_type            = 4
            no_batch                = 5
            unknown_error           = 6
            invalid_table_width     = 7
            gui_refuse_filetransfer = 8
            customer_error          = 9
            OTHERS                  = 10.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

0 Kudos
90

currently program is using ALV Reporting and the anamoly I found is in excel download in ALV not in our custom excel downloads...... Cud u explain further what you meant ?

Thanks

0 Kudos
90

U can use this code in ALV only. TAB delimited to get the output formatting for cells.

I have also used this part of the code in the ALV dowmload.