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: 

Field names not Coming while Data downloading to Presentation Server

Former Member
0 Kudos

Hi,

I am facing a problem while downloading SAP data from Application server to presentation server.

Here i am using GUI_DOWNLOAD FM.

Any one can help on this issue, how to get field names with this FM,.

Thanks in advance.

Message was edited by:

Krishnanjaneyulu Gowrneni

4 REPLIES 4

Former Member
0 Kudos

Hi guy,

You have the input table FIELDNAME.

Hope this helps,

Erwan

0 Kudos

Hi,

I have already given that field names input table,

rgs

Krsih

Former Member
0 Kudos

Hi,

pass all the column names in an internal table and pass the internal table in the field names parameter of the FIELDNAMES of tables parameters..

IMPORTING

  • FILELENGTH =

TABLES

DATA_TAB = itab

FIELDNAMES = it_fieldnames

PLS CHECK THE SIMPLE CODE BELOW...

data: begin OF itab occurs 0,

matnr like mara-matnr,

end of itab.

data : begin of it_fieldnames occurs 0,

name(100),

end of it_fieldnames.

it_fieldnames-name = 'MATNR'.

APPEND IT_FIELDNAMES.

select matnr from mara into table itab UP TO 10 ROWS.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

FILENAME = 'C:\Documents and Settings\omkar\Desktop\flatfile.txt'

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 = itab

FIELDNAMES = IT_FIELDNAMES

  • 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.

ENDIF.

Regards,

Omkar.

0 Kudos

Hi,

I copied your sample code even then i am not getting the 'MATNR' in specified file.

instead of 'MATNR' it is giving as space.

Regards

Krsih