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
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;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
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.