on 09-19-2012 10:56 AM
Hi Guys,
I am using required field attribute for some input fields which don't have a label.
Ironically its not showing it with red star on the view when I execute it.
but its fine fore fields with Labels.
I am not sure why this is happening..?
Thanks
Sam
Hi,
Star mark will come only if it has label. If you dont want label, create a text view with text '*' (star) and change the semanticColor to negative. Or create an empty label( with text as .(dot) ) as suggested by Amy
Hope this helps u.,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
When you mark a field as required, the red asterisk is actually shown as part of the field's label, so a label is needed. I haven't tried this, but I wonder if you could get the asterisk if you assign a label but bind its text property to a context element that is blank-- a string with no value for example.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amy,
I am using this view in FPM GAF. it's a second screen but its not checking the mandatory field is filled or not.
Also checking the mandatory field in Process_Event method of comp. controller.
IF io_event->mv_event_id = 'FPM_NEXT_STEP'.
lo_view_controller = wd_this->lo_view.
lo_message_manager = lo_view_controller->get_message_manager( ).
cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
EXPORTING
view_controller = lo_view_controller
display_messages = abap_true
IMPORTING
messages = lt_msg ).
ENDIF.
Ironically its checking it in the first screen. but they have labels.
Not sure.. not assigning label is the problem..!
Hi Sam,
I don't use FPM so don't know if there is some difference in behavior, but one option for you is instead of using method CHECK_MANDATORY_ATTR_ON_VIEW of class CL_WD_DYNAMIC_TOOL, use method CHECK_MANDATORY_ATTRIBUTES. The latter method allows you to pass an explicit list of attributes you consider to be required, so it does not depend on a field's state property.
ls_attr-attribute_name = 'ATTRIBUTE_1'.
append ls_attr to lt_attributes.
ls_attr-attribute_name = 'ATTRIBUTE_2'.
append ls_attr to lt_attributes.
cl_wd_dynamic_tool=>check_mandatory_attributes(
attribute_list = lt_attributes
display_messages = abap_true
context_root = wd_context
).
Cheers,
Amy
Why dont u assign a label with no text in it and that should solve the issue, But still a Input field made mandatory not working with out a label assigned seems to be funny. I will surely try this out and update you if find some thing , till then you can have a work around to assigna label with no text.
Thanks
Phani
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.