GithubHelp home page GithubHelp logo

abap2ui5 / abap2ui5 Goto Github PK

View Code? Open in Web Editor NEW
243.0 11.0 46.0 3.81 MB

Developing UI5 Apps Purely in ABAP

Home Page: http://www.abap2UI5.org

License: MIT License

ABAP 99.98% JavaScript 0.02%
abap fiori ui5 abap2ui5 abapgit sap

abap2ui5's Introduction



...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, BOPF 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 2402)
  • Easy Installation: abapGit project, no additional app deployment required

Compatibility

  • BTP ABAP Environment (ABAP for Cloud)
  • S/4 Public Cloud ABAP Environment (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 downport repository

Information (Blog Series)

  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 - Sep. 2023 (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 โ€“ Jan. 2024 (SCN - 08.01.2024)

References

Extensions & Apps

More

Credits

Thanks to everyone who submits PRs or enriches my knowledge in issues, via Slack, or through other channels. This project greatly benefits from your support, making it a joy to work on! ๐Ÿ‘ทโ€โ™‚๏ธ

Installation

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

Standard ABAP ๐Ÿ 
METHOD if_http_extension~handle_request.

   DATA(lv_resp) = SWITCH #( server->request->get_method( )
      WHEN 'GET'  THEN z2ui5_cl_http_handler=>http_get( )
      WHEN 'POST' THEN z2ui5_cl_http_handler=>http_post( server->request->get_cdata( ) ) ).

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

ENDMETHOD.
ABAP for Cloud โ˜๏ธ
show code...
METHOD if_http_service_extension~handle_request.

   DATA(lv_resp) = SWITCH #( request->get_method( )
      WHEN 'GET'  THEN z2ui5_cl_http_handler=>http_get( )
      WHEN 'POST' THEN z2ui5_cl_http_handler=>http_post( request->get_text( ) ) ).

   response->set_header_field( i_name = `cache-control` i_value = `no-cache` ).
   response->set_text( lv_resp ).
   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 quantity TYPE string.

ENDCLASS.

CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.

  METHOD z2ui5_if_app~main.

    CASE client->get( )-event.
      WHEN 'BUTTON_POST'.
        client->message_toast_display( |{ quantity } Product ABC - send to the server| ).
    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( 'Product-ABC'
            )->input( client->_bind_edit( quantity )
            )->button( text = 'post' press = client->_event( 'BUTTON_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'.
        DATA(lt_sel) = t_tab.
        DELETE lt_sel WHERE selected = abap_false.
        client->message_box_display( `go to details for item ` && lt_sel[ 1 ]-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

abap2ui5's People

Contributors

abapsheep avatar abs-lme avatar axelmohnen avatar choper725 avatar christianguenter2 avatar jelliottp avatar larshp avatar marchl-woid avatar mbtools avatar nomssi avatar noso2k1 avatar oblomov-dev avatar th0masma avatar wegnerdan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

abap2ui5's Issues

Outdated bootstrapping documentation

This documentation seems outdated
https://github.com/oblomov-dev/abap2ui5/wiki/Configuration

Should be something like:

    DATA(lt_config) = VALUE z2ui5_if_client=>ty_t_name_value(
      ( name = `data-sap-ui-theme`         value = `sap_belize` ) " <= adjusted
      ( name = `src`                       value = `https://sdk.openui5.org/resources/sap-ui-core.js` ) " <= adjusted
      ( name = `data-sap-ui-libs`          value = `sap.m` )
      ( name = `data-sap-ui-bindingSyntax` value = `complex` )
      ( name = `data-sap-ui-frameOptions`  value = `trusted` )
      ( name = `data-sap-ui-compatVersion` value = `edge` ) ).

    DATA(lv_resp) = SWITCH #( server->request->get_method( )
       WHEN 'GET'  THEN z2ui5_cl_http_handler=>main_index_html(
                          title    = `abap2UI5`
                          t_config = lt_config )
       WHEN 'POST' THEN z2ui5_cl_http_handler=>main_roundtrip( ) ).

Launchpad Integration (FLP On-Premise)

Abap2UI5 is based on a single page index.html, therefore it is not compatible to FLP out of the box. But it is possible to encapsulate abap2UI5 in a UI5 standard app and call it from inside instead of showing the normal view.

Next steps:

  • build it more generic by passing the app id via FLP target mapping parameter
  • set the path of the http handler from outside or make it configurable

Open questions / Restrictions / Further Improvements:

  • the ui5 library is loaded two times (one time the normal ui5, second time with the iframe)
  • theme of the normal app is not used by abap2UI5, therefore it is also not configurable via launchpad (abap2UI5 in an iframe ignores launchpad configuration and theme)

Hi. I have some question for education(?).

Dear. ABAP2UI5 Team.

Hi. Thank you for creating the ABAP2UI5.
I`m ABAP Developer from South Korea.

I was moved by the ABAP2UI5.
So, I want learn more about the ABAP2UI5 and Share experience throught my blog(For Free).
Would you mind if I do these activities?

Sincerely.
yroomoo.

Main_v702 - CLASS z2ui5_lcl_if_ui5_library IMPLEMENTATION.

Hello Team

Got an issue in METHOD xml_get_begin.
start at line 1228.

      temp30 = `<mvc:View controllerName="MyController"     xmlns:core="sap.ui.core"    xmlns:l="sap.ui.layout"` && |\n| && `    xmlns:html="http://www.w3.org/1999/xhtml"  xmlns:f="sap.ui.layout.form" xmlns:mvc='sap.ui.core.mvc' displayBlock="true"` && |\
    ELSE.
      temp30 = `<core:FragmentDefinition   xmlns:core="sap.ui.core"    xmlns:l="sap.ui.layout"` && |\n| && `    xmlns:html="http://www.w3.org/1999/xhtml"  xmlns:f="sap.ui.layout.form" xmlns:mvc='sap.ui.core.mvc' displayBlock="true"` && |\n| && ` xmlns:edi

Compilation raises following issues.
Line 1228: Unmasked symbol '' in string template
Line 1230: Literals that take up more than one line are not permitted.

Lines seem to be .. well ... too long so they are not complete.

I just rearranged the ABAP code as following.

      temp30 = `<mvc:View controllerName="MyController" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout"` && |\n| &&
               ` xmlns:html="http://www.w3.org/1999/xhtml"  xmlns:f="sap.ui.layout.form" xmlns:mvc='sap.ui.core.mvc' displayBlock="true"` && |\n| &&
               ` xmlns:editor="sap.ui.codeeditor"   xmlns:ui="sap.ui.table"  xmlns="sap.m" xmlns:text="sap.ui.richtexteditor" > ` && temp13.
    ELSE.
      temp30 = `<core:FragmentDefinition   xmlns:core="sap.ui.core"    xmlns:l="sap.ui.layout"` && |\n| &&
               `    xmlns:html="http://www.w3.org/1999/xhtml"  xmlns:f="sap.ui.layout.form" xmlns:mvc='sap.ui.core.mvc' displayBlock="true"` && |\n| &&
               ` xmlns:editor="sap.ui.codeeditor"  xmlns:ui="sap.ui.table"  xmlns="sap.m" xmlns:text="sap.ui.richtexteditor" > `.

Activation works and I do not notice any trouble.

Thank you and regards
Sebastien

DEMO 21: Popup to select

If I press "continue" without selecting any entry, I get an exception.

Proposed fix in class Z2UI5_CL_APP_DEMO_21

      WHEN 'POPUP_TABLE_CONTINUE'.
        DELETE t_tab WHERE selkz = abap_false.
        "client->popup_message_toast( `Entry selected: ` && t_tab[ 1 ]-title ).
        client->popup_message_toast( `Entry selected: ` && VALUE #( t_tab[ 1 ]-title DEFAULT `no entry selected` )  ).

my pain points / feedback

First of all, thanks to @oblomov-dev for a great tool.

Something I hope to see documented in the upcomming blog (Technical documentation):

abap2UI5 is stateless, but it creates a powerful illusion of state with it draft table magic. This works well most of the time, but the developer must actively help to maintain this illusion if the code has object references.

a) make sure all objects (including their attributes that are object reference) implement the IF_SERIALIZABLE_OBJECT tag interface
b) beware the comparison of objects, as two objects with the same attributes are equivalent. Comparisons like

IF oref1 = oref2.
    ...
ENDIF.

eventually fail after one object is serialized and deserialized and the other is not. This may happen if one of the object references is an attribute in another object. I am now using something like

IF oref2 IS BOUND AND oref1->key = oref2->key.
    ...
ENDIF.

to avoid the subtle errors in a legacy logic where I was using singletons created in class constructor once (singletons are global variables :( )

abap2UI5 is simple to use, I can easily created Popup to input. But while doing so I was tempted to simulate synchronous input , where the code awaits the result and the resume. Like when you execute a dynpro with CALL SCREEN. This is not possible (yet ?). I have been mulling about using the ABAP promises https://github.com/abapify/promise to achieve this control flow.

That is all for now

Bootstrapping (respecting SAP license terms)

I suspect abap2ui5 is currently used mainly in the on-premise context.
In the current configuration SAPUI5 is used by the CDN ui5.sap.com.
Unfortunately this is not allowed see SAP Note 2943781.

The usage of the SAPUI5 CDN is only allowed for SAP Cloud products like e.g. SAP Business Technology Platform, SAP S/4HANA Cloud, public edition or SAP SuccessFactors, however on premise installations/systems are not allowed to bootstrap SAPUI5 from the SAPUI5 CDN.

I recommend making the repository parameter configurable and setting it during setup.
https://github.com/oblomov-dev/abap2UI5/blob/03856e3d0c51a7d8c35e4c4cc4a2037dbefc15c0/src/z2ui5_cl_http_handler.clas.abap#L12
So everyone can set his own UI5 variant for which licenses were purchased.
Possible settings would be e.g. src="/sap/public/bc/ui5_ui5/resources/sap-ui-core.js" , src="resources/sap-ui-core.js" , an own CDN or even OpenUI5, see note 3207822.

Getting error after refreshing page

image

I follow regular steps and after creating my link, I can see my ui. But when I refresh the browser page, it stucks as you see above. It is Brave browser and browser shields are off. Also after refresh the page, url looks like this "something/sadullah?sap-client=100?sap-client=100&app=ZST_CL_CLICK_FOR_DB_REC". Double question marks are normal? I don't know this is bacuse of me or a general issue. By the way you guys doing a great work with this project, claps for you =).

namespace in demo 30

why the ns = โ€˜fโ€™ is there in the dynamic page layout in Z2UI5_CL_APP_DEMO_30 ?

Downport and static code check

If you want to achieve a wider adoption, it should run lower SAP Basis releases as well. My suggestion would be to target 750 syntax.

  1. Install abaplint

https://github.com/apps/abaplint/installations/new

  1. Give abaplint access to your repos

https://github.com/settings/installations

  1. Add abaplint.json to your repo

Get latest default from https://playground.abaplint.org (2nd tab) and put it in your root folder

Change the following:

  "syntax": {
    "version": "v750",
    //...
  }

With any commit, your repo will then be checked with the default rules. There will be many findings but no worry. If you don't like a rule, just set it to false. For example:

  "keep_single_parameter_on_one_line": false,

It takes a little time to find the rules you want to use and adjust code accordingly but it's worth the effort. It will keep things clean even if many other people contribute.

Switch Binding

I am not able to bind the switch value with the backend variable value.
I dont think it is working in the z2ui5_cl_app_demo_02 example either.

On-premise Compatibility

Thanks for putting this creative solution together ๐Ÿ‘

And thank you for making it open source ๐Ÿ™ ๐Ÿ”

Object Types / Branches

I'm trying to install it on the ABAP Developer Edition (docker) which is 7.54 - the on-premise scenario. In general, this can not work with the same repository as a BTP / cloud solution since there are object types that do not exist on-premise (in this case HTTP, SCO2, SIA6):

image

My suggestion would be to create a new on-prem branch that does not include these objects.

Having separate branches really helps to keep things in order. You can still develop everything together in one system but just pay attention which object needs to be pushed to which branch. I would do three branches:

  • main all objects (current repo)
  • cloud (everything + HTTP, SCO2, SIA6 + z2ui5_cl_http_cloud)
  • on-prem (everything + SICF + z2ui5_cl_http_onprem)

Users can then install from the cloud or on-prem branches without any issues.

Diffs

After the initial pull, there are a few diffs:

image

DEVC

It looks like you developed using a package in the SAP namespace (which has tpclass = X). On-premise custom developments do not set this flag. I'm not sure if you can move to a local package ($) and update the repo from there which should remove the tpclass field. If not, remove the field in the on-prem branch.

image

TABL

On-prem abapGit does not serialize the ABAP language version. Remove the field in the on-prem branch.

image

CLAS

The class file should have an empty line at the end. Add it in the on-prem branch.

image

Syntax errors

CL_ABAP_RANGE is missing but see from your blog that you are already working on this :-)

Design

Your "lodash" class is quite a curious collection of things. Mixing functional methods into an exception class should really not be done. It's very confusing. You're not using much of this utility class anyway. Maybe keep what you really use in a separate class from the exception ;-)

