Upload Excel Files to ITable

Hi... maybe someone of you have been reading about how to upload excel files to an internal table using function module ALSM_EXCEL_TO_INTERNAL_TABLE.
The problem that I found with this technique is that it is not possible to use this FM with the SAP WAS because it gives a runtime dump (it only works if the file is on the client machine and if the function module is called from SAPGUI.
Then I have found the topic
Re: BSP and Excel
And one guy puts something interesting like this:
1. In the application use file upload to upload the file.
2. caputure the content and length
DATA: data TYPE REF TO CL_HTMLB_FILEUPLOAD.
data ?= CL_HTMLB_MANAGER=>GET_DATA(
request = runtime->server->request
name = 'fileUpload'
id = 'xx').
name = data->file_name.
content = data->file_content.
length = data->file_length.
content_type = data->file_content_type.
3. Then read the data using the class
DATA: conv TYPE REF TO CL_ABAP_CONV_IN_CE.
conv = CL_ABAP_CONV_IN_CE=>CREATE( input = CONTENT ).
conv->READ( importing data = Variable len = length ).
Now... has anyone continued with this sample? has anyone put the contents into an internal table (with the READ method)...
If someone did it please show me how to..
Thanks
Ariel

Hi Craig,
Ok, I was reading the Thomas's Blog and the thread about excel. The blog talks about encoding and the thread is about how to "download" the table. I want to upload the excel to an internal table.
So, I am almost finishing the code.. But I have a problem (named DUMP) when I create the "conv" object (check the code) the problem is because I dont know how to call the create method indicating 'UFT-16' as encoding.
I show you my "OnInputProcessing" code:
IF button_event->id = 'btnUpload'.
  fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                       request = request
                       id      = 'txtFile'
                       name    = 'fileUpload' ).
  IF ( fileUpload->file_name  NE '' ) AND
     ( fileUpload->file_length GT 0 ).
     IF fileUpload->file_content_type
        = 'application/vnd.ms-excel'.
        DATA: content   TYPE ZMTVEMAT,
              conv      TYPE REF TO CL_ABAP_CONV_IN_CE,
              viewoff   TYPE REF TO CL_ABAP_VIEW_OFFLEN,
              it_off    TYPE ABAPOFFLENTAB,
              wa_off    TYPE ABAPOFFLEN,
              dd_fields TYPE DDFIELDS,
              wa_fields TYPE DFIES,
              len       TYPE I.
        conv = CL_ABAP_CONV_IN_CE=>CREATE(
                  encoding = 'UTF-16'
                  endian   = 'L'
                  input    = fileUpload->file_content ).
        CALL FUNCTION 'TR_NAMETAB_GET'
           EXPORTING
            IV_TABNAME                   = 'ZMTVMAT'
            IV_GET_LENGTHS_IN_CHARMODE   = 'X'
            IV_GET_TEXTS                 = ' '
           IMPORTING
            ET_DFIES                     = dd_fields.
            LOOP AT dd_fields INTO wa_fields.
              MOVE wa_fields-offset TO wa_off-ioff.
              MOVE wa_fields-intlen TO wa_off-ilen.
              APPEND wa_off TO it_off.
            ENDLOOP.
   viewoff = CL_ABAP_VIEW_OFFLEN=>CREATE( tab = it_off ).
            conv->READ(
                        exporting
                          view = viewoff
                        importing
                          data = content
                          len = len ).
This is the DUMP
Runtime Errors         CONVT_CODEPAGE_INIT                               
Exception              CX_SY_CODEPAGE_CONVERTER_INIT                     
       Occurred on     30.11.2004 at 13:20:47                                                                               
The conversion of some code pages is not supported.                                                                               
What happened?                                                                               
The conversion of texts in code page 'UTF-' to code page '1100' is not   
supported.                                                               
Thanks
Ariel

