on 2007 Nov 06 12:28 PM
Hi Experts,
I want to throw the Error Message using Method <b>add_message</b> from the <b>CL_BSP_MESSAGE</b> class.
I called the method. But it didn't work.
Any body please give me the idea or Give any document for this class CL_BSP_MESSAGE.
Thanks in Advance,
Points Assured.
Request clarification before answering.
Hi,
Take a look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2a/31b97835a111d5992100508b6b8b11/frameset.htm">this</a> link.
regards,
Dirk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CL_BSP_MESSAGE is just a mechanism for queuing of messages and an easy way of sending these message from a controller (or model) into the view. It isn't actually responsible for the output of the messages however.
For that you have to design a mechanism to output the messages. The messages object will automatically be available from within the view via the page object. You can use the messages to check the status and indirectly change the output rendering:
if page->messages->assert( 'VALID_TABLE' ) <> 0.
"do something.
endif.
You can also use the phtmlb:messageBar element to easily output the error message:
<phtmlb:messageBar id = "VALID_TABLE"
type = "ERROR"
connectedControlId = "DDStructure"
text = "<%= page->message->assert_message( 'VALID_TABLE' ). %>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for your valuable reply.
But I got the error when I write this code in controller class.
if page->messages->assert( 'VALID_TABLE' ) <> 0.
endif.
Error is,
<b>Invalid logical expression: A field, a function, or "(" was expected
instead of "PAGE->MESSAGES->ASSERT("</b>
How can I rectify this.
Thanks.
User | Count |
---|---|
53 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.