on 04-11-2008 5:35 AM
Hi all,
How can i use the method REPORT_ATTRIBUTE_T100_MESSAGE.and how many msgs can we show at a time?
Regards,
Ravi
Hi Ravi,
This method is used to raise error message and also highlight the field to which the attribute is bound.
Create a component controller method say REPORT_ATTR_MESSAGE the following are the interface parameters.
ATTRIBUTE Importing STRING
ELEMENT Importing IF_WD_CONTEXT_ELEMENT
L_MSG Importing SYSMSG
Place the following code in the method.
* get message manager
DATA: l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager.
DATA: l_msg TYPE symsg.
l_current_controller ?= wd_this->wd_get_api( ).
CALL METHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
* report message
CALL METHOD l_message_manager->REPORT_ATTRIBUTE_T100_MESSAGE
EXPORTING
MSG = l_msg
ELEMENT = element
ATTRIBUTE_NAME = attribute.
When you want to raise message do the following.
ls_msg-msgid = 'msgid'
ls_msg-msgno = 'msgno'
ls_msg-msgty = 'E'
ls_msg-msgv1 = message_v1
ls_msg-msgv2 = message_v2
ls_msg-msgv3 = message_v3
ls_msg-msgv4 = message_v4
wd_comp_controller->report_attr_message(
attribute = '<Attribute_name>'
element = elem_<node_name>
l_msg = ls_msg.
And at time we can only raise 1 error message using this method. It can be called multiple times to display more than 1 messages though.
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 Sravan,
in my scenario i want to update PAY flag ,for those who pay the min bill.if patient isn't paying the min bil i want show a msg that you have to pay a balance of 2000.if there are any no of patients who are not paying the minimun bill.but i have to give msgs for all patients with thier balance to pay.
Regards,
Ravi.
Hi Ravi,
Are you displaying the data as a table? If yes how many records are expected in it. This is important because, if you want to display messages, and if there are n number of ppl with min balance not paid, then it comes up with those many messages. It is not a good design practice.
Regards,
Sravan Varagani
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.