cancel
Showing results for 
Search instead for 
Did you mean: 

display information message in WDDOINIT

Former Member
0 Kudos

Hi all  ,

I want to display an information message in  portal  using  webdynpro abap .

So i tried in WDDOINIT method but not displaying message eventhough the code executed .

Used  IF_WD_MESSAGE_MANAGER-->REPORT_MESSAGE  for displaying .

Coula anyone please share  any information so that i can display an information message using WDDOINIT option  .

Regards ,

Sijin K P.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Karthik  ,

Could you please help me to display message in layout_view of component FITV_FPM .

While debugging i could see the code executed but still message is not displaying ..

I am not able to find out the reason ..please help.

Regards ,

Sijin K P.

Former Member
0 Kudos

Just try to create another view for showing the error message

former_member184578
Active Contributor
0 Kudos

Hi Sijin,

Raise Warning message in WDDOMODIFYVIEW method and check.

IF first_time = 'X'.

* get message manager

   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_MESSAGE

     EXPORTING

       MESSAGE_TEXT              = 'This is an info msg'

       MESSAGE_TYPE              if_wd_window=>co_msg_type_information.

    ENDIF.

Hope this helps u.,

Thanks & Regards,

Kiran.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sijin,

As you said you are working on FITV_FPM component, my assumption is you are using this component to create trip or expenses right? You must be navigating to different components which are conned to FITV_FPM.

Can you please elaborate on what action do you want to display the message? What i wanted to  know this since various components are called when you create/edit/delete expense or trips.

Execute your application and right click on window ->Display more help to exactly identify the webdynpro component you want to display message on.

PS:There is already a message area on the view layout of FITV_FPM i dont think you need to add another message area.

Bhanu

Former Member
0 Kudos

Hi Bhanu ,

I want to display a message whenever  comes in to create expense report screen .

one more thing  that suppose if  am unable to see  display more help after right click , this mean it is not part of webdynpro abap  componenet ?

Regards ,

Sijin K P.

Former Member
0 Kudos

Hi Sijin,

When you create expense report the first component is general data FITE_VC_GENERAL_DATA so in the wdoinit or wdomodifyview (depends on your requirement) method of component FITE_VC_GENERAL_DATA you should display the message.

For help either you dont have authorisation or its disabled in configuration

Former Member
0 Kudos

Paste the code, Have you passed 'I' to this MESSAGE_TYPE of the above method. Is the message displayed when run through SE80.

Former Member
0 Kudos

Hi lekha ,

code ,

   DATA lo_api_controller     TYPE REF TO if_wd_controller.
            DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
            DATA lv_msg_id TYPE string.
            lo_api_controller ?= wd_this->wd_get_api( ).

            CALL METHOD lo_api_controller->get_message_manager
              RECEIVING
                message_manager = lo_message_manager.

            CALL METHOD lo_message_manager->report_message
              EXPORTING
                message_text              = 'please make  zoom level 100% '
*                message_type              = 'I' "CO_TYPE_ERROR
*                params                    =
*                msg_user_data             =
*                is_permanent              = ABAP_FALSE
*                scope_permanent_msg       = CO_MSG_SCOPE_CONTROLLER
*                view                      =
*                show_as_popup             =
*                controller_permanent_msg  =
*                msg_index                 =
*                cancel_navigation         =
*                enable_message_navigation =
*                component                 =
              receiving
                message_id                = lv_msg_id
                .

i am not able to pass 'I' to message type as it is of type Integer .

Regards ,

Sijin K P.

Former Member
0 Kudos

You should use constant if_wd_window=>co_msg_type_information instead of "I".

Former Member
0 Kudos

Hi ondrej,

But still message is not coming in output ...

Please help .

Regards ,

Sijin K P .

chengalarayulu
Active Contributor
0 Kudos

Hi Sijin,

Please use the below code

CALL METHOD lo_message_manager->report_message

              EXPORTING

                message_text              = 'please make  zoom level 100% '

                message_type              = 1.

Since, there is no feasibility to report information message, instead we can display Warning.

and if you wanna display information in popup.. then just use the confirmation popup concept, and display, if user clicks on Ok then only your initial page can be displayed.

Hope this would be helpful.

Former Member
0 Kudos

Hi,

Have you tested it through SE80 then try it in portal.

Former Member
0 Kudos

Hi Chengalarayulu ,

Still i am not getting message in output .

i am doing this coding in WDDOINIT method of view LAYOUT_VIEW  , component : FITV_FPM.

Regards , Sijin K P.

chengalarayulu
Active Contributor
0 Kudos

Hi Sijin,

Please note, here you sould export message_type as numeric value i.e. 1(one) not 'I'.

try.

Former Member
0 Kudos

Yes I did numeric 1 not 'I'..but still no expected output ..

Is there anything that i am missing here .

Or any other method to display message ?

Regards ,

Sijin K P.

chengalarayulu
Active Contributor
0 Kudos

Can you try by inserting MessageArea UI element on View.

Former Member
0 Kudos

Hi Chengalarayulu ,

Sorry i dont know how to insert MessageArea UI element on View .

Can u please help me on this .

Regards ,

Sijin K P.