Skip to Content
-1
Jan 31, 2023 at 06:33 AM

Not found with Read entity in RAP

312 Views

Here is the CDS Entity ->

@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Base CDS View Entity'
define root view entity ZI_EKKO_DMO
as select distinct from zekko_dmo as ekko_dmo
association [1..1] to ZCDS_EKKO_DMO as _ekko on $projection.Ebeln = _ekko.ebeln
{
key chng_uuid as ChngUuid,
key ebeln as Ebeln,
_ekko.final_del as OldDeliveryDate,
deliv_date as DelivDate,
_ekko.supplier,
_ekko.supplier_name,
@Semantics.user.lastChangedBy: true
action_by as ActionBy,
@Semantics.systemDateTime.lastChangedAt: true
action_ts as ActionTs,
comments as Comments
}


Here is Behavior Definition -

managed;

define behavior for ZI_EKKO_DMO alias DelayedPO
implementation in class zcl_ekko_del unique
persistent table zekko_dmo
lock master

{
create;
update;
delete;

field( numbering: managed, readonly ) ChngUuid;
field( readonly ) OldDeliveryDate;
field( readonly ) supplier_name;
field( readonly ) supplier;
field( readonly ) ActionBy;

mapping for zekko_dmo
{
ChngUuid = chng_uuid;
Ebeln = ebeln;
DelivDate = deliv_date;
ActionBy = action_by;
ActionTs = action_ts;
Comments = comments;
} }

ABAP Class ->

CLASS zcl_ekko_del DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .

PUBLIC SECTION.
INTERFACES if_oo_adt_classrun.
PROTECTED SECTION.
private section.
ENDCLASS.

CLASS ZCL_EKKO_DEL IMPLEMENTATION.
METHOD if_oo_adt_classrun~main.
BREAK-POINT.
READ ENTITIES OF ZI_EKKO_DMO
ENTITY DelayedPO
ALL FIELDS
WITH VALUE #( ( ChngUuid = '13D09EB0F2BC1EEDA8A41F9DFF41888A' ) )
RESULT DATA(output)
FAILED DATA(failed)
REPORTED DATA(reported).
out->write( output ).
out->write( failed ).
out->write( reported ).
ENDMETHOD.
ENDCLASS.

The ChngUuid is present in the table. Even though the values are not getting retrived.