cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP RAP - Managed scenario with draft Create button in Service preview but not in application

Hi everyone,

Sorry if this post is a duplicate one, I just didn't find it.

I'm kind of new with ABAP RAP and I've modified an application with managed scenario to add an association (association to parent...) like it has been done in SAP example with Travel and Booking.

I've modified all the CDS (basics, consumption) to add this association, created CDS (basics, consumption) for the child, I've modified the behavior of the basic view :

managed implementation in class zbp_i_xyz_req unique;
strict;
with draft;
define behavior for ZI_BP_REQ alias Request
persistent table zxyz_req draft table zxyz_req_d
lock master
total etag LastChange
etag master LastChangeMaster
authorization master ( instance )
with additional save
{
...

association _Details { create ; with draft; }
...

define behavior for ZI_REQ_DETAIL alias Detail
implementation in class zbp_i_bp_reqdet unique
persistent table zbp_req_detail
draft table zbp_req_detail_d
lock dependent by _Request
authorization dependent by _Request
etag master LastChange
{
  field ( numbering : managed, readonly ) DetUUID;
  field ( readonly ) RequestUUID;
...

  association _Request { with draft; }

  update;
  delete;
}
The behavior of the projection view :
projection;
use draft;
define behavior for ZC_BP_Request alias Request
use etag
{
...
use association _Details { create; with draft; }
...

define behavior for ZC_BP_REQUEST_DET alias Detail
use etag
{
  use update;
  use delete;
  use association _Request { with draft; }
}<br>

I've added in the metadata extension the table for detail :

  @UI.facet: [
    ...
    { 
      id: 'Details',
      purpose: #STANDARD,
      type: #LINEITEM_REFERENCE,
      label: 'Details',
      position: 50,
      targetElement: '_Details' 
    }
   ]

And created the metadata extension for the child (screen to fill all the details when pressing the button create).I've modified the service definition to add the association and regenerate the service binding. My problem is that, when I display a preview of the service binding (OData V2) I can see my table with the columns, the button create and the button delete. But in the application Fiori (List Report - Object Page), I never see the button create, only the button delete and the table.

Thank you in advance for your help and if you need more information, just tell me.

Yohann.

Accepted Solutions (1)

Accepted Solutions (1)

Hi everyone,

We found the solution, the manifest has to be adapted by adding the navigation to the object page Details. I thought it was done automatically but not.

Thank you.

Answers (0)