Dragging rows in a grid

Is there way to make rows of a grid component draggable or
interchangable on runtime?

Hi,
Yes, Please refer the following link
http://www.sephiroth.it/file_detail.php?id=140
regards,
savneet

Similar Messages

  • Deactivate the double click/ hot spot for a particular row in alv grid.

    Hello,
       As per a certain condition how to deactivate the double click/ hot spot for a particular row in alv grid.
    Regards,
    Saroj

    where u define layout there is a field hotspot.like
    data: var.
    if con is true
    var = 'X'. (show hotspot)
    else.
    var = ' '. (deactive hotspot)
    elseif ws_fieldcat-fieldname = 'DMBTR'
                    AND ws_fieldcat-tabname = 'T_MTAB'.
          ws_fieldcat-do_sum = C_X.
          <b>ws_fieldcat-hotsopts = var.</b>
          MODIFY Wt_fieldcat FROM ws_fieldcat
                  TRANSPORTING   DO_SUM.
    It is helpful for u. if any problen send me ur coding i will change it.
    Regards
    Manish Kumar

  • Single Click on a Row in ALV Grid

    Hello,
    I am using 'CL_GUI_ALV_GRID' class for displaying an ALV grid.
    The requirement is when an user clicks on a row of the grid, a popup should be displayed with the details of that line, the user can edit/enter some fields there and when clicks on the save button, the updated values should get saved in database.
    Which event needs to be used for this? A sample code will be very useful.
    Thanks
    Indrajit.

    Hello Indrajit
    The same behaviour you see in the IDoc Monitor (transaction WE02, report RSEIDOC2). The event you need to handle is DELAYED_CHANGED_SEL_CALLBACK.
    Coding copied from RSEIDOC_ALV_CL:
    ***INCLUDE CLASS_ALV .
    * LOCAL CLASSES: Definition für ALV Ereignisse
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
        handle_delayed_changed_sel_cb
            FOR EVENT delayed_changed_sel_callback OF cl_gui_alv_grid,
    METHOD handle_delayed_changed_sel_cb.
    data: lt_rows TYPE lvc_t_row.
    data: l_row   TYPE lvc_s_row.
      CALL METHOD grid->get_selected_rows
               IMPORTING et_index_rows = lt_rows.
      CALL METHOD cl_gui_cfw=>flush.
      read table lt_rows index 1 transporting no fields.
      if sy-subrc ne 0.
        exit.
      endif.
      perform fill_special_values tables lt_rows.
      need_refresh = 'N'.
      set screen 100.
      leave screen.
    ENDMETHOD.
    Regards
      Uwe

  • How to print a report without row numbers or grid lines?

    Is there a way to print a Discoverer report without row numbers or grid lines?
    Thank you.
    Blake

    Hi Blake
    You're not doing anything wrong.
    The settings made when you use Tools | Options | Sheet are global settings that are only applied to new workbooks and worksheets going forwards. These have no impact on existing worksheets or even the one you currently have open. This is because Discoverer does not know whether your original worksheets were setup in a certain way deliberately as opposed to inheriting the global settings as they were at that time. What this also means, reading between the lines, is that these settings must then be stored within the worksheet itself, and this is exactly what happens.
    Thus, to edit an existing worksheet's settings you need to open the worksheet, right-click in the sheet and from the popup select either Format Table or Format Crosstab depending upon the type of worksheet you are working with. After making any necessary changes you will need to save or re-save the workbook in order for those settings to be remembered for the next time.
    Best wishes
    Michael

  • How to change a color for a row in ALV grid display

    Hi,
       how to change a color for a row in ALV grid display based on a condition.Any sample code plz

    Hello Ramya,
    Did you check in [SCN|How to color a row of  alv grid]
    Thanks!

  • Color a row with ALV GRID

    Hi my friends,
    I have written a small ALV Grid where some rows should be colored, dependend on their status in a table. But it's not working and I can't find out, why it is not working. I've already studied all the topics in this forum, which are related to 'row color alv grid', but I can't find the mistake in my code. Is anyone able to find out what is wrong here?
    Thanks a lot for your help!
    *& Report  /BMC_TST_SHOWLOG
    REPORT  /BMC_TST_SHOWLOG.
    TYPES: BEGIN OF log_table.
      TYPES:  log_level TYPE /bmc_log_message,
              cr_date TYPE /bmc_cr_date,
              message TYPE /bmc_log_message,
              linecolor(4) TYPE c.
    TYPES: END OF log_table.
    DATA: lt_log TYPE TABLE OF log_table with HEADER LINE,
          lt_log2 TYPE TABLE OF log_table with HEADER LINE,
          lt_log_list TYPE TABLE OF log_table,
          lt_line LIKE LINE OF lt_log_list,
          container_r TYPE REF TO cl_gui_custom_container,
          grid_r TYPE REF TO cl_gui_alv_grid,
          gc_custom_control_name TYPE scrfname VALUE 'CONTAINER_LOG',
          fieldcat_r TYPE lvc_t_fcat,
          layout_r TYPE lvc_s_layo,
          logA TYPE /bmc_log_level,
          logB TYPE /bmc_log_level,
          logC TYPE /bmc_log_level,
          logD TYPE /bmc_log_level,
          logE TYPE /bmc_log_level,
          ls_ct TYPE lvc_s_scol,
          ok_code LIKE sy-ucomm.
    *DATA BEGIN OF ls_log_list OCCURS 0.
    *DATA: log_level TYPE /bmc_log_message,
    *      cr_date TYPE /bmc_cr_date,
    *      message TYPE /bmc_log_message,
    *      rowcolor(4) TYPE c.
    *DATA END OF ls_log_list.
    *DATA: lt_log_list TYPE TABLE OF log_table.
    PARAMETERS: loglevlA  TYPE c AS CHECKBOX,
                loglevlB  TYPE c as CHECKBOX,
                loglevlC  TYPE c As CHECKBOX,
                loglevlD  TYPE c aS CHECKBOX,
                loglevlE  TYPE c AS CHECKBOX,
                dateA     TYPE /bmc_cr_date OBLIGATORY,
                dateB     TYPE /bmc_cr_date.
    CALL SCREEN 0200.
    MODULE user_command_0200 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          SET SCREEN 0.
          MESSAGE ID 'BC400' TYPE 'S' NUMBER '057'.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.
    MODULE status_0200 OUTPUT.
      SET PF-STATUS 'DYNPRO200'.
      SET TITLEBAR 'D0200'.
    ENDMODULE.
    MODULE display_alv OUTPUT.
      PERFORM display_alv.
    ENDMODULE.
    FORM display_alv.
      IF grid_r IS INITIAL.
    *----Creating custom container instance
      CREATE OBJECT container_r
      EXPORTING
        container_name = gc_custom_control_name
      EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        others = 6.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT grid_r
        EXPORTING
          i_parent = container_r
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init = 2
          error_cntl_link = 3
          error_dp_create = 4
          others = 5.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          PERFORM get_log_data.
    *----Preparing field catalog.
          PERFORM prepare_field_catalog CHANGING fieldcat_r.
    *----Preparing layout structure
          PERFORM prepare_layout CHANGING layout_r.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
          CALL METHOD grid_r->set_table_for_first_display
          EXPORTING
            is_layout = layout_r
          CHANGING
            it_outtab = lt_log2[]
            it_fieldcatalog = fieldcat_r
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error = 2
            too_many_lines = 3
            OTHERS = 4.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          ELSE.
            CALL METHOD grid_r->refresh_table_display
          EXCEPTIONS
            finished = 1
            OTHERS = 2.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
        ENDIF.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDFORM.
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
        DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
        i_structure_name = '/BMC_LOG'
      CHANGING
        ct_fieldcat = pt_fieldcat[]
      EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
      IF sy-subrc ne 0.
    *--Exception handling
      ENDIF.
      LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'UUID'.
            ls_fcat-no_out = 'X'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'LOG_LEVEL'.
            ls_fcat-coltext = 'Meldungsart'.
            ls_fcat-outputlen = '25'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CR_DATE'.
            ls_fcat-coltext = 'Erstellungsdatum'.
            ls_fcat-outputlen = '20'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CR_TIME'.
            ls_fcat-no_out = 'X'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'MESSAGE'.
            ls_fcat-coltext = 'Nachricht'.
            ls_fcat-outputlen = '50'.
            MODIFY pt_fieldcat FROM ls_fcat.
        ENDCASE.
    *    CASE ls_fcat-value.
    *      WHEN '1'.
    *        ls_fcat-line_color = 'c100'.
    *    ENDCASE.
      ENDLOOP.
    ENDFORM.
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X'.
      ps_layout-grid_title = 'Log'.
      ps_layout-smalltitle = 'X'.
      ps_layout-info_fname = 'linecolor'.
    ENDFORM.
    FORM get_log_data.
      if loglevlA = 'X'.
        logA = '1'.
      ENDIF.
      if loglevlB = 'X'.
        logB = '2'.
      ENDIF.
      if loglevlC = 'X'.
        logC = '3'.
      ENDIF.
      if loglevlD = 'X'.
        logD = '4'.
      ENDIF.
      if loglevlE = 'X'.
        logE = '5'.
      ENDIF.
      IF dateB ne 0.
        SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
          OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA and cr_date <= dateB.
      ELSE.
        SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
          OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA.
      ENDIF.
    *    and cr_date >= dateA.
        SORT lt_log_list ASCENDING.
        LOOP AT lt_log_list INTO lt_line.
        IF lt_line-log_level = '1'.
          lt_line-log_level = 'Info'.
          lt_line-linecolor = 'C100'.
        ENDIF.
        IF lt_line-log_level = '2'.
          lt_line-log_level = 'Warning'.
          lt_line-linecolor = 'C200'.
        ENDIF.
        IF lt_line-log_level = '3'.
          lt_line-log_level = 'Error'.
          lt_line-linecolor = 'C300'.
        ENDIF.
        IF lt_line-log_level = '4'.
          lt_line-log_level = 'Debug'.
          lt_line-linecolor = 'C400'.
        ENDIF.
        IF lt_line-log_level = '5'.
          lt_line-log_level = 'Trace'.
          lt_line-linecolor = 'C500'.
        ENDIF.
        APPEND lt_line TO lt_log2.
        ENDLOOP.
    ENDFORM.
    SELECTION-SCREEN BEGIN OF SCREEN 0100 TITLE text-001 AS WINDOW.
    SELECTION-SCREEN END OF SCREEN 0100.

    > change to this
    >
    > <b>ps_layout-stylefname = 'LINECOLOR'.</b>
    >
    > sorry ignore the above line
    >
    > just debug and check what is happening
    >
    > Message was edited by:
    >         Chandrasekhar Jagarlamudi
    Hi,
    I've changed the line to <b>ps_layout-stylefname = 'LINECOLOR'.</b>, but then I'm getting a runtime error 'ASSIGN_TYPE_CONFLICT' in program 'SAPLSLVC in line 2975'...
    I don't have any idea what is causing that.

  • Select multiple rows in a grid

    Hi All,
    I want to select multiple rows in a grid on click of a button, there is no checkbox there are multiple rows which need to be selected like we do on pressing shift key on the keyboard. Please suggest how can this be done.
    thanks in advance.
    Regards,
    Anju

    Hi Anju,
    You can check this link to solve your problem:
    https://wiki.sdn.sap.com/wiki/display/Snippets/ALV%2bGrid%2bDisplay%2bwith%2bcheckbox%2bto%2bprocess%2bselected%2brecords%2bat%2bruntime
    Hope it helps you.
    Thanks & Regards,
    Sarita Singh Rathour

  • How to create new or delete the existing row in the grid....

    hi my friends...
    i am developing report using Reuse_alv_grid_display...
    my requirement is... At runtime
              1.  i may create new row on the grid (empty row inwhich  i may enter the data).
              2.  i may delete a existing row in the grid
              3.  i may edit the existing data...
    then i have to trace the modification in the grid in one internal table...
    how can i get into this.....
    note:
    i have some idea to edit the existing record in the grid and trace those modification,
    but i don't know abt how to create new or delete the existing row....
    can you give me some idea...

    Hi deva,
    write a class which implemets these methods
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
    To handle the toolbar on alv
         handle_toolbar
           FOR EVENT toolbar OF cl_gui_alv_grid
              IMPORTING e_object e_interactive,
    To handle the buttons on the alv grid
         handle_user_command
           FOR EVENT user_command OF cl_gui_alv_grid
           IMPORTING e_ucomm.
    endclass.
    Now Implement these methods.
    CLASS lcl_event_receiver IMPLEMENTATION.
    To handle the toolbar on alv
      METHOD handle_toolbar.
       DATA ls_toolbar  TYPE stb_button.
        CLEAR gs_toolbar.
        MOVE 3 TO gs_toolbar-butn_type.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_INSERT_ROW' gs_toolbar-icon.
        MOVE text-010 TO gs_toolbar-function.
        MOVE text-012 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_DELETE_ROW' gs_toolbar-icon.
        MOVE text-011 TO gs_toolbar-function.
        MOVE text-013 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.
       METHOD handle_user_command.
    In this form, check the function code(e_ucomm has the function code), based on that do the required action.
    as i said yesterday(i.e for appending a row, deleting a row, modifying a row)
        PERFORM user_command USING e_ucomm.
      ENDMETHOD
    endclass.
    Before calling the alv method, create a object of this class.
    DATA :
          gref_event_receiver  TYPE REF TO lcl_event_receiver,
          gv_tables_alv          TYPE REF TO cl_gui_alv_grid.
          CREATE OBJECT gref_event_receiver.
          SET HANDLER   gref_event_receiver->handle_user_command
                        FOR gv_tables_alv.
          SET HANDLER   gref_event_receiver->handle_toolbar
                        FOR gv_tables_alv.
    check this program for event handling, it is the similar way
    demo_abap_objects_events
    Hope u understood this.
    Regards,
    Prasant
    reward if helpful

  • HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?

    HI.
    HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
    GABRY =)

    You need to use
    data : grid1  type ref to cl_gui_alv_grid.
      call method grid1->get_selected_rows
        importing
          et_index_rows = i_sel_alvrows[].

  • Changing font size(bold) or color of a particular row in ALV Grid Digplay

    Hi Experts ,
    I am having a requirment to highlight some particular rows in ALV Grid Display . To achieve this i need to change font size or make it bold or change color of that row .
    Please give me some inputs .
    Thanks in Advance.
    Vijyeta

    Hi
    Coloring An Entire Row
    Coloring a row is a bit (really a bit) more complicated. , you should add an additional field to your list data table. It should be of character type and length at least 4. This field will contain the color code for the row.
    First you have to declaration of our list data table u201Cgt_listu201D.
    DATA BEGIN OF gt_list OCCURS 0 .
    INCLUDE STRUCTURE SFLIGHT .
    DATA rowcolor(4) TYPE c .
    DATA END OF gt_list .
    Adding the field that will contain row color data
    As you guess, you should fill the color code to this field.  But how will ALV Grid know that you have loaded the color data for the row to this field. So, you make it know this by passing the name of the field containing color codes to the field u201CINFO_FNAMEu201D of the layout structure.
    e.g.
    ps_layout-info_fname = <field_name_containing_color_codes>. u201Ce.g. u2018ROWCOLORu2019
    You can fill that field anytime during execution. But, of course, due to the flow logic of screens, it will be reflected to your list display as soon as an ALV refresh occurs.
    Try this link also:
    Possible functionalities in ALV
    Regards
    Neha

  • Grey out(disable) a row in ALV grid

    Hi,
    I want to know how to grey out(disable) row wise in ALV grid display.
    i..e.. Few rows in ALV grid display shoud be editable and few rows non editable based on certain condition.
    How do we do that....Please help.
    Thanks in advance.

    Hi,
    Since fieldcatalog is used to modify coloum and not the row, the fieldcatalog would not solve the problem.
    Thankyou.

  • Dragging rows in Numbers

    I can no longer drag rows in Numbers. I was able to do this until very recently.
    When I click on the number on the left hand side of the row, nothing happens. I used to be able to do this and then drag the row. Any suggestions?

    Sorry for not providing enough info with the initial post.
    I can edit the document in most ways. I can resize rows and columns and do eveyrthing inside of cells.
    When I click on the number at the left-hand side of the row, I can get the drop-down menu, but I can't move the row at all. I don't think I can move individual cells, either.
    I just tried to move other rows in a different Numbers spreadsheet and I can not.
    I'm not sure how to attach a screenshot.

  • Default 10 rows in ALV grid

    Hi Group,
    My requirement is to show 10 default rows in ALV grid (with 4 fields in ALV grid), whenever Create radio button is selected in Selection Screen.
    Please could you help me with this.
    Thanks and Regards,
    Kumar.

    Thanks for your reply.
    Sorry I forgot to mention earlier.
    I have to show default 10 empty rows (editable) whenever the Create radio button is selected on the Sel Screen.
    Kindly assist with this regard.
    Thanks and Regards,
    Kumar.

  • Add grid rows in panel grid layout in adf UI page

    I'm using panel grid layout in adf UI page. I need to add a dynamic grid row in panelGridLayout. Or in simple way programatically I need to add grid rows in panel grid layout in adf UI page.Timo Hahn Frank Nimphius Shay Shmeltzer-Oracle

    Hi Shay,
    It is a dynamic grid.
    there can be one dropdown, two dropdown.... n dropdown.
    Please tell me if there is any specific method to add children.

  • Problem in selecting rows in ALV Grid

    Hi All,
    I am doing a ALV Grid program using Classes. when i select 2 rows from that grid and executes,
    it going next screen. Again when  i am using back button and selecting same rows or different rows from teh same Grid and executing it is not retrieving any rows. In dedugger it is showing that the there is no selection of rows.
    Please suggest me the solution.
    Thanks in advance,
    Regards,
    Balaji.

    Hi chaitanya,
    I am not clearing any code.
    please find the code...
    CALL METHOD g_grid1->get_selected_rows
            IMPORTING
              et_index_rows = w_lvc_t_row_1.
          IF w_lvc_t_row_1 IS INITIAL.
            MESSAGE e004(zmsg).
          ELSE.
            CLEAR it_memis1-signal.
            REFRESH po_memis1.
            LOOP AT w_lvc_t_row_1 INTO w_lvc_s_row_1.
              READ TABLE it_memis1 INTO po_memis1 INDEX w_lvc_s_row_1-index.
              SELECT SINGLE name INTO v_nam FROM icon WHERE id = po_memis1-signal.
              IF v_nam = 'ICON_LED_GREEN' OR v_nam = 'ICON_LED_YELLOW'.
                APPEND po_memis1.
                CLEAR po_memis1-signal.
              ELSE.
                MESSAGE 'This item Cannot be processed due to errors' TYPE 'E'.
              ENDIF.
            ENDLOOP.
          ENDIF.
    regards,
    Balaji.

