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

Excel File Handling in application server

Former Member
0 Likes
673

Hi All,

I have successfully  uploaded an excel file to application server(AL11 -Tcode), the problem is I am unable to download the excel data which i have uploaded to application server data to Presentation server.

Please help me out on this issue.

Thanks,

Mahesh

Hi All,

I have successfully  uploaded an excel file to application server(AL11 -Tcode), the problem is I am unable to download the excel data which i have uploaded to application server data to Presentation server.

Please help me out on this issue.

Thanks,

Mahesh

3 REPLIES 3
Read only

rambabu_k3
Active Participant
0 Likes
640

Hi Mahesh,

  try using CG3Y transaction.

Thanks

Rambabu

Read only

Former Member
0 Likes
640

Hi,

     If you are trying to download the file using a program follow the below steps,

     1) Use OPEN DATASET to open the file in application server.

     2) Make use of READ DATASET to read the file content to an internal table.

     3) Use GUI_DOWNLOAD to download the internal table data to presentation server.

Hope this helps,

~Athreya

Read only

Jay_Kamdar
Participant
0 Likes
640

sample code for upload:

SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.

PARAMETERS : up_file TYPE rlgrap-filename OBLIGATORY."  This Parameters using File select File Input

SELECTION-SCREEN END OF BLOCK b.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR up_file.


   CALL FUNCTION 'F4_FILENAME'
   "  Using Call function File Select
   EXPORTING
     program_name  = syst-cprog
     dynpro_number = syst-dynnr
     field_name    = ' '
   IMPORTING
     file_name     = up_file.

*----------------------------------------------------------------------*
*                        START  OF SELECTION                           *
*----------------------------------------------------------------------*

START-OF-SELECTION.

   REFRESH it_excel.

   IF up_file IS NOT INITIAL.

     CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
     "  Using Call function File Select Upload excel sheet to sap Systems
     EXPORTING
       i_line_header              = 'X'
       i_tab_raw_data             = it_raw
       i_filename                 = up_file
     TABLES
       i_tab_converted_data       = it_excel
     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.

   ELSE.
     MESSAGE 'Please enter a file !!!,' TYPE 'I'.
   ENDIF.