on 02-28-2008 6:12 AM
Hi gurus,
I have to views and the second view there is a submit button. On clicking of that button I am validating the inputs. And if first view has error i am firing an outbound plug to back in the view.
But the problem is the messages always displaying in the second view and the plug is not working.
I have tested the plug independently it is working fine.
Please suggest.
code for validation.
IF ls_type_of_appointment-appt_type IS INITIAL.
*clear the text used to display messages to ignore previous values stored
CLEAR l_text.
*get the final error message
CONCATENATE l_text_0 l_typ_of_appt l_text_1 INTO l_text.
report message
CALL METHOD l_message_manager->report_attribute_error_message
EXPORTING
message_text = l_text
element = lo_el_type_of_appointment
attribute_name = 'APPT_TYPE'
cancel_navigation = abap_false.
l_iserror = l_iserror + 1 .
ENDIF.
Use report element error message instead of attribute error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prosun,
Method report_attribute_error_message is used to highlite the attribute which is incorrect/invalid.
In order to accomplish this, the WDA frame work ensures that the view in which the element exists is rendered back. So even though a plug is fired, it doesnt navigate to the other view.
Try using report_t100_message in the same class . It shud work ..
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,
You can explicitly create a message area in your first view so that the message gets displayed in the First view.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prosun Bondopadhyay ,
Usually it should work,
try putting the code for firing the plug inside a condition that check the message variable.. if the message variable is initial -> then fire else not
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.