Anyway, great work already and I'm looking forward to the 'cl_abap_range' replacement so I can test the complete solution

Syntax error in unit test

In unit test method TEST_APP_DEEP_DATA( ) of class Z2UI5_CL_HTTP_HANDLER, the field symbol must be defined as

   FIELD-SYMBOLS <row> TYPE REF TO data.

on lower releases, or a syntax error occurs.

Json deserialization issue

Today, I tried out abap2ui5 on my premise system but when i started any demo app i got a dump as the image:
image

Please help me!

New (very stupid) question

Hello to all

I have followed the tutorial very conscientiously and implemented IF_HTTP_EXTENSION interface into class Z2UI5_CL_HTTP_HANDLER
image

Then I moved to method IF_HTTP_EXTENSION~HANDLE_REQUEST to implement the snippet indicated in tutorial.
image
image

It worked great ... but what do I have to do now ?
I have read carefully the initial blog and it just say that When you are on an On-Premise system, you need to find the url by transaction SICF.

But where do I find the service ?

I warned you this was a very stupid one ...
Thousands thank you in advance for all your help.

Sebastien

Extension UI Element

Hey,

Would it be possible to add the "navigated" attribute to the StandardListentem ui element?

<StandardListItem type="Active" title="{Name}" navigated="{ parts: [ 'settings>/navigatedItem', 'ProductId' ], formatter: '.isNavigated' }" press="onPress" />

