I´m using the same values in two different views of the same component/window by using context binding via Component Controller.
AView <-> CoCo <-> BView
The values in AView are stored in a standard Model Node; this Model Node is bound to a Value Node of the CoCo for sharing only some fields.
BView uses also a Value Node that is bound to the Value Node of the CoCo.
AView (Model Node) <-> CoCo (Value Node) <-> BView (Value Node)
The created Value Nodes does have one attribute (EMP_RESP_NAME).
After binding the Value Node of BView to the Value Node of the CoCo following error is shown:
Cannot display view ZSRQM_INCIDENTH/BView of UI Component SRQM_INCIDENT_H
An exception has occurred Exception Class CX_CRM_CIC_PARAMETER_ERROR - Entry parameter of method CL_CRM_BOL_ENTITY->GET_PROPERTY contains value EMP_RESP_NAME, which is not allowed
Source Text Row: 19
Does anybody has made similar experiences or can explain that behaviour?
Thanks in advance,
This error usually comes when system tries to retrieve the value of an attribute which is not in structure of the either a value node or context node.
I will suggest you put a breakpoint on line number 19 in the method IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY
of class CL_CRM_BOL_ENTITY.
Check the attribute name in IV_ATTR_NAME and the structure name in <DATA>.
You have mentioned that you have bound a model node of view A to value node of CoCo for sharing only some fields. This approach is incorrect. If you want to bind two nodes, then they have to be of the same type - model or value; you can't bind a model node to a value node. So, change your node in component controller to model node. Then in view B, read only those fields from the component controller model node that you want.
thanks for information.
I´ve changed the CoCo context node to a Model Node.
When binding standard Model Node BTPartnerSet of AView to the added standard Model Node of the CoCo following error is shown by calling AView:
Exception Class CX_SY_MOVE_CAST_ERROR - Source type CLASS=CL_BSP_WD_MIXED_NODE is not compatible, for the purposes of assignment, with target type CLASS=CL_CRM_BOL_ENTITY
Source Text Row: 14
The only thing I want is to transfer the value of RESP_EMP_NAME of model node BTPartnerSet from AView via CoCo to BView.
Any suggestions how to prevent that error?
The context node BTPartnerSet of standard AView of component SRQM_INCIDENT_H is a mixed node. Means, there is a STRUCT.GUID and several value attributes. How can I cast/bind it to a CoCo node?
Many thanks in advance,
Edited by: Andre Schillack on Jun 13, 2011 9:18 PM
If you want to read just one attribute value, then you can actually declare a variable of the corresponding type in the component controller. You can then set this variable from the SETTER method of context node from source view and then read this attribute later in the target view. You can add more such variables to the component controller based on your need.
You can set the value of your component controller attribute from two locations:
1. DO_HANDLE_DATA( ) method of your source view controller (you need to re-define this method, and put your code of populating coco attribute after calling the super method, from this method you can basically get a component controller instance and set its public attribute)
2. Any event handler in your source view that triggers navigation to target view