How to download the datas of ALV tree without passing iternal table

Hi,
  I want to download the values of ALV tree output in an Excel file without using any internal table.
Please suggest your thoughts on the same.
Regards,
Shasiraj.C
Edited by: Raj Shasi on Aug 1, 2008 8:44 AM

There is one option -Export' in menu bar of ALV grid itself. Click on that and then click 'Local File'. Then choose 'Spreadsheet' option and provide local PC path for download.
Regards,
Aparna Gaikwad

Similar Messages

  • How to download the data which is in the table?

    how to download the data which is in the table?
    every field data in the table i want to download and once the download is finished then i have to set the flag as 'download is finished ' as one field in table?
    can any one help me in this.
    Phani.
    Edited by: phani kumarDurusoju on Jan 9, 2008 6:36 AM

    One way is to Download the data Directly from the database table using the path SE11->Give table name ->Execute -> system ->List ->Save ->Local File
    There u can downlaad the data .
    The ither way is to use the code
    The Following Code will be helpfull to You
    Data :ITAB  TYPE TRUXS_T_TEXT_DATA,
            FILE  TYPE STRING.
             C_ASC     TYPE CHAR10   VALUE 'ASC',
    DATA: L_STATUS TYPE C,
           L_MESSAGE TYPE PMST_RAW_MESSAGE,
           L_SUBJECT TYPE SO_OBJ_DES.
    DATA: L_FILELENGTH TYPE I.
      PERFORM download_to_pc
                  TABLES
                     itab
                  USING
                     filename
                     c_asc
                     c_x
                  CHANGING
                     l_status
                     l_message
                     l_filelength.
    FORM DOWNLOAD_TO_PC TABLES   DOWNLOADTAB
                        USING    FILENAME
                                 FILETYPE TYPE CHAR10
                                 DELIMITED
                        CHANGING STATUS
                                 MESSAGE TYPE PMST_RAW_MESSAGE
                                 FILELENGTH TYPE I.
      DATA: L_FILE TYPE STRING,
            L_SEP.
      L_FILE = FILENAME.
      IF NOT DELIMITED IS INITIAL.
        L_SEP = 'X'.
      ENDIF.
      STATUS = 'S'.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = L_FILE
          FILETYPE                = FILETYPE
          WRITE_FIELD_SEPARATOR   = L_SEP
        IMPORTING
          FILELENGTH              = FILELENGTH
        TABLES
          DATA_TAB                = DOWNLOADTAB
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
      IF SY-SUBRC <> 0.
        STATUS = 'E'.
        CASE SY-SUBRC.
          WHEN 1.
            MESSAGE = 'gui_download::file write error'.
          WHEN 2.
            MESSAGE = 'gui_download::no batch'.
          WHEN 3.
            MESSAGE = 'gui_download::gui refuse file transfer'.
          WHEN 4.
            MESSAGE = 'gui_download::invalid type'.
          WHEN 5.
            MESSAGE = 'gui_download::no authority'.
          WHEN 6.
            MESSAGE = 'gui_download::unknown error'.
          WHEN 7.
            MESSAGE = 'gui_download::header not allowed'.
          WHEN 8.
            MESSAGE = 'gui_download::separator not allowed'.
          WHEN 9.
            MESSAGE = 'gui_download::filesize not allowed'.
          WHEN 10.
            MESSAGE = 'gui_download::header too long'.
          WHEN 11.
            MESSAGE = 'gui_download::dp error create'.
          WHEN 12.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 13.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 14.
            MESSAGE = 'gui_download::ubknown dp error'.
          WHEN 15.
            MESSAGE = 'gui_download::access denied'.
          WHEN 16.
            MESSAGE = 'gui_download::dp out of memory'.
          WHEN 17.
            MESSAGE = 'gui_download::disk full'.
          WHEN 18.
            MESSAGE = 'gui_download::dp timeout'.
          WHEN 19.
            MESSAGE = 'gui_download::file not found'.
          WHEN 20.
            MESSAGE = 'gui_download::dataprovider exception'.
          WHEN 21.
            MESSAGE = 'gui_download::control flush error'.
          WHEN 22.
            MESSAGE = 'gui_download::Error'.
        ENDCASE.
      ENDIF.
    ENDFORM.             "download_to_pc
    At The End Reward points.
    Please it's Required.
    Thanks ,
    Rahul

  • Facing a Problem while downloading the data from ALV Grid to Excel Sheet

    Hi Friends,
    Iam facing a problem while downloading the data from ALV Grid to excel sheet. This is working fine in Development server , when comes to Quality and Production servers I have this trouble.
       I have nearly 11 fields in ALV Grid and out of which one is PO number of length 10 , all the ten numbers are visible in the excel sheet if we download it from development server but when we download it from Quality or Production it is showing only 9 numbers.
    Can any one help me out in this case.

    hi...
    if this problems happens dont display the same internal as u finally got.
    just create new internal table without calling any standard data elements and domains... but the new internal table s similar like ur final internal table and move all the values to new int table.
    for eg.
    ur final internal int table for disp,
         data : begin of itab occur 0,
                        matnr like mara-matnr,
                   end of itab.
    create new like this,
               data : begin of itab occur 0,
                        matnr(12) type N,
                   end of itab.

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • How to retrieve the data type of a column of a table?

    Hi,
    I want to retrieve the data type of a column of a table. At the moment I am querying "OCI_ATTR_DATA_TYPE" attribute but it is returning SQLT_CHR for both varchar2 and nvarchar2 data type columns. I need to distinguish between these two data types columns separately. Is there any API through which I could get the exact data type of a column i.e. "nvarchar2"?
    Thanks in advance.
    Hashim

    Hi,
    This is the Oracle C++ Call Interface (OCCI) forum - I'm not sure if you are using OCCI or OCI (Oracle Call Interface - the C interface) since you reference "OCI_ATTR_DATA_TYPE" which is more of an OCI focus than OCCI.
    In any case, you might take a look at "OCI_ATTR_CHARSET_FORM" which takes the following values:
    #define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
    #define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */So, if you have a datatype of SQLT_CHR and OCI_ATTR_CHARSET_FORM is SQLCS_IMPLICIT then you have a varchar2 if it is SQLCS_NCHAR then you have an nvarchar2.
    If you are using OCCI and not OCI then take a look at MetaData::ATTR_DATA_TYPE and MetaData::ATTR_CHARSET_FORM which expose OCI_ATTR_DATA_TYPE and OCI_ATTR_CHARSET_FORM respectively.
    Perhaps that will get you what you want.
    Regards,
    Mark

  • HT1766 How can restore the datas of Ipod touch without backup?

    Please help me the way to restore the datas of Ipod touch without backup, such as: images, documents, music, application... Thanks so much!!

    You can try to use the data recovery softwares.

  • How to validate the date in alv List

    Hi,
    How to write the code for date validation in alv.
    for ex
    i have to recieve the data in between any two months such as
    jan- feb,
    june-july,
    aug-sep,
    nov-dec,
    dec-jan,
    Could you plse explain me with some examples
    Thanking you
    Ravi Kumar

    I did not understand your requirement fully...but this code will give you date range for any two months..
    depending up on date you've supplied...
    DATA : date LIKE sy-datum,
           date_low LIKE sy-datum,
           date_high LIKE sy-datum.
    date = sy-datum.
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
      EXPORTING
        months  = '-1'
        olddate = date
      IMPORTING
        newdate = date_low.
    date_low+6(2) = '01'.
    CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
      EXPORTING
        day_in            = date
      IMPORTING
        last_day_of_month = date_high.
    WRITE :/ date_low.
    WRITE :/ date_high.

  • How to save the data from alv output

    My ALV output is editable one.I want that user can edit the output and  save the output details into database.How to do it?
    Moderator Message: Basic Question. This site is not an alternative for your Consultancy work. Put some effort of your own before turning to the forums for help. This is your LAST warning. One more violation will lead to Account deletion.
    Edited by: kishan P on Dec 6, 2010 6:45 PM

    Hi
    U need to implement an user_command and manage the functionality SAVE: when the user press SAVE you'll store the data into db.
    There are several programs demo in SAP and many solution in SCN forum: try to search it
    Max
    Moderator message: please think twice before replying. By now you should know which type of questions will be locked, so no point in replying, in a double sense.
    Edited by: Thomas Zloch on Dec 6, 2010 2:49 PM

  • How to retive the data from ALV display when checkbox clicked

    HI.....
    suppose i have a ALV list with 3 fields and checkbox attached with it.Now if i click any of the checkbox i want to retrieve the data from a particular field from one of the 3 fields.How shal i do that....
    Kind Regards.

    hi
    use the  field catalog property wa_fcat-hotspot = 'X' and then
    in in list display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program       = g_repid
            i_callback_pf_status_set = 'PFTEST'
    i_callback_user_command  = 'USER_COMMAND_ALV
            is_layout                = l_layout
            it_fieldcat              = it_fcat[]
          TABLES
            t_outtab                 = it_outtab[]
          EXCEPTIONS
            program_error            = 1
            OTHERS                   = 2.
        IF sy-subrc <> 0.
    FORM user_command_alv USING r_ucomm     LIKE sy-ucomm
                                rs_selfield TYPE slis_selfield.
      DATA: l_index      LIKE sy-tabix.
      DATA: l_belnr      TYPE rbkp-belnr.
      DATA: l_gjahr      TYPE rbkp-gjahr.
      DATA: l_awkey      TYPE bkpf-awkey.
      DATA: lwa_bkpf TYPE bkpf.
      CLEAR g_flag.
      IF r_ucomm EQ 'CREATESO'.
        REFRESH it_outsel[].
        LOOP AT it_outtab INTO wa_outtab.
          IF wa_outtab-check = 'X'.
    delete and put in new itab.
          ENDIF.
          CLEAR wa_outtab.
        ENDLOOP.
    shiva

  • How to print the data in ALV list  format using an existing layout

    Hi all
    Iam displaying the output in ALV list format and I saved the layout with some name
    now my requirement is i have to provide a field to select the layout name with F4 help and if i execute the program it should show the output with that layout format
    I tried this iam getting F4 help for that layout and selecting the layout but iam not getting the output with that layout iam getting the normal basic layout
    Can anyone send me a sample program code or what to do to get that
    Thank you

    Hi,
    refer this code.
    DATA : wa_variant  TYPE disvariant,       "Work area for variant
           wa_variant1 TYPE disvariant,       "Work area for variant
           wa_layout   TYPE slis_layout_alv,  "Work area for layout
    *&      Form  sub_get_default_variant                                  *
    This form will initialize the variant                               *
    FORM sub_get_default_variant .
    *--Clear
      CLEAR wa_variant.
    *--Pass the report name
      v_repid = sy-repid.                     "Report ID
      wa_variant-report = v_repid.
    *--Call the function module to get the default variant
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save        = c_save
        CHANGING
          cs_variant    = wa_variant1
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
    *--Check Subrc
      IF sy-subrc = 0.
        p_varnt = wa_variant-variant.
      ENDIF.
    ENDFORM.                                  "sub_get_default_variant
    *&      Form  sub_f4_for_variant                                       *
    This form will display the List of Variants                         *
    FORM sub_f4_for_variant .
    *--Local Variables
      DATA: lv_exit(1) TYPE c.                "ALV exit
    *--Call the function module to display the list of Variants
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant    = wa_variant
          i_save        = c_save
        IMPORTING
          e_exit        = lv_exit
          es_variant    = wa_variant1
        EXCEPTIONS
          not_found     = 1
          program_error = 2.
    *--Check Subrc
      IF sy-subrc <> 2 AND lv_exit IS INITIAL.
        p_varnt = wa_variant1-variant.
      ENDIF.
    ENDFORM.                                  "sub_f4_for_variant
    *&      Form  sub_check_variant                                        *
    This form will check the variant                                    *
    FORM sub_check_variant .
      IF NOT p_varnt IS INITIAL.
        CLEAR wa_variant1.
        MOVE wa_variant TO wa_variant1.
        MOVE p_varnt TO wa_variant1-variant.
    *--Call the function module to check the variant exist
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
          EXPORTING
            i_save     = c_save
          CHANGING
            cs_variant = wa_variant1.
        wa_variant = wa_variant1.
      ENDIF.
    ENDFORM.                                  "sub_check_variant
    Regards,
    Prashant

  • How can i save the data from ALV grid to my database tables?

    Hi all,
    Suppose in a grid i want to edit some fields and after editing the data i want to store the refresh data to my database tables. How can i do that? what is procedure? Please tell me in details.
    Thanks in Advance,
    Abhijit.

    Hi, 
       If you are doing it with oops concept then here are the steps for that.
    1) Declare DATA : er_data_changed TYPE REF TO cl_alv_changed_data_protocol,
           data_changed TYPE REF TO cl_alv_changed_data_protocol.
    --For getting the row no of of the row which is edited by user
    DATA : ls_mod_cell TYPE table of lvc_s_modi with header line,
    lv_value TYPE lvc_value .
    in your program
    2) Define a class
    CLASS notification DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS : handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
    ENDCLASS.                    "NOTIFICATION DEFINITION
    3) For that class write the implementation
    CLASS notification IMPLEMENTATION.
      METHOD handle_data_changed.
        PERFORM handle_data_changed USING er_data_changed.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "NOTIFICATION IMPLEMENTATION
    4) In the  PERFORM handle_data_changed  you code like this
    FORM handle_data_changed  USING er_data_changed type ref TO
    cl_alv_changed_data_protocol.
    SORT er_data_changed->mt_mod_cells BY row_id .
    LOOP AT er_data_changed->mt_mod_cells
    INTO ls_mod_cell .
    append ls_mod_cell.
    ENDLOOP.
    *LS_MOD_CELL will have all the rows which were edited
    and all the updated data corresponding to those rows*
    You can now use the the data which is in LS_MOD_CELL
    to update into your DB Table.
    LOOP at ls_mod_cell.
      READ TABLE itab3 INTO t_output INDEX ls_mod_cell-row_id.
    ENDLOOP.
    ENDFORM.                    " handle_data_changed
    Regards,
    Syed

  • How to print some data in alv which is not in table.

    hi all,
    Please can any one tell me how to print some text in the existing alv program to the second line of every record.
    the header is there but it is empty.In the data,
    there are two lines printing for a normal alv.the same text should be  printed in every second line of each record.Please reply soon.its urgent.

    This is not possible in ALV.
    When you say some text I assume the text is not in the same columnar format as the list is.
    ALV supports only a columnar format (except for subtotals).
    You can add the text to the ITAB by parsing the text to the record. It is not going to look good if you do that.

  • How to find the date when entries were made in DEVACCESS table

    Hi All,
    I needed to know if there is a way to find the date when an a developer was registered in our SAP system.
    I can see in DEVACCESS table (in SE16) all users registered along with their developer key but i also need to see when those entries were  made. Can you please help in this.
    Regards,
    Ashish Robinson

    Hi all,
    Thanks for the replies but my issue is that I got only for some users from SCCR in service maketplace. It seems that that other users for which (i can see entries in table DEVACCESS in my system) were created with somne other s-user which we dont know at thsi time so finding from service marketplace is not working!
    I needed to know iff there is some way i could get this information (when entries went in table or when the users registered) from SAP itself.... or may be from oracle sql level.
    Thanks to suggest <removed by moderator>
    Regards,
    Ashish Robinson
    Edited by: Thomas Zloch on Nov 23, 2010 2:28 PM - priority normalised

  • How to get the data like a tree in t-code /nEC01 ?

    Dear Friends,
    When using t-code EC01, you can click 'Structure' button, and then click 'Navigation'  button, finally the "SAP organizational objects" will be displayed as a tree - when you double click one item, it will be expaned.
    My problem is, is there any table or view to store these tree data? if not, how could I get them?
    Thanks a lot!

    Hi YIN,
    unable to understand ur question .... anyhow
    check the flow
    company codes ---> Controlling area
    controlling area  ---> Operating Concern
    SPRO Path-->
    SPRO--->Enterprise Structure ->Assignment->Controlling --->see both options.
    i think u know how to get table name from the view.

  • How to download background color of ALV with button "Export to Excel"

    Dear Experts:
    I can download the data of ALV in webdynpro for ABAP, but the color is missing.
    Does anybody know how to download background color of the ALV cells also by "Export to Excel" button?
    Could anybody help on this?
    Thanks in advance!
    Best Regards
    Lingxing Meng

    never experienced that...
    [chk this link|Download colored ALV output in to EXCEL sheet;
    a couple of intersting posts, they talk abt general ALV...
    try one of the last post ...when downloading
    use local file->HTML only.. but while choosing the file location to save give extension as XLS.

Maybe you are looking for

  • SendAndLoad fails in mac .app version - possible security setting problem?

    Hi all, I'm having trouble with sendAndLoad working on the .app version of a flash application I made. So far it's only happening on one computer, so it appears to be some sort of security setting.  Here's what's going on: I've built a flash applicat

  • Using flowplayer videos in RoboHelp 9

    Hi folks. I'm having real difficulty with intalling flowplayer into RH9 topics. I've followed many of the options on the flowplayer website and all of them seem to fail after they have been added to the RoboHelp topic. The code below takes a hyperlin

  • Multi-Provider Provider-Specific Properties for Navigational Attributes

    Experts, I need to over-ride the naming for a navigational attribute in a multi-provider. For non-navigational attributes you simply use the Provider-Specific Properties.  This selection is not available for navigational attributes. Is there a differ

  • Customizing pan and zoom (Ken Burns) slide by slide -- help

    Here's where I am: I've imported a bunch of photos into iMovie and they are happily sitting in the Photos Pane. Here's what I want to do: Photo-by-photo I want to customize the Ken Burns effect to change the zoom and panning behavior. Here's what I a

  • Update with join

    Hello Everybody I have 3 tables in a maxdb 7.6 database rbarbeitsplanpos key=rbarbeitsplanposid column gewichtung,... rbaplposausf key=rbaplposausfid columns rbarbeitsplanposid,... rbqspruefpos key=rbqspruefposid columns rbaplposausfid,gewichtung,...