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

Value downloaded to Excel

Former Member
0 Likes
1,080

Hi Guys,

For the program, i need to download info to an excel file. Below is the scenario:

Value to be downloaded to file is <b>-1.00</b>. But in the downladed file, 2 decimals place has been omitted. It becomes <b>-1</b>. But i need the exact value <b>-1.00</b> to be downloaded to excel.

FYI, i'm 4.6C using FM WS_DOWNLOAD to perform the downloading with parameters:

filename = filename

filetype = 'DAT'

Pls comment on how can i get the exact value from SAP to be downloaded to excel.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,028

Hi,

You can use function module XXL_FULL_API too. There you can describe the "Semantic information on DATA columns".

Rgds,

JP

Hi Guys,

For the program, i need to download info to an excel file. Below is the scenario:

Value to be downloaded to file is <b>-1.00</b>. But in the downladed file, 2 decimals place has been omitted. It becomes <b>-1</b>. But i need the exact value <b>-1.00</b> to be downloaded to excel.

FYI, i'm 4.6C using FM WS_DOWNLOAD to perform the downloading with parameters:

filename = filename

filetype = 'DAT'

Pls comment on how can i get the exact value from SAP to be downloaded to excel.

Thanks in advance.

7 REPLIES 7
Read only

Former Member
0 Likes
1,028

Hi,

Check if you have declared the internal table field as type F or P?

Read only

Former Member
0 Likes
1,028

use this funtion module and download....

or directly save it(after getting excel sheet)

  • CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'

  • EXPORTING

  • DATA_FILENAME = <b>'MARA.XL</b>S'

  • DATA_PATH_FLAG = 'W'

    • DATA_ENVIRONMENT =

  • DATA_TABLE = <b>ITAB[]</b>

    • MACRO_FILENAME =

    • MACRO_PATH_FLAG = 'E'

    • MACRO_ENVIRONMENT =

  • WAIT = 'X'

    • DELETE_FILE = 'X'

  • EXCEPTIONS

  • NO_BATCH = 1

  • EXCEL_NOT_INSTALLED = 2

  • INTERNAL_ERROR = 3

  • CANCELLED = 4

  • DOWNLOAD_ERROR = 5

  • NO_AUTHORITY = 6

  • FILE_NOT_DELETED = 7

  • OTHERS = 8

  • .

  • IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

  • ENDIF.

  • leave to list-processing.

  • endcase.

reward if it helps u

vijay pawar

Read only

0 Likes
1,028

Hi Vijay,

I have tried on FM 'RH_START_EXCEL_WITH_DATA', fyi I'm still can not get the decimals place to be downloaded to excel. For my case, susposedly <b>-1.00</b> to be downloaded but it is still <b>-1</b>. Below are the parameters that i used for the FM

CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'

EXPORTING

DATA_NAME = 'test.xls'

DATA_PATH_FLAG = 'W'

DATA_TYPE = 'DAT'

WAIT = ''

TABLES

DATA_TAB = t_fld.

Please comment if i did something wrongly.

Thanks in advance.

Read only

Former Member
0 Likes
1,028

hi,

use function module ws_download and gui_download.

file path : give the filepath .

Reward with points if helpful.

Read only

Former Member
0 Likes
1,028

Hi,

This should be the problem with the excel file

select the column>right click>Format cells-->select number -->choose 2 decimals from drop down

Read only

Former Member
0 Likes
1,029

Hi,

You can use function module XXL_FULL_API too. There you can describe the "Semantic information on DATA columns".

Rgds,

JP

Read only

0 Likes
1,028

Hi Joern,

Thanks for your suggestion, FM XXL_FULL_API works fine to me.