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: 

FILE conversion

Former Member
0 Kudos

Hi experts,

Is there any sample program that takes my input text file through the selection screen and after running that it should produce the same file in the excel format with TAB delimited???

Thanks in advance.

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos

Hi,

Use GUI_UPLOAD, to upload the file in internal table and use GUI_DOWNLOAD to download the file in Xcel format.

This would be a simple program.

Best regards,

Prashant

4 REPLIES 4

former_member223537
Active Contributor
0 Kudos

Hi,

Use GUI_UPLOAD, to upload the file in internal table and use GUI_DOWNLOAD to download the file in Xcel format.

This would be a simple program.

Best regards,

Prashant

Former Member
0 Kudos

HI

Use Function modules GUI_UPLOAD, GUI_DOWNLOAD to Upload and download the files respectively in Xcel format.

Regards

Haritha

Former Member
0 Kudos

Hi,

Using GUI_UPLOAD function module you can upload the .txt file into a Internal table, Downloa the same internal table using GUI_DOWNLOAD as .xls with Tab delimited ..

Regards

Sudheer

Former Member
0 Kudos

Hi Sateesh,

WHEN U R UPLOADING U HAVE TO GIVE .XLS AS EXTENSION

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = W_DATA

FILETYPE = 'DAT' "THIS IS FOR XLS FORMAT

HAS_FIELD_SEPARATOR = 'X' " TAB DELIMITED

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

DATA_TAB = IT_DATA

EXCEPTIONS

FILE_OPEN_ERROR = 1

FILE_READ_ERROR = 2

NO_BATCH = 3

GUI_REFUSE_FILETRANSFER = 4

INVALID_TYPE = 5

NO_AUTHORITY = 6

UNKNOWN_ERROR = 7

BAD_DATA_FORMAT = 8

HEADER_NOT_ALLOWED = 9

SEPARATOR_NOT_ALLOWED = 10

HEADER_TOO_LONG = 11

UNKNOWN_DP_ERROR = 12

ACCESS_DENIED = 13

DP_OUT_OF_MEMORY = 14

DISK_FULL = 15

DP_TIMEOUT = 16

OTHERS = 17 .

Thanks

Vikranth Khimavath