cancel
Showing results for 
Search instead for 
Did you mean: 

Checkbox,dropdown,image in ALV

Former Member
0 Kudos

Hi Experts,

I am working ALV table in Webdynpro ABAP.

My client have a requirement like

1] He want to display the check box for ist row accept and secon row reject and 4th coloumn link if you click that it will open the editor.7th coloumn inputfield and 8th image if you click that image then add two coloumns in the table below that cell.and 12h coloumn dropdown box the values coming from BAPI.and 18th image. like that........

2] these above UI elemnts will be based on the record containe in the number.

Example:1. if that BAPI gives the 3 records only three row will be appear these UI elements other rows are should be

non- editable.

2. If the BAPI giving 10 records only ten rows should appear these Ui elements.

3] Some casess based on the condition also the UI elements should non-editable in ALV.

Can you please give how to do this.Please help me these screen how to develop.time is very less.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For Editable/Non-Edtiable, you can create a READ_ONLY attribute type wdy_boolean in the context node to which the ALV is bound.

For this -

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-818...

And for the UI elements for each column - How many columns do you have.....

How do you know which is Image/Input field/Link/checkbox etc...Based on what you are deciding this -

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

Thank youfor giving the quick reply.

Based on the Field i want to display the UI elements in that coloumn.The field values are coming from the table which gives the BAPI.

For exapmle: The field is CONNID Here I want to display the Image.

The field is CARRID Here I want to display the check box.

Like that display in the ALV.and I w ant to fetch those values what we enter in the input field and check box like that.

Can you give the full description and corresponding data.

I am very thankfull to you,if you give the data.

Thanks

Ramkumar

Former Member
0 Kudos

Hi,

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

  lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
  IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
  ENDIF.

  DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
  lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).

  DATA lv_value TYPE REF TO cl_salv_wd_config_table.
  lv_value = lo_interfacecontroller->get_model(
  ).

DATA lt_columns type SALV_WD_T_COLUMN_REF.
DATA ls_columns type SALV_WD_S_COLUMN_REF.
lr_column type ref to CL_SALV_WD_COLUMN
  DATA:
    lr_input       TYPE REF TO cl_salv_wd_uie_input_field,
    lr_checkbox type ref to cl_salv_wd_uie_checkbox.

  CALL METHOD lv->if_salv_wd_column_settings~get_columns
    RECEIVING
      value = lt_columns.

   LOOP AT lt_columns INTO lis_columns.
      lv_id = ls_columns-id.
      lr_column = ls_columns-r_column.
***Column name
      CASE lv_id.
        WHEN 'CARRID'.
create object lr_checkbox
EXPORTING
checked_fieldname = 'CARRID'.

lr_checkbox->set_enabled( abap_true ).
lr_column->set_cell_editor( lr_checkbox ).

        WHEN 'CONNID'.
 
            CREATE OBJECT lr_input
              EXPORTING
                value_fieldname = lv_id.

            CALL METHOD lr_column->set_cell_editor
              EXPORTING
                value = lr_input.

        WHEN 'FLDATE'.
       endcase.
    endloop.

Regards,

Lekha.

Answers (0)