cancel
Showing results for 
Search instead for 
Did you mean: 

RAP OData v4 Web-API metadata nullable action parameter (abstract entity)

01-16-2025 4:14 PM
jrtr Explorer
1765 views 3 comments Go to solution
Subscribe

Hi folks,

I already asked a general question about the nullable option here and found solutions for properties based on CDS entities and custom entities. Now I need a solution for the properties of action parameter structures defined as abstract entities. How can I make the nullable="false" disappear in this case?

 

We're on a S/4 HANA oP 2023 release.

Accepted Solutions (1)

Accepted Solutions (1)

jrtr
Explorer

After a long journey with SAP support the simple answer is:

"unfortunately, as of now we do not support influencing the nullable attribute of elements in abstract entities."

Answers (1)

Answers (1)

AbhishekSharma
Active Contributor
0 Likes

Hi @jrtr I am not sure if I understood your question correctly. but if ask is to not pass Key field while calling Abstract entity you may use in Abstract entity Behavior Definition.

field (suppress) <Key_field>;

Refer below code

abstract;
strict ( 2 );
with hierarchy;
define behavior for ZAE_ABSTRACT alias Head
{
    field (suppress) key_field;
    association _Item;
}

define behavior for ZAE_ABSTRACT_ITEM alias Item
{
    field (suppress) key_field;
    association _Head;
}

Hope this helps...

Thanks-

 

jrtr
Explorer
0 Likes

Hi @AbhishekSharma thanks for your answer. Sorry if I did not ask precisely. The nullable option I want to change is in the metadata document. I attached a screenshot of the part that I want to influence.

jrtr_0-1737615872379.png