cancel
Showing results for 
Search instead for 
Did you mean: 

Create button unavailable in SAP RAP ODATA V4

Mayursatardekar
Explorer
0 Kudos

Hi Experts,

I am trying to create a simple APP using RAP. I created a behavior definition without draft and created a ODATA V4 service, when I checked the preview, the CREATE button was missing on the page, so i checked online and i found out that if one is creating an ODATA V4 service, Draft functionality is mandatory, so I add Draft functionality, but after adding the Draft functionality, the create button is still missing, I check in BAS as well, it is not showing the Create button.

managed implementation in class zbp_i_qenbill unique;

strict ( 2 );

with draft;

define behavior for ZI_QENBILL alias Invoice

persistent table zqen_billingdata

draft table zqen_df_billdata

lock master total etag Locallastchangedat

authorization master ( instance )

etag master Locallastchangedat

{

create;

update;

delete;

field(readonly) Accountid;

field(readonly) Projectid;

field(readonly) Associateid;

mapping for zi_qenbill

{

// Accountid = accountid;

Projectid = projectid;

Associateid = associateid;

Accountname = accountname;

Projectname = projectname;

Associatename = associatename;

Associaterole = associaterole;

Deliverymanager = deliverymanager;

PoSow = posow;

Bdm = bdm;

Location = location;

Billfrom = billfrom;

Billto = billto;

Billinghours = billinghours;

Billingrate = billingrate;

Totalamount = totalamount;

Invoiceamount = invoiceamount;

Status = status;

Runrate = runrate;

Locallastchangedat = locallastchangedat;

Locallastchanged = locallastchanged;

}

draft action Edit;

draft action Discard;

draft action Activate;

draft action Resume;

draft determine action Prepare;

}

View Entire Topic
pothapragada_harsha
Discoverer
0 Kudos

I have below code in my Behavior definitions. I can see create button in the application but on click, its navigating to an empty Page and when i click on back button in browser a new record is being created with all fields as blank.

Everytime 3 $Batch calls are happening on create button with status code 200, navigating a blank page with no fields/buttons visible. Can you guide me?

managed implementation in class zbp_i_rap_shpmt_demo unique;

//strict;

with draft;

define behavior for ZI_RAP_SHPMT_DEMO alias Shipment //alias <alias_name>

persistent table zrap_db_table

draft table zrap_db_draft

lock master total etag Locallastchangedat

authorization master ( instance )

etag master Locallastchangedat

{

create;

update;

delete;

field ( numbering : managed, readonly ) Shipreqno;

mapping for ZRAP_DB_TABLE //ZC_RAP_SHPMT_DEMO

{

shipreqno = shipreqno;

Shipname = Shipname;

Shipdesc = Shipdesc;

Receivername = Receivername;

Address = Address;

Status = Status;

Locallastchangedat = locallastchangedat;

Locallastchanged = locallastchanged;

}

draft action Edit;

draft action Discard;

draft action Activate;

draft action Resume;

draft determine action Prepare;

}

TylerFincham
Discoverer
0 Kudos
How do we implement create button if we decide to not use draft with RAP and V4 ?