cancel
Showing results for 
Search instead for 
Did you mean: 

Error when performing write operations to Create , delete and Edit in CDS View and Projection View

ronaldo_aparecido
Contributor
0 Kudos
174

I created the CDS view and the projection view and created the service binds and service definitions:

This is the CDS view :

ronaldo_aparecido_1-1745050297911.png

This is The projection View :

ronaldo_aparecido_2-1745050360227.png

Behavior:

ronaldo_aparecido_3-1745050452955.pngronaldo_aparecido_4-1745050485348.png

However, when viewing my Fiori application and trying to change or create, I receive this error:

ronaldo_aparecido_5-1745050553720.png

I analyzed the Dump and it says that there is an incompatible type:

ronaldo_aparecido_6-1745050596895.png

This is my table:

ronaldo_aparecido_0-1745050071913.png

 


I have attached the dump:

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor

You have defined a date column in the table, but you indicated a datetime annotation in the CDS view entity.

NB: 1) Thanks for attaching the short dump. 2) For making your question findable, you should type the exception class is CX_CSP_ACT_REQUEST as text instead of image.

Reference code in the short dump you have attached (method ADD_MAPPING_FOR_TIMESTAMP of local class LCLA_ADMIN_DATA_STRATEGY in CL_CSP_ACT_SET_ADMIN_DATA):

      " We expect that the time stamp element is either typed as UTCLONG or TIMESTAMP(L)
      DATA(lo_timestamp_elem_descr) = CAST cl_abap_elemdescr( cl_abap_typedescr=>describe_by_data( <lv_timestamp_value> ) ).
      IF lo_timestamp_elem_descr->type_kind = cl_abap_typedescr=>typekind_utclong.
        " is UTCLONG
        <lv_timestamp_value> = mv_change_timestamp_as_utclong.
      ELSE.
        " expect TIMESTAMP(L)
        TRY.

            cl_abap_tstmp=>move( EXPORTING tstmp_src=mv_change_timestampl
                                 IMPORTING tstmp_tgt = <lv_timestamp_value> ).
          CATCH cx_sy_dyn_call_illegal_type INTO DATA(lx_invalid_type_for_admin_data).
            RAISE SHORTDUMP NEW cx_csp_act_request( textid       = cx_csp_act_request=>incomp_type_for_timestamp
                                                    entity_name  = iv_entity_name
                                                    element_name = <lv_timestamp_elem_name> )->enrich( ).
        ENDTRY.
      ENDIF.

 

Answers (0)