Skip to Content
0
Feb 18, 2011 at 04:08 PM

Download an internal table to a txt file from CRM WEB CLIENT

42 Views

Hi everybody,

I'm working with CRM WEB CLIENT 7.0 and I have a problem with a requirement, it is the following:

I develop a certain process to have the data that I need in an internal table.

I have to download that internal table into any folder of my local computer as a txt file by clicking a button.

I've used some methods to do it, but I can't download the data to a file, it just appear in the web browser.

Do you have any ideas guys?

These are the methods:

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'

EXPORTING

text = lv_log

IMPORTING

buffer = lv_xstring

EXCEPTIONS

FAILED = 1

OTHERS = 2

CALL METHOD cl_bsp_utility=>download

EXPORTING

object_s = lv_xstring

content_type = 'application/download'

content_disposition = 'attachment;filename=prueba.txt'

response = response

navigation = navigation

Thanks in advance,

Regards,

Lemus