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

fm CALL FUNCTION 'GUI_DOWNLOAD'

Former Member
0 Likes
740

hi experts:

How to add a field name line in fm 'GUI_DOWNLOAD'?

allen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
613

Use the parameter : FIELDNAMES its a table type parameter

append all your fieldnames to it.

hi experts:

How to add a field name line in fm 'GUI_DOWNLOAD'?

allen

4 REPLIES 4
Read only

Former Member
0 Likes
613

hI,

DATA: V_PATH TYPE STRING.

V_PATH = P_FILE.

**-- Function GUI_DOWNLOAD is used to save the data back in the

**-- flat file from the internal table

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = V_PATH

FILETYPE = 'ASC'

APPEND = ' '

WRITE_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = I_PIPE

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

OTHERS = 22.

IF SY-SUBRC <> 0.

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

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

****DO REWARD IF USEFULL

VIJAY

Read only

Former Member
0 Likes
614

Use the parameter : FIELDNAMES its a table type parameter

append all your fieldnames to it.

Read only

Former Member
0 Likes
613

Hi

Put all the field names in a internal table and pass that ITAB to FIELDNAMES internal tables in TABLES parameter of the fun module

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
613

HI,

In the Function module FIELDNAMES, you need to pass a Structure which will have the Field name to the FIELDNAMES

Regards

Sudheer