cancel
Showing results for 
Search instead for 
Did you mean: 

Mark inputfield

Former Member
0 Kudos

Hello,

ive got a form with serveral inputfields to change data.

when this data is noch correct. for example wrong not integer.. i want to have something like a red frame round that field after a action is triggered. cant find something like this in meta data.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi adrian,

if you looking for this .. [http://flic.kr/p/8vvxKF|http://flic.kr/p/8vvxKF]

then you must use method report_attribute_error_message .

trigger validation event on any action , if validation fails report as attribute erro message for getting the red frame on the inputfield

sample code :

DATA: l_current_controller TYPE REF TO if_wd_controller,
          l_message_manager    TYPE REF TO if_wd_message_manager.
    l_current_controller ?= wd_this->wd_get_api( ).
    l_message_manager = l_current_controller->get_message_manager( ).
*     report message

    l_message_manager->report_attribute_error_message(
        message_text  = ' Not an interger value 
        element = l_element
        attribute_name = 'ATT_NUM'
*        PARAMS        =
*        MSG_USER_DATA =
           ).

Regards

Chinnaiya P

Answers (2)

Answers (2)

Former Member
0 Kudos

more info

Former Member
0 Kudos

HI adrian,

For displaying the message in your desire area in the view .. just add a message area UI element in your view ..

in the below pic the message will display below the button

[http://i36.tinypic.com/6rha53.jpg|http://i36.tinypic.com/6rha53.jpg]

Regards

Chinnaiya P

Former Member
0 Kudos

great.

since there is no parameter for the area is there only one area allowed? or does it take the area in group i.e.

Former Member
0 Kudos

HI adrian ,

I tryied using two message are in single view both(inside group & without Group ) the message is displaying in the both of the message area and i dint find any parameter in the method report_attribute_error_message for mentioning the message area ID to be only display also ..

have a loot at this pic..

http://i35.tinypic.com/291dyeb.jpg

lets wait until some body throw lights on it

Regards

Chinnaiya P

Former Member
0 Kudos

same i expierienced.

well .. maybe its just it.

took one msgarea just above the container element of the form

ChrisPaine
Active Contributor
0 Kudos

Hi Guys,

from the SAP help

>With components that you want to use in several applications you should never use the MessageArea UI element, since each window is allowed to contain only one visible MessageArea at the most.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/b37974eb5c6200e10000000a421937/frameset.htm

Think this addresses why you are seeing multiple and can't update them separately.SAP didn't design it to do that...

Sorry it doesn't help allow you to do this, but at least it explains the behaviour seen.

As an aside, I'd always go with the default of having messages on the top of the screen - users get used to having it there.

Chris

Former Member
0 Kudos

Hi,

thanks a lot. Excactly what i was looking for.

Well. How can i define where this top msg text is?

because i rather had it just above the form instead top of the page