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

using gui_download

Former Member
0 Likes
552

Hi,

How to display header in xl file using gui_download function

4 REPLIES 4
Read only

Former Member
0 Likes
528

pass an internal table to the fieldnames parameter

Read only

Former Member
0 Likes
528

Hi,

<b>Please see below 2 postings

Regards, ABY

Message was edited by:

Aby Jacob Emmanuel

Read only

Former Member
0 Likes
528

Hi,

try with this.

first populate 'I_FCOL' with header data.

and then populate actual data in internal table 'I_FILE'.

try with below code.

DATA: I_FCOL TYPE SY-TITLE OCCURS 0 WITH HEADER LINE. "field name

APPEND 'G/L Account'(089) TO I_FCOL.

APPEND 'Posting Key'(041) TO I_FCOL.

APPEND 'Amount in doc.curr'(040) TO I_FCOL.

CALL FUNCTION 'WS_DOWNLOAD'

EXPORTING

FILENAME = L_FILENAME

FILETYPE = 'DAT'

TABLES

DATA_TAB = I_FILE

FIELDNAMES = I_FCOL

EXCEPTIONS

FILE_OPEN_ERROR = 1

FILE_WRITE_ERROR = 2

INVALID_FILESIZE = 3

INVALID_TYPE = 4

NO_BATCH = 5

UNKNOWN_ERROR = 6

INVALID_TABLE_WIDTH = 7

GUI_REFUSE_FILETRANSFER = 8

CUSTOMER_ERROR = 9

OTHERS = 10.

Regards

Sudheer

Read only

Former Member
0 Likes
528

You should use append = 'X' in exporting parameters.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = FILENAME

WRITE_FIELD_SEPARATOR = 'X'

append = 'X'

TABLES

DATA_TAB = jtab

...

Make sure the filendmaes you added is already in jtab internal table.The code you have given here seems that you are adding in header internal table.

Check the Function module documentation for example.

regards,

srinivas

<b>*reward for useful answers*</b>