cancel
Showing results for 
Search instead for 
Did you mean: 

Value nodes not populated with values

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi guys

i solved this

needed to create the object before adding to collection ....... lr_col->add( lr_valuenode )

CREATE OBJECT lr_col TYPE cl_crm_bol_bo_col.

Thanks

Abishek