cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration of Messages: MOVE_CAST_ERROR

alexander_stettler
Participant
0 Kudos

Hi at all,

I want to configure my messages in a WDA project. To this, I found in the SAP documentation the following coding...

data:
    l_api_mycomp type ref to if_wd_window_controller,
    l_wd_message_area type ref to if_wd_message_area.

  l_api_mycomp ?= wd_this->wd_get_api( ).
  l_wd_message_area = l_api_mycomp->get_message_area( ).
  l_wd_message_area->set_display_attributes( i_for_all_instances = ' '
                                             i_msg_lines_visible = '0'
                                             i_use_toggle_area   = '  '
                                             i_show_only_current = ' ' )

Source: http://help.sap.com/saphelp_nw70/helpdata/en/45/5996d07d2b09cce10000000a114a6b/frameset.htm

Unfortunally I can't execute the coding, caused by a MOVE_CAST_ERROR at the statement "l_api_mycomp ?= wd_this->wd_get_api( ).".. Do anybody of you know why I get this error?

Thanks in advance and Regards,

Alex

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This is just sample code and the initialization of the message manager would be different depending upon if you are in a window controller, view controller, or component controller. It looks like this code was designed for running in the WDDOINIT of the Window Controller. Is that where you placed it? Or are in the View Controller? You might try changing the reference of if_wd_window_controller to if_wd_view_controller if you are trying this from the View.

Answers (0)