Best Regards
Thomas

Hi. Where can i find 'z2ui5_cl_xml_view_helper' Class?

Hi.

bc, my server can`t use ABAPGit.
So I install ABAP2UI5 manually.
create class, source copy & paste.

In some demo apps, i found 'z2ui5_cl_xml_view_helper' class was used.
but, i can`t found source code about 'z2ui5_cl_xml_view_helper'.
where can i find it ?

App Configuration (Repository, Themes, Title...)

Issue to find a good place for the app configuration.

First solution (which can be improved in the future) - you configure it with the first call of the index.html:
image

Then an user can call abap2UI5 for instance like this:

  CASE lv_system.
      WHEN 'PROD'.
        lv_ui5_path = 'resources/sap-ui-core.js'.
        lv_theme    = 'sap_horizon'.
      WHEN 'Q'.
        lv_ui5_path = 'resources/sap-ui-core.js'.
        lv_theme    = 'sap_horizon'.
      WHEN 'DEV'.
        lv_ui5_path = 'https://ui5.sap.com/resources/sap-ui-core.js'.
        lv_theme    = 'sap_horizon'.
    ENDCASE.

    DATA(lv_resp) = SWITCH #( request->get_method( )
       WHEN 'GET'
        THEN z2ui5_cl_http_handler=>main_index_html(
                    library_path = lv_ui5_path
                    theme        = lv_theme 
                    )
       WHEN 'POST' THEN z2ui5_cl_http_handler=>main_roundtrip( ) ).

Idea:
(1) configuration can be set during runtime in the http handler by the user
(2) if needed, users can also create a customizing table to set the theme etc.
(3) optional, when different apps need different themes you can also create additional http handler and call from the outside the theme you want (think this is also the old its mobile idea where you decide which theming and html templates are used by changing the http handler)
(4) abap2ui5 stays small and simple -> configuration is outside and not a part of abap2ui5

The app itself (z2ui5_if_app) has no own configuration. Due to the fact that abap2ui5 apps can call each other and switching between them is a part of the concept, it makes no sense to change the theme or ui5_path between two apps. Example:
https://twitter.com/OblomovDev/status/1640743794206228480

In addition you have the chance to copy&paste apps between systems without changing the configuration.

This is just the actual solution, feel free to share your ideas or experiences, that we can find out if the place is good or there is a better one.

Z2UI5_CL_HTTP_HANDLER cannot be activated

Hello to all.
This is my first port so please be patient with me. I have been developing ABAP for more than 20 years but I must admit that I am still a very beginner when talking about classes, methods, http handler ...etc.

