cancel
Showing results for 
Search instead for 
Did you mean: 

ALV data from domain's value range

Former Member
0 Kudos

Hi!

I'm using ALV for displaying a table. This table has several columns, based on the data element WDY_BOOLEAN.

Now in the report only the 'X' or ' ' values appear, however, in the domain's value range I see, there is a TRUE and a FALSE values for the 'X' and ' ' values.

Is there an easy way to show the 'TRUE' and 'FALSE' values instead of the 'X' and ' '? If it is possible, I would like to avoid reading these values for each field from the DD07T table, so an easier solution would be fine.

Thank you in advance

Tamá

Accepted Solutions (1)

Accepted Solutions (1)

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

The ALV table which has data element as WDY_BOOLEAN ,wht is the cell editor..

is it an input field or any other?.

.how r u showing the values

You can use the function module DD_DOMVALUES_GET to get the domain values.

pass the domain name and get the values..

Priya

Former Member
0 Kudos

The cell editors are default (inputfield). Maybe that would be good to change to dropdownbykey...

Unfortunately I don1t know exactly, how cn I change the cell editors in ALV grids...

Any idea?

Former Member
0 Kudos

There are options in the in the column settings in ALV initialiazation where u can set what kind of an editor u want the column to be.

Please refer to class 'CL_SALV_WD_COLUMN' and the method 'SET_CELL_EDITOR'.

Code Snippet


l_value = l_ref_interfacecontroller->get_model( ). " Where interface controller is the IF controller of ur ALV component

  DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
             lr_column          TYPE REF TO cl_salv_wd_column.

  CLEAR: lr_column.
  lr_column = lr_column_settings->get_column( 'MANDT' ).
  IF NOT lr_column IS INITIAL.
    lr_column->set_visible( if_wdl_core=>visibility_none ).
    lr_column->set_cell_editor().  " Use this method
  ENDIF.

Regards,

Pramod

Edited by: Pramod M on Jan 6, 2010 4:21 PM

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

you can set it to drop down by using the following code:

DATA:lr_dropdown_by_key  type ref to cl_salv_wd_uie_dropdown_by_key,
          lref_cell_action TYPE REF TO cl_salv_wd_config_table,
         lo_column_setting TYPE REF TO if_salv_wd_column_settings,
        lo_column TYPE REF TO cl_salv_wd_column.

 lo_column = lo_column_setting->get_column( 'APPR_STATUS' )."*pass the column name here*

  CREATE OBJECT lr_dropdown_by_key
    EXPORTING
      selected_key_fieldname = 'APPR_STATUS'.

  CREATE OBJECT lo_inputfield
    EXPORTING
      value_fieldname = 'APPR_STATUS'.

 lo_column->set_cell_editor( lr_dropdown_by_key ).

Priya

Edited by: Chaitanya Priya Puvvada on Jan 6, 2010 11:52 AM

Edited by: Chaitanya Priya Puvvada on Jan 6, 2010 1:13 PM

Answers (0)