Maybe you are looking for

  • Invoice verification is not posted with T.Code MIRO

    Hi Friends, 1) I created a purchase order with T.Code: ME21N, and Enter Goods Receipts with T.Code: MIGO after that Invoice verification with T.Code:MIRO, but it is not posted: Error Message is: Error in account determination: Table T030K Co.Code: RK

  • Creating and Selecting a line in After Effects CC?

    OK, So I suppose this is a two part question... But there is a little thing in After Effects CC that is annopying me alot, and it could just be me, and the way I've been doing things... 1) The way I have creating a simple Line in After effects, is by

  • Install JRE 1.5.12 in the PI 7.0 server

    Hi Gurus, We are planning to install JRE 1.5.12 in the PI 7.0 server with Service Pack 11, whereas currently it is 1.4.2. Please note we will not remove the 1.4.2 version from the PI Server but will add this new version as well. What will be impact o

  • Ipod skips 4-5 random songs after each sync

    I bought my first ipod last thursday and i have had numerous problems starting from the moment itunes attempted to import my existing music library. I have fixed most of the problems myself, but there still two that have me stumped. 1) After i sync m

  • Problems with the notification centre

    hello, can anyone tell me why i don't receive notification from Facebook in my notification center? i can only post from my notificatin barr to facebook but i don't receive notofications.