cancel
Showing results for 
Search instead for 
Did you mean: 

ASSIGNMENT_TYPE_CONFLICT when saving Draft in RAP

Mattias
Active Participant
0 Kudos
338

 

Spoiler
 

Hello,

 

I'm on S/4 Hana 2020 and am having issues with using Draft functionallity in RAP. I have created a really basic application to illiminate any user errors.

The error we get is ASSIGNMENT_TYPE_CONFLICT in CL_RAP_BHV_CID_REGISTRY when trying to create or edit a post. Our drafts seems to save ok.

Both me an collegues have tried following the documentation with the same result. Below is our short example program.

Unfortunately we don't have ABAP GIT, so i cannot upload the complete example.

First table def.

@EndUserText.label : 'Favourite List'
@AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table ymdca_fav_list {
  key mandt             : mandt not null;
  key favouritelistid   : uuid not null;
  userid                : xubname;
  store                 : werks_d;
  description           : char26;
  creadatetime          : timestampl;
  creauname             : uname;
  lchgdatetime          : timestampl;
  lchguname             : uname;
  local_last_changed_at : timestampl;

}

Then the interface definition

@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Favourite Lists (Mattias)'

define root view entity YI_MJ_FAV_LIST as select from ymdca_fav_list
{
    key favouritelistid as Favouritelistid,
    userid as Userid,
    store as Store,
    description as Description,
     @Semantics.systemDateTime.createdAt: true
    creadatetime as CreaDateTime,
    @Semantics.user.createdBy: true
    creauname as CreaUname,
     @Semantics.systemDateTime.lastChangedAt: true
    lchgdatetime as LchgDateTime,
    @Semantics.user.lastChangedBy: true
    lchguname as LchgUname,
    @Semantics.systemDateTime.localInstanceLastChangedAt: true
    local_last_changed_at as LocalChangedAt
}

Then the Projection view

@EndUserText.label: 'Favourite List  (Mattias)'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.allowExtensions: true

@Search.searchable: true

define root view entity YP_MJ_FAV_LIST as projection on YI_MJ_FAV_LIST
{
    key Favouritelistid,
    Userid,
    Store,
    Description,
    CreaDateTime,
    CreaUname,
    LchgDateTime,
    LchgUname
}

 And finally our behaviour definitions. I've kept them to a minimum with no custom actions 

managed; // implementation in class ybp_i_mj_fav_list unique;
with draft;

define behavior for YI_MJ_FAV_LIST alias FavouriteList
draft table ymdca_fav_list_d
persistent table ymdca_fav_list
lock master
total etag LchgDateTime
authorization master ( instance )
etag master LocalChangedAt
{

  field ( readonly )
  CreaDateTime,
  CreaUname,
  LchgDateTime,
  LchgUname,
  LocalChangedAt;

  field ( readonly, numbering : managed )
  Favouritelistid;

  create;
  update;
  delete;

  mapping for ymdca_fav_list
  {
    Store = store;
    Userid = userid;
    CreaDateTime = creadatetime;
    CreaUname = creauname;
    Description = description;
    Favouritelistid = favouritelistid;
    LchgDateTime = lchgdatetime;
    LchgUname = lchguname;
    LocalChangedAt = local_last_changed_at;

  }


}

 

projection;
use draft;

define behavior for YP_MJ_FAV_LIST //alias <alias_name>
{
  use create;
  use update;
  use delete;
}

 

Accepted Solutions (0)

Answers (0)