cancel
Showing results for 
Search instead for 
Did you mean: 

Subnode does not exist error

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Solved

Former Member
0 Kudos

Hi Sap programmer,

Can you share the solution please?

Thanks!

Kind regards,

Bart

Former Member
0 Kudos

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.