To visualize it a bit better, assume this nonsense example:
- A simple, freestyle HTML/CSS/JS page is served via an HTTP service in ICF.
- The page was populated with data from SPFLI, i. e. an HTML table is displayed showing all the entries from the database table (including the carrid field).
- A button is implemented on the page to trigger an event.
- An entry of the HTML table is selected. Clicking the button triggers the execution of ABAP code, for example like this: The carrid value of the selected table line is passed and based on this value, some ABAP code should be executed (e.g. a SELECT on SFLIGHT/SCARR based on the passed carrid value is executed to populate another table on the page or whatever).
These are my questions:
- Is something in this direction possible at all?
- If not such a freestyle HTML/CSS/JS page, what would be the best technology to do it (UI5, Webdynpro ...) to do further research (Note: it is not meant for a "productive app", rather playing around)?
- Are there any recommendations for demos, tutorials or links especially concerning the ABAP code execution triggering and value passing?
If you want a web application to communicate with an ABAP backend, then you would usually do that through a webservice exposed by the application server.
There are several ways to implement webservices in SAP ABAP. The classic way to do that would be an enterprise service. But the current state-of-the-art would be an OData-compliant webservice with the RESTful programming model.
The web frontend could be implemented via UI5, which offers really elegant ways to bind UI controls to a data model backed by an oData webservice. But if you don't want to bother with the huge dependency and arduous learning curve of SAPUI5 / OpenUI5, then you can just as well communicate with an oData-webservice via the usual vanilla-JS tools (
XmlHttpRequest/fetch(url)).