Cell Color in FPM List

Tags: FPM

Like in the SAP GUI or WebDynpro lists, you can paint the cell background of a field.  

  • Add a new component of type WDUI_TABLE_CELL_DESIGN to the table line structure ( e.g. STATUS_CELL_DESIGN)
  • Set the field added as cell design reference ( e.g. STATUS_CELL_DESIGN) as technical in IF_FPM_GUIBB_LIST~GET_DEFINITION
  • Link the field (e.g. STATUS) to be painted in method IF_FPM_GUIBB_LIST~GET_DEFINITION to the cell design reference field
      <ls_field_descr>  TYPE fpmgb_s_listfield_descr.

    "Field properties
    LOOP AT et_field_description ASSIGNING <ls_field_descr>.
      CASE <ls_field_descr>-name.
        WHEN 'STATUS'.
          <ls_field_descr>-cell_design_ref = 'STATUS_CELL_DESIGN'.
        WHEN 'STATUS_CELL_DESIGN'.           
          <ls_field_descr>-technical_field = abap_true.

Hint: you can set the same field as cell design reference of more fields.

You just need to fill the STATUS_CELL_DESIGN field during runtime with the requires background color code.

You can choose from a a wide range of colors. Visit data element WDUI_TABLE_CELL_DESIGN, or FPM background color list.