To upload excel file directly to the application server using OLE concept

hi experts
i have done a coding in OLE to download excel with graph to presentation server, is it possible to upload excel with graph directly to the application server  , the excel should have graph while downloading to presentation server fom app server.
Moderator message - duplicate post locked
Edited by: Rob Burbank on Jun 25, 2009 9:49 AM

HI,
have a look at tcode cg3z and then FM 'C13Z_FILE_UPLOAD_ASCII'.
What you can do is, first create the file on presentation server using OLE automation, and then using this FM, write the file to Application server

Similar Messages

  • Reading the data from excel file which is in application server.

    Hi,
    Iam trying to read the data from excel file which is in application server.
    I tried using the function module ALSM_EXCEL_TO_INTERNAL_TABLE. But it didn't work.
    I tried just reading using open data set and read data set it is giving junk characters.
    Please suggest me if you have any solution.
    Best Regards,
    Brahma Reddy

    Hi Narendra,
    Please see the below code I have written
    OPEN DATASET pa_sfile for INPUT in text mode ENCODING  DEFAULT MESSAGE wf_mess.
    CHECK sy-subrc = 0.
    DO.
    READ DATASET pa_sfile INTO wf_string.
    IF sy-subrc <> 0.
    EXIT.
    else.
    split wf_string at wl_# into wf_field1 wf_field2 wa_upload-field3
    wa_upload-field4 wa_upload-field5 wa_upload-field6 wa_upload-field7 wa_upload-field8
    wa_upload-field9 wa_upload-field10 wa_upload-field11 wa_upload-field12 wa_upload-field13
    wa_upload-field14 wa_upload-field15 wa_upload-field16 wa_upload-field17 wa_upload-field18
    wa_upload-field19 wa_upload-field20 wa_upload-field21 wa_upload-field22 wa_upload-field23
    wa_upload-field24 wa_upload-field25 wa_upload-field26 wa_upload-field27 wa_upload-field28
    wa_upload-field29 wa_upload-field30 wa_upload-field31 wa_upload-field32 wa_upload-field33
    wa_upload-field34 wa_upload-field35 wa_upload-field36 .
    wa_upload-field1 = wf_field1.
    wa_upload-field2 = wf_field2.
    append wa_upload to int_upload.
    clear wa_upload.
    ENDIF.
    ENDDO.
    CLOSE DATASET pa_sfile.
    Please note Iam using ECC5.0 and it is not allowing me to declare wl_# as x as in your code.
    Also if Iam using text mode I should use extension encoding etc.( Where as not in your case).
    Please suggest me any other way.
    Thanks for your help,
    Brahma Reddy

  • F4 help for file path in the Application server

    Hi All,
    i want to provide the F4 help so as to enable us to give the file path in the application server (AL11). I'm in version 4.0
    Regards
    Shekhar

    Hi
    Copy paste the following code and see the result
    Here you can see 2 types of open dialogs
    1. Directory View
    2. File View
    Use any one as per your requirement.
    DATA : l_filetable TYPE filetable,
           l_rc TYPE i.
    DATA: l_folder TYPE string,
          l_file TYPE string.
    PARAMETERS: p_folder(100) TYPE c,
                p_file(100) TYPE c.
    *Provide a Dialogue box for getting a folder path
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_folder.
      CALL METHOD cl_gui_frontend_services=>directory_browse
        EXPORTING
          window_title    = 'Select Folder Path'
          initial_folder  = 'D:\'
        CHANGING
          selected_folder = l_folder.
      p_folder = l_folder.
    *Provide a Dialogue box for getting a file path
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title      = 'Select a Text File'
          initial_directory = l_folder
        CHANGING
          file_table        = l_filetable
          rc                = l_rc.
    Reward points generously
    Regards
    Akshay Chonkar
      READ TABLE l_filetable INTO p_file INDEX 1.
      CHECK sy-subrc <> 0.

  • Regarding the File Format on the application server

    Hi,
    I would like to know the file format (ANSI, UTF-8, UTF-16, UTF-32) of the file placed on the application server in my program. Can anyone help me with the Function Module or Class or any other way which will retrieve this information.
    Thanks
    Sarves S V K

    Hi
    You can try the standard class CL_ABAP_FILE_UTILITIES and the method
      CALL METHOD cl_abap_file_utilities=>check_utf8 
        EXPORTING 
         file_name = filename 
        IMPORTING 
         bom       = file_bom 
         encoding  = file_encoding. 
    Check the possible values returned by encoding and BOM:
    NO_BOM
    BOM_UTF8
    BOM_UTF16_BE
    BOM_UTF16_LE
    ENCODING_UTF8
    ENCODING_7BIT_ASCII
    ENCODING_OTHER

  • How to send the file contents in the application server to ftp server

    Hi,
    how to send the file contents in the application server to ftp server.
    regards,
    sree

    Test SAP FTP functions
    DATA: BEGIN OF MTAB_DATA OCCURS 0,
    LINE(132) TYPE C,
    END OF MTAB_DATA.
    DATA: MC_PASSWORD(20) TYPE C,
    MI_KEY TYPE I VALUE 26101957,
    MI_PWD_LEN TYPE I,
    MI_HANDLE TYPE I.
    START-OF-SELECTION.
    MC_PASSWORD = 'password'.
    DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
    *-- FTP_CONNECT requires an encrypted password to work
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
         ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
         ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
         ID 'DSTLEN' FIELD MI_PWD_LEN.
    CALL FUNCTION 'FTP_CONNECT'
         EXPORTING
           USER            = 'userid'
           PASSWORD        = MC_PASSWORD
           HOST            = 'servername'
           RFC_DESTINATION = 'SAPFTP'
         IMPORTING
           HANDLE          = MI_HANDLE
         EXCEPTIONS
           NOT_CONNECTED   = 1
           OTHERS          = 2.
    CHECK SY-SUBRC = 0.
    CALL FUNCTION 'FTP_COMMAND'
         EXPORTING
           HANDLE = MI_HANDLE
           COMMAND = 'dir'
         TABLES
           DATA = MTAB_DATA
         EXCEPTIONS
           TCPIP_ERROR = 1
           COMMAND_ERROR = 2
           DATA_ERROR = 3
           OTHERS = 4.
    IF SY-SUBRC = 0.
      LOOP AT MTAB_DATA.
        WRITE: / MTAB_DATA.
      ENDLOOP.
    ELSE.
    do some error checking.
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
         EXPORTING
           HANDLE = MI_HANDLE
         EXCEPTIONS
           OTHERS = 1.
    Execute external commands (FTP Scripts)
    The following code shows the syntax of the FM 'SXPG_COMMAND_EXECUTE'. You pass it the external command created within transaction SM69 and it will execute it.
    DATA: ld_comline 
    LIKE sxpgcolist-name,
            ld_param    LIKE sxpgcolist-parameters,
            ld_status   LIKE extcmdexex-status,
            ld_output   LIKE btcxpm OCCURS 0 WITH HEADER LINE,
            ld_subrc    LIKE sy-subrc.
      REFRESH ld_output.
      MOVE 'FTP_DATA_IN' to ld_comline.         "Maintained using trans SM69
    Execute external command, contained in 'ld_comline'
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
           EXPORTING
                commandname                   = ld_comline
              additional_parameters   = ld_param  "Params passed to script
              operatingsystem              
    = 'UNIX'
           IMPORTING
                status                        = ld_status
           TABLES
                exec_protocol                 = ld_output
           EXCEPTIONS
                no_permission
                     = 1
                command_not_found
                 = 2
                parameters_too_long          
    = 3
                security_risk                
    = 4
                wrong_check_call_interface    = 5
                program_start_error           = 6
                program_termination_error     = 7
                x_error                       = 8
                parameter_expected            = 9
                too_many_parameters           = 10
                illegal_command               = 11
                wrong_asynchronous_parameters = 12
                cant_enq_tbtco_entry
              = 13
                jobcount_generation_error
         = 14
                OTHERS                       
    = 15.
      IF sy-subrc NE 0.
      ENDIF.

  • FIle Creation in the Application Server With Unicode-8 and Byte-Order Mark

    Hi Guys,
    I've requirement of creating a file in the Application server with the Data.
    The Data Format Should be in UTF-8 and Byte-Order Mark.
    I need to supply this data from SAP to PRMS.
    I'm able to create a file with Unicode, but any of the guys have worked on Umicode with Byte-Order Mark, please let me know.
    Thanks,
    Adi.

    Hi Mathieu,
    If you haven't found an aswer yet, you can check in transaction SE24 CL_ABAP_FILE_UTILITIES method CREATE_UTF8_FILE_WITH_BOM. You can check the code of the method (it's very short) so you can understand how it works. It's also a static method so you can call it directly in your program.
    Ex:
    CALL METHOD cl_abap_file_utilities=>create_utf8_file_with_bom(your_file_name).
    I hope this helps.
    Pax Vobiscum.
    ~ Eric

  • How to upload a file in bdc  from application server

    how to upload a file in bdc  from application server

    Hi
    Check if this is useful and reward.
    PERFORM UNIX_UPLOAD.
    FORM unix_upload.
      DATA : lv_string(600) TYPE c.
      lv_string = p_fname. "p_fname is the filename  in path
    OPEN DATASET lv_string FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc <> 0.
        MESSAGE 'File Not Found' TYPE 'I'.
        LEAVE PROGRAM.
      ENDIF.
      DO .
        READ DATASET lv_string INTO gs_gfile.
        IF sy-subrc NE 0 .
          EXIT.
        ENDIF.
        APPEND gs_gfile TO gt_gfile .
        CLEAR  gs_gfile .
      ENDDO.
      CLOSE DATASET lv_string.
      CLEAR lv_string.
      DATA: lc_split TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
      LOOP AT gt_gfile INTO gs_gfile .
        SPLIT gs_gfile AT lc_split INTO
                                       gs_ipfile-field1                           
                                       gs_ipfile-field2.
      ENDLOOP.
    ENDFORM.                    "unix_upload
    here gs_ipfile is the same structure as your input file to upload
    and
    gs_gfile is the work area of the internal table containing characters as :
    TYPES  : BEGIN OF  ygs_gfile    ,
              data(600)             ,
             END OF    ygs_gfile    .
    *Internal table declaration for input file as text
    gt_gfile   TYPE STANDARD TABLE OF ygs_gfile  INITIAL SIZE 0 ,
    *Work area declaration for input file
           gs_gfile   TYPE ygs_gfile                                   .
    Thanks and Regards
    A Swarna

  • Copying dependent files, Where is the application server icon?!?

    I have looked at the Dreamweaver help sites and I cannot figure out where the application server icon is! I am currently running CS3 on a mac thats running OSX 10.4, and I'm trying to upload my site from a different computer than I originally had the files. First I expand my files window in the window>files menu. But then I have no idea where the 'application server icon' is which is supposed to re-link all my dependent files I think? Please, anyone can you give me the co-ordinates of this icon?? I will love you forever!
    -Thanks,
    Dylan
    feel free to contact me at [email protected]!

    Sounds to me like they are talking about the Connect to Server Icon,

  • Upload a file to portal--- BW application server.

    Dear All,
    I have requirement where some part of business does not have SAP installed. But we would like to extract data from these business too.
    So just wanted to know if we can have a scenario where user will upload the data to the portal (this is just a web portal). Can this be done?
    Secondly, if the can be done, can we extract the file from portal to application server? From application then it becomes very simple to upload to data targets in BW.
    Please help in this regard.
    Thanks,
    Sandeep

    Assign an ID (e.g. 1234) to the uploaded file. You should abstract the store
    so that it will work on the file system or in the database.
    The JSP will include an image ref to that ID, e.g.
    http://www.myco.com/myapp/imageservlet?id=1234
    The image servlet will retrieve and stream the image. It has to set content
    type etc. You should also verify that the current user has access to the
    requested image if security/privacy is an issue.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "newsgroups.bea.com" <[email protected]> wrote in message
    news:3daadaa5$[email protected]..
    Imp struggling to find a way of uploading an image file from the browserto
    the app server (wl 6.1), where the uploaded image will to be included as
    part of a JSP file.
    ** Note
    - this part of Managed Cluster, the uploaded directory is NFS mounted
    between the managed servers
    - we deploy using EAR's from the admin server.
    I am able to upload but, cant get the uploaded image to display as partof
    a JSP,
    Our 5.1 WL server work perfectly using a standard exploaded directory !
    I have logged this as a call at BEA, but they have not been able to offerme
    a solution yet.
    Regards
    Roland

  • How to delete the record in the file present in the application server?

    Hi,
      I have two questions.
      i) How can I delete a record based on some condition in the recordx in the file that is present in the application server?
      ii) How can I lock the users whiel one user is accessing the file on the application server?
    Thanks in advance.
    Suvan

    Hi,
    If u want a frequent deletion this approach to delete a record from a file will havee unnecesary copy of records from one file to another and deletion of one file and renaming activities.
    Instead what u can do is Add and field del_flag to ur record structure.
    If u want to delete the record from a file just mark this del_flag as 'X'.
    While processing u can have a loop like
    loop at it_XXX where del_flag <> 'X'.
    endloop.
    This will logically delete the record.
    When u r to finish the application at that time only perform this copying / deleting / and renaing activity
    Hope this helps.
    Cheers,
    Nitin

  • Working with File Properties on the Application Server

    Hi,
    I am looking for a way to get the size of a file existing in a directory in the application server without reading it.
    Is there a function module or a static method that returns a file properties exists in the application server?
    Thanks,
    Eyal.

    hi Eyal,
    fm <b>EPS_GET_FILE_ATTRIBUTES   </b>
    regards Andreas

  • Regarding Upload of data into SAP from Application server using DATA SETS

    Hi all,
    I have a problem when uploading data that is application server [.txt file] into SAP using OPEN DATA SET,READ DATA SET & CLOSE DATA SET it is now going to dump. The file is actually splits the fields by using Tab Delimiter.  
    During uploading some junk values are coming with '#' so it going to dump and giving follow type of error.
    Runtime Errors         CONVT_NO_NUMBER          
    Exception              CX_SY_CONVERSION_NO_NUMBER
    Unable to interpret "#0#0#0#0#0#0#0#" as a number.
    Can any one solve the above issue as i need it urgently.
    Thanks in advance.
    Thanks & Regards,
    Rayeezuddin.

    Hi Hielman,
    Thnaks for that reply and for effort you are putting to solve my issue.
    I had done the same thing what u have posted prior to your reply but still i am getting dump.
    FORM f_get_legacy_data .
      DATA: l_tab type xstring,
            l_tab1(1) type c,
            s type x.
      move '23' to l_tab.
      move l_tab to l_tab1.
    OPEN DATASET v_pfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      OPEN DATASET v_pfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc <> 0.
       MESSAGE text-207 TYPE c_e.
    ELSE.
      DO.
        CLEAR wa_input1.
       READ DATASET v_pfile INTO wa_input1.
        READ DATASET v_pfile INTO wa_read.
        IF sy-subrc EQ 0.
          move wa_read to i_txt-txt.
          append i_txt.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      s = '09'.
      loop at i_txt.
       move i_txt-txt+10(1) to l_tab1.
       move '#' to l_tab1.
       split i_txt-txt at s into wa_input1-vbeln wa_input1-posnr
        split i_txt-txt at '#' into wa_input1-vbeln wa_input1-posnr
                                       wa_input1-per0bal wa_input1-per1val
                                       wa_input1-per2val wa_input1-per3val
                                       wa_input1-per4val wa_input1-per5val
                                       wa_input1-per6val wa_input1-per7val
                                       wa_input1-per8val wa_input1-per9val
                                       wa_input1-per10val wa_input1-per11val
                                       wa_input1-per12val.
        APPEND wa_input1 TO i_input1.
        CLEAR wa_input1.
      endloop.
    ENDIF.
      CLOSE DATASET v_pfile.
      IF i_input1[] IS INITIAL.
    If there is no data in the legacy file or if the structure of the
    legacy data does not match with that of internal table error message
    need to be displayed.
        MESSAGE text-211 TYPE c_e.
    *&--begin of change--
      ELSE.
        CLEAR: wa_input, wa_input1.
        LOOP AT i_input1 INTO wa_input1.
         MOVE wa_input1 TO wa_input.
          MOVE: wa_input1-vbeln TO wa_input-vbeln,
                wa_input1-posnr TO wa_input-posnr,
                wa_input1-per0bal TO wa_input-per0bal,
                wa_input1-per1val TO wa_input-per1val,
                wa_input1-per2val TO wa_input-per2val,
                wa_input1-per3val TO wa_input-per3val,
                wa_input1-per4val TO wa_input-per4val,
                wa_input1-per5val TO wa_input-per5val,
                wa_input1-per6val TO wa_input-per6val,
                wa_input1-per7val TO wa_input-per7val,
                wa_input1-per8val TO wa_input-per8val,
                wa_input1-per9val TO wa_input-per9val,
                wa_input1-per10val TO wa_input-per10val,
                wa_input1-per11val TO wa_input-per11val,
                wa_input1-per12val TO wa_input-per12val.
          APPEND wa_input TO i_input.
          CLEAR: wa_input, wa_input1.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " GET_LEGACY_DATA
    When i am giving input as
    Directory  /pw/data/erp/D5S/fi/up
    Name: Backlog1616_D1S.txt
    BKCOPO1           BKSOI1        1000.00                100.00                 -200.00                0                      0                      0                      0                      0                      0                      0
    BKSOPO2           BKSOI2        2222.22                0                      300                    0                      0                      0                      0                      0                      0                      0
    BKSOPO3           BKSOI3        -3000                  400                    0                      0                      0                      0                      0                      0                      0                      0
    BKSOPO4                         4000.55                500                    600                    0                      0                      0                      0                      0                      0                      0
    0040000000        000010        -100                   -110                   -110                   0                      0                      -600                   0                      0                      0                      0
    0040000001        000010        -110                   -110                   0                      0                      0                      -610                   0                      0                      0                      0
    I am getting i_input internal table populated as follows at the end of that subroutine.
    After appending [APPEND wa_input TO i_input].
    BKCOPO1#BK|000000|            0.00 |            0.00 |            0.00    |
    BKSOPO2#BK|000000|            0.00 |            0.00 |            0.00    |
    BKCOPO3#BK|000000|            0.00 |            0.00 |            0.00    |
    BKCOPO4##4|000000|            0.00 |            0.00 |            0.00    |
    0040000000|000000|            0.00 |            0.00 |            0.00    |
    0040000001|000000|            0.00 |            0.00 |            0.00    |
    And output is showing erronious records: 6
    No entries inserted.
    Can you solve this issue.

  • ** Is it possible to send message directly to the AS2 server using URL

    Hi friends,
    We have Axway (B2B) Integration software trial version. We have XI system in which AS2 adapter is installed.  We want to send EDI file directly from Axway to AS2 adapter of XI by calling the AS2 server URL.
    http://<server>:50100/SeeburgerAS2/AS2Server
    We have created one File to File scenario in Axway. We have one File to AS2  scenario in XI also.  Now, Presently, the scenario in Axway works like, to pick the file from Axway  and  delivers the output file which is the source directory mentioned in sender CC of XI thru FTP in Axway.  Then, XI automatically poll this file and send to AS2 adpater. Instead, we want to send EDI file directly from Axway to AS2 server. We tried the scenario in Axway, but not able to call the URL directly. Any idea, friends.
    Kindly reply friends.
    Thanking you.
    Kind Regards,
    Jeg P.

    ok, and i answered you
    where's the problem? why you can not send this message? is the problem in axway? or you can't see message in the XI? If you can send it from axway and it doesn't reach the XI, what information do you have in your axway log?
    p.

  • Moving of flat file from the application server after upload.

    Hi All,
    I am uploading data from a flat file placed on the application server by a BDC program.
    After the BDC has created the session i want to transfer the flat file from that folder to another folder on the application server by changing the name of the flatfile.
    Can any one suggest the best way of doing this particular scenario?
    Thanks in advance.
    Regards
    Satish Nair.

    Here is a sample program.
    report zrich_0001.
    data: d1 type localfile value '/usr/sap/TST/SYS/Data1.txt',
          d2 type localfile value '/usr/sap/TST/SYS/Data2.txt'.
    data: begin of itab occurs 0,
          rec(20) type c,
          end of itab.
    data: wa(20) type c.
    start-of-selection.
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into wa.
          if sy-subrc <> 0.
            exit.
          endif.
          itab-rec = wa.
          append itab.
        enddo.
      endif.
      close dataset d1.
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
      delete dataset d1.
    Regards,
    Rich Heilman

  • Can 'GUI_UPLOAD'  to be used to upload excel file lonely?

    Hi experts,
    I wonder that can 'GUI_UPLOAD'  to be used to upload excel file lonely. I tried and use 'asc' as the L_FILETYPE, but the data uploaded contain many '###yyy'. But if I save the excel file as a txt file,
    the data can be uploaded by 'GUI_UPLOAD' correctly. So what is the problem?

    Excel files be can't uploaded using "GUI_UPLOAD".
    Use the FM "ALSM_EXCEL_TO_INTERNAL_TABLE"
    Try this code:
    * Upload data direct from excel.xls file to SAP
    REPORT ZEXCELUPLOAD.
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program

Maybe you are looking for