Skip to Content
0
Former Member
Jun 16, 2011 at 03:20 PM

Value nodes not populated with values

14 Views

Hi people

I want to populate a value node and add it to collection. But while adding to collection i get a CX_SY_REF_IS_INITIAL exception

Why does this come as my lr_valuenode has the data in it for the fields.

LOOP AT lt_result into ls_result.

REATE DATA lr_tabline.

create object lr_valuenode

exporting

iv_data_ref = lr_tabline.

lr_valuenode->set_property( iv_attr_name = 'EXCHANGE'

iv_value = ls_result-EXCHANGE ).

lr_valuenode->set_property( iv_attr_name = 'POST_CODE1'

iv_value = ls_result-POST_CODE1 ).

lr_valuenode->set_property( iv_attr_name = 'PRICE'

iv_value = ls_result-PRICE ).

lr_valuenode->set_property( iv_attr_name = 'PRODUCT_ID'

iv_value = ls_result-PRODUCT_ID ).

lr_valuenode->set_property( iv_attr_name = 'SPEED'

iv_value = ls_result-SPEED ).

lr_col->add( lr_valuenode )//////////////// * Throws the exception*

endloop.

me->typed_context->zproduct->collection_wrapper->set_collection( lr_col ).

Kindly help.points will be awarded

Thanks

Abishek