Show TOC

Function documentationMandatory Fields


You can set a field as mandatory in one of the following ways according to your business requirements:

  • In the business object layer (BOL)

    You can use the GenIL Model Editor to define a mandatory field in the object model. The property from the BOL is made available on the user interface (UI).

  • In the application by implementing a property getter (P-getter) method

    Implement the following P-getter that evaluates the property IF_BSP_WD_MODEL_SETTER~FP_INPUT_MANDATORY and return ABAP_TRUE if the field is to be mandatory:

    Syntax Syntax

    2. CASE iv_property.
    3. WHEN if_bsp_wd_model_setter_getter~fp_input_mandatory.
    4. IF gv_display_mode = abap_true.
    5. rv_value = ABAP_FALSE.
    6. ELSE.
    7. rv_value = ABAP_TRUE.
    8. ENDIF.
    9. ENDCASE.
    10. ENDMETHOD.
    End of the code.
  • In the view configuration

    In the UI Configuration Tool, you can define a field as mandatory. If you make this setting in a layer, you cannot override it in the next layer above it. For this reason, mandatory fields are marked with an asterisk (*) as part of the label for editable input fields. If the field is left empty, a red frame is displayed around the field and you cannot save or process your data.


You have made the settings in Customizing for UI Framework under Start of the navigation path Generic Interaction Layer/Object Layer Next navigation step Basic Settings End of the navigation path.