on 04-30-2007 9:05 AM
Hi,
I want to assign one text to TextView(userinterface element) at runtime.
For this i have written this code in WDDOMODIFYVIEW method.
DATA TV4 TYPE REF TO CL_WD_TEXT_VIEW.
TV4->SET_TEXT ( 'ABC' ).
when i run this, i am getting an error: Access Via 'NULL' object reference not possible.
How should i resolve this??????????
Null error means you are trying to access some property or method of object which is still not been created or is still a reference and as in this code u r trying to access a method set_text thru object TV4 which is still a reference and hasn't been created so please create an object with calling a constructor of the class CL_WD_TEXT_VIEW.
Regards
Anuj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
You havent created the object of the class CL_WD_TEXT_VIEW ..and u r trying to access the method thats why its giving this null reference error.
write this code ..
DATA TV4 TYPE REF TO CL_WD_TEXT_VIEW.
tv4 ?= view->get_element( 'ID OF ELEMENT' ).
TV4->SET_TEXT ( 'ABC' ).
it will solve ur problem..
Regards
Yashpal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.