hello.
i have a question.
i implemented uielement multipane example in wda.
it worked very well in only first trying, but it occured a runtime error -that is Access via 'NULL' object reference not possible.- from second trying.
context -
hd <node>
-
attribute1 <hd of attribute>
-
attribute2 <hd of attribute>
-
item <hd of subnode>
-
attribute1 <item of attribute>
-
attribute2 <item of attribute>
below is source.
==========================================================
DATA: node_hd type ref to if_wd_context_node,
node_item type ref to if_wd_context_node,
itab_hd type wd_this->elements_hd,
stru_hd type wd_this->element_hd,
itab_item type wd_this->elements_item,
rt_auart type ref to data,
rt_vbeln type ref to data.
field-symbols: <fs_auart> type table,
<fs_vbeln> type table.
retrieve the data from the select option
rt_auart = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'AUART' ).
assign it to a field symbol
assign rt_auart->* to <fs_auart>.
retrieve the data from the select option
rt_vbeln = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'VBELN' ).
assign it to a field symbol
assign rt_vbeln->* to <fs_vbeln>.
retrieve that data from the database.
Normally it is suggested to encapsulate the data retrieval in a separate class.
For simplicity, the select statement has been implemented here.
select * into corresponding fields of table itab_hd
from vbak
where vbeln in <fs_vbeln>
and auart in <fs_auart>.
bind the data to the context
node_hd = wd_context->get_child_node( name = 'HD' ).
node_hd->bind_table( itab_hd ).
bind the data to the context
loop at itab_hd into stru_hd.
retrieve item_node object each sy-tabix
i could't get item_node object when sy-tabix is 1.
i hope to know why i can't get item_node object when sy-tabix is 1.
node_hd->get_child_node(
exporting
index = sy-tabix
name = 'ITEM'
receiving
child_node = node_item ).
***************************************************************************
when index = 1
node_item object is null.
*
why node_item object is null?????
i don't got it.
can sombody explain about it???
because of this matter, i can't acess frist node_item to insert value.
do you have a solving this matter?
*
***************************************************************************
select * into corresponding fields of table itab_item
from vbap
where vbeln = stru_hd-vbeln.
node_item->bind_table( itab_item ).
endloop.