Skip to Content

How to check all mandatory fields in different UIBBs which are not active

Hi FPM colleagues,

Thanks for your time in advance:).

We are using FPM to develop our application(Solution Manager) Now we get a requirement from user that they want fields mandatory property to be configurable according to their own business requirement.

The first idea coming up to us is that we create component configuration to change fields mandatory properties and apply them to FPM application configuration. And then check those fields validation by framework method:

CALL METHOD cl_wd_dynamic_tool=>check_mandatory_attr_on_view

EXPORTING

view_controller = lo_api_controller.

Since mandatory fields are configurable and may exist in several UIBBs in different main views. The check method will not work if those UIBBs are never created(e.g. user didn't click it, then the instance will not exist and check will not work)

So the question is: how can I check all mandatory fields by this framework method(since user need it to be configurable) in a FPM application even some UIBBs are not active. Or maybe I can activate all UIBBs by code? Thanks a lot for any answer regarding this requirement:):)

BR,

Steve

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 17, 2014 at 09:11 AM

    Hi Steve,

    you need to distinguish between mandatory fields check on the UI (for which one can use the mentioned API or a flag in the the FPM General Settings for the Form in 7.02+) and a check in the underlying business logic.

    The check on the UI can only be processed for visible views / UIBBs. So you can never rely on the UI check only, i.e. it is generally necessary that the business logic does additional checks about the data consistency. This check should be processed at least when the data shall be saved (and let it fail if required fields are not filled) The UI check can be added for the user's convenience and it works as a pre-check which also points to the void (visible) fields.

    Regards

    Jens

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Jens,

      Thank you very much for your help and patience. I did some research and the main technical difficulty is that I cannot get the binding property since it is not stored in component configuration. And as per your suggestion, we will check mandatory in the backend rather than reply on the standard WDY check API on UI layer. So many thanks to you and it's really great for me to know more on FPM framework😊

      BR,

      Steve