Hi Experts,
When i am hitting enter after giving the value for that particular field, it is showing the empty in that field.
So I have created a Setter method for ZCREATED_AT field like below.even though i am facing the same problem.
while debugging ,i observed dref,oval and nval have field value and in 'current' the field value is 0. .after executing this,the field is not getting value.
then i added below bold sentences to the code->syntax check ->
Field "TYPED_CONTEXT" is unknown. It is not contained in one of the
specified tables nor is it defined by a "DATA" statement. "DATA"
statement.
how to resolve this one.
CODE:
method SET_ZZCREATED_AT.
Data:lr_collection type ref to cl_crm_bol_bo_col.
DATA:current TYPE REF TO if_bol_bo_property_access,
** current1 TYPE REF TO if_bol_bo_property_access,
dref TYPE REF TO data,
copy TYPE REF TO data.
FIELD-SYMBOLS:
<nval> TYPE ANY,
<oval> TYPE ANY.
current = me->TYPED_CONTEXT->zchild_detail->collection_wrapper->get_current( ).
if iterator is bound.
current = iterator->get_current( ).
else.
current = collection_wrapper->get_current( ).
endif.
TRY.
TRY.
dref = current->get_property( 'ZZCREATED_AT' ). "#EC NOTEXT
CATCH cx_crm_cic_parameter_error.
ENDTRY.
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
cx_crm_genil_model_error.
RETURN.
ENDTRY.
CHECK dref IS BOUND.
ASSIGN dref->* TO <oval>.
CREATE DATA copy LIKE <oval>.
ASSIGN copy->* TO <nval>.
*TRY.
TRY.
CALL METHOD if_bsp_model_util~convert_from_string
EXPORTING
data_ref = dref
value = value
attribute_path = attribute_path.
* FIELD-SYMBOLS:<l_data> type data.
** cl_bsp_utility=>instantiate_simple_data(
** value = value
** reference =
** use_bsp_exceptions = abap_true
** data = <l_data> ) .
*
CATCH cx_sy_conversion_error.
RAISE EXCEPTION TYPE cx_bsp_conv_failed
EXPORTING
name = 'ZZCREATED_AT'."#EC NOTEXT
ENDTRY.
IF <nval> <> <oval>.
current->Set_property(
iv_attr_name = 'ZZCREATED_AT'
IV_VALUE = <nval> ).
*
ENDIF.
endmethod.
Please tell me any one how to resolve this one.