ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET

HI ,
CAN I HAVE ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET
Regards,
Aruna

Standard ALV grid uses the FM <b>ALV_XXL_CALL</b> for exporting data into Excel. You can put a break-point in the FM and check it for urself.
for ur info - the above FM takes the internal table name, internal table content and the field catalog as input.

Similar Messages

  • How to get data from excel sheet present in the client(local) system?

    hi,
    I have to upload the data from an excel sheet present in the local system(not on the server) to the table using webdynpro.
    i donot want to upload the excel file
    if it is necessary to upload the file then it should be on temporary basis and it should be deleted automatically.
    i can get the data from excel sheet which is present in the km using HSSF api but how to do the same if it is in local system?
    if anyone has the sample application of this type please give me the link.
    thanks

    You can use the FM ALSM_EXCEL_TO_INTERNAL_TABLE with Web Dynpro ABAP.

  • Create a visual web part which get data from excel sheet and import it into sql server database in sharepoint 2010 (development)

    Hi,
    I want to create a visual webpart which will read data from excel sheet and import it in to sql server database.(using sharepoint development)
    I want to do it using visual webpart.
    Please help to solve the issue.
    Thanks in advance!
    Regards
    Rajni

    Hi  Rajni,
    Microsoft.Office.Interop.Excel assembly provides class to read excel file data, in your web part solution, reference the assembly, and following blog contains samples about how to read the excel file data,
    and import it to SQL  database.
    1.Create a Visual Web Part Project:Create
    Visual Web Parts in SharePoint 2010
    2.Read the excel workbook by using SPFile class:
    http://alancejacob.blogspot.in/2012/06/read-data-from-excel-file-and-insert-in.html
    http://stackoverflow.com/questions/14496608/read-excel-file-stored-in-sharepoint-document-library
    3.Export the excel workbook to SQL Server:
    http://www.c-sharpcorner.com/UploadFile/99bb20/import-excel-data-to-sql-server-in-Asp-Net/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to get data to excel sheet from background

    Hello Experts,
    I have be assigned a task where i have to find out all the reports and the variants containing a ' / '. I have written the code where i am able to scan through the entire list and get a set of reports and the variantsin the internal table. NOW i have to run the code in the background and the entire set of reports and the variants in the internal table to the excel sheet . So how do I do this? I am able to get the data in the excel sheet from the foreground using the FM GUI_download. But this FM does not work in the background.
    So what should be the ideal way to do this ?
    Thanks
    Aditya

    Hi,
    You can write the file into Application server.
    OPEN DATASET dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      LOOP AT it_itab INTO wa_itab.
        TRANSFER wa_itab TO dataset.
      ENDLOOP.
      CLOSE DATASET dataset
    use CG3Y transaction to download file from app server to presentation server.
    Regards
    Sree

  • Problem while executing app for retrieving data from EXCEL Sheet

    hi
    i have this exception while running my application of retrieving data from a Excel sheet through java application , i had also set theclasspath for jxl. jar file but where its going wrong i dont know heres my code
    import java.util.Date;
    import java.io.*;
    import jxl.*;
    import javax.swing.*;
    import java.awt.*;
    import jxl.read.biff.BiffException;
    public class testExcel2
    public static void main(String args[]) throws jxl.read.biff.BiffException
    try
    File f=new File("move.xls");
    jxl.Workbook workbook=null;
    jxl.Sheet sheet=null;
    workbook=jxl.Workbook.getWorkbook(f);
    sheet=workbook.getSheet(0);
    Cell a1 = sheet.getCell(0,0);
    String stringa1 = a1.getContents();
    System.out.println("stringshaddddddddjk "+stringa1);
    workbook.close();
    }catch(IOException ex){
    System.out.println("Error" + ex);
    catch (BiffException ex2){
    System.out.println("Error" + ex2);
    catch(IndexOutOfBoundsException ex1){
    System.out.println("Error" + ex1);
    compilation is sucees but while running its giving an EXCeption
    MicrosoftXP[Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    G:\mysfw\pgms>java testexcel2
    Exception in thread "main" java.lang.NoClassDefFoundError: testexcel2 (wrong nam
    e: testExcel2)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)

    Java is case sensitive. testexcel2 is different from testExcel2.
    G:\mysfw\pgms>java testexcel2
    Exception in thread "main" java.lang.NoClassDefFoundError: testexcel2 (wrong name: testExcel2)

  • Reg Function module for getting date

    Hi,
    My requirement is, If I entered some date I need to get past three months number of days.
    Eg: if I entered 26thDec,2007
    I need to get number of days form October 1st to 26th Dec.
    Regards,
    sarath.

    try this code
    REPORT ztest .
    DATA : lv_date TYPE syst-datum ,
           lv_tmp  TYPE i          .
    PARAMETERS : p_date TYPE syst-datum OBLIGATORY .
    CALL FUNCTION 'ADD_TIME_TO_DATE'
      EXPORTING
        i_idate = p_date
        i_time  = '3'
        i_iprkz = '2' "Month
      IMPORTING
        o_idate = lv_date.
    lv_tmp = lv_date - p_date .
    WRITE : 'Diff in days ' , lv_tmp .

  • Functional module for Getting Material classification data.

    Please tell me Functional module for Getting Material classification data like class type , class, characteristics and characteristics values for material.

    Dear,
    FM:
    CLAF_CLASSIFICATION_OF_OBJECTS
    Table KLAH Class Header Data
    - KSML Characteristics of a Class
    Regards,
    R.Brahmankar

  • Getting short dumps while reading bulky data from excel sheet

    Hi all,
    We have converted our non-unicode based sap system (R/3 4.7, Windows 2003,
    SQL 2000) into a unicode based system recently. We are facing two peculiar
    problems for last few days.
    *Problem 1 - *Whenever we want to upload the data from excel sheet, the
    system throws a dump after reading about 400 entries, while last week the
    same system used to read about 8000 entries in a single go.
    *Problem 2 - *Also, whenever we realease a transport requst from development
    containing a lot of changes, the request will reach the quality system but
    without the changes. but if i ll try to import the changes into quality
    system after generating more than one request containing small small
    changes, they get reflected in QAS immediately. Is there any size
    constraint in transporting a request fro DEV->QAS->PRD.
    Please suggest some ways.
    I am pasting the dump (that I am getting while data uploading from Excel).
    ~~~~~~~~~~~~~~~~~~
    Runtime errors
    MESSAGE_TYPE_X*
    Occurred on
    22.02.2008 at
    13:21:02*
    The current application triggered a termination with a short dump.
    What happened?
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
    What can you do?
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    Error analysis
    Short text of error message:
    Control Framework : Error processing control
    Technical information about the message:
    Diagnosis
    An error occurred when the system tried to process the commands
    from the Automation Queue on the presentation server.
    There are several possible reasons for this:
    - The installation of the SAP GUI on the presentation server is
    faulty or obsolete.
    - There is an error in the application program
    - There is an error in the SAPGUI or an integrated control
    Procedure
    1. Make sure that you have imported the appropriate Support
    Package, the current kernel, and GUI patch for the release of your
    System
    2. Check whether the error occurs locally on one or a few PCs, or
    generally on all PCs. Note whether the error only occurs for some
    users, for example because of a specific Customizing setting.
    If it only occurs locally, this suggests an installation problem
    with the PC. Check the installation; if necessary, reinstall the
    software. In the dump, search for the SY-MSGLI field, since it may
    point to the cause of the error.
    3. Activate the Automation Trace (in accordance with SAP Note
    158985).
    4.Start the transaction and continue until the screen immediately
    before the dump.
    5. From the System -> Utilities menu, choose Autom. Queue,
    Synchronous Processing.
    The status bar of the GUI displays the text:
    "Automation synchron flush mode on"
    6. If you now proceed with the application, the short dump will
    display the ABAP call that caused the error; the Automation Trace
    will contain the error on the presentation server.
    7. If necessary, load the short dump and trace files on to
    sapservX, so that SAP can analyze them.
    Message classe...... "CNDP"
    Number.............. 006
    Variable 1.......... " "
    Variable 2.......... " "
    Variable 3.......... " "
    Variable 4.......... " "
    Variable 3.......... " "
    Variable 4.......... " "
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:
    "MESSAGE_TYPE_X" C
    "SAPLOLEA" or "LOLEAU02"
    "AC_SYSTEM_FLUSH"
    If you cannot solve the problem yourself, please send the
    following documents to SAP:
    1. A hard copy print describing the problem.
    To obtain this, select the "Print" function on the current screen.
    2. A suitable hardcopy prinout of the system log.
    To obtain this, call the system log with Transaction SM21
    and select the "Print" function to print out the relevant
    part.
    3. If the programs are your own programs or modified SAP programs,
    supply the source code.
    To do this, you can either use the "PRINT" command in the editor or
    print the programs using the report RSINCL00.
    4. Details regarding the conditions under which the error occurred
    or which actions and input led to the error.
    System environment
    SAP Release.............. "620"
    Application server....... "nhbho930"
    Network address.......... "192.168.0.30"
    Operating system......... "Windows NT"
    Release.................. "5.2"
    Hardware type............ "4x Intel 801586"
    Character length......... 16 Bits
    Pointer length........... 32 Bits
    Work process number...... 0
    Short dump setting....... "full"
    Database server.......... "NHBHO930"
    Database type............ "MSSQL"
    Database name............ "DEV"
    Database owner........... "dev"
    Character set............ "C"
    SAP kernel............... "640"
    Created on............... "Aug 17 2007 00:18:58"
    Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
    Database version......... "SQL_Server_8.00 "
    Patch level.............. "196"
    Patch text............... " "
    Supported environment....
    Database................. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
    SAP database version..... "640"
    Operating system......... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2,
    Windows NT 6.0"
    User, transaction...
    Client.............. 300
    User................ "NHBABAP"
    Language key........ "E"
    Transaction......... "SE38 "
    Program............. "SAPLOLEA"
    Screen.............. "SAPMSDYP 0010"
    Screen line......... 0
    Information on where terminated
    The termination occurred in the ABAP program "SAPLOLEA" in
    "AC_SYSTEM_FLUSH".
    The main program was "ZBDC_CONTRACT ".
    The termination occurred in line 29 of the source code of the (Include)
    program "LOLEAU02"
    of the source code of program "LOLEAU02" (when calling the editor 290).
    ~~~~~~~~~~~~~~~~~~~~~
    Thank you all.
    Cheers.
    Mitra __.____._

    for the 50 millionth time: Excel spreadsheets are NOT databases, you should NOT try to use them as such and NEVER access them using JDBC.
    You should also under NO condition use the JDBC-ODBC bridge driver (that was actually the 78 millionth time that was told someone).

  • Error in XXL_FULL_API function module for download report to excel

    Hi all,
    I am using XXL_FULL_API function module for download report to excel, In this FM we have to fill a table called sema        = t_gxxlt_s. in this table we have a fields called
    i_sema-col_no  = 19.
      i_sema-col_src = 19.
      i_sema-col_typ = 'STR'.
      i_sema-col_ops = 'DFT'
    here in 'col_typ' if we put STR in excel it will come as a text but i wnat the time field what i have to pass ?
    and for filed 'col_ops' also ??
    Thaks,
    Sridhar

    Hi sridhar joshi,
    Please check this program
    REPORT Excel.
    TABLES:
      sflight.
    * header data................................
    DATA :
      header1 LIKE gxxlt_p-text VALUE 'Suresh',
      header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
    * Internal table for holding the SFLIGHT data
    DATA BEGIN OF t_sflight OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA END   OF t_sflight.
    * Internal table for holding the horizontal key.
    DATA BEGIN OF  t_hkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_h.
    DATA END   OF t_hkey .
    * Internal table for holding the vertical key.
    DATA BEGIN OF t_vkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_v.
    DATA END   OF t_vkey .
    * Internal table for holding the online text....
    DATA BEGIN OF t_online OCCURS 0.
            INCLUDE STRUCTURE gxxlt_o.
    DATA END   OF t_online.
    * Internal table to hold print text.............
    DATA BEGIN OF t_print OCCURS 0.
            INCLUDE STRUCTURE gxxlt_p.
    DATA END   OF t_print.
    * Internal table to hold SEMA data..............
    DATA BEGIN OF t_sema OCCURS 0.
            INCLUDE STRUCTURE gxxlt_s.
    DATA END   OF t_sema.
    * Retreiving data from sflight.
    SELECT * FROM sflight
             INTO TABLE t_sflight.
    * Text which will be displayed online is declared here....
    t_online-line_no    = '1'.
    t_online-info_name  = 'Created by'.
    t_online-info_value = 'KODANDARAMI REDDY'.
    APPEND t_online.
    * Text which will be printed out..........................
    t_print-hf     = 'H'.
    t_print-lcr    = 'L'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the header'.
    APPEND t_print.
    t_print-hf     = 'F'.
    t_print-lcr    = 'C'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the footer'.
    APPEND t_print.
    * Defining the vertical key columns.......
    t_vkey-col_no   = '1'.
    t_vkey-col_name = 'MANDT'.
    APPEND t_vkey.
    t_vkey-col_no   = '2'.
    t_vkey-col_name = 'CARRID'.
    APPEND t_vkey.
    t_vkey-col_no   = '3'.
    t_vkey-col_name = 'CONNID'.
    APPEND t_vkey.
    t_vkey-col_no   = '4'.
    t_vkey-col_name = 'FLDATE'.
    APPEND t_vkey.
    * Header text for the data columns................
    t_hkey-row_no = '1'.
    t_hkey-col_no = 1.
    t_hkey-col_name = 'PRICE'.
    APPEND t_hkey.
    t_hkey-col_no = 2.
    t_hkey-col_name = 'CURRENCY'.
    APPEND t_hkey.
    t_hkey-col_no = 3.
    t_hkey-col_name = 'PLANETYPE'.
    APPEND t_hkey.
    t_hkey-col_no = 4.
    t_hkey-col_name = 'SEATSMAX'.
    APPEND t_hkey.
    t_hkey-col_no = 5.
    t_hkey-col_name = 'SEATSOCC'.
    APPEND t_hkey.
    t_hkey-col_no = 6.
    t_hkey-col_name = 'PAYMENTSUM'.
    APPEND t_hkey.
    * populating the SEMA data..........................
    t_sema-col_no  = 1.
    t_sema-col_typ = 'STR'.
    t_sema-col_ops = 'DFT'.
    APPEND t_sema.
    t_sema-col_no = 2.
    APPEND t_sema.
    t_sema-col_no = 3.
    APPEND t_sema.
    t_sema-col_no = 4.
    APPEND t_sema.
    t_sema-col_no = 5.
    APPEND t_sema.
    t_sema-col_no = 6.
    APPEND t_sema.
    t_sema-col_no = 7.
    APPEND t_sema.
    t_sema-col_no = 8.
    APPEND t_sema.
    t_sema-col_no = 9.
    APPEND t_sema.
    t_sema-col_no = 10.
    t_sema-col_typ = 'NUM'.
    t_sema-col_ops = 'ADD'.
    APPEND t_sema.
    CALL FUNCTION 'XXL_FULL_API'
      EXPORTING
    *   DATA_ENDING_AT          = 54
    *   DATA_STARTING_AT        = 5
       filename                = 'TESTFILE'
       header_1                = header1
       header_2                = header2
       no_dialog               = 'X'
       no_start                = ' '
        n_att_cols              = 6
        n_hrz_keys              = 1
        n_vrt_keys              = 4
       sema_type               = 'X'
    *   SO_TITLE                = ' '
      TABLES
        data                    = t_sflight
        hkey                    = t_hkey
        online_text             = t_online
        print_text              = t_print
        sema                    = t_sema
        vkey                    = t_vkey
    EXCEPTIONS
       cancelled_by_user       = 1
       data_too_big            = 2
       dim_mismatch_data       = 3
       dim_mismatch_sema       = 4
       dim_mismatch_vkey       = 5
       error_in_hkey           = 6
       error_in_sema           = 7
       file_open_error         = 8
       file_write_error        = 9
       inv_data_range          = 10
       inv_winsys              = 11
       inv_xxl                 = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    please refer this link
    http://www.thespot4sap.com/Articles/Download_to_excel.asp
    Best regards,
    raam

  • Want to create RFC FM for Getting data in CRM from R/3

    Hi,
    I have made the RFC connection in CRM system , now I want to make RFC FM for getting data from R/3 'MARD' table into CRM, If any one help me how to do this.
    From CRM system I will pass Plant & material no to FM and I need Storage location & Storage Bin from R/3 MARD table in CRM.
    Thanks
    Bobby

    Dear Bobby,
    You would create a FM in SE37 select 'Remote Enabled Module' radio-button in attributes tab of Function Builder.
    Select matnr werks LGORT LGPBE
               from MARD
               into ET_MARD
               where matnr = i_matnr
               and  werks = i_werks.
    Note:
    matnr is material number
    werks is plant
    LGORT is storage location
    LGPBE is storage bin
    Hope this will help.
    Regards,
    Naveen.

  • How to  send ALV output data into Excel sheet format via Mail to the user?

    Hi friends,
    I have a doubt ie,
    How to  send ALV output data into Excel sheet format via Mail to the user?
    regards
    Moosa

    Hi,
    Provide the output internal table to the objbin in the below FM
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = i_docdata
                put_in_outbox              = c_x
           TABLES
                packing_list               = i_objpack
                object_header              = i_objhead
                contents_bin               = i_objbin
                contents_txt               = i_objtxt
                receivers                  = i_reclist
    and specify the document type
      i_objpack-doc_type   = 'XLS'.
    and try.
    Regards,
    Nandha

  • Any function module for getting fiscal year week numbers

    can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
    Thanks!
    Lakshmikandh

    hi,
    Use FM <b>'DATE_GET_WEEK'</b>...
    parameter D1 LIKE SCAL-DATE.
    Data w like scal-week.
    CALL FUNCTION <b>'DATE_GET_WEEK'</b>
    EXPORTING
    date = D1
    IMPORTING
    WEEK = W
    EXCEPTIONS
    DATE_INVALID = 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.
    write W+4(2).
    Regards,
    Santosh

  • Function module for convert date as sap internal format ?

    Hi All,
    Is there any standard function module to convert the date filed as SAP internal date?
    My problem is while uploading data from excel sheet date filed can be any format
    for exp: dd/mm/yyyy or mm/dd/yyyy or yyyy/dd/mm or dd-mm-yyyy,mm-dd-yyyy
                 dd-mm-yyyy or dd.mm.yyyy or mm.dd.yyyy  etc...
    In our case there is no particular format in excel it can be differ for each user. I know we have few FM's in standard.
    But those are not working for my req. pls help me if you have any idea.
    Thanks in advance.
    Regards,
    Venkat Mote.

    Hi Venkatesh,
    Can you please check with the following function module. For my case, it is working fine.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
      EXPORTING
        datum = p_gs_date
        dtype = 'DATS'
      IMPORTING
        idate = p_gs_date
    Hope it helps to you.
    Regards
    Rajkumar Narasimman

  • Function Module to DownLoad data in excel.

    Hi All,
    Is there a FM to download data in excel sheet.
    Regards,
    Vidya.

    Hi use this works.
    TYPE-POOLS: truxs.
    DATA: it_raw TYPE truxs_t_text_data.
    Uploading data from Local system to SAP.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    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.
    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     = i_spread[]         "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.

  • Error in CLOB datatype for transfering data from Excel to Oracle database

    Am using excel sheet as source and Oracle as target Database.
    For all tables the operations works smoothly except for tables containing CLOB datatype.
    Initially i have used SQL Developer to transfer some data into excell sheets, now i want to transfer those file's data into another Oracle Database.
    What other options do i have?
    Is excel not the right tool to transfer CLOB datatypes?

    well,
    I couldn't suggest an excel to do it...
    You can go from Oracle to Oracle with the PL/SQL IKM. It works fine.
    Does it help you?

Maybe you are looking for