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

Excel column problem in ECC 6.0

Former Member
0 Likes
439

Hi Experts,

In the excel, data of one column is spliting into four columns.

My code is like this,

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

EXPORTING

FILENAME = lv_wsfile

FILETYPE = 'ASC'

CHANGING

DATA_TAB = ifinal[]

EXCEPTIONS

OTHERS = 1.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE

EXPORTING

DOCUMENT = lv_wsfile

OPERATION = 'OPEN'

EXCEPTIONS

CNTL_ERROR = 1

ERROR_NO_GUI = 2

BAD_PARAMETER = 3

FILE_NOT_FOUND = 4

PATH_NOT_FOUND = 5

FILE_EXTENSION_UNKNOWN = 6

ERROR_EXECUTE_FAILED = 7

SYNCHRONOUS_FAILED = 8

NOT_SUPPORTED_BY_GUI = 9

others = 10.

Any help,

Thanks In Advance,

Harsha.

2 REPLIES 2
Read only

jaideepsharma
Active Contributor
0 Likes
386

Hi,

Please try passing value X in WRITE_FIELD_SEPARATOR parameter.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 15, 2008 12:09 PM

Read only

venkat_o
Active Contributor
0 Likes
386

Hi Harsha, Use the function module SAP_CONVERT_TO_XLS_FORMAT to download the internal table to an excel file.

DATA: t100_lines TYPE STANDARD TABLE OF t001 WITH DEFAULT KEY.

PARAMETERS: p_file LIKE rlgrap-filename DEFAULT 'c:\tmp\test.xls'.
SELECT * FROM t001
  INTO TABLE t100_lines.

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
  EXPORTING
    i_filename     = p_file
  TABLES
    i_tab_sap_data = t100_lines.
Regards, Venkat.O