cancel
Showing results for 
Search instead for 
Did you mean: 

Return type error

Former Member
0 Kudos

Hi,

<b>1) when i use this code WDDOMODIFYVIEW method, it is not showing any error.</b>

DATA TV4 TYPE REF TO CL_WD_TEXT_VIEW.

tv4 ?= view->get_element( 'ID OF ELEMENT' ).

TV4->SET_TEXT ( 'ABC' ).

<b>2)

I have one more own method called DISPLAY, which contains</b>

DATA TV4 TYPE REF TO CL_WD_TEXT_VIEW.

tv4 ?= myview->get_element( 'ID OF ELEMENT' ).

TV4->SET_TEXT ( MSG ).

I am calling this method from one event ONACTIONGETTRIPS

I am passing two parameters myview & msg.

CALL METHOD DISPLAY EXPORTING MSG = 'xxxx'.

<b>but it is showing error: </b> <u>Result type of the fuction cannot be converted into the type of TV4.</u>

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I had come across a similar problem.

It worked when i changed the ID.

I dont remember exactly -- but it was something like i changed 'ORT01' to 'ORT1'.

although it sounds silly ..

Former Member
0 Kudos

Hi Mog.

The ID that you pass to the get_element method is the same?

Cheers,

Sascha

Former Member
0 Kudos

Yes...Method to get element is same.

Former Member
0 Kudos

Hi Mog.

Strange. If the view is the same and the ID of the element you pass to the

get_element is the same it should work. Could you please post the complete code

of both methods?

Did you debug this? What object type does the get_element methopd return in

your case?

Cheers,

Sascha