on 03-02-2011 5:40 AM
Hi,
I have added a new search help in component BT116QH_SRVQ for node 'ZCAMPID' attribute - 'CAMPAIGN_ID'.
I facing values setting the value in this attribute after fetching the value from the search help screen.
This node has the attribute base_entity_name as 'BTOrder'.
if i use
me->typed_context->zcampid->collection_wrapper->get_current( ).
It says that zcampid does not exist.
This node is not available in the comp. controller and hence not able to access throught the comp,controller.
I think i will have to get the current from the BASE_ENTITY_NAME, but i don't know how?
Can you please help me set value to the node 'zcampid'.
Thanks in advance.
Regards
Shanthi.
Hi Shanthi,
Seems like you are trying to access context zcampid in some other view or in context class where it does not exist/ is not available.
If you have base entity access, you can reach to your intended entity by following the relationships those we can see in genil_model_browser.
TRY.
lr_entity ?= focus_bo.
lr_collection = lr_entity->get_related_entities(
iv_relation_name = 'entity_relation'
iv_mode = iv_mode ).
CATCH cx_crm_genil_model_error.
should never happen
RETURN.
CATCH: cx_sy_ref_is_initial,
cx_sy_move_cast_error. " parent is still value node
RETURN.
ENDTRY.
Please let me know in which method you are trying to set the value and also code that you are using.
Please let me know if this helps.
Thanks,
Bhushan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shanti,
Where exactly are you trying to access you Zcontext node? If you want to access the node via component controller, the code snippet would look something like this:
data : lr_comp TYPE REF TO <<CompControllerImplClass>>, "If Z class, then <<ZCompControllerImplClass>
lr_entity TYPE REF TO cl_crm_bol_entity.
lr_comp ?= me->comp_controller.
check lr_comp is BOUND.
lr_entity ?= lr_comp->ztyped_context-><<ZContextNodeName>>->collection_wrapper->get_current( ).
"Now use lr_entity's set_property_as_string to set the value of you reqd property
lr__entity->set_property_as_string( iv_attr_name = <<Attrname>> iv_value =<<Attrval>> ).
Hope this helps.
Regards
Nisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
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.