on 04-15-2008 1:02 PM
Hi
Is there a way to change the mandatory fields message output from CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW.
I would like a custom message to be displayed and not the standard 'Fill in all required fields'.
Cheers
Ian
Hi Ian,
Unfortunately, this message canot be changes as it is generated and exported out by the standard SAP.
As an alternative, set the check box for displaying the messages to abap_false and one of the import parameters returns a flag 'X' if error occurs. Based on this flag try displaying the your custom message.
If you want to do it at field level, then you can use CHECK_MANDATORY_ATTRIBUTES method, pass the attribute that is checked in parameter ATTRIBUTE_LIST and raise as mentioned earlier.
Though elementory way, checking the fields for initial value and raising field is also one way to do the same.
Hope this helps.
Regards,
Sravan Varagani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gents
Thanks for the swift responses.
I have tried outputting my own message after passing in abap_false for the display messages parameter, which is fine, but the field containing the error is not highlighted!
Therefore, my question now is whether I have a choice of either the highlighted field and the standard message or a custom message without the highlighted box.
Cheers
Ian
Hi Ian,
You are right, raising of the message and highlighting of the field as both done togeather inside the method. So if you want to raise a message and highlite the field use our standard way of checking the value of the attribute for initial and use attribute_message to highlite the same.
Regards,
Sravan Varagani
Many thanks for your help guys.
I can't help thinking that it's a poor solution delivered by SAP. It only seems to go halfway.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ian....
what you can do is,
the method returns a message parameter.
check whether it is initial. if it is not....
then use the code wizard and generate your own message.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.