Skip to Content

Change a property of a cell of a UIBB List

Hi guys how are you?

I have to change a property of a cell of a UIBB List as read only when the value of another cell get a certain value, for example.

Every time field "Tipo referencia" get a value not equals "Financiera" the field "Producto o servicio" must be Read only.

In a form I was able to do that implementing the method IF_FPM_GUIBB_FORM~GET_DATA.

I do the same in the method IF_FPM_GUIBB_LIST~GET_DATA but it does not works.

Is there something worng witho my code, or it is not done by this method?

I appreciate any help.

Best regards.

Ronaldo S. Vieira

SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S32 {
color: #3399FF;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
.L0S70 {
color: #808080;
}

  method if_fpm_guibb_list~get_data.
    data: lr_data      type ref to data.

    field-symbols: <lfs_usage> type fpmgb_s_fieldusage,
                   <lt_data>   type any table
                   .
    super->if_fpm_guibb_list~get_data(
      exporting iv_eventid = iv_eventid
                it_selected_fields = it_selected_fields
                iv_raised_by_own_ui = iv_raised_by_own_ui
                iv_visible_rows = iv_visible_rows
                iv_edit_mode = iv_edit_mode
                io_extended_ctrl = io_extended_ctrl
      importing et_messages = et_messages
                ev_data_changed = ev_data_changed
                ev_field_usage_changed = ev_field_usage_changed
                ev_action_usage_changed = ev_action_usage_changed
                ev_selected_lines_changed = ev_selected_lines_changed
                ev_dnd_attr_changed = ev_dnd_attr_changed
                eo_itab_change_log = eo_itab_change_log
      changing ct_data = ct_data
               ct_field_usage = ct_field_usage
               ct_action_usage = ct_action_usage
               ct_selected_lines = ct_selected_lines
               cv_lead_index = cv_lead_index
               cv_first_visible_row = cv_first_visible_row
               cs_additional_info = cs_additional_info
               ct_dnd_attributes = ct_dnd_attributes
    ).

    get reference of ct_data into lr_data.
    assign lr_data->* to <lt_data>.
    loop at <lt_data> assigning field-symbol(<ls_data>).
      assign component 'ZZ_REF_TIPO' of structure <ls_data> to field-symbol(<ls_value>).

      if <ls_value> is assigned and <ls_value> <> 4.
        read table ct_field_usage assigning <lfs_usage>
        with key name = 'ZZ_REF_SERVICIO'.
        if <lfs_usage> is assigned.
          <lfs_usage>-read_only = abap_true.
          <lfs_usage>-enabled = abap_true.
          <lfs_usage>-visibility = 02.
        endif.
      endif.
    endloop.

    ev_data_changed = abap_true.
    ev_field_usage_changed = abap_true.

tipo-ref.png (17.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 15 at 07:02 PM

    I found this in the Floorplan Manager ABAP - Developer’s Guide.

    If you would like to set these attributes for single cells, proceed as follows:

    1. Create a new column for the table (add a field to the field catalog in the GET_DEFINITION method).

    2. Define the column as a technical column that is not visible at runtime, by setting the field TECHNICAL_FIELD to ‘X’. This column contains the properties of the cells.

    3. In the GET_DEFINITION method, adjust the field description accordingly. For example, you have a column A and you want to set the property READ_ONLY for single cells in that column. For this reason you created a technical column B. In the field description, set READ_ONLY_REF to B.

    Has somebody implement this? Or could somebody please provideme an example?

    best regards

    Ronaldo S. Vieira

    Add comment
    10|10000 characters needed characters exceeded