ABAPGIThub and online repository have been successfully installed, so I could pull all objects from this Github to my SAP development instance. (ABAP Standard).

But I cannot activate class Z2UI5_CL_HTTP_HANDLER. It raises a syntax error "No type can be derived from the context for the operator "REDUCE"." in line 1081 of include Z2UI5_CL_HTTP_HANDLER=========CCIMP

     result = |{ result } <{ COND #( WHEN m_ns <> '' THEN |{ m_ns }:| ) }{ m_name } \n {
                          **REDUCE #( INIT val = `` FOR row IN mt_prop WHERE ( v <> '' )**
                           NEXT val = |{ val } { row-n }="{ escape( val = row-v  format = cl_abap_format=>e_xml_attr ) }" \n | ) }|.

Can someone inform me on what I did wrong ?
Thank you very much in advance.

SJ

Downport to ABAP syntax version v702

Downport to ABAP syntax version v702, to make ABAP2UI5 compatible to a wide range of ABAP stacks.

If there is someone with a v702 system who can test, after the downport, feel free to let me know!

Project dependencies:
image
Syntax downport to-do:
image

Main_v702 - CLASS z2ui5_lcl_db IMPLEMENTATION

Hello Team !

Just 2 tiny little blocking class activation in ABAP 7.40

METHOD db_load.

**    DELETE ...    
**    SELECT SINGLE data
**      FROM z2ui5_t_draft
**     WHERE uuid = id
**    INTO lv_data.    
**    AND REPLACE BY         
    SELECT SINGLE data 
      INTO lv_data
      FROM z2ui5_t_draft
      WHERE uuid = id.

METHOD execute_init.

**          DELETE ...
**          SELECT SINGLE * FROM z2ui5_t_draft
**            WHERE uuid = lv_uuid
**            INTO ls_db.
**        AND REPLACE BY
          SELECT SINGLE * FROM z2ui5_t_draft
            INTO ls_db
            WHERE uuid = lv_uuid.

With warm regards.
Sebastien

Delete local variables?

In class Z2UI5_CL_HLP_TREE_XML Method WRITE( ), the DATA declarations

     mo_document TYPE REF TO if_ixml_document,
     mo_parser   TYPE REF TO if_ixml_parser_core,

overwrite attribute declaration for the same identifiers in the class. I guess it can be outright deleted?
I would appreciate if you could you provide some guidance on this.

regards,
Jacques

Diffs for on-prem

There are minor diffs when pulling (main or _dev) into a on-prem system (7.54 ABAP Dev Edition):

image

The ABAP language version can't be avoided until we solve abapGit/abapGit#6154.

The package xml is missing the BOM mark. I can open a PR with the correct file if you like.

"Cannot convert character set"

I'm new to abapGIT and abap2UI5. I just installed abapGIT and tried to install abap2UI5 via a offline package, but I get the following error:
image

The system does not seem to be up to dat, but from my understanding at least the main_v702-branch should be supported:
image

Any ideas what could be wrong/missing here?

Extension SAPUI5 elements

Hey,
Thank you for your work in creating the ABAP2UI5 tool. For me as an ABAP developer, this is a huge relief. I think it's very important that this tool gives us a means to ease the transition. I would try to create some examples in order to present them to the specialist department. However, some SAPUI5 elements are still required for this. Would it be possible to integrate this into the HTTP handler?
The relevant elements are as follows:

Planning Calendar
https://sapui5.hana.ondemand.com/#/entity/sap.m.PlanningCalendar

MultiInput
https://sapui5.hana.ondemand.com/#/entity/sap.m.MultiInput

Smart Table
https://sapui5.hana.ondemand.com/#/entity/sap.ui.comp.smarttable.SmartTable

Smart Filter Bar
https://sapui5.hana.ondemand.com/#/entity/sap.ui.comp.smartfilterbar.SmartFilterBar

Object Page Layout
https://sapui5.hana.ondemand.com/#/entity/sap.uxap.ObjectPageLayout

Or is there another way to extend the SAPUI5 elements?

Best regard
Thomas

Error Pull in Repository

Hello,

Error Message Pull in Repository:

image

Great work. I am wating of the new Block 3/3 Demo App.

Best Regards
Thomas

Editable table

I copied example 11 and only changed the table to my own - Get this error when toggle between display and edit
image

Table Maintenance error

