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: 

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

Former Member
0 Kudos

Hello gurus,

i have a problem in my report,that is download data with fieldnames as headers

using CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

plz help me, <b><REMOVED BY MODERATOR></b>

Kind Regards

Shweta

Message was edited by:

Alvaro Tejada Galindo

3 REPLIES 3

Former Member
0 Kudos

Hi,

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

window_title = 'Import from a local file'

default_extension = 'DAT'

  • DEFAULT_FILENAME =

file_filter = l_file_filter

initial_directory = 'C:\'

  • MULTISELECTION =

  • WITH_ENCODING =

CHANGING

file_table = l_file_table

rc = l_rc

  • USER_ACTION =

  • FILE_ENCODING =

EXCEPTIONS

file_open_dialog_failed = 1

cntl_error = 2

error_no_gui = 3

not_supported_by_gui = 4

OTHERS = 5

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

EXPORTING

FILENAME = V_FILE

FILETYPE = 'ASC'

WRITE_FIELD_SEPARATOR = 'X'

CHANGING

DATA_TAB = IT_MAIN[]

EXCEPTIONS

FILE_WRITE_ERROR = 1

NO_BATCH = 2

GUI_REFUSE_FILETRANSFER = 3

INVALID_TYPE = 4

NO_AUTHORITY = 5

UNKNOWN_ERROR = 6

HEADER_NOT_ALLOWED = 7

SEPARATOR_NOT_ALLOWED = 8

FILESIZE_NOT_ALLOWED = 9

HEADER_TOO_LONG = 10

DP_ERROR_CREATE = 11

DP_ERROR_SEND = 12

DP_ERROR_WRITE = 13

UNKNOWN_DP_ERROR = 14

ACCESS_DENIED = 15

DP_OUT_OF_MEMORY = 16

DISK_FULL = 17

DP_TIMEOUT = 18

FILE_NOT_FOUND = 19

DATAPROVIDER_EXCEPTION = 20

CONTROL_FLUSH_ERROR = 21

NOT_SUPPORTED_BY_GUI = 22

OTHERS = 23.

IF SY-SUBRC <> 0.

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

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

ENDIF.

Regards

Sudheer

rainer_hbenthal
Active Contributor
0 Kudos

Might be more help if you desctribe your problems.

0 Kudos

hello Rainer,

i need to download data with respect to fieldlables using

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

actually i got fieldlables and data, but while displaying filed lables are coming vartcally and data is coming harzantally. that is my proble.

ex format:

client

salesdocument

120 5545

120 5546

plz help me if you know

Regards

Shweta