Similar Messages

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • SharePoint 2013 Foundation error when uploading Excel files

    Hello 
    I have a specific problem. I have an xlsx file that I cannot upload in SharePoint. Normally our SharePoint can upload Excel files and other file formats normally but this one has data with nearly 5000 rows. The size of the file is less then 500 KB. The error
    message is: "The URL is invalid. Perhaps it refers to a nonexistent file or folder, or it refers to a valid file or folder in the current Web." When I am uploading this file I am getting the same error message in every library. When I save
    the file as a 97-2003 compatible xls then it works. Sometimes even Excel files with Macros won't upload. 
    Kind regards
    ivicapro1987

    Hi,
    This issue occurs when the Version column is configured as an Indexed Column. 
    To work around this issue, remove the Version column from the list of Indexed Columns for the list that has this issue. To do this, follow these steps:
    Browse to the list where the issue exists.
    In the ribbon, click the Library tab, and then click
    Library Settings.
    In the fields list, click Indexed Columns.
    In the Indexed Columns list, click Version.
    Click Delete, and then click OK.
    Upload any files that you previously experienced the issue with.
    Reference:
    https://support.microsoft.com/kb/2796640?wa=wsignin1.0
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Upload Excel File from Portal (R/3 working fine)

    Hi Experts!!
    We have a report in which we are uploading an excel file from presentation server into an itab. When F4 clicked for file path, browser will open for choosing the path. Now, we have created an iView in Portal for this t-code. However, F4 is not working from Portal, rather giving an error 'Please wait. You will be forwarded automatically. This page had to be included for technical reasons.'.
    We need to upload excel file even from Portal too. Can somebody please give me some inputs or suggestions?

    Hi Jigar,
    Now I am able to get into SAP screen. However it's not opening the t-code that I mentioned. I gave some Z t-code ZTEST. Once I check the iView, it is showing SAP screen with the below things:
    Service Type:
    Service ID:
    TCode: ZTEST
    Object Type:
    Key:
    Field 1:
    Val. 1:
    Field 2:
    Val.2:
    Field 3:
    Val 3:
    And at the bottom it's giivng a warning message:
    Object type or object does not exist
    Message no. 1W001
    In iView properties I can see Object Type as com.sapportals.portal.iview. Is this the same Object Type that the message is talkign about? Can you please help me out?

  • How to upload excel file in Webdynpro application using ABAP

    Hi Experts,
    Am developing a webdynpro application in which it will take an excel file as input and display the contents in the form of a table in output. I am able to upload tab delimited text file and populate the table using the below code but not able to do the same with .xls file. Pls let me know if I need to use a different function module for upload excel file.
    get single attribute
      wd_context->get_attribute(
        EXPORTING
          name =  `DATASOURCE`
        IMPORTING
          value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
        READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.
        READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.
        APPEND fs_table TO t_table1.
      ENDLOOP.
    lo_nd_data = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_data->bind_table( T_TABLE1 ).
    Thanks,
    Subathra

    Dear Exports
    Can anyone guide me how to uplode the .xlsx or ..xls formatted excel file using abap webdynpro without converting it to .txt file. Because my client requirement is only to upload the excel file. because to convert the .xlsx flie to .txt file it will be time taking and cost expanssive. Another requirement is suppose today i have create a application for uploading a file which has 8 columns and 10 rows. suppose tomorrow the client will make some changes in that flat file means the client will add 2 extra columns and 10 more columns in that fil. and will upload that file. Then the new file will be display on the browser or old file. but my requirement is to display the new file in browser.
    Can anyone kindly help to solve my problem. I am completely fresher in this field and I need to do it as soon as possible. Please help to solve the problem. 
    Regards
    Rashmita

  • Error message while upload excel file (with macro) to sap (iw28)

    While upload excel file to sap through iw28, i get error message (vb)
    u2022     i have to say that the excel file contain macro , with out the macro , work fine .
    u2022     The error display just in refresh command.
    the error message :
    Public Sub ALV_CUS_Exit()
    Dim objs As ChartObjects
    Dim obj As ChartObject
    Dim sheet As Worksheet
    Dim r As Range
    For Each sheet In Sheets
    Set objs = sheet.ChartObjects
    For Each obj In objs
    Set r = Sheets("RawData").UsedRange
    obj.Chart.SetSourceData Source:=r
    Next obj
    Next sheet
    End Sub

    hi,
    This is releated to the ABAP coding...There might be some ouput problem in the Abap list viewer...Pls check it with the ABAP consultant...
    Regards
    Priyanka.P

  • Upload excel file in SAP BI-7.0

    Hi ,
    i  need to  upload an excel  file in SAP BI 7.0 where the standard r/3 fm are not available.
    Currently we uploading a file in CSV format but now we want to upload using XLS also.
    ia way to upload excel  file in SAP BI 7.0
    Best Regards,
    Sharad
    Edited by: sharad narayan on Jan 7, 2011 10:58 AM
    while searching the forum i  found the fm MS_EXCEL_OLE_STANDARD_DAT .
    but while using this FM i  am getting the exception file not exist.
    Kindlu  suggest what  to  do
    i  even tried the FM TMP_GUI_GET_FILE_EXIST' to  check  the existence of the file.
    even then same problem.
    Please suggest
    Edited by: sharad narayan on Jan 10, 2011 2:51 PM

    Hi,
    Scheduled jobs are the jobs for which we have scheduled for a time, may be daily so that each day the scheduled jobs will trigger at the time given.So that every time u need not to trigger the job manully urself as the schedule time will hit the job will trigger itself.
    Released job means the job which is in between Sheduled state and active state.say For eg: 10 jobs are Scheduled in a queue Job no 1 is released from the queue that means any moment it will be in active state.So it is the state between Schedule and Active state of a job.
    Thanks
    Varun

  • Uploading Excel file  using 'ALSM_EXCEL_TO_INTERNAL_TABLE'

    Hi,
    I am uploading excel file into an internal table using 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
    but I'm getting a popup with the message
    'There is a large amount of the information on the clipboard. Do you want to be able to paste this information into another programme later.' and there are three buttons in the popup 'YES', 'CANCEL' and 'NO'. but for any choice there is no data in the internal table. 
    the progrsm is working in other systems but giving problem in customer laptop, can you please tell me is there any settings need to set for EXCEL or SAP.
    system details are as below
    OS: windows 7
    MS-Office - 2007
    SAP : ECC06

    Looks like there was an intention to clear the clipboard in the code, but this does not seem to work.
    I copied the function module to my own version and added the following code, which seems to work :
    * clear clipboard
      refresh excel_tab.
      call method cl_gui_frontend_services=>clipboard_export
         importing
            data                 = excel_tab
         changing
            rc                   = ld_rc
         exceptions
            cntl_error           = 1
    *       ERROR_NO_GUI         = 2
    *       NOT_SUPPORTED_BY_GUI = 3
            others               = 4
    * Copy only one cell to prevent the clipboard data message.
      call method of worksheet 'Cells' = h_cell
          exporting #1 = 1 #2 = 1.
      m_message.
      call method of worksheet 'Cells' = h_cell1
          exporting #1 = 1 #2 = 1.
      m_message.
      call method  of worksheet 'RANGE' = range
                     exporting #1 = h_cell #2 = h_cell1.
      m_message.
      call method of range 'SELECT'.
      m_message.
    * copy marked area (whole spread sheet) into Clippboard
      call method of range 'COPY'.
      m_message.
    * quit Excel and free ABAP Object - unfortunately, this does not kill
    * the Excel process
      call method of application 'QUIT'.
      m_message.

  • Uploading Excel file to SAP

    Hi Friends,
    Iam trying to Upload Excel file into SAP using the FM
    ALSM_EXCEL_TO_INTERNAL_TABLE. But it is going to dump n the error is                                                                             
    The call to the function module "ALSM_EXCEL_TO_INTERNAL_TABLE" is incorrect:                                                                               
    In the function module interface, you can specify only                          
    fields of a specific type and length under "INTERN".                            
    Although the currently specified field                                          
    "ITAB" is the correct type, its length is incorrect.                            
    I have attached the code also.
    Please let me know where iam getting the error.
    Code :
    Tables : mara,
             ztable.
    parameters : p_infile like rlgrap-filename.
    data : begin of itab occurs 0,
           matnr like mara-matnr,
           mbrsh like mara-mbrsh,
           matkl like mara-matkl,
           end of itab.
           CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
               FILENAME                      = p_infile
               I_BEGIN_COL                   = 1
               I_BEGIN_ROW                   = 1
               I_END_COL                     = 100
               I_END_ROW                     = 100
             TABLES
               INTERN                        = itab
           EXCEPTIONS
             INCONSISTENT_PARAMETERS       = 1
             UPLOAD_OLE                    = 2
             OTHERS                        = 3
           IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
    sort itab by matnr.
    loop at itab.
    write:/ itab.
    *modify ztable from table itab.
    endloop.

    hi check this code:
    DATA : BEGIN OF TYP_INPUT ,
               MATNR LIKE MARA-MATNR,
               WERKS LIKE MARC-WERKS,
               LGORT LIKE MARD-LGORT,
               LGNUM LIKE MLGN-LGNUM,
               LGTYP LIKE MLGT-LGTYP,
               LTKZA LIKE MLGN-LTKZA,
               LTKZE LIKE MLGN-LTKZE,
               LGBKZ LIKE MLGN-LGBKZ,
               LGPLA LIKE MLGT-LGPLA,
            END OF TYP_INPUT.
    *Input File Data
    DATA : IT_FILE LIKE TYP_INPUT OCCURS 0 WITH HEADER LINE.
    *"INTERNAL TAB TO TAKE EXCEL SHEET.
    DATA : IT_EXCEL    LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
           CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
            EXPORTING
                 FILENAME                = P_PFILE
                 I_BEGIN_COL             = 1
                 I_BEGIN_ROW             = 2
                 I_END_COL               = 9
                 I_END_ROW               = 6000
            TABLES
                 INTERN                  = IT_EXCEL
            EXCEPTIONS
                 INCONSISTENT_PARAMETERS = 1
                 UPLOAD_OLE              = 2
                 OTHERS                  = 3.
    * IT_EXCEL CONTAINS DATA IN THE FORM OF ROW, COL, VALUE       *
    * CONVERTING THAT INTERNAL TABLE TO FORMAT THAT OF EXCEL SHEET *
       IF NOT IT_EXCEL[] IS INITIAL.
         SORT IT_EXCEL BY ROW COL.
         LOOP AT IT_EXCEL.
           CASE IT_EXCEL-COL.
            WHEN 1.
                  IT_FILE-MATNR = IT_EXCEL-VALUE.
            WHEN 2.
                  IT_FILE-WERKS = IT_EXCEL-VALUE.
            WHEN 3.
                  IT_FILE-LGORT = IT_EXCEL-VALUE.
            WHEN 4.
                  IT_FILE-LGNUM = IT_EXCEL-VALUE.
            WHEN 5.
                  IT_FILE-LGTYP = IT_EXCEL-VALUE.
            WHEN 6.
                  IT_FILE-LTKZA = IT_EXCEL-VALUE.
            WHEN 7.
                  IT_FILE-LTKZE = IT_EXCEL-VALUE.
            WHEN 8.
                  IT_FILE-LGBKZ = IT_EXCEL-VALUE.
            WHEN 9.
                  IT_FILE-LGPLA = IT_EXCEL-VALUE.
           ENDCASE.
           AT END OF ROW.
             APPEND IT_FILE.
             CLEAR IT_FILE.
           ENDAT.
         ENDLOOP.
       ELSE.
         MESSAGE I000  WITH 'The input file is empty'.
         STOP.
       ENDIF.

  • Uploading excel files into Web UI

    We are following the blog http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUI-UploadingdatafromExcelfiles
    to upload excel files into Web UI.
    The  problem which we are facing is that the values are not getting populated in the text are and in the
    event handler EH_ONSERVEREVENT, no values are being populated in lt_items table.
    It would be great if someone could help us with this.

    Hi Nidhi,
    I have tried the blog but due to some reason, could not get it worked out.
    But, If U are ok to use CSV input files, instead of excel, U can use the standard component "GS_FILE_UPLOAD" as a popup and upload the files into the required assignment blocks.

  • Upload excel file to internal table in web dynpro program

    Hi friend's
    In web dynpro program how to upload excel file into  internal table and finally data will be save Y table.

    hi,
    See the properties of File Upload UI element..
    Link: [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/732f0510d83ff6e10000000a42189c/frameset.htm]
    Goto References -> User Interface Elements -> Integration Category -> File upload..
    After creating the 'FILE UPLOAD' element in a view.. Bind a datasource(a context attribute with STRING) with the data property..
    Double click on ONACTION_UPLOAD method. Write a code as given below.
    METHOD onactionon_upload .
    TYPES :   BEGIN OF str_itab,
           name(10) TYPE c,
           age(10) TYPE c,
           END OF str_itab.  DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
             i_data TYPE STANDARD TABLE OF string,
             l_string TYPE string,
             fs_table TYPE str_itab,
             l_xstring TYPE xstring,
             fields TYPE string_table,
             lv_field TYPE string.
    DATA : t_table TYPE if_main=>elements_data_tab,
             data_table TYPE if_main=>elements_data_tab.
    * get single attribute 
    wd_context->get_attribute(  
    EXPORTING    
    name =  `DATASOURCE`  
    IMPORTING    
    value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string. 
    SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    * Bind With table Element.
    LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
       READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.  
    READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.   
    APPEND fs_table TO t_table1.     "Append to  the internal  table
      ENDLOOP.
    Edited by: Rameshkumar Raamasamy on Feb 9, 2010 9:39 AM

  • 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

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Problem in Uploading excel file using WebDynpro for Java

    Hi  All
    I have followed for Uploading excel file using WebDynpro for Java added by  Tulasi Palnati
    I done all, but I'm getting 500 Exception please contact u r system admin meag  at run time also  Jxl/Workbook class not found msag  but i downloaded Jxl.jar file and  there is no error signals  in coding part. How can I solve the Problem.
    Thanks
    Polaka

    Please ask the people in the Web Dynpro Java forum for a solution.

  • Readily available bean in PI 7.1 to upload excel file

    Hi,
    Is there any readily available bean to upload excel file thru File adapter to PI. working on PI7.1 version. Please let me know if any.
    Thanks,
    Jogula Ramesh

    For developing Adapter module for same, please check the links below:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa
    http://wiki.sdn.sap.com/wiki/display/stage/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns

Maybe you are looking for

  • Error while creating  RMA with Original Order

    Hi All, Can any one pls help to troubleshoot this error. I'm using oe_order_pub.process_order API. Error: message is :ORA-06502: PL/SQL: : NULL value of a key of the index table an error of number or value in a package OE_Order_PVT, procedure Lines m

  • Flex 2 + Yahoo API problemmo....

    Hi there, I've put together an application which incorporates the Yahoo! Maps API. More info regarding that can be found here - the problem I am experiencing at the moment is with markers I've added to the yahoo map not functioning properly when inco

  • Help with vidieo? Premiere Elements

    I created a slide show in organizer. Now in Premier Elements I have added a narritive and sound track. Hve burnt a dvd in hvchd and it works fine on my dvd players at home but will not work on some other dvd players I have tried. Also when I down loa

  • Cursors in package

    I want to know what is faster if a definition of a cursor is declared in a package or if a cursor id declared in the same procedure where it is going to be used ? What advantadges and disadvantages it has ? Thanks for all Joel P�rez

  • Maximum number of panes is 9 ?

    Hi I am just coding a screen for an SBO 2004 customer. It is based on a table with lots of fields and the customer would like to have 16 folders to display all these, similar to the business partner screen. This would mean I will need 16 pane levels,