On my Demosystem (7.54? Abap Platform 1909 On premise) the method /ui2/cl_json=>serialize( ) has no FORMAT_OUTPUT parameter, so there is a syntax error in Z2UI5_CL_APP_DEMO_13.
I could run the test after commenting out the parameter

        format_output    = abap_true

in method get_json_by_table( ).

Language \ Locale

how can we change ui locale from abap code ? or rather set it that way..

any thoughts on making it globaly changeable ?

Number of table rows in Example CLAS Z2UI5_CL_APP_DEMO_06

Hello,

i duplicate the clas Z2UI5_CL_APP_DEMO_06 to my own clas and change the line 7 to

t_tab = REDUCE #( INIT ret = VALUE #( ) FOR n = 1 WHILE n < 1001 NEXT ret =

In the Debugger i see 1000 Entries in the Table t_tab.
But i dont see more then 100 lines iin the Page. What can i do, to see all Entries?

Best Regard
Thomas

CL_ABAP_CONTEXT_INFO doesnt exist in 750

Error in 750 system. Proposed fix is because cl_abap_context_info=>get_user_technical_name( ) actually calls cl_abap_syst=>get_user_name( ) and CL_ABAP_SYST is available in 750.
Error is in local definitions/implementations of z2ui5_cl_http_handler.

Error:
image

Proposed fix:
image

StandardListItemInfoStateInverted

Hey,

I want to implement the following list:

StandardListItemInfoStateInverted
https://sapui5.hana.ondemand.com/#/entity/sap.m.StandardListItem/sample/sap.m.sample.StandardListItemWrapping

StandardListItemWrapping
https://sapui5.hana.ondemand.com/#/entity/sap.m.StandardListItem/sample/sap.m.sample.StandardListItemInfoStateInverted

My Code StandardListItemInfoStateInverted

...
t_tab = VALUE #(
( title = 'Peter' info = 'Information' descr = 'this is a description' icon = 'sap-icon://badge' highlight = 'Information' )
( title = 'Peter1' info = 'Success' descr = 'this is a description1' icon = 'sap-icon://favorite' highlight = 'Success')
( title = 'Peter2' info = 'Warning' descr = 'this is a description2' icon = 'sap-icon://employee' highlight = 'Warning')
( title = 'Peter3' info = 'Error' descr = 'this is a description3' icon = 'sap-icon://accept' highlight = 'Error' )
( title = 'Peter4' info = 'None' descr = 'this is a description4' icon = 'sap-icon://activities' highlight = 'None')
( title = 'Peter5' info = 'Information' descr = 'this is a description5' icon = 'sap-icon://account' highlight = 'Information' )
).
...
page->list(
headertext = 'List Ouput'
items = client->_bind( t_tab )
mode = None
)->_generic(
name = StandardListItemInfoStateInverted
t_prop = VALUE #(
( n = title v = '{TITLE}' )
( n = description v = '{DESCR}' )
( n = icon v = '{ICON}' )
( n = info v = '{INFO}' )
( n = iconInset v = 'false' )
( n = iconState v = '{highlight}' )
( n = infoStateInverted v = 'true' )
( n = highlight v = '{highlight}' )
)

Unfortunately I get the following error:

5loader-dbg.js:1180 Uncaught (in promise) ModuleError: failed to load 'sap/m/StandardListItemInfoStateInverted.js' from https://sdk.openui5.org/resources/sap/m/StandardListItemInfoStateInverted.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sdk.openui5.org/resources/sap/m/StandardListItemInfoStateInverted.js'.
at ve (https://sdk.openui5.org/resources/sap-ui-core.js:10:7732)
at de.failWith (https://sdk.openui5.org/resources/sap-ui-core.js:10:5570)
at Le (https://sdk.openui5.org/resources/sap-ui-core.js:10:14352)
at Ie (https://sdk.openui5.org/resources/sap-ui-core.js:10:16322)

Best Regards
Thomas

Popups - reduce data transfer

In certain situations data is send to the frontend even if it is not needed. Adjust View Model creation only for used data (add used flag).

How to configure ZABAP2UI5 ?

Hello Team

I am trying to build ZABAP2UI5 service in SICF but do not find documentation or tutorial to assist me.
Can somone share the setup ?

Here is what I did:

Service configuration
image

GUI Configuration
image

Handler configuration
image

Any advice ?
Thank and regards
Sebastien

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.