Developing UI5 Apps Purely in ABAP
Go to file
oblomov-dev 90c680c923
abaplint fixes (#1376)
* abaplint fixes

* update
2024-09-06 15:31:22 +02:00
.github/workflows Update build_downport.yaml (#1350) 2024-08-30 16:35:31 +02:00
ci Update abaplint.jsonc (#1371) 2024-09-05 07:21:05 +02:00
resources refactoring (#875) 2024-02-08 18:40:16 +01:00
src abaplint fixes (#1376) 2024-09-06 15:31:22 +02:00
test Update abap_transpile.json (#1052) 2024-03-31 12:51:51 +02:00
.abapgit.xml Update .abapgit.xml (#1043) 2024-03-26 04:50:20 -04:00
.gitignore add transpiler setup running unit tests (#195) 2023-06-15 16:23:16 +00:00
abaplint-app.json ci config (#1096) 2024-04-22 10:27:54 +02:00
changelog.txt Refactoring (#1326) 2024-08-24 17:07:25 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2023-06-27 09:42:09 +02:00
CONTRIBUTING.md update contribution (#472) 2023-08-08 22:22:10 +02:00
LICENSE Ui5 version (#761) 2024-01-05 13:50:20 +01:00
package-lock.json fix url (#1369) 2024-09-04 22:21:23 +02:00
package.json fix url (#1369) 2024-09-04 22:21:23 +02:00
README.md Update README.md (#1363) 2024-09-04 16:20:19 +02:00



...offers a pure ABAP approach for developing UI5 apps, entirely without JavaScript, OData and RAP — similar to the past, when only a few lines of ABAP sufficed to display input forms and tables using Selection Screens & ALVs. Designed with a minimal system footprint, it works in both on-premise and cloud environments.

Key Features

  • 100% ABAP: Developing purely in ABAP (no JavaScript, DDL, EML or Customizing)
  • User-Friendly: Implement just a single interface for a standalone UI5 application
  • Minimal System Footprint: Based on a plain HTTP handler (no BSP, OData, CDS or RAP)
  • Cloud and On-Premise Ready: Works with both language versions (ABAP for Cloud, Standard ABAP)
  • Broad System Compatibility: Runs on all ABAP releases (from NW 7.02 to ABAP Cloud)
  • Easy Installation: abapGit project, no additional app deployment required

Compatibility

  • BTP ABAP Environment (ABAP for Cloud)
  • S/4 Public Cloud (ABAP for Cloud)
  • S/4 Private Cloud or On-Premise (ABAP for Cloud, Standard ABAP)
  • R/3 NetWeaver AS ABAP 7.50 or higher (Standard ABAP)
  • R/3 NetWeaver AS ABAP 7.02 to 7.42 - use the downported repositories

References

Credits

A big thank you to everyone who submits PRs, shares knowledge in issues, comments, via Slack, or through other channels. This project thrives on your support!

What's next?

Check out...
🎓 Sample Repository - Learn how to code with abap2UI5
💅 Addons - Extend abap2UI5s functionality
🪐 Connectors - Access your apps from anywhere
🚜 Apps - Discover & try out abap2UI5 apps
📺 More - Explore other projects using abap2UI5

Blogs & Articles

I. Development & Technical Background

  1. Introduction: Developing UI5 Apps Purely in ABAP (SCN - 22.02.2023)
  2. Displaying Selection Screens & Tables (SCN - 23.02.2023)
  3. Popups, F4-Help, Messages & Controller Logic (SCN - 30.03.2023)
  4. Advanced Functionality & Demonstrations (SCN - 02.04.2023)
  5. Creating UIs with XML Views, HTML, CSS & JavaScript (SCN - 12.04.2023)
  6. Installation, Configuration & Troubleshooting (SCN - 14.04.2023)
  7. Technical Background: Under the Hood of abap2UI5 (SCN - 26.04.2023)
  8. Repository Organization: Working with abapGit, abaplint & open-abap (SCN - 21.08.2023)
  9. Update I: Community Feedback & New Features (SCN - 11.09.2023)
  10. Extensions I: Exploring External Libraries & Native Device Capabilities (SCN - 04.12.2023)
  11. Extensions II: Guideline for Developing New Features in JavaScript (SCN - 11.12.2023)
  12. Update II: Community Feedback, New Features & Outlook (SCN - 08.01.2024)

II. On-Stack & Side-By-Side Extensibility

  1. Overview & Use Cases (LinkedIn - 04.08.2024)
  2. Running abap2UI5 on older R/3 Releases (LinkedIn - 14.07.2024)
  3. Calling Apps Remotely via RFC (LinkedIn - 25.06.2024)

III. SAP Fiori Launchpad Integration

  1. Installation & Configration (LinkedIn - 03.06.2024)
  2. Setup Title, Parameters & Navigation (LinkedIn - 06.06.2024)
  3. Integration of KPIs (LinkedIn - 07.06.2024)

IV. SAP BTP Integration

  1. Installation & Configuration (LinkedIn - 09.06.2024)
  2. Setup SAP Build Workzone Websites (LinkedIn - 16.06.2024)
  3. Setup SAP Mobile Start (LinkedIn - 17.06.2024)

Installation

Install with abapGit abapGit and set up a new HTTP service with the following handler:

Standard ABAP 🏠
METHOD if_http_extension~handle_request.

   server->response->set_cdata( z2ui5_cl_http_handler=>main( server->request->get_cdata( ) ) ).
   server->response->set_header_field( name = `cache-control` value = `no-cache` ).
   server->response->set_status( code = 200 reason = `success` ).

ENDMETHOD.
ABAP for Cloud ☁️
show code...
METHOD if_http_service_extension~handle_request.

   response->set_text( z2ui5_cl_http_handler=>main( request->get_text( ) ) ).
   response->set_header_field( i_name = `cache-control` i_value = `no-cache` ).
   response->set_status( 200 ).

ENDMETHOD.

Usage

Implement the abap2UI5 interface as shown in the following example:

CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.

  PUBLIC SECTION.
    INTERFACES z2ui5_if_app.
    DATA name TYPE string.

ENDCLASS.

CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.

  METHOD z2ui5_if_app~main.

    CASE client->get( )-event.
      WHEN 'POST'.
        client->message_toast_display( |Your name is { name }.| ).
    ENDCASE.

    client->view_display( z2ui5_cl_xml_view=>factory(
      )->page( 'abap2UI5 - Hello World App'
         )->simple_form( )->content( ns = `form`
            )->title( 'Input here and send it to the server...'
            )->label( 'What is your name?'
            )->input( client->_bind_edit( name )
            )->button( text = 'post' press = client->_event( 'POST' )
      )->stringify( ) ).

  ENDMETHOD.
ENDCLASS.

Or check out this bigger example with tables and events:

show code...
CLASS z2ui5_cl_demo_app DEFINITION PUBLIC.

  PUBLIC SECTION.

    INTERFACES Z2UI5_if_app.

    TYPES:
      BEGIN OF ty_row,
        title    TYPE string,
        value    TYPE string,
        descr    TYPE string,
        icon     TYPE string,
        info     TYPE string,
        selected TYPE abap_bool,
        checkbox TYPE abap_bool,
      END OF ty_row.

    DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY.
    DATA check_initialized TYPE abap_bool.

ENDCLASS.

CLASS z2ui5_cl_demo_app IMPLEMENTATION.

  METHOD Z2UI5_if_app~main.

    IF check_initialized = abap_false.
      check_initialized = abap_true.

      t_tab = VALUE #(
        ( title = 'row_01'  info = 'completed'   descr = 'this is a description' icon = 'sap-icon://account' )
        ( title = 'row_02'  info = 'incompleted' descr = 'this is a description' icon = 'sap-icon://account' )
        ( title = 'row_03'  info = 'working'     descr = 'this is a description' icon = 'sap-icon://account' )
        ( title = 'row_04'  info = 'working'     descr = 'this is a description' icon = 'sap-icon://account' )
        ( title = 'row_05'  info = 'completed'   descr = 'this is a description' icon = 'sap-icon://account' )
        ( title = 'row_06'  info = 'completed'   descr = 'this is a description' icon = 'sap-icon://account' )
      ).

      DATA(view) = z2ui5_cl_xml_view=>factory( ).
      DATA(page) = view->shell(
          )->page(
              title          = 'abap2UI5 - List'
              navbuttonpress = client->_event( 'BACK' )
                shownavbutton = abap_true
              )->header_content(
                  )->link(
                      text = 'Source_Code'  target = '_blank'
                      href = z2ui5_cl_demo_utility=>factory( client )->app_get_url_source_code( )
              )->get_parent( ).

      page->list(
          headertext      = 'List Ouput'
          items           = client->_bind_edit( t_tab )
          mode            = `SingleSelectMaster`
          selectionchange = client->_event( 'SELCHANGE' )
          )->standard_list_item(
              title       = '{TITLE}'
              description = '{DESCR}'
              icon        = '{ICON}'
              info        = '{INFO}'
              press       = client->_event( 'TEST' )
              selected    = `{SELECTED}`
         ).

      client->view_display( view->stringify( ) ).

    ENDIF.

    CASE client->get( )-event.

      WHEN 'SELCHANGE'.
        client->message_box_display( `item pressed with title ` && t_tab[ selected = abap_true ]-title ).

      WHEN 'BACK'.
        client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
    ENDCASE.

  ENDMETHOD.
ENDCLASS.

FAQ

  • Still have open questions? Check out the documentation or find an answer in the FAQ
  • Want to help out? Check out the contribution guidelines
  • As always - your comments, questions, wishes and bug reports are welcome, please create an issue