on 05-03-2019 8:57 AM
Hi there
System: S/4 Hana 1809
I am creating a custom app using CDS/BOPF/Fiori Elements. All good so far, however, when the users Create a new record they would like certain fields to have default values. Is there a way to do this?
I noticed the BOPF Node API which has a Retrieve Default Values but the generated BOPF does not seem to allow a Node Default Class to be added.
Regards
Mark
Hi Mark Lewis,
You can try using the determination. SAP help has a very similar example.
As you are having 1809 I am thinking this is draft enabled scenario. If not convert it to draft enabled cds view as the above approach will not work for non draft.
Thanks,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mahesh
I thought these determinations were done Before Save and not at time of entry in UI. I'll check though and get back to you.
What I need is to be able to prepopulate fields in the UI at time of entry, so when the Create button is pressed the screen shows fields for entry with some values already filled.
Mark
Hi Mark Lewis,
Yeah The determination is triggerd for draft (when changes are done on the draft version as it actually saves the draft data to db) and for the normal (I would say "Abnormal" :p) non draft scenario determination will work at the time of save.
I would suggest you to go for draft only even if it is a small app as it is very feature rich compared to non draft(the abnormal one). You can check the below blog introduction part which has help links as well.
Thanks,
Mahesh
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.