0

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?
Brix
  • 1

1 Answers1

2

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)).

Philipp
  • 67,764
  • 9
  • 118
  • 153
  • Thanks. Will then further research on the topic. If s.o. has right away a straightforward tutorial/blog to get one's hands dirty quickly, most welcome. Regarding RAP, I assume the ABAP code is then implemented in a behavior pool. – Brix Feb 14 '22 at 16:05
  • @Brix The tutorials and blog posts I would recommend to you are the same ones Google would recommend. If you mean the restful programming model with RAP: That's implemented as an ABAP class and a bunch of other artifacts you have to create via the ABAP development tools in Eclipse. If you have any further questions, feel free to post them. – Philipp Feb 14 '22 at 16:15
  • 2
    For a minimalistic and very old school feel, google SAP BSP – Jorg Feb 15 '22 at 10:03