Skip to Content
0
Nov 26, 2009 at 12:20 PM

problem after downloading a file via ie browser.

17 Views

Hi, experts

here are the codes:

CONCATENATE SY-DATUM '.'  SY-UZEIT '.xls'  INTO  L_TYPENAME.
    CONCATENATE 'attachment; filename='     L_TYPENAME  INTO L_NAME.
*----- some Browsers have caching problems when loading Excel format
    RESPONSE->DELETE_HEADER_FIELD( NAME = IF_HTTP_HEADER_FIELDS=>CACHE_CONTROL ).
    RESPONSE->DELETE_HEADER_FIELD( NAME = IF_HTTP_HEADER_FIELDS=>EXPIRES ).
    RESPONSE->DELETE_HEADER_FIELD( NAME = IF_HTTP_HEADER_FIELDS=>PRAGMA ).
*----- start Excel viewer either in the Browser or as a separate window
    RESPONSE->SET_HEADER_FIELD( NAME  = IF_HTTP_HEADER_FIELDS=>CONTENT_TYPE
                                VALUE = 'application/excel' ).
    RESPONSE->SET_HEADER_FIELD( NAME  = IF_HTTP_HEADER_FIELDS=>CONTENT_DISPOSITION
                                VALUE = L_NAME ).  "'attachment; filename=webforms.xlsx'
*----- finally display Excel format in Browser
    RESPONSE->SET_CDATA( DATA =  lv_log ).
*----- do not process Layout, response has been rendered
     NAVIGATION->RESPONSE_COMPLETE( ).

then there will be a popup window to download the file.

after we saved the file , we found the browser freezed with the wait image on it .

someone know what's wrong with it ?

problem also occured in firefox.

Thanks.

Oliver.

Edited by: oliver.yang on Nov 26, 2009 1:27 PM