How to upload Excel data in Ztables fastly & easily.

Dear ALL,
I  want to compare material codes in 2 different excel sheets.
I have downloaded output from 2 different SQVI into 2 different excel sheets.
Now I want to compare these 2 sheets to get matching codes or unmatching codes.
I can use VLOOKUP in excel also. But How can I make use of ABAP by downloading these excel data in 2 different Ztables and compare these 2 tables with some user defined TC (transaction code) ?
For this activity How to upload Excel data(2 sheets) in 2 Ztables fastly & easily ?
Is there any method other than SCAT , BDC and LSMW  ???
Or which is best method in above ?
Pl' reply.
Thanks.

Have a look at the program
*: Description                                                :
*: This is a simple example program to get data from an excel :
*: file and store it in an internal table.                    :
*: Author : www.sapdev.co.uk, based on code from Jayanta      :
*: SAP Version : 4.7                                          :
REPORT  zupload_excel_to_itab.
TYPE-POOLS: truxs.
PARAMETERS: p_file TYPE  rlgrap-filename.
TYPES: BEGIN OF t_datatab,
      col1(30)    TYPE c,
      col2(30)    TYPE c,
      col3(30)    TYPE c,
      END OF t_datatab.
DATA: it_datatab type standard table of t_datatab,
      wa_datatab type t_datatab.
DATA: it_raw TYPE truxs_t_text_data.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      field_name = 'P_FILE'
    IMPORTING
      file_name  = p_file.
*START-OF-SELECTION.
START-OF-SELECTION.
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    I_FIELD_SEPERATOR        =
      i_line_header            =  'X'
      i_tab_raw_data           =  it_raw       " WORK TABLE
      i_filename               =  p_file
    TABLES
      i_tab_converted_data     = it_datatab[]    "ACTUAL 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.
END-OF-SELECTION.
END-OF-SELECTION.
  LOOP AT it_datatab INTO wa_datatab.
    WRITE:/ wa_datatab-col1,
            wa_datatab-col2,
            wa_datatab-col3.
  ENDLOOP.
Message was edited by:
        K N  REDDY

