Alv colour row select first row

Hi. I hava an alv with colour in some rows. When i want to select another row distint the first, it always goes to de first row and it doesn't allow me select other row.
how can i solve this to select for example the third row.
thanks.

Hi,
Are you programatically setting the selection of the ALV row anywhere in your program? This might happen if you set the lead selection of the node in the WDDOMODIFYVIEW method of your view. Can you please check that ? Also you can try changing the selection mode of your ALV:
lo_config_model_value = lo_interfacecontroller->get_model( ).
lo_config_model_value->IF_SALV_WD_TABLE_SETTINGS~SET_SELECTION_MODE(CL_WD_TABLE=>E_SELECTION_MODE-AUTO).
Best Rgds,
Viqar.

Similar Messages

  • Web dynpro alv colour row

    Hi. I want that when a condition is true, the row of alv have the colour red.
    how can i do that.
    thanks

    I have this code in the modifyview and it doesn't work. Anybody can help me.
      DATA lo_nd_alv TYPE REF TO if_wd_context_node.
      DATA lo_el_alv TYPE REF TO if_wd_context_element.
      DATA ls_alv TYPE wd_this->element_alv.
      DATA lt_alv type wd_this->elements_alv.
      DATA loa_elements TYPE wdr_context_element_set.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_column          TYPE REF TO cl_salv_wd_column,
            lr_cell_editor     TYPE REF TO cl_salv_wd_uie,
            lr_text_view       TYPE REF TO cl_salv_wd_uie_text_view.
      lo_nd_alv = wd_context->get_child_node( name = wd_this->wdctx_alv ).
      lo_nd_alv->get_static_attributes_table( IMPORTING table = lt_alv ).
    DATA: l_column_settings TYPE REF TO if_salv_wd_column_settings.
    data:   lo_value        TYPE REF TO cl_salv_wd_config_table.
    Get columns
      DATA: lt_columns TYPE salv_wd_t_column_ref ,
            ls_columns TYPE salv_wd_s_column_ref ,
             lo_column                   TYPE REF TO cl_salv_wd_column ,
            lo_col_head                 TYPE REF TO cl_salv_wd_column_header ,
            lo_ref_cmp_usage            TYPE REF TO if_wd_component_usage,
            lo_ref_interfacecontroller  TYPE REF TO iwci_salv_wd_table .
    Get reference to the Component usage of the ALV.
      lo_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
      IF lo_ref_cmp_usage->has_active_component( ) IS INITIAL.
        lo_ref_cmp_usage->create_component( ).
      ENDIF.
    Get reference to the Interface controller of the ALV.
      lo_ref_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      lo_value = lo_ref_interfacecontroller->get_model( ).
      wd_this->gr_table = lo_value.
    Get the Columns of the ALV
      CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
        RECEIVING
          value = lt_columns.
      DATA: l_column_header  TYPE REF TO cl_salv_wd_column_header .
      LOOP AT lt_columns INTO ls_columns      .
    lo_column = ls_columns-r_column.
        CASE ls_columns-id                                       .
          WHEN 'CODIGO'                                            .
            l_column_header = ls_columns-r_column->get_header( )  .
            l_column_header->set_ddic_binding_field(
               if_salv_wd_c_column_settings=>ddic_bind_none )     .
              lo_col_head = lo_column->get_header( ) .
            lo_col_head->set_ddic_binding_field(  ).
            DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
            CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'CODIGO'.
            lo_column->set_cell_editor( lr_input_field ).
            ls_columns-r_column->set_cell_design_fieldname( value = 'CELL_DESING' ).
             WHEN 'CELL_DESING'.
            CALL METHOD lo_column->set_visible(
              EXPORTING
                value = '00'
          endcase.
       endloop.
      loop at lt_alv into ls_alv.
          if ls_alv-CANTIDAD is initial.
           ls_alv-cell_desing = '03'.
          else.
           ls_alv-cell_desing = CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_DARK.
          endif.
            MODIFY lt_alv INDEX sy-tabix FROM ls_alv TRANSPORTING cell_desing.
       endloop.
    Edited by: jose marcos on Jun 19, 2009 2:47 PM

  • Af:inputListOfValues popup : selecting first row

    Hi,
    Is there a way to select first row inside lov popup, the by default behaviour is it selects the rowHeader rather than row itself.
    When the lov popup is opened , there is no focus on table resides in the popup
    - to focus on table, user has to press down arrow key - which will just focus on rowHeader and not the actual row itself
    - to focus row for currently selected rowHeader user has to press right arrow key which will then select the table row itself
    its cumbersome everytime when you open lov and do these extra steps to just to select a value from lov
    any ideas?
    Thanks,
    Dev

    so, why it supports keyboard navigation at all? either support full features or nothing. the fact that user can use up/down arrow keys which selects rowHeader of every row , rather than actual row
    regarding "Search and Select : " it could be anything it has nothing to do with row selection,
    Thanks,

  • Get Selections From ALV on Multiple Selection Mode

    Hi,
    How can i get values of selected rows from ALV that has selection '0..n' (multiple selection) ?
    Can somebody help me pls?
    Thanks.

    Hi Nurullah,
    Steps to make multiple rows selectable in ALV:
    1) Create the selection property of the node that you are binding to the DATA node as o..n
    2) Un-check the, "Initialization Lead Selection" checkbox for the node which you are using to bind to the DATA node
    3) In the WDDOINIT method specify the ALV's selection mode as MULTI_NO_LEAD. It is important that you set the selection mode to MULTI_NO_LEAD or else in the end you would be capturing 1 row lesser than the total number of rows the user has selected. This is because 1 of the rows would have the LeadSelection property & our logic wouldnt be reading the data for that row. Check the example code fragment as shown below:
    DATA lo_value TYPE REF TO cl_salv_wd_config_table.
      lo_value = lo_interfacecontroller->get_model( ).
      CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
        EXPORTING
          value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.
    Steps to get the multiple rows selected by the user
    In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. So as you can see its no different from how you would get the multiple rows selected by the user in a table ui element. First get the reference of the node which you have used to bind to the ALV & then call this method on it. Check the example code fragment below:
    METHOD get_selected_rows .
      DATA: temp TYPE string.
      DATA: lr_node TYPE REF TO if_wd_context_node,
                wa_temp  TYPE REF TO if_wd_context_element,
                ls_node1 TYPE wd_this->element_node_flighttab,
                lt_node1 TYPE wd_this->elements_node_flighttab.
      lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
    " This would now contain the references of all the selected rows
      lt_temp = lr_node->get_selected_elements( ).
        LOOP AT lt_temp INTO wa_temp.
    " Use the references to get the exact row data
          CALL METHOD wa_temp->get_static_attributes
            IMPORTING
              static_attributes = ls_node1.
          APPEND ls_node1 TO lt_node1.
          CLEAR ls_node1.
        ENDLOOP.
    ENDMETHOD.
    Hope this helps resolve your problem.
    Regards,
    Uday

  • Query for selecting first  3 characters of name of any person

    query for selecting first 3 characters of name of any person

    10:52:44 SQL> SELECT SUBSTR(ename, 1, 3) first_three FROM emp;
    FIRST_THREE
    SMI
    ALL
    WAR
    JON
    MAR
    BLA
    CLA
    SCO
    KIN
    TUR
    ADA
    FIRST_THREE
    JAM
    FOR
    MIL
    Ton
    15 rows selected.
    Elapsed: 00:00:00.00

  • Display alv grids in selection screen based on the user event

    Hi All,
    I am workign on displaying ALV in same selection screen.I am able to display the ALV in selection screen.
    But i have 2 buttons in my selection screen 'Create' and 'change'.
    When i click on create i need  with some type of data and when i click on 'change' my alv grid another type of data.Ex: if i click on crate mara data should be dispalyed when i click on change makt table data should be dispalyed and also i have user defined buttons are in my grids.
    So i have used 2 containers to dispaly to different data.I am able to display the perfectly but the problem is first time when i click on create the grid is displaying when i click on change button  the create alv grid is displaying down and change data is dispalying up.
    I need only one alv grid at a time.Can anybody please let me know how can i do this.
    Thanks,
    Taragini

    Hello,
    Also I would suggest if it is relevant data maintain in one interntal table and show/hide based on condition
    through fieldcatalog (NO_OUT) parameter.
    Thanks

  • Return from ALV  Grid to Selection screen

    hi,
    I want to go back from ALV grid to selection screen.
    I am using the following code:
    WHEN 'BACK'.
    CALL METHOD grid1->refresh_table_display.
    CALL METHOD grid1->free.
    CALL METHOD custom_container1->free.
    CALL SELECTION-SCREEN 1000.
    it is working,but when i press BACK button from selection screen to program it is showing ERROR IN FLUSH 4 Error.
    Also I tried with method FLUSH
    WHEN 'BACK'.
    CALL METHOD grid1->refresh_table_display.
    CALL METHOD grid1->free.
    CALL METHOD custom_container1->free.
    CALL METHOD cl_gui_cfw=>flush.
    it's still showing same Error.
    Please help on this.
    Regards,
    Sankar

    Hi,
    My grid name is grid1.
    I tried with :
    DATA grid1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = grid1.
    CALL METHOD grid1->check_changed_data.
    CALL METHOD grid1->refresh_table_display.
    LEAVE TO SCREEN 0.
    Even, I tried with declaring another grid : grid2
    DATA grid1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = grid1.
    CALL METHOD grid1->check_changed_data.
    CALL METHOD grid1->refresh_table_display.
    LEAVE TO SCREEN 0.
    In both cases, I am getting the following Error : OBJECTS_OBJREF_NOT_ASSIGNED

  • Run alv report without selection screen in background

    Hello Every body,
    i programmed a ALV Report without selection screen, and i want to create a job for this alv report.
    Any help?
    Thank u.
    Ouail.

    Hi Steve,
    Can you tell me where i have to put your code?
    this is my abap code:
    START-OF-SELECTION.
       p_filref = '\\SAPSERVER\f\SAFT\ivat\FI_Extract_1000_20140709_102346_910.XML'.
       PERFORM copy_from_xml_to_itab TABLES it_ref_file
                                     ref_xml_data
                                     USING p_filref.
    **Begin Extraction File
       SUBMIT ZZ_FI_IVAT_EXTRACTOR
       WITH p_bukrs EQ '1000'
       WITH p_gjahr EQ '1998'
       WITH filepath EQ '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
       WITH cldata eq space
       AND RETURN.
       DATA: FILE_TABLE  TYPE TABLE OF SDOKPATH,
       DIR_TABLE  TYPE TABLE OF SDOKPATH.
       CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
         EXPORTING
           DIRECTORY  = '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
           FILTER     = '*.*'
         TABLES
           FILE_TABLE = FILE_TABLE
           DIR_TABLE  = DIR_TABLE
         EXCEPTIONS
           CNTL_ERROR = 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.
       "get file name
       LOOP AT FILE_TABLE INTO p_filref.
       ENDLOOP.
       CONCATENATE '\\SAPSERVER\f\SAFT\iVAT_Extractie\' p_filref INTO path.
       PERFORM copy_from_xml_to_itab TABLES t_ext_file
                                     ext_xml_data
                                     USING path.
       PERFORM fill_xml_tab_in .
       perform build_fieldcatalog.
       PERFORM compare_data_ref_ext.
       PERFORM send_email.
       perform display_alv_report.
       PERFORM delete_extraction_file.
    in the perform copy_from_xml_to_itab TABLES it_ref_file......, i use this code:
       CREATE OBJECT gcl_xml.
    *Upload XML File
       CALL METHOD gcl_xml->import_from_file
         EXPORTING
           filename = p_filref
         RECEIVING
           retcode  = gv_subrc.
       IF gv_subrc = 0.
         CALL METHOD gcl_xml->render_2_xstring
           IMPORTING
             retcode = gv_subrc
             stream  = gv_xml_string
             size    = gv_size.
         IF gv_subrc = 0.
           REFRESH gt_xml_data[].
    * Convert XML to internal table
           CALL FUNCTION 'SMUM_XML_PARSE'
             EXPORTING
               xml_input = gv_xml_string
             TABLES
               xml_table = gt_xml_data
               return    = gt_return.
         ENDIF.
       ENDIF.

  • Select first n columns

    Hi
    I need to select first n columns thru a query. i dont know the column names.
    Thanks and Regards
    Ananth Antony

    desc emp
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    if n=3 means the output should be (i dont know the column name)
    EMPNO ENAME JOB
    7369 SMITH CLERK
    7499 ALLEN SALESMAN
    7521 WARD SALESMAN
    7566 JONES MANAGER
    7654 MARTIN SALESMAN
    7698 BLAKE MANAGER
    7782 CLARK MANAGER
    7788 SCOTT ANALYST
    7839 KING PRESIDENT
    7844 TURNER SALESMAN
    7876 ADAMS CLERK
    EMPNO ENAME JOB
    7900 JAMES CLERK
    7902 FORD ANALYST
    7934 MILLER CLERK
    for emp Table.
    Thanks
    Ananth Antony

  • Select first 4 char

    Hi all,
    I am new to ABAP.
    I want select first 4 char of  variable.
    Example:
    X = '627128891'.
    i want first 4 char of X  save to Y.
    Y= '6271'.
    How can I do it with ABAP statement?
    Thanks
    Shiva.

    hi,
    data x(10) type c value '1234567'.
    data y(4) type c.
    y = x0(4).   " xn(m) n is the starting position and m no of character from n.
    output y = 1234.. first four characters
    y = x+2(2).
    output y = 34 ..
    rewards if understood..
    regards,
    nazeer

  • How to select first several records from a database table by using select?

    Hi,
       I want to select first 100 records from a database table by using select clause. How to write it?
       Thanks a lot!

    hai long!
                 well select statement is used to retrive
    records from the database.
    following is the syntax to be used.
    1) select *  into corresponding fields of itab from basetable where condition.
    endselect.
      ex: select * into corresponding fields of itab from mara
                where matnr >= '1' and  matnr <= '100'.
           append itab.
          endselect.
    select * is a loop statement.it will execute till matnr is less than or equal to 100.
    note: you can also mention the required field names in the select statement otherwise it will select all the field from table mara.
    note: itab means your internal table name.
    hope you got the required thing.if it really solved u r problem then award me the suitable points.<b></b>

  • Selection first n(20 )records from result page

    Hi,
    I have a requirement where the the users  want to select first n(20)  record from the result page after applying the date filter . They want to see all results and then select the records say first 50.I do not want to select manually clicking( browsing on page).Any thoughts how this can be achieved  like adding  text box at frame so that I can give number .

    Hello Senthil,
    why you want to create one more textbox... you can achieve your requirement by entering 20 in "maximum number of fields". It will give first 20 results.
    If you want to add one more textbox for your purpose then tell me.
    Thanks and Regards,
    Amit Singh

  • VERIFY fails if Card Manager selected first

    Hi,
    If I send VERIFY with the appropriate key the card replies with 0x9000 (OK). The VERIFY command looks like this: A0 20 00 00 08 XX XX XX XX XX XX XX XX
    If I first select the card manager (00 A4 04 00 07 A0 00 00 00 03 00 00) and then send VERIFY, the card replies with 0x6E00 (class byte expected by Transport Manager is not correct) or with 0x6D00 (Invalid instruction byte).
    I would like to ask this:
    Why does it matter if the Card manager is selected or not?
    Does not the card manager get selected at reset automatically?
    And who else would receive the command (and dispatch it) if not the card manager?
    Why would I get an "Invalid instruction byte" error when the same command does not fail when sent first? Does that mean that different entities are involved in processing the command?
    It is probably something silly, but buried somewhere where I cannot find it.
    Thanks
    Edited by: 815684 on Dec 20, 2010 7:02 AM

    815684 wrote:
    It is a multiapplication card and it is for GSM (I was actually wondering what class A0 was). But is not the Card Manager supposed to be selected immediately after reset (all this happens immediately after reset)?If you have a default selectable applet loaded onto your card, this will receive any APDU's sent to the card if no other applet has been selected first. If you want to perform card management operations, you need to select the card manager before you can proceed. You do not need to select anything after reset, but there will need to be something receiving your APDU's for your card to respond.
    We have a script that deletes our company's old applet (and its files) from the card and downloads a newer version. The first step of this process is to authenticate the user to the card. And though your reply clarified my question, it poses another one: Since I need to delete/download applets, why do I authenticate myself to someone else (the GSM applet) rather than the Card Manager (which is supposed to be in charge of deleting and downloading applets)? Is not the Card Manager supposed to be in charge of this?If you are doing card content management, you need to authenticate to the card manager. Your applet may have a mechanism that requires authentication to the applet before it will allow itself to be deleted. There is no official GP way of supporting this, so if this is the case someone that worked on the applet will be aware of this.
    PS I am reading the GP, unfortunately it does take time to understand this stuffBe patient :) Reading this document will raise more questions. You just need to look through the document for these answers as there is a good chance you will find it in there somewhere. If and when that fails, you can always get help here. Just don't be surprised if the answer is: it is in the GP card spec. Hopefully we can point you to where as well.
    Cheers,
    Shane

  • WEB DYNPRO ALV GRID  GET SELECTED ROWS...

    I'm reusing component ALV Grid ...
    How can i get selected rows...

    Hi Stephan,
    In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. So as you can see its no different from how you would get the multiple rows selected by the user in a table ui element. First get the reference of the node which you have used to bind to the ALV & then call this method on it.
    METHOD get_selected_rows .
      DATA: temp TYPE string.
      DATA: lr_node TYPE REF TO if_wd_context_node,
                wa_temp  TYPE REF TO if_wd_context_element,
                ls_node1 TYPE wd_this->element_node_flighttab,
                lt_node1 TYPE wd_this->elements_node_flighttab.
      lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
    " This would now contain the references of all the selected rows
      lt_temp = lr_node->get_selected_elements( ).
        LOOP AT lt_temp INTO wa_temp.
    " Use the references to get the exact row data
          CALL METHOD wa_temp->get_static_attributes
            IMPORTING
              static_attributes = ls_node1.
          APPEND ls_node1 TO lt_node1.
          CLEAR ls_node1.
        ENDLOOP.
    ENDMETHOD.
    Hope this helps resolve your problem.
    Regards,
    Uday

  • ALV Grid row selection possible options

    Hello Experts,
    I have an ALV Grid output with rows color codes based on certain status for each rows.Now when the user selects one or more lines to do the next process, what happens now as sap standard is the selected lines becomes highlighted ( kind of yellowish) and the selection button gets pressed.
    But what the user is requesting is ,lets say he selects one blue and another red line, then both becomes yellow (because of the SAP standard highlighting) ...he would like those line colors to be still red and blue and only the selection button pressed.
    Is there a way to do that is ALV grid? I'm trying to convince him to look at the status colum if he gets confused with what colors he selected or I will have to use a checkbox field as the first column and and hide the ALV selection option.
    But was curious to find if this is possible in ALV?Or any other suggestions to handle this requirement is welcome.
    Mat

    Hi Mat,
    I am curious if your user is so arogant when he buys a car too. Does he say to dealer "Sorry I don't want this gear lever to be placed here and here, I want it a litte bit higher. Can you please fix that?". This sounds like you are struggling with dumb user. I have never heard of someone complaining that the standard highlight is in wrong color. You already provided to him row colors, right? I think most of the users would be hugging you for such facilities.
    I think in your case as the user is inalterable you should go for the checkboxes as you say. This way maybe you will somehow satisfy his needs (as the row colors will be kept even during selection). Personally I wouldn't bother such requirements. As long as the program reports correct data, he should not complain at all.
    Good luck then
    Marcin

