cancel
Showing results for 
Search instead for 
Did you mean: 

GET_PROPERTY contains value which is not allowed

former_member110533
Participant
0 Kudos

Hi,

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

Method: CL_CRM_BOL_ENTITY=>IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY

Source Text Row: 19

Does anybody has made similar experiences or can explain that behaviour?

Thanks in advance,

André

Accepted Solutions (1)

Accepted Solutions (1)

former_member214667
Contributor
0 Kudos

Hi Andre,

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.

Regards,

Shiromani

former_member110533
Participant
0 Kudos

Hi Shiromani,

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

Method: CL_CRM_UIU_BTPARTNERSET_CN=>GET_PARTNER_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?

Edit:

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,

André

Edited by: Andre Schillack on Jun 13, 2011 9:18 PM

Former Member
0 Kudos

Hello Andre

You can try reading the model node of the mixed node.

lr_next_item ?= lr_mixed_ent->if_bsp_wd_ext_property_access~get_model_node( )

From the this model node lr_next_item you can read the property.

Regards

Sohit

former_member214667
Contributor
0 Kudos

Hi Andre,

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.

Regards,

Shiromani

former_member110533
Participant
0 Kudos

Hi Shiromani,

sounds good.

How can I Set a value from source view attribute to the CoCo? Means, what is the correct coding for accessing the CoCo from source view?

Thanks in advance,

André

former_member214667
Contributor
0 Kudos

Hi Andre',

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

Regards,

Shiromani

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Andre,

Try using the get_property_as_string by passing the attribute like 'Attribute_name'.

before calling this method check if the entity is not empty.

It will be helpful to analyze if you can put your code.

Thanks

Sohit

former_member110533
Participant
0 Kudos

Hi Sohit,

where this coding shall be implemented?

GET_PROPERTY is called by standard class.

Best regards,

André

Edited by: Andre Schillack on Jun 13, 2011 10:58 AM

Former Member
0 Kudos

Andre,

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>.

Regards

Sohit