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

Generate file from internal table

Former Member
0 Likes
836

Hi sdn friends,

i'm looking for a class (and its method) wich generates a file from an internal table

(like the WS_DOWNLOAD FM)

Thanks,

Regards,

Soufiane

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

Hi,

You can use class CL_GUI_FRONTEND_SERVICES and method GUI_DOWNLOAD.


CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
  EXPORTING   
    FILENAME            = filename
  CHANGING    
    DATA_TAB            = content.

Regards,

Ferry Lianto

7 REPLIES 7
Read only

Former Member
0 Likes
816

Hi,

You can use the class CL_GUI_FRONTEND_SERVICES and the method is GUI_DOWNLOAD

Thanks,

Naren

Read only

Former Member
0 Likes
817

Hi,

You can use class CL_GUI_FRONTEND_SERVICES and method GUI_DOWNLOAD.


CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
  EXPORTING   
    FILENAME            = filename
  CHANGING    
    DATA_TAB            = content.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
816

Thank you for the replies,

wich type for the <b>filename</b> and <b>content</b> table for :

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

EXPORTING

FILENAME = filename

CHANGING

DATA_TAB = content.

Soufiane

Read only

Former Member
0 Likes
816

Hi,

The file type parameter FILETYPE can accept only asc or bin..

If you want TAB delimited in the parameter WRITE_FIELD_SEPARATOR pass 'X'

Thanks,

Naren

Read only

Former Member
0 Likes
816

OK and wich type for DATA_TAB in this method ??

Read only

0 Likes
816

DATA_TAB is your internal table here so there's no specific type.

Just pass your internal table(say ITAB).

Read only

Former Member
0 Likes
816

WS_DOWNLOAD is obselete...dont use it...

better to use GUI_DOWNLOAD... ok