cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP WD: Must-be-filled fields ??

Former Member
0 Kudos

Hi colleagues,

cProjects uses WD ABAP. Field controls by cPro allow to define some fields as MUST fields. But only a star is displayed, to indicate a MUST field.

Will WD ABAP provide some basis functionality to switch a field to MUST BE FILLED status with full check functionality ??

If not, what is the best-practice procedure to implement such solution in a customer project ??

Any help is welcome.

Regards,

Joerg

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thomas,

thanks for your answer.

If I understood you right, WD framework offers the possibilty to prevent further User progress until all MUST-fields have been filled.

By the way, no consistency check should be done. Only a check if something has been filled in.

My question is, is there a kind of "switch" to enable this behaviour for certain WD UI elements easily or do I have to modify/write a lot of code ??

Regards,

Joerg

thomas_szcs
Active Contributor
0 Kudos

Hi Joerg,

There is no switch that allows an application developer to either chose (a) or (b). Each of these options or any mix of them needs to be implemented by the application developer. I am aware that you would like to have Web Dynpro an error message issued. Well, if the application checks for mandatory input, raising a framework related error message will result in two error messages displayed to a user. Thus, no error message is provided by the framework.

Best regards,

Thomas

Answers (1)

Answers (1)

thomas_szcs
Active Contributor
0 Kudos

Hello Joerg,

As you said some ui elements Web Dynpro provide a "state" attribute that can be set to required, which in turn adds a "*" to a corresponding label. This gives a user a hint that the application expects this field to be filled.

From the perspective of an application, there are two options to move forward if a user did not enter something in such a marked field:

(a) display an error message and enforce the user to enter the value by preventing further input to other fields and/or the execution of certain functionality such as saving.

(b) display an error message, but allow the user to continue with his/her work - possibly including the execution of certain actions such as saving.

Both options are supported by the Web Dynpro framework. It is up to the designer of an application to decide which functionality should be offered. Option (b) has some advantages since it allows for quick-save and thus allows an user to i.e. gather some missing data and to continue at a later time. Of course, in such a case the application needs to mark a document as having errors or not in order to prevent it from being used in followup business processes.

There are more reasons as well. One such a reason is that an application can never be sure from where it receives its input. It can be a user interface, it can be a web service, it can be anything - even different clients with different user interfaces are possible. Hence, it is a requirement that an application checks all input. This of course includes validating that mandatory fields have been filled. An application should never rely on a certain layer on top of it to do such a thing, because if this top layer was exchanged (e.g. ui -> web service), a user could create inconsistent data assuming that this other top layer does not provide such a built-in check. So even if Web Dynpro did it internally, the application would have to do it again. This would be a waste in terms of performance and thus, it is not done.

Best regards,

Thomas