This is a test message to test the length of the message box.
Login
|

Write a comment

Writing comments is only allowed to registered users, registration is free and does not require an email address and can be done quickly here.

Validation Sequence for Parent and Child Entity

rapnoob - 10/07/2025 - 16:56

If there is a validation on Parent Entity and a validation on Child Entity in Managed BO and Managed BO with additional save, Is there a sequence in which the Validations run for Parent and Child Entity or the sequence is uncontrolled?

validation checkParent on save { create ; }

validation checkItem on save { field matnr; create }

thanks


Xexer - 10/07/2025 - 22:12

Normally, I'd say it doesn't really matter. The validations can work independently of each other, since the RAP buffer is filled and won't be changed. So far, the documentation seems to say that the order isn't fixed.

Greetings Björn


rapnoob - 10/08/2025 - 00:24

thanks for all the cool blogs and quick response :)

but what if i want my child entity validations to run first? maybe can be done by putting child validation in draft determine prepare action in Parent Entity. In that way, it will be called before check_before_save.

Also a small correction in the example shared in the blog -

validation validateCoreData on save { field Country, PaymentCurrency; } -> this validation will trigger also during Create Operation if any one of the field Country or Payment Currency is provided. We dont need to write create explicitly here. If we add create also, then regardless of changes/data in these fields, this validation will always trigger during create.


Xexer - 10/13/2025 - 20:03

Most of this series of articles was written in 2022, so it's possible that the validations still worked as they did at that time and the behavior was changed in later versions. We usually checked and tested the behavior thoroughly back then, otherwise this sentence wouldn't be in the article.

Thanks for the tip, I'll have to test it again later.