on 06-16-2011 4:20 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.