Is there a way to define view clusters through ABAP code ?
Function Module VIEWCLUSTER_MAINTENANCE_CALL
only seems to handle existing clusters. FMs of Function module SVCM handle SE54 screens, but I did not find the code that saves and activates a cluster definition.
There's no official API, and you can see with the SAT ABAP trace that the database updates are mixed together with the User Interface management, so it's hopeless. You can only rely on Batch Input or SAP GUI Scripting to build your own API.