The MODIFY ENTITIES statement in Entity Manipulation Language (EML) is used in ABAP RAP (Restful Application Programming Model) to modify instances of a Business Object (BO). Here’s a breakdown of how it works:

MODIFY ENTITIES OF BUSINESS_OBJECT
ENTITY BO_ENTITY
OPERATION FIELDS ( RELEVANTFIELD1
RELEVANTFIELD2 )
WITH INTERNAL_TABLE | FROM INTERNAL_TABLE
[FAILED FAILED]
[MAPPED MAPPED]
[REPORTED REPORTED]
Key components in EML statement
BUSINESS_OBJECT: The root interface entity where your all others associations are connected is used to make changes.
BO_ENTITY : The associated entity which is actualy required changes based on the condition or validation as per business logic.
OPERATION : This section is indicates the type of action your expecting on the selected entity
FIELDS : The list of al fields you required for making changes or using validation need to mention/Used at this section of EML statement
WITH / FROM : The EML statement al any of them to be used. As per the developers choice and required business logic. Using this section you can either write for statement to add your business logic with more proficient FAILED : During your business logic modification in EML statement if any issue you wanted raise then you wil be notified using this section.
MAPPED : Once you are done with modification in EML you can use this section to mapped the required fields.
REPORTED : If any problem you wanted to notify at the UI section . You have the flexibility to add this in your statement.
Every EML statement starts with a keyword for the statement type indicating the purpose of the EML statement, For statements like MODIFY covering different operation types, the actual operation of the EML statement is indicated after the entity specification part.
Depending on the operation, you must pass relevant values to identify the related instance or to pass values for the instances. EML expects that you explicitly mark the fields that are relevant for the operation and for which the values should be used. These fields can be either specified with the fields statement or by filing the control structure.
The responses of the operations triggered by an EML statement are stored in typed response parameters. The structure failed for example is used to store the keys of instances for which the triggered operations have failed whereas the table result contains the results returned by a READ operation or by an action