Maybe you are looking for

  • Can't login to BPM PRocess Composer

    Hi guys, having installed SOA Suite 11.1.1.3, I am trying to login to to the BPM Composer web-app. On first attempt my browser times out after a few minutes of waiting. Then I try to login again and see the following exception in the log: ExecuteThre

  • Queries related to SQl Server

     I have one hosted Database Server on which using  SQL 2008 Web Edition  now We want to change to  SQL Standard edition # Server Config Dual Socket  Server populated  with  2 8 Core Processor # we use this Database server for our ecommerce Website .

  • Fillable forms question - FrameMaker to PDF - Without losing copy protection options

    Hello, I'm looking for a solution that will allow us to integrate fields in a Chapter Review-style question area where users can comment their answers (instead of using StickyNotes). It must disallow printing/copying etc to meet content protection re

  • In trouble - need help: FCPX will not open - prompts CRASH report

    Tonight, 7:15pm MTN, I closed FCPX upon a short range (single connected clip) wasn't rendering.  It played perfectly, and I simply wanted to get rid of the red line above the project timeline over the clip, but nothing I did to render that section or

  • BW Portal Queries

    Good day, We are busy implementing BW queries for the SAP portal, we are trying to implement are the cockpit, 0COCKPIT_0_1, which consists of the following queries; Headcount, Headcount FTE, Entries, and Leavings. When executing the queries in the po