on 08-19-2008 8:49 PM
Friends,
I have written the following code in WDDOINIT method of view controller.
-
method WDDOINIT .
types: begin of zs,
zktokd type kna1-ktokd,
end of zs.
*
data: handle1 type ref to if_wd_context_node,
begin of zstruct,
zktokd type kna1-ktokd,
end of zstruct,
zitab type table of zs.
handle1 = wd_context->get_child_node( name = 'DATA.KTOKD' ).
select ktokd from kna1 into corresponding fields of zstruct.
append zstruct to zitab.
endselect.
handle1->bind_table( new_items = zitab ).
endmethod.
-
In the view context, under the Context root node, I have created a node called 'DATA' of cardinality '1..n'. Under 'DATA', i have created another node called 'KTOKD' of cardinality '1..n'
When the WDA application is executed, i get the error message:
Subnode MAIN.DATA.KTOKD does not exist
When i comment out the entire code in WDDOINIT method, i get the error message:
Access via 'NULL' object reference not possible.
Please let me know what is wrong here.
Thanks and Regards.
Solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go to transaction ST22 and look at what exactly is throwing the error. That should probably clear it up. It sounds like there is a null object reference to that node somewhere besides the wddoinit. ST22 should clear it up.
I would check for spelling errors.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.