SAP CRM
全部博文(33)
分类: Web开发
2015-05-14 10:56:25
例如,我需要将Context Node B中的ATTR2属于的值根据context node A的ATTR1改变,怎么做呢?
方法如下:
1) 获取 ATTR1 .
2) Put its value in a temporary holder, say ZTEMP attribute of Context
Node B
3) In getter-setter of Dependent attribute, ATTR2 ,use the
ZTEMP which reflect value of ATTR1.
因为ATTR1和ATTR2是在不同的Context Node下面的,所以用ZTEMP过渡是必须的
代码如下:
lv_entityA ?= me->typed_context->node A->collection_wrapper->get_current( ). lv_value = lv_entityA~if_bol_bo_property_access->get_property_as_srting( 'ATTR1' ) .
If
lr_entityB ?= me->typed_context->node B->colloction_wrapper->get_current( ) . lv_entityB~if_bol_bo_property_access->set_property( name = 'ZTEMP' Value = lv_value ).
Endif. |