Skip to Content
avatar image
Former Member

Subnode does not exist error

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 19, 2008 at 08:54 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2008 at 03:15 AM

    Solved

    Add comment
    10|10000 characters needed characters exceeded