Skip to Content
avatar image
Former Member

web dynpro application performance help...

Hello Gurus,

I've started developing a web app using web dynpro, there are many places to raise different error messages and success messages. Using the wizard I am raising those messages repeatedly at different  places in my coding. Is there any way to declare them once and calling them wherever I needed.

Please Help me on this.

thank you

regards,

Nagendra

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 07, 2015 at 06:07 AM

    Yes, its possible.

    Proceed as below

    • Create a method REPORT_MESSAGE( ) in component controller with importing parameters

              id_message_type  of type sy-msgty

              it_messages  .... type string_table / other type

    • Inside report_message( ) method, use the wizard and call the different messages as below

             

    >>> Component controller method

                        lo_message_manager = .... get message manager .. here

                   case id_message_type.

                        when 'E'.

                                  lo_message_manager->report_error( )

                        when 'S'.

                                  lo_message_manager->report_success( )

                        when others.

                   endcase.

    >>> In views, you can call this method

                  

                   To raise error message ...

                                  wd_comp_controller->report_message(

                                            exporting

                                                 id_message_type = 'E'

                                                 it_messages = lt_messages ).

                  

                  

                   To raise success message ...

                                  wd_comp_controller->report_message(

                                            exporting

                                                 id_message_type = 'S'

                                                 it_messages = lt_messages ).

    Hope this helps you.

    Regards,

    Rama

    Add comment
    10|10000 characters needed characters exceeded