Similar Messages

  • Upload excel data thru gui_upload in CRM

    Hi,
      Can anyone tell me how to upload excel data into internal table thru GUI_UPLOAD only in CRM without converting into text files. Please help me out.
    Thanks in advance.
    regards
    sireesha

    hi,
    Use the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      exporting
        filename                      = filename
        i_begin_col                   = i_begin_col
        i_begin_row                   = i_begin_row
        i_end_col                     = i_end_col
        i_end_row                     = i_end_row
      tables
        intern                        = intern
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3          .
    if sy-subrc <> 0.
    * error
    endif.
    Regards,
    Richa

  • How to upload the data from excel(3 tabs) file to sap environment

    Hi all,
    This is Mahesh.
    how to upload the data from excel(3 tabs) file to sap environment (internal tables) while doing bdc.

    Hi,
    The FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' makes it possible to load a worksheet into an internal table in ABAP.
    However, if you want to get the data from several worksheets, I think you are stuck with OLE access to your Excel Workbook...
    You can find a solution for 2 worksheets in this post :
    TO UPLOAD DATA FROM 2 EXCEL SHEETS INTO TWO INTERNAL TABLES
    I think you can easily modify it to handle any number of worksheets.
    Hope it helps !
    Best regards,
    Guillaume

  • How to upload the data to SAP-DMS(Document Management System)

    Dear sir,
    How to upload the data to SAP-DMS (Document Management System) please give me the code for this .ex for (excel format or tab  deliminated) to sap system through BAPI i have to pass.
    regards
    R M Patil

    Hi,
    May be following link may help you.
    /thread/315373 [original link is broken]
    /message/205534#205534 [original link is broken]
    Thanks,
    Sree.

  • 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

  • Upload excel data into Internal table

    Hi,
    I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.
    Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.
    I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.
    Please advise if you know any alternate procedure to upload excel data into internal table.
    Thanks,
    Kumar.

    Moderator message - Cross post locked
    Rob

  • Problem in Uploading Excel Data ! - Urgent

    Dear Experts,
    I am uploading excel data using FM 'TEXT_CONVERT_XLS_TO_SAP' , its directly convert data and store in internal table same as in excel sheet(row , column wise).
    But the problem is , one of the column having description more then 500 characters. so while uploding excel to itab its truncating the text and only uploding 255 characters.
    Is there any other way , so that i can upload more then 500 characters long text. Also i have tried 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM , it was also not working.
    Please Help me , its Urgent.
    Points will be rewared.
    Thanks & Regards,

    Hi,
    Please use FM 'GUI_UPLOAD'.
    types: begin of ttab,
           rec(1000) type c,
           end of ttab.
    types: begin of tdat,
           fld1(10) type c,
           fld2(10) type c,
           fld3(10) type c,
           end of tdat.
    data: itab type table of ttab with header line.
    data: idat type table of tdat with header line.
    data: file_str type string.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      file_str = p_file.
      call function 'GUI_UPLOAD'
           exporting
                filename                = file_str
                filetype                = 'ASC'
           tables
                data_tab                = itab
           exceptions
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                others                  = 17.
    Best regards,
    Prashant

  • Step- by- Step on How to Load Excel data into Crystal Reports?

    Hi Friends,
                      Can anyone send me a Step- by- Step on How to Load Excel data into Crystal Reports? Pls help me. Thanks in Advance.
    Vijay

    It's also important to 'prep' the excel file prior to connecting to it.
    Give the data tab a meaningful name
    Make sure the column headers are unique and that every column has a header
    Delete any blank tabs
    If you have trouble with Excel changing the data type of a field (say, a social security number you want to be a string value rather than a number so you don't lose leading zero) an alternative would be to save the spreadsheet file as a CSV, create a schema.ini to specify the data types for each column (example below) and use the same steps to connect except instead of choosing Excel 8.0, scroll to the bottom and choose Text.  You have to make sure the CSV file is in the same folder as the schema.ini file that defines the columns.
    Schema.ini example:
    200912PUSD.csv
    ColNameHeader=True
    Format=CSVDelimited
    MaxScanRows=25
    CharacterSet=OEM
    Col1=SSN Char Width 9
    Col2=LAST_NM Char Width 25
    Col3=FIRST_NM Char Width 25
    Col4=DOB Date
    Col5=STDNT_ID Char Width 10
    Col6=SORTKEY Char Width 10
    Col7=SCHOOL_NM Char Width 30
    Col8=OTHER_ID Integer
    Col9=GRADE Char Width 2
    The filename in the first line needs to have the []  brackets around it, but I couldn't get it to display in this forum correctly.
    Edited by: Eric Petersen on Jan 27, 2010 9:40 AM

  • How to  upload Transaction data from source system to BI 7.0

    Dear friends,
    I want to know how to  upload Transaction data from source system to BI 7.0.
    if anybody having step by step material for this process ,please send it to my
    mail id.
    [email protected]
    [email protected]
    Thanks,
    D.prabhu

    Hi,
    it works in the same way as before in case you are not using the new features like the dtp and the transformations. Using the new features, you schedule a infopackage to load the data up to psa and schedule a dtp to post the data to the targets.
    regards
    Siggi
    PS: We want to share knowledge in sdn and not keeping it private by having the information sent to our email adresses.

  • How 2 upload Master Data 4 a Info Object in BI 7.

    Hi,
    I have to load Master Data to a Info Object in BI 7 ( Like Diret Update in 3.5 )
    How 2 upload Master Data 4 a Info Object in BI 7.
    Dont suggest me to " Insert Characteristic as Data Target".
    Points assured.
    Thank you.

    hi...chk these steps..
    Uploading of master data
    Log on to your SAP
    Transaction code RSA1—LEAD YOU TO MODELLING
    1. Creation of Info Objects
    • In left panel select info object
    • Create info area
    • Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    • Create new characteristics and key figures under respective catalogs according to the project requirement
    • Create required info objects and Activate.
    2. Creation of Data Source
    • In the left panel select data sources
    • Create application component(AC)
    • Right click AC and create datasource
    • Specify data source name, source system, and data type ( master data attributes, text, hierarchies)
    • In general tab give short, medium, and long description.
    • In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    • In proposal tab load example data and verify it.
    • In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    • Activate data source and read preview data under preview tab.
    • Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    3. Creation of data targets
    • In left panel select info provider
    • Select created info area and right click to select Insert Characteristics as info provider
    • Select required info object ( Ex : Employee ID)
    • Under that info object select attributes
    • Right click on attributes and select create transformation.
    • In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    • Activate created transformation
    • Create Data transfer process (DTP) by right clicking the master data attributes
    • In extraction tab specify extraction mode ( full)
    • In update tab specify error handling ( request green)
    • Activate DTP and in execute tab click execute button to load data in data targets.
    4. Monitor
    Right Click data targets and select manage and in contents tab select contents to view the loaded data. Alternatively monitor icon can be used.
    hope this helps..

  • How to upload the data from two sheets in one excel into SAP

    Hi experts,
                    My requirement is to upload the data from two sheets in an excel into an internal table.How can this be achieved.Is some OLE application has to be used?
    Thanks
    Abhishek

    Hi
    see this program will upload excel file to application.
    *& Report  ZSD_EXCEL2
    REPORT  ZSD_EXCEL2.
    types: begin of ttab ,
          fld1(30) type c,
          fld2(30) type c,
          fld3(30) type c,
          fld4(30) type c,
          fld5(30) type c,
          end of ttab.
    data: itab type table of ttab with header line.
    selection-screen skip 1.
    parameters: p_file type localfile default
                'C:\test.xls'.
    selection-screen skip 1.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      clear itab. refresh itab.
      perform upload_data.
      loop at itab.
        write:/ itab-fld1, itab-fld2, itab-fld3, itab-fld4, itab-fld5.
      endloop.
    * Upload_Data
    form upload_data.
      data: file type  rlgrap-filename.
      data: xcel type table of alsmex_tabline with header line.
      file = p_file.
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = file
                i_begin_col             = '1'
                i_begin_row             = '1'
                i_end_col               = '200'
                i_end_row               = '5000'
           tables
                intern                  = xcel
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
      loop at xcel.
        case xcel-col.
          when '0001'.
            itab-fld1 = xcel-value.
          when '0002'.
            itab-fld2 = xcel-value.
          when '0003'.
            itab-fld3 = xcel-value.
          when '0004'.
            itab-fld4 = xcel-value.
          when '0005'.
            itab-fld5 = xcel-value.
        endcase.
        at end of row.
          append itab.
          clear itab.
        endat.
      endloop.
    endform.

  • How to upload excel file in application server??

    Hi,
    How to upload an excel file into internal table in background mode from application server?
    Thanks

    Hi vipin,
    check this it may help you...
    hope below links helps you
    Export the report list to Excel Sheet
    http://www.sapdevelopment.co.uk/file/file_updown.htm
    or below is a sample programme which helps you upload and download
    REPORT ytest5 LINE-SIZE 80
                    LINE-COUNT 65
                    NO STANDARD PAGE HEADING.
    TABLES: dd02l, dd03l.
    * selection screen
    SELECTION-SCREEN BEGIN OF BLOCK b00 WITH FRAME TITLE text-b00.
    SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
    PARAMETERS: tabname     LIKE dd02l-tabname OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b01.
    SELECTION-SCREEN BEGIN OF BLOCK b03 WITH FRAME TITLE text-b03.
    PARAMETERS: path(30)    TYPE c DEFAULT 'C:SAPWorkdir'.
    SELECTION-SCREEN END OF BLOCK b03.
    SELECTION-SCREEN BEGIN OF BLOCK b04 WITH FRAME TITLE text-b04.
    PARAMETERS: p_exp RADIOBUTTON GROUP radi,
                p_imp RADIOBUTTON GROUP radi,
                p_clear     AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK b04.
    SELECTION-SCREEN END OF BLOCK b00.
    * data
    DATA: q_return     LIKE syst-subrc,
          err_flag(1)  TYPE c,
          answer(1)    TYPE c,
          w_text1(62)  TYPE c,
          w_text2(40)  TYPE c,
          winfile(128) TYPE c,
          w_system(40) TYPE c,
          winsys(7)    TYPE c,
          zname(8)     TYPE c,
          w_line(80)   TYPE c.
    * internal tables
    DATA : BEGIN OF textpool_tab OCCURS 0.
            INCLUDE STRUCTURE textpool.
    DATA : END OF textpool_tab.
    * table for subroutine pool
    DATA : itab(80) OCCURS 0.
    * events
    INITIALIZATION.
      PERFORM check_system.
    AT SELECTION-SCREEN ON tabname.
      PERFORM check_table_exists.
    START-OF-SELECTION.
      PERFORM init_report_texts.
      PERFORM request_confirmation.
    END-OF-SELECTION.
      IF answer = 'J'.
        PERFORM execute_program_function.
      ENDIF.
    TOP-OF-PAGE.
      PERFORM process_top_of_page.
    * forms
    *       FORM CHECK_TABLE_EXISTS                                      *
    FORM check_table_exists.
      SELECT SINGLE * FROM dd02l
      INTO CORRESPONDING FIELDS OF dd02l
      WHERE tabname = tabname.
      CHECK syst-subrc NE 0.
      MESSAGE e402(mo) WITH tabname.
    ENDFORM.
    *       FORM INIT_REPORT_TEXTS                                        *
    FORM init_report_texts.
      READ TEXTPOOL syst-repid
      INTO textpool_tab LANGUAGE syst-langu.
      LOOP AT textpool_tab
      WHERE id EQ 'R' OR id EQ 'T'.
        REPLACE '&1............................'
        WITH tabname INTO textpool_tab-entry.
        MODIFY textpool_tab.
      ENDLOOP.
    ENDFORM.
    *       FORM REQUEST_CONFIRMATION                                     *
    FORM request_confirmation.
    * import selected, confirm action
      IF p_imp = 'X'.
    *   build message text for popup
        CONCATENATE 'Data for table'
                     tabname
                     'will be imported' INTO w_text1 SEPARATED BY space.
    *   check if delete existing selected, and change message text
        IF p_clear = ' '.
          w_text2 = 'and appended to the end of existing data'.
        ELSE.
          w_text2 = 'Existing Data will be deleted'.
        ENDIF.
        CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
             EXPORTING
                  defaultoption  = 'N'
                  textline1      = w_text1
                  textline2      = w_text2
                  titel          = 'Confirm Import of Data'
                  cancel_display = ' '
             IMPORTING
                  answer         = answer
             EXCEPTIONS
                  OTHERS         = 1.
      ELSE.
    *   export selected, set answer to yes so export can continue
        answer = 'J'.
      ENDIF.
    ENDFORM.
    *       FORM EXECUTE_PROGRAM_FUNCTION                                 *
    FORM execute_program_function.
      PERFORM build_file_name.
      CLEAR: q_return,err_flag.
      IF p_imp = 'X'.
        PERFORM check_file_exists.
        CHECK err_flag = ' '.
        PERFORM func_import.
      ELSE.
        PERFORM func_export.
      ENDIF.
    ENDFORM.
    *       FORM BUILD_FILE_NAME                                          *
    FORM build_file_name.
      MOVE path TO winfile.
      WRITE '' TO winfile+30.
      WRITE tabname TO winfile+31.
      WRITE '.TAB' TO winfile+61(4).
      CONDENSE winfile NO-GAPS.
    ENDFORM.
    *       FORM CHECK_FILE_EXISTS                                        *
    FORM check_file_exists.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                filename = winfile
                query    = 'FE'
           IMPORTING
                return   = q_return
           EXCEPTIONS
                OTHERS   = 1.
      IF syst-subrc NE 0 OR q_return NE 1.
        err_flag = 'X'.
      ENDIF.
    ENDFORM.
    *     FORM func_export                                              *
    FORM func_export.
      CLEAR itab. REFRESH itab.
      APPEND 'PROGRAM SUBPOOL.' TO itab.
      APPEND 'FORM DOWNLOAD.' TO itab.
      APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
      CONCATENATE 'INCLUDE STRUCTURE'
                  tabname
                  '.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'DATA: END OF IT_TAB.' TO itab.
      CONCATENATE 'SELECT * FROM'
                  tabname
                  'INTO TABLE IT_TAB.' INTO w_line  SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'CALL FUNCTION ''WS_DOWNLOAD''' TO itab.
      APPEND 'EXPORTING' TO itab.
      CONCATENATE 'filename = ' ''''
                  winfile '''' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'filetype = ''DAT''' TO itab.
      APPEND 'TABLES' TO itab.
      APPEND 'DATA_TAB = IT_TAB.' TO itab.
      APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
      APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
      APPEND 'WRITE: /1 syst-vline,' TO itab.
      APPEND '''EXPORT'',' TO itab.
      APPEND '15 ''data line(s) have been exported'',' TO itab.
      APPEND '68 syst-index,' TO itab.
      APPEND '80 syst-vline.' TO itab.
      APPEND 'ULINE.' TO itab.
      APPEND 'ENDFORM.' TO itab.
      GENERATE SUBROUTINE POOL itab NAME zname.
      PERFORM download IN PROGRAM (zname).
    ENDFORM.
    *       FORM func_import                                              *
    FORM func_import.
      CLEAR itab. REFRESH itab.
      APPEND 'PROGRAM SUBPOOL.' TO itab.
      APPEND 'FORM UPLOAD.' TO itab.
      APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
      CONCATENATE 'INCLUDE STRUCTURE'
                  tabname
                  '.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'DATA: END OF IT_TAB.' TO itab.
      APPEND 'DATA: BEGIN OF IT_TAB2 OCCURS 0.' TO itab.
      CONCATENATE 'INCLUDE STRUCTURE'
                  tabname
                  '.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'DATA: END OF IT_TAB2.' TO itab.
      APPEND 'CALL FUNCTION ''WS_UPLOAD''' TO itab.
      APPEND 'EXPORTING' TO itab.
      CONCATENATE 'filename = ' ''''
                  winfile '''' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'filetype = ''DAT''' TO itab.
      APPEND 'TABLES' TO itab.
      APPEND 'DATA_TAB = IT_TAB.' TO itab.
      IF p_clear = 'X'.
        CONCATENATE 'SELECT * FROM'
                    tabname
                    'INTO TABLE IT_TAB2.' INTO w_line SEPARATED BY space.
        APPEND w_line TO itab.
        APPEND 'LOOP AT IT_TAB2.' TO itab.
        CONCATENATE 'DELETE'
                    tabname
                    'FROM IT_TAB2.' INTO w_line SEPARATED BY space.
        APPEND w_line TO itab.
        APPEND 'ENDLOOP.' TO itab.
        APPEND 'COMMIT WORK.' TO itab.
      ENDIF.
      APPEND 'LOOP AT IT_TAB.' TO itab.
      CONCATENATE 'MODIFY'
                  tabname
                  'FROM IT_TAB.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'ENDLOOP.' TO itab.
      APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
      APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
      APPEND 'WRITE: /1 syst-vline,' TO itab.
      APPEND '''IMPORT'',' TO itab.
      APPEND '15 ''data line(s) have been imported'',' TO itab.
      APPEND '68 syst-index,' TO itab.
      APPEND '80 syst-vline.' TO itab.
      APPEND 'ULINE.' TO itab.
      APPEND 'ENDFORM.' TO itab.
      GENERATE SUBROUTINE POOL itab NAME zname.
      PERFORM upload IN PROGRAM (zname).
    ENDFORM.
    *       Form  CHECK_SYSTEM
    *            Check users workstation is running
    *            WINDOWS 95, or WINDOWS NT.
    *            OS/2 uses 8.3 file names which are no good for
    *            this application as filenames created are 30 char
    *            same as table name.
    *            You could change the logic to only use the first 8 chars
    *            of the table name for the filename, but you could possibly
    *            get problems if users had exported already with a table
    *            with the same first 8 chars.
    *            As an alternate method you could request the user to input
    *            the full path including filename and remove the logic to
    *            build the path using the table name.
    FORM check_system.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                query  = 'WS'
           IMPORTING
                return = winsys.
      IF winsys NE 'WN32_95'.
        WRITE: 'Windows NT or Windows 95/98 is required'.
        EXIT.
      ENDIF.
    ENDFORM.                               " CHECK_SYSTEM
    *       FORM PROCESS_TOP_OF_PAGE                                      *
    FORM process_top_of_page.
      FORMAT COLOR COL_HEADING INTENSIFIED ON.
      ULINE.
      CONCATENATE syst-sysid
                  syst-saprl
                  syst-host INTO w_system SEPARATED BY space.
      WRITE : AT /1(syst-linsz) w_system CENTERED.
      WRITE : AT 1 syst-vline, syst-uname.
      syst-linsz = syst-linsz - 11.
      WRITE : AT syst-linsz syst-repid(008).
      syst-linsz = syst-linsz + 11.
      WRITE : AT syst-linsz syst-vline.
      LOOP AT textpool_tab WHERE id EQ 'R'.
        WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
      ENDLOOP.
      WRITE : AT 1 syst-vline, syst-datum.
      syst-linsz = syst-linsz - 11.
      WRITE : AT syst-linsz syst-tcode(004).
      syst-linsz = syst-linsz + 11.
      WRITE : AT syst-linsz syst-vline.
      LOOP AT textpool_tab WHERE id EQ 'T'.
        WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
      ENDLOOP.
      WRITE : AT 1 syst-vline, syst-uzeit.
      syst-linsz = syst-linsz - 11.
      WRITE : AT syst-linsz 'Page', syst-pagno.
      syst-linsz = syst-linsz + 11.
      WRITE : AT syst-linsz syst-vline.
      ULINE.
      FORMAT COLOR COL_HEADING INTENSIFIED OFF.
      LOOP AT textpool_tab WHERE id EQ 'H'.
        WRITE : AT /1(syst-linsz) textpool_tab-entry.
      ENDLOOP.
      ULINE.
    ENDFORM.
    if it helps you reward with points.
    regards,
    venu
    regards,
    venu.

  • Is it possible to upload Excel data in SAP ?

    Hi everybody,
    I just joined the forum u2013 nice to meet all of you.
    We have to input in SAP a huge amount of customer invoices (A/R) from an Excel File and I was thinking if it is possible to set up all the required fields and to automatically upload all those invoices instead of going and entry them one by one.
    Thank you in advance for any idea about how to make this data entry process easier u2026

    Hello,
    yes, this is possible. We are doing something similar - we upload .xls files through a functional module WS_UPLOAD in a transparent z table and then we work over the entries . You could do that either through TCD or write directly in the database (not recommended).
    Feel free to ask for details!
    Regards,
    Diana Abu-Gosh

  • Uploading excel data to database table

    Dear Experts,
                         I have an Excel file which was downloaded from SQL database, now I need to export this data into my 'ztable', for this first I created an internal table of ztable structure and tried to upload into this table through ''TEXT_CONVERT_XLS_TO_SAP".
    But I was unable to get data into the internal table(incompatible type), so now I created an internal table of character type fileds now I able to get data to this internal table, but to put this internal table data to actual database table it gives error, here the actual problem is the fields of internal table are getting concated with blank spaces(observed through debug), I unable to condense these blanks also, (I have created an Excel of my own and put data into it and uploaded that data there is no problem working fine but this problem occurs only for the excel downloaded from SQL db)
                       The problem occurs for quantity and currency fields(I tried through standard FMs also to convert data types ), Could plz suggest something..........
                                                                                    Thank you
                                                                                    Regards
                                                                                    Srinivas

    Hi,
    To upload excel sheet into database table, define a types which is of same as table fields.
    and try it with the function module  TEXT_CONVERT_XLS_TO_SAP
    Here is a sample code:
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
            EXPORTING
             I_FIELD_SEPERATOR          ='X'   
              i_tab_raw_data             = fs_truxs( TYPE of  truxs_t_text_data.)
              i_filename                 = '<FILE-PATH>'
          tables
              i_tab_converted_data       = <Internal Table>
           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.
    LOOP AT <internal-table> INTO field string.
    INSERT <DATABASE- TABLE> FROM <field string>.
    ENDLOOP.
    Hope this solves the issue.
    Regards,
    Rajani

  • Upload Excel data to Sharepoint list VIA infopath form

    Hi,
    I'll try to explain the process of what I want to do first.
    1. In Excel
    I have an exceldocument (XLS, XLSX or XLSM) with 4 named columns and a named worksheet saved locally on my computer.
    I want to upload this data into preferably a custom list in sharepoint but it needs to run via a infopath template first.
    2. In Infopath
    The Infopath template will prompt the user to specify values in 2 additional fields.
    After giving input to these fields user may browse for the locally stored excel document and upload the document.
    In the same infopath template a dynamic array should be visible containing 6 columns (4 from excel + 2 from headerlevel of template) and the amount of rows based on the number of rows from excelsheet.
    At the end of template a submit button is found for uploading the entire array into sharepoint custom list.
    Is this possible to do at all?
    NOTE! End user should not have to save the excelsheet as XML file nor do a XML mapping.
    Infopath should, perhaps with help of VBA read excelsheet and transfer data to correct destination in sharepoint on it self.
    Looking forward to your reply

    Hi Jonas,
    You can attach your Excel doucment into InfoPath form and send InfoPath form to a custom web service. Then you can parse the Excel data and combine the Excel data and additional fields into SharePoint list in the customized  web service.
    For more information, you can have a look at the thread:
    http://dandeng.blogspot.com/2012/03/submit-infopath-form-data-to-web.html
    http://www.codeproject.com/Articles/88547/Submit-entire-InfoPath-form-to-web-service
    https://social.msdn.microsoft.com/Forums/office/en-US/590f1e78-5c08-47bd-8af4-9709102b568d/webservice-to-send-attachments-in-infopath-form-to-different-location?forum=sharepointcustomization
    https://msdn.microsoft.com/en-us/library/office/gg575571.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for