Skip to Content
0
Former Member
Jul 11, 2008 at 08:49 AM

data not populating into the appln server

12 Views

Hai friends,

Plz refer my code.

w-directory = '/usr/sap/trans/'.

w-filename = 'ZMAHESH1.XLS'.

CONCATENATE w-directory w-filename INTO w-file.

*open file

OPEN DATASET w-file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc = 0.

*Transfer the data into excel sheet

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'

EXPORTING

  • I_FIELD_SEPERATOR =

  • I_LINE_HEADER =

i_filename = w-file

  • I_APPL_KEEP = ' '

TABLES

i_tab_sap_data = tab_file_data

  • CHANGING

  • I_TAB_CONVERTED_DATA =

EXCEPTIONS

conversion_failed = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDIF.

*close file

CLOSE DATASET w-file.

Here I want to transfer the data which is in tab_file_data to excel file which I am trying to generate in application server.of-course the excel file is getting generated wirh the same name(zmahesh1).but when I double click on the filename in appln server it is saying that no contents in the file.

Can anybody give the immediate reply for this.

Regards

mahesh