cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal places to 2

Former Member
0 Kudos

Hi All,

I have retrieved data from BSIK and when displaying the DMBE2 field (the amount field), on the list screen for certain records which have after decimal place single value ex 54.20, the value displays as 54.20 which is fine but when downloaded to excel it shows as 54.2

So, i highlighted the DMBE2 column and from the menu FORMAT-->Cells, under the NUMBER tab checked the number and set the decimals to 2 and when said OK, the excel format changes to the format that is required i.e 54.20 (with the zero added)Is there any other way that this can be done while downloading it to the excel , without any manual correction on the excel.

Thank you,

- Sravan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sravan,

The following code snippets should make the point very clear to you.

================================================

data itab type DMBE2 occurs 0 with header line.

itab = '10.29'.

append itab.

itab = '10.30'.

append itab.

itab = '10.31'.

append itab.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'C:\test8.XLS'

TABLES

DATA_TAB = itab.

File Contents :

10.29

10.3

10.31

================================================

data itab type DMBE2 occurs 0 with header line.

itab = '10.29'.

append itab.

itab = '10.30'.

append itab.

itab = '10.31'.

append itab.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'C:\test8.XLS'

DAT_MODE = 'X'

TABLES

DATA_TAB = itab.

File Contents:

10,29

10,30

10,31

================================================

Hope this helps.

Regards,

Anand Mandalika.