on 2024 Dec 17 8:34 AM
I implemented an OData v4 Web-API and realized that the metadata document contains nullable="false" for almost every property (all but Edm.Date typed properties) of my entities. As far as I recall the metadata document of the RAP implementation (UI service) of the S4D437 course didn't contain that much nullables. I searched for an answer and found Andre Fischers post in this thread that says that you can't set it directly but influence it by the implementation.
Sadly there is nothing mentioned "how" you influence it. What do I have to do to make properties nullable?
Request clarification before answering.
Hi @jrtr,
It seems @Semantics.nullValueIndicatorFor can be used. Check out similar question Set Nullable Property on SAP RAP based OData V4 and @tudor_teoteoi's response.
@Semantics.nullValueIndicatorFor: "OriginalField"
cast ('X' as boole_d) as NullValIndicator
Thought it must be applicable only in "Only available with the latest SAP BTP or SAP S/4HANA Cloud, public edition release and for SAP S/4HANA, on-premise edition or SAP S/4HANA Cloud, private edition, from release 2023 onwards." Check out here.
Thanks,
Tuncay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
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.