cancel
Showing results for 
Search instead for 
Did you mean: 

Error Messages

Former Member
0 Kudos
48

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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Raja,

Thanks for providing the information,can u please provide list of standard Web Dynrpo Components ,.

Former Member
0 Kudos

hi raju........

wdr_test_events is one of the major component wherein you can get the examples for all the ui elements.

---regards,

alex b justin

Former Member
0 Kudos

Hi Raju,

Check out SWDP_TEST package to get all standard web Dynpro Demo applications.

If you are happy with the reply, do close the thread.

Regards

Raja Sekhar