on 06-21-2023 12:25 PM
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;
}
You also have to use the statement
use draft;
in the behavior definition of the projection layer.
So your BDEF projection should look as follows:
projection;
strict( 2 ) ;
use draft;
Did you do that?
In addtion you would have to set a
use create;
statement there as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry for replying late, but yes it did work, thank you for your response
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.