on 2007 Dec 26 12:05 PM
Hi All,
i want to display some error messages in my application, like success,Error ,or need to enter values like that.
can anyone help me by step by step procedure.
any material or any blogs related to this..
Thanks,
raju
Hi,
For Error messages you need to call the messenger class.
For example if you want to display a message if sy-subrc = 0 .Follow the bellow steps.
1.)Place the cursor after the condition.and click to the wizard button.You will get a pop up with several radio buttons.
2.) select the radio button with 'Generate messages'.Enter
Message manager as = IF_WD_MESSAGE_MANAGER
method = (from f4 as per the message).
3.)and say ok.You will get the following piece of code.
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
report message
CALL METHOD lo_message_manager->report_success
EXPORTING
message_text =
params =
msg_user_data =
view =
show_as_popup =
is_permanent = ABAP_FALSE
scope_permanent_msg =
controller_permanent_msg =
msg_index =
cancel_navigation =
.
implicitly available data objects
wd_Context type ref to if_wd_context_node.
wd_This type ref to if_FileDownload.
4.)Pass the message text.For example 'Successful'.
This is the way you can display the static message.however for the dymnamic message you need to use assistance class.
This will work .Please let me know if this helps u out.
Thanks and regards,
Amita Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raju,
Please check the standard Web Dynrpo Component - WDR_TEST_MSG_AREA to get an idea of Message Areas and Messages.
Hope, this solves your problem.
Regards
Raja Sekhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.