We can pass the values from UI while calling an action without any UI5 coding. This is possible with Action with Parameters feature.
Let see how to define & implement the action with an use case
Want to know what is action ? - • Actions in Behavior Definition | REST...
SAP RAP playlist - • Managed Restful ABAP Programming Mode...