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: 

GUI_Download......

Former Member
0 Kudos

Hi everyone,

here am uploading a text file which contains 10 fields, and based on that am getting 5 more fields from database. then am downloading that total 15 fields into desktop. using gui_download FM. but now i want to provide the headings into those fields while downloading.

how to provide?

Could anyone give me process.

Thanks in advance,

murali.

1 ACCEPTED SOLUTION

former_member404244
Active Contributor
0 Kudos

hI,

In the FM 'GUI_DOWNLOAD'. u will have a parameter in tables tab

"TABLES

*" DATA_TAB

*" FIELDNAMES

Now pass the header information to fieldnames..thatmeans u should prepare ur internal with all the 15 headers and pass it to fieldnames.

like this

"TABLES

*" DATA_TAB = ITAB

*" FIELDNAMES = ITAB_HEADER..

Try like this

reward if helpful.

Regards,

Nagaraj

4 REPLIES 4

former_member404244
Active Contributor
0 Kudos

hI,

In the FM 'GUI_DOWNLOAD'. u will have a parameter in tables tab

"TABLES

*" DATA_TAB

*" FIELDNAMES

Now pass the header information to fieldnames..thatmeans u should prepare ur internal with all the 15 headers and pass it to fieldnames.

like this

"TABLES

*" DATA_TAB = ITAB

*" FIELDNAMES = ITAB_HEADER..

Try like this

reward if helpful.

Regards,

Nagaraj

0 Kudos

hi nagaraj Thank u verymuch i ve solved my problem.

i ve given gd rewards,

Regards,

sudharsan.

0 Kudos

Hi murali,

if it is solved then plz give full points.....

Regards,

nagaraj

harimanjesh_an
Active Participant
0 Kudos

hi murali,

I hope u r first uploading the flat file contents to appilication server file. So, add the headings in the appilication server file itself. So that u can directly download data from that file with headings. Before uploading flat file contents to application server file, add the headings line and then upload suitable data.

I hope u got it.

otherwise .... there is an option to pass field names in GUI_DOWNLOAD FM.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

filename =

  • FILETYPE = 'ASC'

  • APPEND = ' '

  • WRITE_FIELD_SEPARATOR = ' '

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = ' '

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • IMPORTING

  • FILELENGTH =

tables

data_tab =

<b>* FIELDNAMES =</b>

  • 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

.

<b>FIELDNAMES</b> Field Name for DBF File Type

<b>FIELDNAMES is an Optional table with column names for the individual columns.

'DBF': The column names are entered in the structure definition of the DBF file.

'DAT': An additional line with the column name is inserted at the beginning of the table.</b>

Reward if useful...

Harimanjesh AN