https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/SAP-R3-blog-posts.xml SAP Community - SAP R/3 2024-05-20T11:13:39.426955+00:00 python-feedgen SAP R/3 blog posts in SAP Community https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-1-introduction-developing-ui5-apps-purely-in-abap/ba-p/13567635 abap2UI5 - (1) Introduction: Developing UI5 Apps Purely in ABAP 2023-02-23T00:15:11+01:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 <P>Welcome to the first part of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A>&nbsp;</STRONG>— an open-source project for developing UI5 apps purely in ABAP.</P><P><STRONG>This first post offers an overview of the project. It highlights its features, presents demonstrations, and provides a step-by-step guide to the development process.</STRONG></P><P><STRONG>Blog Series &amp; More</STRONG></P><P>You can find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and explore the other articles in this blog series:</P><OL><LI>Introduction: Developing UI5 Apps Purely in ABAP (this blog post)</LI><LI><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">Displaying Selection Screens &amp; Tables</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">Advanced Functionality &amp; Demonstrations</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">Installation, Configuration &amp; </A><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">Troubleshooting</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer">Technical Background: Under the Hood of abap2UI5</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer">Repository Organization: Working with abapGit, abaplint &amp; open-abap</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></LI><LI><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG></LI></OL><P><STRONG>Content</STRONG></P><P>This post covers the following areas:</P><OL><LI>Project Information<OL><LI>&nbsp;Features</LI><LI>Demos</LI><LI>Basic Example</LI></OL></LI><LI>Development Process<OL><LI>&nbsp;View</LI><LI>Controller</LI><LI>Event</LI><LI>Model &amp; Data Binding</LI></OL></LI><LI>What's next?</LI><LI>Conclusion</LI></OL><P>Let’s begin with the first topic.</P><H3 id="toc-hId-1092206467"><STRONG>1. Project Information</STRONG></H3><P>This project 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 &amp; ALVs. Designed with a minimal system footprint, it works in both on-premise and cloud environments.</P><H4 id="toc-hId-1024775681"><STRONG>1.1 Features, Compatibility &amp; Installation</STRONG></H4><UL><LI><STRONG>100% ABAP:</STRONG>&nbsp;Developing purely in ABAP (no JavaScript, DDL, EML or Customizing)</LI><LI><STRONG>User-Friendly:</STRONG><SPAN>&nbsp;Implement just a single interface for a standalone UI5 application</SPAN></LI><LI><STRONG>Minimal System Footprint:</STRONG><SPAN>&nbsp;Based on a plain HTTP handler (no BSP, OData, CDS, BOPF or RAP)</SPAN></LI><LI><STRONG>Cloud and On-Premise Ready:</STRONG><SPAN>&nbsp;Works with both language versions (ABAP for Cloud, Standard ABAP)</SPAN></LI><LI><STRONG>Broad System Compatibility:</STRONG><SPAN> Runs on all ABAP releases (from NW 7.02 to ABAP Cloud Stacks)</SPAN></LI><LI><STRONG>Easy Installation:</STRONG><SPAN>&nbsp;abapGit project, no additional app deployment required</SPAN></LI></UL><P>Use <STRONG><A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer">abapGit</A></STRONG> for installation, pull the repository, create a new HTTP service and call abap2UI5. Detailed information can be found <A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer"><STRONG>in part 6</STRONG></A> of this series. This project is compatible with all ABAP releases and language versions:</P><UL><LI>BTP ABAP Environment (ABAP for Cloud)</LI><LI>S/4 Public Cloud ABAP Environment (ABAP for Cloud)</LI><LI>S/4 Private Cloud or On-Premise (ABAP for Cloud, Standard ABAP)</LI><LI>R/3 NetWeaver AS ABAP 7.50 or higher (Standard ABAP)</LI><LI>R/3 NetWeaver AS ABAP 7.02 to 7.42 (Standard ABAP) - use this <A href="https://github.com/abap2ui5/abap2UI5-downport" target="_blank" rel="noopener nofollow noreferrer"><STRONG>downport repository</STRONG></A></LI></UL><H4 id="toc-hId-828262176"><STRONG>1.2 Demos</STRONG></H4><P>For an impression of the possibilities of abap2UI5, take a look at the demos presented in this blog series — everything is developed in pure ABAP:</P><TABLE border="1"><TBODY><TR><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_selscreen-1.gif" border="0" /></TD><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_table.gif" border="0" /></TD></TR><TR><TD>Selection Screens (Blog 2)</TD><TD>Tables, Lists &amp; Maintenance (Blog 2)</TD></TR><TR><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_popup-1.gif" border="0" /></TD><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_demo.gif" border="0" /></TD></TR><TR><TD>Popups &amp; F4-Helps (Blog 3)</TD><TD>File Editor, File Upload &amp; Visualization (Blog 4)</TD></TR></TBODY></TABLE><P>But first let's start with a basic example.</P><H4 id="toc-hId-631748671"><STRONG>1.3 Basic Example</STRONG></H4><P>A simple abap2UI5 app with an input and a message output looks like this:</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>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-&gt;get( )-event. WHEN 'BUTTON_POST'. client-&gt;message_toast_display( |{ quantity } Product ABC - send to the server| ). ENDCASE. client-&gt;view_display( z2ui5_cl_xml_view=&gt;factory( )-&gt;page( 'abap2UI5 - Hello World App' )-&gt;simple_form( )-&gt;content( ns = `form` )-&gt;title( 'Input here and send it to the server...' )-&gt;label( 'Product-ABC' )-&gt;input( client-&gt;_bind_edit( quantity ) )-&gt;button( text = 'post' press = client-&gt;_event( 'BUTTON_POST' ) )-&gt;stringify( ) ). ENDMETHOD. ENDCLASS.</code></pre><P>&nbsp;</P><P>As you can see, to develop an UI5 app with abap2UI5, simply create a new class and implement the method main of the following interface:</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>INTERFACE z2ui5_if_app PUBLIC. METHODS main IMPORTING client TYPE REF TO z2ui5_if_client. ENDINTERFACE.</code></pre><P>&nbsp;</P><P>The output of this app looks like this:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif1-2.gif" border="0" width="479" height="302" /></P><P>&nbsp;</P><P class="">abap2UI5 - Basic Example</P><P><BR />Everything functions seamlessly out-of-the-box, offering bidirectional data transfer, event handling, and a user interface</P><H3 id="toc-hId-306152447"><STRONG>2. Development Process</STRONG></H3><P><BR />Let's walk through the development process step-by-step, beginning with the view, then progressing to the controller, and finally, we'll examine the model.</P><H3 id="toc-hId-109638942"><STRONG>2.1 View</STRONG></H3><P><BR />Abap2UI5 provides the possibility to develop UI5 Views similar to an UI5 freestyle application. You have complete freedom in structuring the view and the flexibility to use a wide range of UI5 controls. The view can be defined either directly as a string or crafted using the class z2ui5_cl_xml_view. Let's examine the app mentioned earlier and compare its UI5-View with its abap2UI5 counterpart:</P><TABLE border="1"><TBODY><TR><TD><STRONG>UI5-View vs. abap2UI5-View</STRONG></TD></TR><TR><TD><BR /><PRE>&lt;Page title="Page title" &gt; &lt;f:SimpleForm title="Form Title"&gt; &lt;f:content&gt; &lt;Title text="Input" /&gt; &lt;Label text="quantity"/&gt; &lt;Input value="{/oUpdate/QUANTITY}"/&gt; &lt;Label text="product" /&gt; &lt;Input value="tomato" /&gt; &lt;Button press="onEvent" text="post"/&gt; &lt;/f:content&gt; &lt;/f:SimpleForm&gt; &lt;/Page&gt;</PRE></TD></TR><TR><TD><BR /><PRE>view-&gt;page( title = 'Page title' ) )-&gt;simple_form( 'Form Title' )-&gt;content( 'f' )-&gt;title( 'Input' )-&gt;label( 'quantity' )-&gt;input( client-&gt;_bind_edit( quantity ) )-&gt;label( 'product' )-&gt;input( value = product editable = abap_false )-&gt;button( text = 'post' press = client-&gt;_event( 'BUTTON_POST' ) ). </PRE></TD></TR></TBODY></TABLE><P><BR />In abap2UI5, the XML-View is generated in ABAP and the class serves as a helper to simplify the creation of XML. However, ultimately, both approaches yield the same result, with the key difference being that in abap2UI5, the view is transmitted from the backend.<BR /><BR />This is just a simple example and in the following blog posts, we will expand its functionality to include tables, lists, selection screens, charts and more.<BR /><BR /><STRONG>abap2UI5 Control Library</STRONG><BR /><BR />Here is a selection of available UI5 controls that you can utilize with the class z2ui5_cl_xml_view:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/Bildschirmfoto-2023-07-27-um-08.53.25.png" border="0" /></P><P>&nbsp;</P><P class="">z2ui5_cl_xml_view</P><P><BR />More controls will be added in the future – check out the <STRONG><A href="https://github.com/oblomov-dev/abap2UI5/blob/main/src/z2ui5_cl_xml_view.clas.abap" target="_blank" rel="noopener nofollow noreferrer">source code.</A> </STRONG>Additionally in <A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer"><STRONG>part five</STRONG></A>&nbsp;of this series, other view creation approaches with increased flexibility will be explained.<BR /><BR />Most UI5 controls are compatible with abap2UI5 without requiring any additional adjustments. For example, <A href="https://sapui5.hana.ondemand.com/#/entity/sap.m.Input" target="_blank" rel="noopener nofollow noreferrer"><STRONG>Inputs</STRONG></A> can be used since it only consists of attributes that can be directly sent back to the server. Controls that rely on additional JavaScript logic need to be modified to work with abap2UI5. They have to be encapsulated in a custom control first.<BR /><BR />We will see an example for this in <A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer"><STRONG>part four</STRONG></A> of this blog series, where we will use a custom control for uploading and downloading files and check also out <STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">part 11</A></STRONG> to learn how to implement your own custom control in abap2UI5.</P><H3 id="toc-hId--86874563"><STRONG>2.2 Controller</STRONG></H3><P><BR />The interface z2ui5_if_app consists of the method 'main', which gives you control over the frontend UI5 app, similar to the JavaScript controller of a UI5 freestyle application. Consequently, they look similar:</P><TABLE border="1"><TBODY><TR><TD><STRONG>UI5-Controller vs. abap2UI5-Controller</STRONG></TD></TR><TR><TD><BR /><PRE>sap.ui.controller("sap.ui.myApp.controller.one", { onInit: function() { }, onBeforeRendering: function() { }, onEvent: function() { }, onAfterRendering: function() { }, onExit: function() { } });</PRE></TD></TR><TR><TD><BR /><PRE> METHOD z2ui5_if_app~main. IF check_initialized = abap_false. check_initialized = abap_true. "set init values here... ENDIF. CASE client-&gt;get( )-event. WHEN 'POST'. "event handling here... ENDCASE. "view rendering here... client-&gt;view_display( z2ui5_cl_xml_view=&gt;factory( )-&gt;shell( )-&gt;page( )-&gt;simple_form( 'Title' ".... ENDMETHOD.</PRE></TD></TR></TBODY></TABLE><P><BR />The abap2UI5 framework redirects event handling from the frontend controller to the backend implementation of your class, granting you complete freedom in the backend to determine how to respond to specific frontend events.<BR /><BR />A single 'main' method is used for this purpose (similar to what if_oo_adt_classrun does), without segregating the view and controller. This approach creates flexibility and enable the user to structure their apps according to their preferences. Therefore, this method acts merely as a foundational layer, on top of which users can build their own logic through distinct methods. For example, one might have a method for initialization, another for handling user commands, and so on.<BR /><BR />Next, let's examine how events can be triggered on the frontend.</P><H3 id="toc-hId--283388068"><STRONG>2.3 Events</STRONG></H3><P>&nbsp;</P><P class="">The following events are available:</P><P><BR /><STRONG>Event (User-Command)</STRONG></P><TABLE border="1"><TBODY><TR><TD><BR /><PRE>view-&gt;( )-&gt;button( text = 'post' press = client-&gt;_event( 'BUTTON_POST' ) ).</PRE></TD></TR><TR><TD>Usually it's enough to just send a simple user-command back to the server -- use the method _event</TD></TR></TBODY></TABLE><P><BR /><STRONG>Event (Popup Close)</STRONG></P><TABLE border="1"><TBODY><TR><TD><BR /><PRE>view-&gt;button( text = 'close' press = client-&gt;_event_client( client-&gt;cs_event-popup_close ) ).</PRE></TD></TR><TR><TD>You can close a popup at the frontend with this event -- we will take a more detailed look at popups in the third blog post of this series</TD></TR></TBODY></TABLE><P><BR />If more event functions are necessary, the framework can be extended in the future.</P><H3 id="toc-hId--479901573"><STRONG>2.4 Model &amp; Data Binding</STRONG></H3><P><BR />When values need to be displayed in the frontend, define them as public attributes in your abap2UI5 app. These attributes will be bound by the framework, so it needs to have a chance to assign them from the outside. Additionally, if your values will also be updated in the frontend, make sure that they are not defined as read-only, otherwise, abap2UI5 will throw an error when attempting to modify them. There are three ways to bind data and sent it to the frontend:<BR /><BR /><STRONG>Direct XML</STRONG></P><TABLE border="1"><TBODY><TR><TD><BR /><PRE>view( )-&gt;label( 'product' )-&gt;input( value = product editable = abap_false ).</PRE></TD></TR><TR><TD>You can write the value into the attribute, abap2UI5 will then write it directly into the UI5-XML-View and sent it to the frontend.</TD></TR></TBODY></TABLE><P><STRONG>Bind Local</STRONG></P><TABLE border="1"><TBODY><TR><TD><BR /><PRE>view( )-&gt;label( 'product' )-&gt;input( value = view-&gt;_bind_local( product ) ).</PRE></TD></TR><TR><TD>You can bind the values locally, which your can use for local variables which are not public attributes of your class. Their value is saved right at the moment. Use cases for example are tables with contents for value helps.</TD></TR></TBODY></TABLE><P><STRONG>One-Way-Binding</STRONG></P><TABLE border="1"><TBODY><TR><TD><BR /><PRE>view-&gt;( )-&gt;label( 'product' )-&gt;input( value = view-&gt;_bind( product ) editable = abap_false ).</PRE></TD></TR><TR><TD>You can use one-way-binding, the values are then written into the view model and bound to the UI5-XML-View. This is useful for complex data models such as tables. We will see this in more detail in the next blog post.</TD></TR></TBODY></TABLE><P><BR /><STRONG>Two-Way-Binding</STRONG></P><TABLE border="1"><TBODY><TR><TD><BR /><PRE>view( )-&gt;label( 'quantity' )-&gt;input( value = view-&gt;_bind_edit( quantity ) editable = abap_true ).​</PRE></TD></TR><TR><TD>You can use two-way-binding, it is similar to one-way binding, but it also sends values from the frontend to the server. This binding mode is useful for inputs and editable tables.</TD></TR></TBODY></TABLE><P><BR />When defining the view, consider the data transfer to the frontend. To keep the request payload small use one-way-binding by default and two-way-binding only when necessary, such as when values need to be updated from the frontend. Besides that, abap2UI5 takes care of the rest by transforming the data into JSON, sending it to the frontend, and bringing back the updated values, as we'll see in <A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>part 7</STRONG></A> of this series.</P><H3 id="toc-hId--676415078"><STRONG><SPAN class="">3. What's next?</SPAN></STRONG></H3><P><BR />Now you got a basic understanding of the functionality of this project. However, this was merely an overview. abap2UI5 is continuously evolving, and more blog posts are being written. If you wish to delve deeper into specific topics, explore the other blog posts next. Additionally, take a look to all the features of abap2UI5 by visiting the <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples" target="_blank" rel="noopener nofollow noreferrer">samples repository</A></STRONG>, which is also regularly updated with new features:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/Bildschirm­foto-2023-08-02-um-10.59.07.png" border="0" /></P><P>&nbsp;</P><P class="">Samples of abap2UI5 (As of August 2023)</P><P><BR /><BR /></P><H3 id="toc-hId--948159952"><STRONG><SPAN class="">4. Conclusion</SPAN></STRONG></H3><P><BR />This was the first part of the introduction to <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abap2UI5</STRONG></A>. You now have an understanding of how to develop apps and its general functionality. While this post was quite technical, the upcoming parts of this blog series will showcase more demos &amp; use cases and we will continuously add more features.<BR /><BR />In the<STRONG> <A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">next part</A>,</STRONG> we will develop abap2UI5 apps displaying tables and selection screens.<BR /><BR />Thank you for reading! Your questions, comments and wishes for this project are always welcome, leave a comment or create an <STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG>.</P> 2023-02-23T00:15:11+01:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-2-displaying-selection-screens-tables/ba-p/13567578 abap2UI5 - (2) Displaying Selection Screens & Tables 2023-02-23T00:26:21+01:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to the second part of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A>&nbsp;</STRONG>— an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>In this post, we're focusing on selection screens and displaying tables. We'll enhance these features by adding a toolbar, various selection modes, and edit functionality.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and be sure to explore the other articles of this blog series:<BR /> <TABLE style="height: 168px" border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px">(2) Displaying Selection Screens &amp; Tables (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; </A><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> This post covers the following areas:<BR /> <OL><BR /> <LI>Displaying Tables<BR /> <OL><BR /> <LI>Fieldcatalog</LI><BR /> <LI>Toolbar</LI><BR /> <LI>Selection Modes</LI><BR /> <LI>Editable</LI><BR /> </OL><BR /> </LI><BR /> <LI>Selection Screens</LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Before we begin let's look at this demo showcasing tables and lists to get an impression of what is possible with abap2UI5 – everything is created purely in ABAP in the backend.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_table-Kopie.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Demo of Tables &amp; Lists in abap2UI5</P><BR /> <BR /> <H3 id="toc-hId-1092205633"><STRONG>1. Displaying Tables</STRONG></H3><BR /> Let's start by examining the classic SAP-GUI method for displaying tables in ABAP:<BR /> <PRE class="language-abap"><CODE>TYPES: <BR /> BEGIN OF ty_s_flight,<BR /> carrid TYPE s_carr_id,<BR /> connid TYPE s_conn_id,<BR /> fldate TYPE s_date,<BR /> price TYPE s_price,<BR /> END OF ty_s_flight.<BR /> DATA gt_flight TYPE STANDARD TABLE OF t_flight.<BR /> <BR /> SELECT carrid connid fldate price FROM sflight INTO TABLE gt_flight.<BR /> <BR /> DATA gr_flight TYPE REF TO cl_gui_alv_grid.<BR /> CREATE OBJECT gr_flight<BR /> EXPORTING<BR /> i_parent = cl_gui_container=&gt;screen0.<BR /> <BR /> gr_flight-&gt;set_table_for_first_display(<BR /> EXPORTING<BR /> i_structure_name = 'TY_S_FLIGHT'<BR /> CHANGING<BR /> it_outtab = gt_flight ).</CODE></PRE><BR /> Displaying a view with table output in ABAP takes only about 25 lines, making it an efficient process. With just a few extra lines, you can add buttons, toolbars, and interactions.<BR /> <BR /> However, creating this result in a non-SAP-GUI or ABAP Cloud Environment requires either RAP or the development of UI5 freestyle applications. The first way requires CDS artifacts and the second one needs JavaScript knowledge. In both approaches you can not use 100% ABAP source code anymore which makes it considerably more complex.<BR /> <BR /> In contrast, abap2UI5 aims to return to the classic SAP GUI approach. The code for the example above in abap2UI5 is as follows:<BR /> <PRE class="language-abap"><CODE>CLASS z2ui5_cl_app_demo_43 DEFINITION PUBLIC.<BR /> <BR /> PUBLIC SECTION.<BR /> <BR /> INTERFACES z2ui5_if_app.<BR /> <BR /> TYPES:<BR /> BEGIN OF t_flight,<BR /> carrid TYPE string,<BR /> connid TYPE string,<BR /> fldate TYPE string,<BR /> price TYPE string,<BR /> END OF t_flight.<BR /> DATA: mt_flight TYPE STANDARD TABLE OF t_flight.<BR /> <BR /> ENDCLASS.<BR /> <BR /> CLASS z2ui5_cl_app_demo_43 IMPLEMENTATION.<BR /> <BR /> METHOD z2ui5_if_app~main.<BR /> <BR /> SELECT carrid connid fldate price FROM sflight INTO TABLE mt_flight.<BR /> <BR /> DATA(page) = z2ui5_cl_xml_view=&gt;factory( )-&gt;page(<BR /> )-&gt;scroll_container( height = '70%' vertical = abap_true<BR /> )-&gt;table( items = client-&gt;_bind( mt_flight )<BR /> )-&gt;columns(<BR /> )-&gt;column( )-&gt;text( 'Carrid' )-&gt;get_parent(<BR /> )-&gt;column( )-&gt;text( 'Connid' )-&gt;get_parent(<BR /> )-&gt;column( )-&gt;text( 'Fldate' )-&gt;get_parent(<BR /> )-&gt;column( )-&gt;text( 'Price' )-&gt;get_parent(<BR /> )-&gt;get_parent(<BR /> )-&gt;items( )-&gt;column_list_item( )-&gt;cells(<BR /> )-&gt;text( '{CARRID}'<BR /> )-&gt;text( '{CONNID}'<BR /> )-&gt;text( '{FLDATE}'<BR /> )-&gt;text( '{PRICE}' ).<BR /> <BR /> client-&gt;view_display( page-&gt;stringify( ) ).<BR /> <BR /> ENDMETHOD.<BR /> ENDCLASS.</CODE></PRE><BR /> As you can see, with just a few additional lines compared to the classic approach, we can create a standalone UI5 application displaying tables (and now it's also ABAP OO <span class="lia-unicode-emoji" title=":winking_face:">😉</span>). We set the content of the table with the class z2ui5_cl_xml_view as follows:<BR /> <PRE class="language-abap"><CODE>page-&gt;scroll_container( height = '70%' vertical = abap_true<BR /> )-&gt;table( items = view-&gt;_bind( t_tab ) ).</CODE></PRE><BR /> Unlike Labels and Texts shown in the previous blog post, we can't directly write the value of the attribute into the XML for a table, as a table has a deep data model. Instead, we use one-way binding with the method '_bind'. The content of the table is then automatically transformed into JSON and sent to the frontend as part of the UI5-View-Model.<BR /> <H3 id="toc-hId-895692128"><STRONG>1.1. Fieldcatalog</STRONG></H3><BR /> In classic ABAP, column definition was done using the fieldcatalog. In abap2UI5, we define it with the view class as well:<BR /> <PRE class="language-abap"><CODE> )-&gt;columns(<BR /> )-&gt;column( )-&gt;text( 'Carrid' )-&gt;get_parent(<BR /> )-&gt;column( )-&gt;text( 'Connid' )-&gt;get_parent(<BR /> )-&gt;column( )-&gt;text( 'Fldate' )-&gt;get_parent(<BR /> )-&gt;column( )-&gt;text( 'Price' )-&gt;get_parent(<BR /> )-&gt;get_parent(<BR /> )-&gt;items( )-&gt;column_list_item( )-&gt;cells(<BR /> )-&gt;text( '{CARRID}'<BR /> )-&gt;text( '{CONNID}'<BR /> )-&gt;text( '{FLDATE}'<BR /> )-&gt;text( '{PRICE}' ).</CODE></PRE><BR /> There are many customization options for column outputs, similar to the classic fieldcatalog, such as choosing a checkbox instead of a normal text output, changing the title or adding hotspots. The full source code of this example can be found <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_006.clas.abap" target="_new" rel="noopener nofollow noreferrer">here</A></STRONG>.<BR /> <BR /> In this example, column definition is set manually, but automatic definition using RTTS is also possible, similar to 'cl_salv_table'&nbsp; We'll explore this in <A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer"><STRONG>part four</STRONG></A> of this blog series, where we develop a table maintenance app. Next, let's extend the table output with a toolbar.<BR /> <H3 id="toc-hId-699178623"><STRONG>1.2 Toolbar</STRONG></H3><BR /> Here’s what a demo app of a table with toolbar looks like:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_toolbar.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Toolbar in abap2UI5</P><BR /> The view definition is similar to the first example, with the table header extended:<BR /> <PRE class="language-abap"><CODE>tab-&gt;header_toolbar( )-&gt;overflow_toolbar(<BR /> )-&gt;title( 'title of the table'<BR /> )-&gt;button(<BR /> text = 'left side button'<BR /> icon = 'sap-icon://account'<BR /> press = client-&gt;_event( 'BUTTON_SORT' )<BR /> )-&gt;segmented_button( selected_key = mv_key<BR /> )-&gt;items(<BR /> )-&gt;segmented_button_item(<BR /> key = 'BLUE'<BR /> icon = 'sap-icon://accept'<BR /> text = 'blue'<BR /> )-&gt;segmented_button_item(<BR /> key = 'GREEN'<BR /> icon = 'sap-icon://add-favorite'<BR /> text = 'green'<BR /> )-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;toolbar_spacer(<BR /> )-&gt;generic_tag(<BR /> text = 'Project Cost'<BR /> design = 'StatusIconHidden'<BR /> status = 'Error'<BR /> )-&gt;object_number(<BR /> state = 'Error'<BR /> emphasized = 'false'<BR /> number = '3.5M'<BR /> unit = 'EUR'<BR /> )-&gt;get_parent(<BR /> )-&gt;toolbar_spacer(<BR /> )-&gt;button(<BR /> text = 'Sort'<BR /> icon = 'sap-icon://sort-descending'<BR /> press = client-&gt;_event( 'BUTTON_SORT' )<BR /> )-&gt;button(<BR /> icon = 'sap-icon://edit'<BR /> press = client-&gt;_event( 'BUTTON_POST' ) ).</CODE></PRE><BR /> The full source code of this example can be found <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_006.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here.</STRONG></A> Next we will add different selection modes.<BR /> <H3 id="toc-hId-502665118"><STRONG>1.3. Selection Modes</STRONG></H3><BR /> There are four selection modes available: (1) SingleSelect, (2) SingleSelectLeft, (3) SingleSelectMaster and (4) MultiSelect. Here’s a preview of the selection modes in action:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_selmode.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Selection Modes in abap2UI5</P><BR /> The selection mode is set in the beginning of the table definition:<BR /> <PRE class="language-abap"><CODE> page-&gt;table(<BR /> mode = 'SingleSelectLeft'<BR /> items = client-&gt;_bind_edit( t_tab ) ).</CODE></PRE><BR /> In addition, we define the column that saves the information of the selected rows. Similarly to the classic fieldcatalog, we define a column which will be automatically updated with the selected rows. We set the column with the name 'selkz' (more modern names are also possible <span class="lia-unicode-emoji" title=":winking_face:">😉</span>) as the 'selected' attribute for the column list item:<BR /> <PRE class="language-abap"><CODE>tab-&gt;items( <BR /> )-&gt;column_list_item( selected = '{SELKZ}'<BR /> )-&gt;cells(<BR /> ...</CODE></PRE><BR /> You can find the full source code of this example <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_019.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>Now we will make the table editable.<BR /> <H3 id="toc-hId-306151613"><STRONG>1.4. Editable</STRONG></H3><BR /> Look at this example of an editable table in abap2UI5:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_edit.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Editable Tables in abap2UI5</P><BR /> The code is similar to the previous example, but the column definition differs. Every time the editable function is activated, input controls are used instead of text controls:<BR /> <PRE class="language-abap"><CODE> IF check_editable_active = abap_true.<BR /> <BR /> tab-&gt;items( )-&gt;column_list_item( )-&gt;cells(<BR /> )-&gt;input( '{TITLE}'<BR /> )-&gt;input( '{VALUE}'<BR /> )-&gt;input( '{INFO}'<BR /> )-&gt;input( '{DESCR}'<BR /> )-&gt;checkbox( selected = '{CHECKBOX}' enabled = abap_true ).<BR /> ELSE.<BR /> tab-&gt;items( )-&gt;column_list_item( )-&gt;cells(<BR /> )-&gt;text( '{TITLE}'<BR /> )-&gt;text( '{VALUE}'<BR /> )-&gt;text( '{INFO}'<BR /> )-&gt;text( '{DESCR}'<BR /> )-&gt;checkbox( '{CHECKBOX}' ).<BR /> ENDIF.</CODE></PRE><BR /> Furthermore, we need to ensure that abap2UI5 sends the updated values back to the server. Therefore, we have to change the type of the data binding from one-way to two-way binding:<BR /> <PRE class="language-abap"><CODE>DATA(tab) = page-&gt;table( items = view-&gt;_bind_edit( t_tab ) ).<BR /> </CODE></PRE><BR /> Now, with every request, the changed table data is sent back to the server. The full source code of this example can be found <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_011.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> Up until now, we have implemented many of the basic features found in cl_gui_alv_grid and cl_salv_table for our table output. There are still many more functionalities to explore, as we will see in the next blog posts. But before that, let's move on to the last part of this post and take a look at selection screens -- an important aspect of ABAP development that enables us to obtain selection criteria for database queries.<BR /> <H3 id="toc-hId-109638108"><STRONG>2. Selection Screens</STRONG></H3><BR /> We start again with a demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/gif_selscreen-2.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Selection Screen - Example in abap2UI5</P><BR /> This is the source code of the above view:<BR /> <PRE class="language-abap"><CODE>view-&gt;page( 'abap2UI5 - Selection-Screen'<BR /> )-&gt;simple_form('Input' )-&gt;content( 'f'<BR /> )-&gt;label( 'Input with value help'<BR /> )-&gt;input(<BR /> value = view-&gt;_bind( screen-colour )<BR /> placeholder = 'fill in your favorite colour'<BR /> suggestion_items = view-&gt;_bind_one_way( mt_suggestion ) )-&gt;get(<BR /> )-&gt;suggestion_items( )-&gt;get(<BR /> )-&gt;list_item( text = '{VALUE}' additional_text = '{DESCR}' <BR /> )-&gt;get_parent( )-&gt;get_parent(<BR /> <BR /> )-&gt;label( 'Date'<BR /> )-&gt;date_picker( view-&gt;_bind( screen-date )<BR /> <BR /> )-&gt;label( 'Date and Time'<BR /> )-&gt;date_time_picker( view-&gt;_bind( screen-date_time )<BR /> <BR /> )-&gt;label( 'Time Begin/End'<BR /> )-&gt;time_picker( view-&gt;_bind( screen-time_start )<BR /> )-&gt;time_picker( view-&gt;_bind( screen-time_end ) ).<BR /> <BR /> )-&gt;label( 'Checkbox'<BR /> )-&gt;checkbox(<BR /> selected = view-&gt;_bind( screen-check_is_active )<BR /> text = 'this is a checkbox'<BR /> enabled = abap_true<BR /> <BR /> )-&gt;label( 'Combobox'<BR /> )-&gt;combobox(<BR /> selectedkey = view-&gt;_bind( screen-combo_key )<BR /> items = view-&gt;_bind_one_way( VALUE ty_t_combo(<BR /> ( key = 'BLUE' text = 'green' )<BR /> ( key = 'GREEN' text = 'blue' )<BR /> ( key = 'BLACK' text = 'red' )<BR /> ( key = 'GRAY' text = 'gray' ) )<BR /> ) )-&gt;get( )-&gt;item( key = '{KEY}' text = '{TEXT}'<BR /> )-&gt;get_parent( )-&gt;get_parent(<BR /> <BR /> )-&gt;label( 'Segmented Button'<BR /> )-&gt;segmented_button( view-&gt;_bind( screen-segment_key ) )-&gt;get(<BR /> )-&gt;items( )-&gt;get(<BR /> )-&gt;segmented_button_item( key = 'BLUE' icon = 'sap-icon://accept' text = 'blue'<BR /> )-&gt;segmented_button_item( key = 'GREEN' icon = 'sap-icon://add-favorite' text = 'green'<BR /> )-&gt;segmented_button_item( key = 'BLACK' icon = 'sap-icon://attachment' text = 'black'<BR /> )-&gt;get_parent( )-&gt;get_parent(<BR /> <BR /> )-&gt;label( 'Switch disabled'<BR /> )-&gt;switch( enabled = abap_false customtexton = 'A' customtextoff = 'B'<BR /> )-&gt;label( 'Switch accept/reject'<BR /> )-&gt;switch( state = screen-check_switch_01 customtexton = 'on' customtextoff = 'off' type = 'AcceptReject'<BR /> )-&gt;label( 'Switch normal'<BR /> )-&gt;switch( state = screen-check_switch_02 customtexton = 'YES' customtextoff = 'NO' ).<BR /> </CODE></PRE><BR /> This looks very technical, but this level of complexity was also present in classic selection screens. The class z2ui5_cl_xml_view provides only the technical rendering layer upon which users can build their own more user-friendly functions. You can find the full source code of the above example <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_002.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here.</STRONG></A><BR /> <BR /> And an other demonstration is <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_005.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here:</STRONG></A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/02/Bildschirmfoto-2023-07-27-um-09.01.34.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Selection Screen - More Controls</P><BR /> <BR /> <H3 id="toc-hId--86875397"><STRONG>3. Conclusion</STRONG></H3><BR /> This concludes the second part of our introduction to <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abap2UI5</STRONG></A>. We've seen that abap2UI5 strives to mimic the classic ABAP way of developing apps for displaying tables and selection screens. We can also easily add toolbars, utilize selection modes, and make tables editable.<BR /> <DIV><BR /> <BR /> In the <STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">next part</A>,</STRONG> we will build upon this by focusing on the controller logic, displaying messages and creating popups &amp; F4-Helps.<BR /> <DIV><BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, create an <STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A> </STRONG>or leave a comment.<BR /> <BR /> </DIV><BR /> </DIV> 2023-02-23T00:26:21+01:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-3-popups-f4-help-messages-controller-logic/ba-p/13562061 abap2UI5 – (3) Popups, F4-Help, Messages & Controller Logic 2023-03-30T18:03:26+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to the third part of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="nofollow noopener noreferrer">abap2UI5</A></STRONG> -- an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>In this post we'll focuses on the controller logic, showcasing how different apps can call each other and exchange data. Additionally, we'll delve into message output and the development of popups, which we'll use to to create F4-Helps.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and be sure to explore the other articles of this blog series:<BR /> <TABLE style="height: 154px" border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px">(3) Popups, F4-Help, Messages &amp; Controller Logic (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; </A><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> This post covers the following areas:<BR /> <OL><BR /> <LI>Controller Logic</LI><BR /> <LI>Popups</LI><BR /> <LI>Popover</LI><BR /> <LI>F4-Help</LI><BR /> <LI>Messages</LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Let’s begin with the first topic.<BR /> <H3 id="toc-hId-1092051835"><STRONG>1. Controller Logic</STRONG></H3><BR /> In abap2UI5, apps can easily call each other and transfer data, reminiscent of the function modules used to call screens of other function groups in the past. Take a look at this demo demonstrating two apps calling each other and exchanging values:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_flow.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Controller Logic in abap2UI5</P><BR /> To call a new app, create the app instance and call it with the method 'nav_app_call':<BR /> <PRE class="language-abap"><CODE>client-&gt;nav_app_call( NEW z2ui5_cl_app_demo_25( ) ).</CODE></PRE><BR /> Initial values can be set by changing the attributes of the class before calling it:<BR /> <PRE class="language-abap"><CODE>DATA(lo_app_next) = NEW z2ui5_cl_app_demo_25( ).<BR /> lo_app_next-&gt;mv_input_previous = mv_input.<BR /> client-&gt;nav_app_call( lo_app_next ).</CODE></PRE><BR /> You can also recreate the previous app and read its attributes:<BR /> <PRE class="language-abap"><CODE>DATA(lo_called_app) = CAST z2ui5_cl_app_demo_25( client-&gt;get_app_by_id( client-&gt;get( )-id_prev_app ) ).<BR /> client-&gt;message_box_display( `Input of the previous app:` &amp;&amp; lo_called_app-&gt;mv_input ).</CODE></PRE><BR /> For a 'Back' or 'Exit' command, you can also call an already existing app again:<BR /> <PRE class="language-abap"><CODE>data(lo_prev_stack_app) = client-&gt;get_app( client-&gt;get( )-id_prev_app_stack ).<BR /> client-&gt;nav_app_leave( lo_prev_stack_app ).</CODE></PRE><BR /> The difference between 'nav_app_leave' and 'nav_app_call' is that the former reduces the call stack, while the latter increases it. This is similar to the 'call screen' and 'leave screen' commands in the SAP GUI screen logic. Therefore, you need to consider two IDs:<BR /> <OL><BR /> <LI>id_prev_app_stack - the ID of the calling application</LI><BR /> <LI>id_prev_app - the ID of the previously used app (ignoring the call stack)</LI><BR /> </OL><BR /> The draft table working in the background makes the flow logic very simple, but select the appropriate ID and method carefully to avoid unexpected behavior. The source code for this example can be found<STRONG> <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_app_demo_24.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>Next, we'll use this logic to display popups.<BR /> <H3 id="toc-hId-895538330"><STRONG>2. Popups</STRONG></H3><BR /> The view of a popup is defined just like a normal view, offering a wide range of possibilities. Here's a demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_popup.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Popups in abap2UI5</P><BR /> The full source code of this example can be found <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_021.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>To define a popup, start the view definition with a dialog control. For instance, a former 'Popup_to_decide'&nbsp;FM developed with abap2UI5 might look like this:<BR /> <PRE class="language-abap"><CODE>lv_popup_xml = z2ui5_cl_xml_view=&gt;factory_popup(<BR /> )-&gt;dialog(<BR /> title = 'Title'<BR /> icon = 'sap-icon://question-mark'<BR /> )-&gt;content(<BR /> )-&gt;vbox( 'sapUiMediumMargin'<BR /> )-&gt;text( 'This is a question, cancel or confirm?'<BR /> )-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;footer( )-&gt;overflow_toolbar(<BR /> )-&gt;toolbar_spacer(<BR /> )-&gt;button(<BR /> text = 'Cancel'<BR /> press = client-&gt;_event( 'BUTTON_CANCEL' )<BR /> )-&gt;button(<BR /> text = 'Confirm'<BR /> press = client-&gt;_event( 'BUTTON_CONFIRM' )<BR /> type = 'Emphasized' ).</CODE></PRE><BR /> To display this view as a popup, set the content in the variable 'xml_popup':<BR /> <PRE class="language-abap"><CODE>client-&gt;popup_display( lv_popup_xml ).</CODE></PRE><BR /> You can also show the main view in the background by filling both xml variables:<BR /> <PRE class="language-abap"><CODE>client-&gt;view_display( lv_main_xml ).<BR /> client-&gt;popup_display( lv_popup_xml ).</CODE></PRE><BR /> Popups can also be closed without additional server roundtrips, use the method _event_client:<BR /> <PRE class="language-abap"><CODE>client-&gt;_event_client( client-&gt;cs_event-popup_close ).</CODE></PRE><BR /> The simple popup to inform is a good use case for this:<BR /> <PRE class="language-abap"><CODE>lo_popup-&gt;dialog( 'Popup - Info'<BR /> )-&gt;vbox(<BR /> )-&gt;text( 'press close to go back to the main view without a server roundtrip'<BR /> )-&gt;get_parent(<BR /> )-&gt;footer( )-&gt;overflow_toolbar(<BR /> )-&gt;toolbar_spacer(<BR /> )-&gt;button(<BR /> text = 'close'<BR /> press = client-&gt;_event_close_popup( )<BR /> type = 'Emphasized' ).</CODE></PRE><BR /> Here's a demo showing the code snippet in action:<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_popup_flow.gif" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Popups and Flow Logic in abap2UI5</P><BR /> You can find the source code for this demo<STRONG> <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_012.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG><BR /> <H3 id="toc-hId-699024825"><STRONG>3. Popover</STRONG></H3><BR /> For situations where you don't want to block the entire screen, a popover is useful. To display a popover, define the view with the popover control instead of the dialog control, and specify the placement and ID of the control for display:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_popover.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Popover with abap2UI5</P><BR /> Set the ID of the popover placement using the following parameter:<BR /> <PRE class="language-abap"><CODE>client-&gt;popover_display( xml = xml_popover by_id = 'TEST' ).</CODE></PRE><BR /> The rendering of the popover is as follows:<BR /> <PRE class="language-abap"><CODE>xml_popover = z2ui5_cl_xml_view=&gt;factory_popup( )-&gt;popover(<BR /> title = 'Popover Title'<BR /> placement = mv_placement<BR /> )-&gt;footer( )-&gt;overflow_toolbar(<BR /> )-&gt;toolbar_spacer(<BR /> )-&gt;button(<BR /> text = 'Cancel'<BR /> press = client-&gt;_event( 'BUTTON_CANCEL' )<BR /> )-&gt;button(<BR /> text = 'Confirm'<BR /> press = client-&gt;_event( 'BUTTON_CONFIRM' )<BR /> type = 'Emphasized'<BR /> )-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;text( 'make an input here:'<BR /> )-&gt;input( value = 'abcd'<BR /> )-&gt;get_root( )-&gt;xml_get( ).</CODE></PRE><BR /> You can find the source code for this demo<STRONG> <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_026.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG> Popovers are particularly useful in conjunction with tables to display additional information for certain cells, as shown in this <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_052.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>example</STRONG></A>:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Bildschirmfoto-2023-07-27-um-09.14.58.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Popover on cell level</P><BR /> Next, let's use popups to create F4-Helps.<BR /> <H3 id="toc-hId-502511320"><STRONG>4. F4-Help</STRONG></H3><BR /> F4-Helps can be created in various ways. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_f4.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Demo F4-Help</P><BR /> The source code is available <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_009.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>. F4-Helps in abap2UI5 are simply normal popups. For instance, a popup to choose a table entry can be defined like this:<BR /> <PRE class="language-abap"><CODE>z2ui5_cl_xml_view=&gt;factory( <BR /> )-&gt;dialog( 'abap2UI5 - F4 Value Help'<BR /> )-&gt;table( mode = 'SingleSelectLeft' items = client-&gt;_bind( mt_suggestion_sel )<BR /> )-&gt;columns(<BR /> )-&gt;column( )-&gt;text( 'Color' )-&gt;get_parent(<BR /> )-&gt;column( )-&gt;text( 'Description'<BR /> )-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;items( )-&gt;column_list_item( selected = '{SELKZ}' )-&gt;cells(<BR /> )-&gt;text( '{VALUE}'<BR /> )-&gt;text( '{DESCR}'<BR /> )-&gt;get_parent( )-&gt;get_parent( )-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;footer( )-&gt;overflow_toolbar(<BR /> )-&gt;toolbar_spacer(<BR /> )-&gt;button(<BR /> text = 'continue'<BR /> press = client-&gt;_event( 'POPUP_TABLE_F4_CONTINUE' )<BR /> type = 'Emphasized' ).</CODE></PRE><BR /> Or you can also create popups to fill select options, as shown <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_056.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here:</STRONG></A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Bildschirmfoto-2023-07-27-um-09.21.30.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Select Options in abap2UI5</P><BR /> There's complete freedom in developing F4-Helps—they can range from simple to complex as needed.<BR /> <H3 id="toc-hId-305997815"><STRONG>5. Messages</STRONG></H3><BR /> Messages can be displayed in various ways. The simplest method is a message toast:<BR /> <PRE class="language-abap"><CODE> client-&gt;message_toast_display( 'this is a message toast' ).</CODE></PRE><BR /> Alternatively, use a message box:<BR /> <PRE class="language-abap"><CODE> client-&gt;message_box_display( 'this is a message box' ).<BR /> client-&gt;message_box_display( text = 'this is a message box' type = 'error' ).</CODE></PRE><BR /> The message strip can be integrated into the view:<BR /> <PRE class="language-abap"><CODE>page-&gt;message_strip( text = 'This is a Message Strip' type = strip_type ).</CODE></PRE><BR /> Here's a demo of these three message types:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_msg1.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Message Strip, Box and Toast</P><BR /> The source code is availible <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_008.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> In situations where errors occur, it may be necessary to display a message that covers the entire page. An illustrated message can be a good solution for this purpose, and you can use it with the following syntax:<BR /> <PRE class="language-abap"><CODE>page-&gt;illustrated_message( illustrationtype = 'NoEntries'<BR /> )-&gt;additional_content( )-&gt;button(<BR /> text = 'information'<BR /> press = client-&gt;_event( 'BUTTON_MESSAGE_BOX' ) ).</CODE></PRE><BR /> A lot of different illustration types are available, as you can see in this <STRONG><A href="https://openui5.hana.ondemand.com/api/sap.m.IllustratedMessageType#properties" target="_blank" rel="nofollow noopener noreferrer">documentation</A></STRONG>. A demo of the illustrated message looks like this:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_illis_msg.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Illustrated Message with abap2UI5</P><BR /> You can see the demo source code <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_033.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here.</STRONG></A> The last option to display messages is the Message View. It is useful for T100, BAPIRET or other logging tables. You can display it on the page or as a popover using this code:<BR /> <PRE class="language-abap"><CODE>popup-&gt;message_view(<BR /> items = client-&gt;_bind( t_msg )<BR /> groupitems = abap_true<BR /> )-&gt;message_item(<BR /> type = `{TYPE}`<BR /> title = `{TITLE}`<BR /> subtitle = `{SUBTITLE}`<BR /> description = `{DESCRIPTION}`<BR /> groupname = `{GROUP}` ).</CODE></PRE><BR /> Check the full source code <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_038.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here</STRONG></A> and here's the demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_manager.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Message View in abap2UI5</P><BR /> <BR /> <H3 id="toc-hId-109484310"><STRONG>6. Conclusion</STRONG></H3><BR /> This concludes the third part of this introduction to <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abap2UI5</STRONG></A>. We've covered how apps can call each other and exchange data, as well as the development and application of popups for creating F4-Helps and displaying messages and errors.<BR /> <BR /> In the <STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">next part</A></STRONG>, we will expand upon these concepts by developing comprehensive demo applications. These demos will illustrate various use cases and highlight additional features of abap2UI5.<BR /> <DIV><BR /> <DIV><BR /> <DIV><BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, create an <STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG> or leave a comment.<BR /> <BR /> </DIV><BR /> </DIV><BR /> </DIV> 2023-03-30T18:03:26+02:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-4-advanced-functionality-demonstrations/ba-p/13560294 abap2UI5 - (4) Advanced Functionality & Demonstrations 2023-04-02T16:43:25+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 4 of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A></STRONG> — an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>In this post, we will explore various demos, including File Editor, Table Maintenance, and Charts, among others. These demos aim to showcase the diverse use cases and features of abap2UI5.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and be sure to explore the other articles of this blog series:<BR /> <TABLE border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px">(4) Advanced Functionality &amp; Demonstrations (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; </A><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> While we've already explored classic scenarios like selection screens and table outputs, the <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/topic" target="_blank" rel="nofollow noopener noreferrer">UI5 Library</A></STRONG> also enables the development of abap2UI5 applications for a broad range of additional use cases. This post covers the following areas:<BR /> <OL><BR /> <LI>File Editor</LI><BR /> <LI>Table Maintenance</LI><BR /> <LI>File Upload &amp; Download</LI><BR /> <LI>Visualization with Charts</LI><BR /> <LI>Monitoring &amp; Timer</LI><BR /> <LI>Layouts</LI><BR /> <LI>Side Effects</LI><BR /> <LI>List Report</LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Let's begin with the file editor.<BR /> <H3 id="toc-hId-1091994271"><STRONG>1. Demo - File Editor</STRONG></H3><BR /> The File Editor uses the <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.codeeditor.CodeEditor" target="_blank" rel="nofollow noopener noreferrer">Code Editor Control</A>.</STRONG> It displays text files and highlights the syntax for a lot of different code types (xml, json, js, abap, yaml...). This functionality is part of UI5 and works seamlessly, requiring no extra effort. We simply need to fill in the attributes of the editor control in the rendering method. For the editor content, we use two-way binding to retrieve the updated frontend values and we call function modules to read and update the MIME repository. Here's a preview of the demo app in action:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_mime-2.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Demo File Editor</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-tools/blob/main/src/z2ui5_cl_tool_app_01.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> The <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/topic" target="_blank" rel="nofollow noopener noreferrer">UI5 Library</A></STRONG> provides information about all controls, including their attributes and possible values:<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-01-um-11.06.07.png" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Available Code Types for Syntax Highlighting of the Editor Control</P><BR /> <BR /> <H3 id="toc-hId-895480766"><STRONG>2. Demo - Table Maintenance</STRONG></H3><BR /> Combining the <A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.codeeditor.CodeEditor" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Editor Control</STRONG></A> with an editable <A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Table" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Table Control,</STRONG></A> as explained in the second blog post, enables us to create an abap2UI5 table maintenance app. This app provides three input formats (XML, JSON, CSV) and converts the data into an internal table to edit it with the Table Control<STRONG>.</STRONG> Once the data is modified, it exports it again with the Editor Control<STRONG>.</STRONG> This example is easily adaptable to other tables by simply changing the table type in ABAP. The transfer of data between the server and client is generic and independent of DDIC artifacts or HTTP interfaces, making it applicable for a lot of different use cases:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_table.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Demo Table Maintenance</P><BR /> Access the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-tools/blob/main/src/z2ui5_cl_tool_app_04.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A>&nbsp;</STRONG>A cl_salv_table flavored ABAP snippet:<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-01-um-11.12.29.png" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Dynamic Column Definition with RTTS</P><BR /> <BR /> <H3 id="toc-hId-698967261"><STRONG>3. Demo - File Upload &amp; Download</STRONG></H3><BR /> Selecting files from the frontend via the browser and uploading &amp; downloading PDFs, images, ZIPs, or other files is a common requirement. The JavaScript 'FileReader' provides this functionality, but there is no UI5 control for that. Therefore, abap2UI5 has a little custom control 'zz_file_uploader' which encapsulates this functionality. This control allows us to use the 'FileReader' like any other abap2UI5 control via its attributes in the renderer method. This approach also offers the possibility to include further JavaScript functions in abap2UI5 in the future. Here's what the demo app looks like:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_file.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Demo File Upload/Download</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-tools/blob/main/src/z2ui5_cl_tool_app_05.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> Some snippets of how you can wrap JavaScript functions for the use in abap2UI5:<BR /> <TABLE style="border-collapse: collapse;width: 130.56%;height: 430px" border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="width: 49.9645%;height: 14px">Custom Control Interface</TD><BR /> <TD style="width: 124.612%;height: 14px">Custom Control Implementation</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 49.9645%;height: 14px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-01-um-11.24.00-1.png" /></TD><BR /> <TD style="width: 124.612%;height: 14px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-01-um-11.25.43.png" height="392" width="375" /></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 49.9645%;height: 14px">ABAP Interface</TD><BR /> <TD style="width: 124.612%;height: 14px">ABAP Implementation</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 49.9645%;height: 14px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-01-um-11.33.13.png" /></TD><BR /> <TD style="width: 124.612%;height: 14px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-01-um-11.17.50.png" height="136" width="274" /></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> Learn more about how to develop custom control in part 11 <STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">here.</A></STRONG><BR /> <H3 id="toc-hId-502453756"><STRONG>4. Demo - Visualization with Charts</STRONG></H3><BR /> This demo tries to be a bit more beautiful. Tables aren't always the best way to visualize data, so with abap2UI5 we can also use the <A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.suite.ui.microchart.InteractiveDonutChart" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Donut Chart</STRONG></A>, <A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.suite.ui.microchart.InteractiveBarChart" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Bar Chart</STRONG></A>, <A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.suite.ui.microchart.InteractiveLineChart" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Line Chart</STRONG></A> or <A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.suite.ui.microchart.RadialMicroChart" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Radial Micro Chart</STRONG></A>. By implementing event handlers, we can enhance interactivity and respond to clicks on specific chart points:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/gif_chart.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Demo Visualization</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_013.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> This ABAP snippet may seem more complex, but achieving the same result using an UI5-XML-View would require equivalent effort:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-01-um-11.34.13-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Rendering Donut Charts in abap2UI5</P><BR /> <BR /> <H3 id="toc-hId-305940251"><STRONG>5. Demo - Monitoring &amp; Timer</STRONG></H3><BR /> Next, we will combine the visualization functionality with a timer. The abap2UI5 timer has the similar functionality to the former cl_gui_timer. You can set an interval and an event that is called after the timer finishes. This allows us to create apps that visualize certain data and refresh themselves every few seconds:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif2.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Self-Refreshing Monitor</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_041.clas.abap" target="_blank" rel="noopener nofollow noreferrer">here.</A></STRONG><BR /> <BR /> Set the following control in the view definition to active the timer:<BR /> <PRE class="language-abap"><CODE>DATA(lo_view) = z2ui5_cl_xml_view=&gt;factory( ).<BR /> lo_view-&gt;_z2ui5( )-&gt;timer( <BR /> finished = client-&gt;_event( `TIMER_FINISHED` ) <BR /> delayms = `2000` <BR /> checkrepeat = abap_true ).</CODE></PRE><BR /> <H3 id="toc-hId-109426746"><STRONG>6. Demo - Layouts</STRONG></H3><BR /> The object page is a useful way to display information for business objects. It is composed of a header and content, which are divided into sections and subsections. Navigation is a built-in functionality of the UI5 control, so it works out of the box:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_layout.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Object Page Layout with abap2UI5</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_042.clas.abap" target="_blank" rel="noopener nofollow noreferrer">here</A> </STRONG>and<A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_030.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG> here.</STRONG></A><BR /> <BR /> A lot of different Layouts are available in UI5, check out the<STRONG> <A href="https://experience.sap.com/fiori-design-web/floorplan-overview/" target="_blank" rel="noopener noreferrer">Fiori UX Guidelines</A></STRONG> to know when to use which:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-14-um-11.24.43.png" height="386" width="481" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Fiori Design Guidelines</P><BR /> <BR /> <H3 id="toc-hId--87086759"><STRONG>7. Demo - Side Effects (Expression Binding)</STRONG></H3><BR /> This demo demonstrates side effects. You can use the _bind function with JavaScript functions to create an expression binding. This enables attributes of different controls to affect each other. For example, you can activate a button only when an input is made. This allows for small checks to be done directly at the frontend without needing a server roundtrip or render again the entire view. The demo looks like this:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_side.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Expression Binding in abap2UI5</P><BR /> Check out the source code<STRONG>&nbsp;<A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_027.clas.abap" target="_blank" rel="noopener nofollow noreferrer">here.</A></STRONG><BR /> <BR /> There are many different expressions available, check out the <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/topic/daf6852a04b44d118963968a1239d2c0" target="_blank" rel="nofollow noopener noreferrer">documentation.</A></STRONG>&nbsp;When ABAP is combined with JavaScript in an expression, it looks like this:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-15.57.16.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">ABAP and JavaScript in an Expression Binding</P><BR /> But watch out not to send too many calculations to the frontend, you might make HANA jealous <span class="lia-unicode-emoji" title=":grinning_face_with_sweat:">😅</span><BR /> <H3 id="toc-hId--283600264"><STRONG>8. Demo - List Report</STRONG></H3><BR /> This final example demonstrates the use case of a list report. The first view displays a table, and you can navigate to the detail page by clicking on an entry. All basic functionalities, such as filtering, sorting, searching, and layout handling, have been implemented. You can also modify table settings, such as visible columns, titles, or selection mode:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_list.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">List Report in abap2UI5</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-tools/blob/main/src/z2ui5_cl_tool_app_03.clas.abap" target="_blank" rel="noopener nofollow noreferrer">here.</A></STRONG><BR /> <BR /> This example demonstrates that you can create apps with abap2UI5, which are similar to Fiori Elements Floorplans. However, in this situation, you should consider whether it might be better to use RAP directly instead of developing everything manually in abap2UI5. You can check out the Floorplans <A href="https://experience.sap.com/fiori-design-web/smart-templates/" target="_blank" rel="noopener noreferrer"><STRONG>here:</STRONG></A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-15-um-12.18.39.png" height="377" width="569" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Fiori Elements Floorplans</P><BR /> <BR /> <H3 id="toc-hId--480113769"><STRONG>9. Conclusion</STRONG></H3><BR /> This marks the end of part four of this introduction to <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A></STRONG>. We explored several demos to gain a better understanding of the various use cases and features of abap2UI5.<BR /> <BR /> In the <A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer"><STRONG>next part,</STRONG></A> we will explore different ways of creating UIs and enhancing them with HTML, CSS, JavaScript and third-party libraries.<BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, create an&nbsp;<STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG> or leave a comment. 2023-04-02T16:43:25+02:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-5-creating-uis-with-xml-views-html-css-javascript/ba-p/13549041 abap2UI5 – (5) Creating UIs with XML Views, HTML, CSS & JavaScript 2023-04-12T18:43:21+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 5 of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A>&nbsp;</STRONG>— an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>This post explains various ways of creating views and enhancing them with HTML, CSS and JavaScript.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and be sure to explore the other articles of this blog series:<BR /> <TABLE border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> This post covers the following areas:<BR /> <OL><BR /> <LI>Creating UI5 Views in the Backend<BR /> <OL><BR /> <LI>View Class Way</LI><BR /> <LI>View Class Generic Way</LI><BR /> <LI>Pure XML Way</LI><BR /> </OL><BR /> </LI><BR /> <LI>HTML, CSS &amp; JavaScript</LI><BR /> <LI>Canvas &amp; SVG</LI><BR /> <LI>External Libraries</LI><BR /> <LI>Additional Comments</LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Let’s begin with the first topic.<BR /> <H3 id="toc-hId-1090413268"><STRONG>1. Creating UI5 Views in the Backend</STRONG></H3><BR /> There are various methods for creating views in abap2UI5. To illustrate, we will create a simple view consisting of an input field and a button, comparing different creation processes. Here's how the view looks:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-11-um-18.52.37-1.png" height="127" width="610" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">View created in three different ways</P><BR /> <BR /> <H3 id="toc-hId-893899763"><STRONG>1.1. View Class Way</STRONG></H3><BR /> We'll start by creating the view using the method detailed in previous blog posts, utilizing the class z2ui5_cl_xml_view. Here's an example of the code for creating the view:<BR /> <PRE class="language-abap"><CODE>lo_view-&gt;shell(<BR /> )-&gt;page(<BR /> title = 'abap2UI5 - NORMAL NORMAL NORMAL'<BR /> navbuttonpress = client-&gt;_event( 'BACK' )<BR /> shownavbutton = abap_true<BR /> )-&gt;header_content(<BR /> )-&gt;link(<BR /> text = 'Source_Code'<BR /> href = z2ui5_cl_xml_view_helper=&gt;hlp_get_source_code_url( app = me get = client-&gt;get( ) )<BR /> target = '_blank'<BR /> )-&gt;get_parent(<BR /> )-&gt;simple_form( 'Form Title'<BR /> )-&gt;content( 'form'<BR /> )-&gt;title( 'Input'<BR /> )-&gt;label( 'quantity'<BR /> )-&gt;input( client-&gt;_bind( quantity )<BR /> )-&gt;button(<BR /> text = 'NORMAL'<BR /> press = client-&gt;_event( 'NORMAL' )<BR /> )-&gt;button(<BR /> text = 'GENERIC'<BR /> press = client-&gt;_event( 'GENERIC' )<BR /> )-&gt;button(<BR /> text = 'XML'<BR /> press = client-&gt;_event( 'XML' ) ).</CODE></PRE><BR /> The class z2ui5_cl_xml_view provides ABAP-typed methods for creating UI5 controls. The class acts as an ABAP-typed proxy for the <STRONG><A href="https://sapui5.hana.ondemand.com/#/api" target="_blank" rel="nofollow noopener noreferrer">SAPUI5 Library</A></STRONG> and as an result only contains code with no extra logic:<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR><BR /> <TD style="width: 47.92%"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-11-um-19.04.59.png" /></TD><BR /> <TD style="width: 52.08%"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-11-um-19.05.19.png" height="459" width="321" /></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> This class stores all control information in a tree structure and ultimately generates a stringified XML view based on that structure. This class is continuously updated with additional controls. If there is a control that you would like to use that is not currently part of the class, you can open an <A href="https://github.com/abap2UI5/abap2UI5/issues" target="_blank" rel="nofollow noopener noreferrer"><B>issue</B></A>&nbsp;or add it by yourself and submit a pull request on <STRONG><A href="https://github.com/abap2UI5/abap2ui5" target="_blank" rel="noopener nofollow noreferrer">GitHub</A> </STRONG>that it becomes available for everyone to use.<BR /> <BR /> Notably, every method in the class calls the generic method _generic to save the control information. As a result, we can skip the first step and call this generic method&nbsp;directly. This will be the second approach for generating a view for abap2UI5, which we will explore now.<BR /> <H3 id="toc-hId-697386258"><STRONG>1.2. View Class Generic Way</STRONG></H3><BR /> To use a control that is not included in the view class, we can also use the method '_generic'. This approach, while offering flexibility, requires more code and forgoes the benefits of typed interfaces. Here's an example:<BR /> <PRE class="language-abap"><CODE>lo_view-&gt;_generic( 'Shell' )-&gt;_generic(<BR /> name = `Page`<BR /> t_prop = VALUE #(<BR /> ( n = `title` v = 'abap2UI5 - GENERIC GENERIC GENERIC' )<BR /> ( n = `showNavButton` v = `true` )<BR /> ( n = `navButtonPress` v = client-&gt;_event( 'BACK' ) ) )<BR /> )-&gt;_generic(<BR /> name = `SimpleForm`<BR /> ns = `form`<BR /> t_prop = VALUE #(<BR /> ( n = `title` v = 'title' )<BR /> ) )-&gt;_generic(<BR /> name = `content`<BR /> ns = `form`<BR /> )-&gt;_generic(<BR /> name = `Label`<BR /> t_prop = VALUE #(<BR /> ( n = `text` v = 'quantity' )<BR /> ) )-&gt;get_parent( )-&gt;_generic(<BR /> name = `Input`<BR /> t_prop = VALUE #(<BR /> ( n = `value` v = client-&gt;_bind( quantity ) )<BR /> ) )-&gt;get_parent(<BR /> )-&gt;_generic(<BR /> name = `Button`<BR /> t_prop = VALUE #(<BR /> ( n = `text` v = `NORMAL` )<BR /> ( n = `press` v = client-&gt;_event( 'NORMAL' ) ) )<BR /> )-&gt;get_parent(<BR /> )-&gt;_generic(<BR /> name = `Button`<BR /> t_prop = VALUE #(<BR /> ( n = `text` v = `GENERIC` )<BR /> ( n = `press` v = client-&gt;_event( 'GENERIC' ) ) )<BR /> )-&gt;get_parent(<BR /> )-&gt;_generic(<BR /> name = `Button`<BR /> t_prop = VALUE #(<BR /> ( n = `text` v = `XML` )<BR /> ( n = `press` v = client-&gt;_event( 'XML' ) ) ) ).</CODE></PRE><BR /> If you wish to use different namespaces, you have the option to modify them in the call of the factory method. The default namespaces are as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-15-um-10.42.27.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Default namespaces of the abap2UI5 view class</P><BR /> This generic approach allows us to generate any control, but it requires more code to be written and we lose the benefits of typed interfaces that make the first approach more convenient to use.<BR /> <BR /> Now, let us examine how the view output is ultimately provided to abap2UI5. The view class creates the UI5 view and outputs it as a string, which is then received by abap2UI5 as a ready-to-use UI5-XML-View:<BR /> <PRE class="language-abap"><CODE>client-&gt;view_display( page-&gt;stringify( ) ).</CODE></PRE><BR /> That means abap2UI5 is not involved in the creation of the views. It operates entirely independently of the view class and just receives the result and sends it to the frontend as it is.<BR /> <BR /> Therefore you also have the freedom to build your own view class or encapsulate the existing one in a way that better fits your needs. The provided view class is just a suggestion but there might be better solutions for the view creation process. Keeping this in mind, we can now also bypass the z2ui5_cl_cml_view class and use XML directly, which will be the next approach we will focus on.<BR /> <H3 id="toc-hId-500872753"><STRONG>1.3. Pure XML Way</STRONG></H3><BR /> Now we copy the XML view directly into ABAP as a string and replace the event handler and data binding. The previous example in XML looks like this:<BR /> <PRE class="language-abap"><CODE> data(lv_xml) = `&lt;mvc:View controllerName="zzdummy" displayBlock="true" height="100%" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:f="sap.ui.layout.form" xmlns:mvc="sap.ui.co` &amp;&amp;<BR /> `re.mvc" xmlns:editor="sap.ui.codeeditor" xmlns:ui="sap.ui.table" xmlns="sap.m" xmlns:uxap="sap.uxap" xmlns:mchart="sap.suite.ui.microchart" xmlns:z2ui5="z2ui5" xmlns:webc="sap.ui.webc.main" xmlns:text="sap.ui.richtexteditor" &gt; &lt;Shell&gt; &lt;Page ` &amp;&amp; |\n|<BR /> &amp;&amp;<BR /> ` title="abap2UI5 - XML XML XML" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` showNavButton="true" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` navButtonPress="` &amp;&amp; client-&gt;_event( 'BACK' ) &amp;&amp; `" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` &gt; &lt;headerContent ` &amp;&amp; |\n| &amp;&amp;<BR /> ` &gt; &lt;Link ` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="Source_Code" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` target="_blank" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` href="&lt;system&gt;sap/bc/adt/oo/classes/Z2UI5_CL_APP_DEMO_23/source/main" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` /&gt;&lt;/headerContent&gt; &lt;f:SimpleForm ` &amp;&amp; |\n| &amp;&amp;<BR /> ` title="Form Title" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` &gt; &lt;f:content ` &amp;&amp; |\n| &amp;&amp;<BR /> ` &gt; &lt;Title ` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="Input" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` /&gt; &lt;Label ` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="quantity" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` /&gt; &lt;Input ` &amp;&amp; |\n| &amp;&amp;<BR /> ` value="` &amp;&amp; client-&gt;_bind( quantity ) &amp;&amp; `" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` /&gt; &lt;Button ` &amp;&amp; |\n| &amp;&amp;<BR /> ` press="` &amp;&amp; client-&gt;_event( 'NORMAL' ) &amp;&amp; `"` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="NORMAL" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` /&gt; &lt;Button ` &amp;&amp; |\n| &amp;&amp;<BR /> ` press="` &amp;&amp; client-&gt;_event( 'GENERIC' ) &amp;&amp; `"` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="GENERIC" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` /&gt; &lt;Button ` &amp;&amp; |\n| &amp;&amp;<BR /> ` press="` &amp;&amp; client-&gt;_event( 'XML' ) &amp;&amp; `"` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="XML" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` /&gt;&lt;/f:content&gt;&lt;/f:SimpleForm&gt;&lt;/Page&gt;&lt;/Shell&gt;&lt;/mvc:View&gt;`.</CODE></PRE><BR /> abap2UI5 takes the XML view as it is and sends it to the frontend. The following demonstration showcases the three approaches in action. Each time, the view remains the same, but it is created using a different method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_three-ways.gif" height="489" width="638" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">App with views created in three different ways</P><BR /> Check out the source code <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_023.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here.</STRONG></A> The XML approach may appear unconventional and could potentially be difficult to maintain. However, it is a speedy way to create prototypes, as this approach enables us to copy and paste any code snippets from the <STRONG><A href="https://sapui5.hana.ondemand.com/#/api" target="_blank" rel="nofollow noopener noreferrer">SAPUI5 Library.</A> </STRONG>Here is an example of how to copy the generic tile example of the UI5 API to abap2UI5:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_copy.gif" height="470" width="611" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Copying Views of the Documentation and Run it with abap2UI5</P><BR /> And here we add a popup using the same method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_popup.gif" height="460" width="598" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Copying Popups of the UI5 Documentation and run it with abap2UI5</P><BR /> We add interaction by replacing the event handler with the abap2UI5 handler:<BR /> <PRE class="language-abap"><CODE> `&lt;Button text="BACK" type="Emphasized" press="` &amp;&amp; client-&gt;_event( 'BACK') &amp;&amp; `"/&gt;`</CODE></PRE><BR /> We add data transfer by replacing the data binding with the abap2UI5 binding:<BR /> <PRE class="language-abap"><CODE> ` &lt;Input id="loadingMinSeconds" width="8rem" type="Number" description="seconds" value="` &amp;&amp; client-&gt;_bind_edit( mv_value ) &amp;&amp; `"/&gt;`</CODE></PRE><BR /> Within minutes, we can create a fully functional prototype with event handling and data transfer:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_app.gif" height="445" width="581" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5-XML-View in abap2UI5 with Events and Data Transfer</P><BR /> Check out the source code of the app <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_031.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> Although the video makes it seem easy, it is important to exercise caution when using this approach. You are now fully responsible for everything. abap2UI5 simply sends it as is to the frontend, so you must ensure that the namespace is correct, libraries can be loaded, images are displayed properly and so on. This approach provides flexibility, but also comes with the potential for problems to occur.<BR /> <BR /> If you need to make corrections, you can activate logging, and the XML view output will be written to the console of your browser. From there, you can copy it, make adjustments and copy it back to the ABAP class:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-12-um-09.18.37.png" height="291" width="568" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Console Output of the UI5-XML-View</P><BR /> A great way to create views is to use sandboxes, for example use the <STRONG><A href="https://codesandbox.io/s/ui5-example-pglil?from-embed=&amp;file=/webapp/App.view.xml" target="_blank" rel="nofollow noopener noreferrer">OpenUI5 Sandbox</A>:</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-12-um-09.38.00.png" height="422" width="727" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">OpenUI5 SandBox</P><BR /> After we now got full control of the view creation process, we can go one step further and add native HTML, CSS, and JS.<BR /> <H3 id="toc-hId-304359248"><STRONG>2. Using HTML, CSS &amp; JavaScript</STRONG></H3><BR /> UI5 provides the ability to use native HTML in XML Views. You can refer to this <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/topic/be54950cae1041f59d4aa97a6bade2d8" target="_blank" rel="nofollow noopener noreferrer">documentation</A></STRONG> for more information. A simple example of HTML output in XML Views looks like this:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-11-um-19.24.27.png" height="377" width="672" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Native HTML and CSS in abap2UI5</P><BR /> Here is the XML view in ABAP for the above example (and a more readable version):<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR style="height: 524px"><BR /> <TD style="width: 100%;height: 524px"><BR /> <PRE class="language-abap"><CODE> app-next-xml_main = `&lt;mvc:View controllerName="project1.controller.View1"` &amp;&amp; |\n| &amp;&amp;<BR /> ` xmlns:mvc="sap.ui.core.mvc" displayBlock="true"` &amp;&amp; |\n| &amp;&amp;<BR /> ` xmlns:z2ui5="z2ui5" xmlns:m="sap.m" xmlns="http://www.w3.org/1999/xhtml"` &amp;&amp; |\n| &amp;&amp;<BR /> ` &gt;&lt;m:Button ` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="back" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` press="` &amp;&amp; client-&gt;_event( 'BACK' ) &amp;&amp; `" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` class="sapUiContentPadding sapUiResponsivePadding--content"/&gt; ` &amp;&amp; |\n| &amp;&amp;<BR /> ` &lt;m:Link target="_blank" text="Source_Code" href="` &amp;&amp; z2ui5_cl_xml_view_helper=&gt;factory( client )-&gt;hlp_get_source_code_url( ) &amp;&amp; `"/&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;html&gt;&lt;head&gt;&lt;style&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `body {background-color: powderblue;}` &amp;&amp; |\n| &amp;&amp;<BR /> `h1 {color: blue;}` &amp;&amp; |\n| &amp;&amp;<BR /> `p {color: red;}` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;/style&gt;` &amp;&amp;<BR /> `&lt;/head&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;body&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;h1&gt;This is a heading with css&lt;/h1&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;p&gt;This is a paragraph with css.&lt;/p&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;h1&gt;My First JavaScript&lt;/h1&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;button type="button"&gt;send&lt;/button&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;Input id='input' value='frontend data' /&gt; ` &amp;&amp;<BR /> `&lt;/body&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;/html&gt; ` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;/mvc:View&gt;`.</CODE></PRE><BR /> </TD><BR /> </TR><BR /> <TR style="height: 629px"><BR /> <TD style="width: 100%;height: 629px"><BR /> <PRE class="language-markup"><CODE>&lt;mvc:View controllerName="z2ui5_controller"<BR /> xmlns:mvc="sap.ui.core.mvc" displayBlock="true"<BR /> xmlns:z2ui5="z2ui5"<BR /> xmlns:m="sap.m"<BR /> xmlns="http://www.w3.org/1999/xhtml"<BR /> &gt;<BR /> &lt;m:Button <BR /> text="back" <BR /> press="onEvent( { 'EVENT' : 'BACK', 'METHOD' : 'UPDATE' } )" <BR /> class="sapUiContentPadding sapUiResponsivePadding--content"/&gt;<BR /> &lt;m:Link target="_blank" text="Source_Code" href="&lt;&lt;system&gt;&gt;m/sap/bc/adt/oo/classes/Z2UI5_CL_APP_DEMO_32/source/main"/&gt;<BR /> &lt;html&gt;<BR /> &lt;head&gt;<BR /> &lt;style&gt;<BR /> body {background-color: powderblue;}<BR /> h1 {color: blue;}<BR /> p {color: red;}<BR /> &lt;/style&gt;<BR /> &lt;/head&gt;<BR /> &lt;body&gt;<BR /> &lt;h1&gt;This is a heading with css&lt;/h1&gt;<BR /> &lt;p&gt;This is a paragraph with css.&lt;/p&gt;<BR /> &lt;h1&gt;My First JavaScript&lt;/h1&gt;<BR /> &lt;button type="button"&gt;send&lt;/button&gt;<BR /> &lt;Input id='input' value='frontend data' /&gt;<BR /> &lt;/body&gt;<BR /> &lt;/html&gt;<BR /> &lt;/mvc:View&gt;</CODE></PRE><BR /> </TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> To enable interaction and data transfer, we add JavaScript to the XML view:<BR /> <PRE class="language-abap"><CODE> app-next-xml_main = `&lt;mvc:View controllerName="project1.controller.View1"` &amp;&amp; |\n| &amp;&amp;<BR /> ` xmlns:mvc="sap.ui.core.mvc" displayBlock="true"` &amp;&amp; |\n| &amp;&amp;<BR /> ` xmlns:z2ui5="z2ui5" xmlns:m="sap.m" xmlns="http://www.w3.org/1999/xhtml"` &amp;&amp; |\n| &amp;&amp;<BR /> ` &gt;&lt;m:Button ` &amp;&amp; |\n| &amp;&amp;<BR /> ` text="back" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` press="` &amp;&amp; client-&gt;_event( 'BACK' ) &amp;&amp; `" ` &amp;&amp; |\n| &amp;&amp;<BR /> ` class="sapUiContentPadding sapUiResponsivePadding--content"/&gt; ` &amp;&amp; |\n| &amp;&amp;<BR /> ` &lt;m:Link target="_blank" text="Source_Code" href="` &amp;&amp; z2ui5_cl_xml_view_helper=&gt;hlp_get_source_code_url( app = me get = client-&gt;get( ) ) &amp;&amp; `"/&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;html&gt;&lt;head&gt;&lt;style&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `body {background-color: powderblue;}` &amp;&amp; |\n| &amp;&amp;<BR /> `h1 {color: blue;}` &amp;&amp; |\n| &amp;&amp;<BR /> `p {color: red;}` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;/style&gt;` &amp;&amp;<BR /> `&lt;/head&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;body&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;h1&gt;This is a heading with css&lt;/h1&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;p&gt;This is a paragraph with css.&lt;/p&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;h1&gt;My First JavaScript&lt;/h1&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;button onclick="myFunction()" type="button"&gt;send&lt;/button&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;Input id='input' value='frontend data' /&gt; ` &amp;&amp;<BR /> `&lt;script&gt; function myFunction( ) { sap.z2ui5.oView.getController().onEvent({ 'EVENT' : 'POST', 'METHOD' : 'UPDATE' }, document.getElementById(sap.z2ui5.oView.createId( "input" )).value ) } &lt;/script&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;/body&gt;` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;/html&gt; ` &amp;&amp; |\n| &amp;&amp;<BR /> `&lt;/mvc:View&gt;`.</CODE></PRE><BR /> Finally, we have a working frontend application that uses events and data transfer to the backend with HTML, CSS and JS:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_fileupload-1.gif" height="469" width="592" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">HTML, CSS and JavaScript in abap2UI5</P><BR /> Here we create the server roundtrip with abap2UI5 and use the second parameter of the event method to transfer data to the backend:<BR /> <PRE class="language-javascript"><CODE>sap.z2ui5.oView.getController().onEvent({ 'EVENT' : 'POST', 'METHOD' : 'UPDATE' }, document.getElementById(sap.z2ui5.oView.createId( "input" )).value ) </CODE></PRE><BR /> Then in the backend the data can be found in the following parameter:<BR /> <PRE class="language-abap"><CODE>client-&gt;popup_message_toast( client-&gt;get( )-t_args[ 1 ] ).</CODE></PRE><BR /> The value of 'app-get-event_data' can also be filled with a stringified JSON, which provides a generic approach for sending data to the backend without requiring changes to the HTTP handler. Take a look at the full source code of the app <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/z2ui5_cl_demo_app_032.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG><BR /> <BR /> This approach provides a lot of freedom, but it also requires you to manage JavaScript, CSS, and HTML within your normal ABAP code. Good wrappers can be helpful, but it's worth considering whether it would be better to create a regular frontend app instead. Additionally, the code in this example isn't considered good practice because we're calling UI5 from the outside, using global variables etc. So, consider it only as an example to see what is possible, and not as a coding guideline to follow.<BR /> <H3 id="toc-hId-107845743"><STRONG>3. Canvas &amp; SVG</STRONG></H3><BR /> We can now use this approach for functionalities that are not normally within the scope of UI5. For example, we can use canvas and SVG:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_canvas.gif" height="467" width="609" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Canvas and SVG in abap2UI5</P><BR /> You can find the source code<STRONG> <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_036.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <H3 id="toc-hId--88667762"><STRONG>4. External Libraries</STRONG></H3><BR /> Or including third-party open-source libraries -- for example use JSBarcode to display barcodes:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_barcode.gif" height="445" width="581" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">JSBarcode in abap2UI5</P><BR /> The source code of the app is <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_040.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> With this method, you can also incorporate additional libraries in the future for various functionalities, such as displaying QR codes, using barcode scanning with the camera, employing localization techniques, or utilizing other device capabilities.<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR><BR /> <TD style="width: 100%"><STRONG>Update 15.12.2023: </STRONG>Over the recent months, more external libraries have been integrated into abap2UI5. For more detailed information, please refer to <A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer"><STRONG>part 10</STRONG></A> of this series.</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <H3 id="toc-hId--285181267"><STRONG>5. Additional Comments</STRONG></H3><BR /> As we have seen, there are many different ways to create views in abap2UI5, each with its own level of flexibility and maintenance requirements. The view creation process is independent to the rest of abap2UI5, as it simply takes the created view and sends it to the frontend as is. Therefore, each user can choose the method that works best for them.<BR /> <BR /> The view class-based approach is very intuitive and is built on typed ABAP methods. The XML approach, which involves copying and pasting views, is extremely fast for creating prototypes with popups in a short amount of time, but maintaining the views can be challenging later on. The last approaches offer a lot of flexibility, but they require deep knowledge of JS and HTML and essentially use the ABAP source code as a BSP. It's a question whether frontend development may be better in this case.<BR /> <BR /> The idea behind abap2UI5 is to just provide a basic layer that offers some flow logic (for easy switching between apps &amp; handling events) and server-client communication (for creating models &amp; transferring data). However, the entire view logic remains separated of the framework. Therefore, the class z2ui5_cl_xml_view is just loosely coupled to the abap2UI5 core functionality. With this approach abap2UI5 remains small and flexible, suitable for a wide range of use cases.<BR /> <BR /> Feel free to find your best way to create views and extend abap2UI5.<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR style="height: 56px"><BR /> <TD style="width: 100%;height: 56px"><STRONG>Update 15.12.2023:&nbsp;</STRONG>We have explored now various methods for integrating JavaScript into abap2UI5, but have not yet addressed the best practices for encapsulating this code. This topic will be covered in <STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">part 11</A></STRONG>, where we will focus on the development of Custom Controls for the integration of JavaScript for the use with abap2UI5.</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <H3 id="toc-hId--481694772"><STRONG>6. Conclusion</STRONG></H3><BR /> This concludes part five of this introduction to <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abap2UI5</STRONG></A>. You now have an understanding about the various methods of creating views in the backend and ideas how to extend it with HTML, CSS and JavaScript.<BR /> <BR /> In the <STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">next part,</A></STRONG> we will focus on how to install, configure and debug abap2UI5.<BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, create an <STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG>&nbsp;or leave a comment. 2023-04-12T18:43:21+02:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-6-installation-configuration-troubleshooting/ba-p/13566652 abap2UI5 – (6) Installation, Configuration & Troubleshooting 2023-04-14T17:28:49+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 6 of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A></STRONG> — an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>This post explains the installation, configuration</STRONG><STRONG>&nbsp;and troubleshooting steps of abap2UI5.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and be sure to explore the other articles of this blog series:<BR /> <TABLE border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px">(6) Installation, Configuration &amp; Troubleshooting (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> This post covers the following areas:<BR /> <OL><BR /> <LI>Installation<BR /> <OL><BR /> <LI>Install the Project</LI><BR /> <LI>Create a new HTTP Service</LI><BR /> <LI>Implement the Handler Method</LI><BR /> </OL><BR /> </LI><BR /> <LI>Configuration<BR /> <OL><BR /> <LI>Options &amp; URL Parameters</LI><BR /> <LI>Title</LI><BR /> <LI>Synchronize the Configuration</LI><BR /> <LI>Theme</LI><BR /> <LI>Bootstrapping</LI><BR /> <LI>Launchpad</LI><BR /> <LI>CSS</LI><BR /> </OL><BR /> </LI><BR /> <LI>Security</LI><BR /> <LI>Debugging<BR /> <OL><BR /> <LI>Frontend</LI><BR /> <LI>Backend</LI><BR /> </OL><BR /> </LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Let’s begin with the first topic.<BR /> <H3 id="toc-hId-1092176735"><STRONG>1. Installation</STRONG></H3><BR /> <H4 id="toc-hId-1024745949"><STRONG>1.1. Install the project with abapGit</STRONG></H4><BR /> If you are new to abapGit, start by reviewing this <A href="https://docs.abapgit.org/user-guide/getting-started/install.html" rel="nofollow noopener noreferrer" target="_blank"><STRONG>Guideline</STRONG></A> for on-premise systems and this <STRONG><A href="https://developers.sap.com/tutorials/abap-environment-abapgit.html" rel="noopener noreferrer" target="_blank">Tutorial</A></STRONG> for cloud environments.<BR /> <BR /> The project is based on a single code line for both language versions (ABAP Cloud, Standard ABAP), so you can pull this <STRONG><A href="https://github.com/oblomov-dev/abap2UI5/tree/main" target="_blank" rel="nofollow noopener noreferrer">repository</A></STRONG>&nbsp;in both cases. For lower releases (NW 7.03 to 7.40) use this <A href="https://github.com/oblomov-dev/abap2UI5-downport" target="_blank" rel="nofollow noopener noreferrer"><STRONG>downport repository.</STRONG></A><BR /> <H4 id="toc-hId-828232444"><A id="user-content-2-create-a-new-http-service" class="anchor" href="https://github.com/oblomov-dev/abap2ui5/wiki/Installation#2-create-a-new-http-service" aria-hidden="true" target="_blank" rel="nofollow noopener noreferrer"></A><STRONG>1.2. Create a new HTTP Service</STRONG></H4><BR /> Next, create a new HTTP service in your system. In an on-premise environment, you need to create and configure a new ICF service. Follow this <STRONG><A href="https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_FOR_SOH_740/753088fc00704d0a80e7fbd6803c8adb/48d182abf6c96745e10000000a421937.html?version=7.40.24&amp;locale=en-US" rel="noopener noreferrer" target="_blank">guideline</A></STRONG> for that and see how to develop a new HTTP request handler <A href="https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_FOR_SOH_740/753088fc00704d0a80e7fbd6803c8adb/48d402801904154ee10000000a421937.html?version=7.40.24&amp;locale=en-US" rel="noopener noreferrer" target="_blank"><STRONG>here.</STRONG></A> In a cloud scenario, follow this <A href="https://developers.sap.com/tutorials/abap-environment-create-http-service.html" target="_blank" rel="noopener noreferrer"><STRONG>tutorial.</STRONG></A><BR /> <H4 id="toc-hId-631718939"><STRONG>1.3. Implement the Handler Method</STRONG></H4><BR /> Now copy the following implementation into your new handle_request method.<BR /> <BR /> <STRONG>ABAP Standard:</STRONG><BR /> <DIV><BR /> <PRE class="language-abap"><CODE>METHOD if_http_extension~handle_request.<BR /> <BR /> DATA(lv_resp) = SWITCH #( server-&gt;request-&gt;get_method( )<BR /> WHEN 'GET' THEN z2ui5_cl_fw_http_handler=&gt;http_get( )<BR /> WHEN 'POST' THEN z2ui5_cl_fw_http_handler=&gt;http_post( server-&gt;request-&gt;get_cdata( ) ) ).<BR /> <BR /> server-&gt;response-&gt;set_header_field( name = `cache-control` value = `no-cache` ).<BR /> server-&gt;response-&gt;set_cdata( lv_resp ).<BR /> server-&gt;response-&gt;set_status( code = 200 reason = `success` ).<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> </DIV><BR /> <A id="user-content-abap-cloud" class="anchor" href="https://github.com/oblomov-dev/abap2ui5/wiki/Installation#abap-cloud" aria-hidden="true" target="_blank" rel="nofollow noopener noreferrer"></A><STRONG>ABAP Cloud:</STRONG><BR /> <DIV><BR /> <PRE class="language-abap"><CODE>METHOD if_http_service_extension~handle_request.<BR /> <BR /> DATA(lv_resp) = SWITCH #( request-&gt;get_method( )<BR /> WHEN 'GET' THEN z2ui5_cl_fw_http_handler=&gt;http_get( )<BR /> WHEN 'POST' THEN z2ui5_cl_fw_http_handler=&gt;http_post( request-&gt;get_text( ) ) ).<BR /> <BR /> response-&gt;set_status( 200 )-&gt;set_text( lv_resp<BR /> )-&gt;set_header_field( i_name = `cache-control` i_value = `no-cache` ).<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> </DIV><BR /> <DIV><BR /> <BR /> By calling your new HTTP handler via browser, you can start abap2UI5 and see the landing page:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-14-um-13.05.32.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Landing Page</P><BR /> Optionally you can install the abap2UI5 <A href="https://github.com/abap2UI5/abap2UI5-samples" target="_blank" rel="nofollow noopener noreferrer"><STRONG>samples repository</STRONG></A>&nbsp;next and check out all the examples:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-08-02-um-10.59.07.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Samples Repository</P><BR /> Now you are ready to develop your first own app. See the first <A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer"><STRONG>blog post</STRONG></A> to find more information about the development process.<BR /> <H3 id="toc-hId-306122715"><STRONG>2. Configuration</STRONG></H3><BR /> <H4 id="toc-hId-238691929"><STRONG><SPAN style="font-size: 1rem">2.1. Options and URL Parameters</SPAN></STRONG></H4><BR /> </DIV><BR /> There are two ways to set the configuration: one is by setting it via URL parameter, and the other option is by importing it as a configuration by calling the index HTML.<BR /> <BR /> By default, the following parameters are set:<BR /> <PRE class="language-abap"><CODE>lt_config = VALUE #(<BR /> ( n = `src` v = `https://sdk.openui5.org/resources/sap-ui-cachebuster/sap-ui-core.js` )<BR /> ( n = `data-sap-ui-theme` v = `sap_horizon` )<BR /> ( n = `data-sap-ui-async` v = `true` )<BR /> ( n = `data-sap-ui-bindingSyntax` v = `complex` )<BR /> ( n = `data-sap-ui-frameOptions` v = `trusted` )<BR /> ( n = `data-sap-ui-compatVersion` v = `edge` ) ).</CODE></PRE><BR /> If you want to make changes, simply copy the table, adjust the necessary parameters and then import the table again when calling the method:<BR /> <PRE class="language-abap"><CODE>DATA(lt_config) = VALUE z2ui5_if_client=&gt;ty_t_name_value( <BR /> ( n = `data-sap-ui-theme` v = `sap_belize` ) "&lt;- adjusted<BR /> ( n = `src` v = `https://sdk.openui5.org/resources/sap-ui-cachebuster/sap-ui-core.js` )<BR /> ( n = `data-sap-ui-async` v = `true` )<BR /> ( n = `data-sap-ui-bindingSyntax` v = `complex` )<BR /> ( n = `data-sap-ui-frameOptions` v = `trusted` )<BR /> ( n = `data-sap-ui-compatVersion` v = `edge` ) ).<BR /> <BR /> DATA(lv_resp) = SWITCH #( request-&gt;get_method( )<BR /> WHEN 'GET' THEN z2ui5_cl_fw_http_handler=&gt;http_get( lt_config )<BR /> WHEN 'POST' THEN z2ui5_cl_fw_http_handler=&gt;http_post( request-&gt;get_text( ) ) ).</CODE></PRE><BR /> You can find a list of all configuration parameters <STRONG><A href="https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_751_IP/468a97775123488ab3345a0c48cadd8f/91f2d03b6f4d1014b6dd926db0e91070.html" target="_blank" rel="noopener noreferrer">here.</A></STRONG> Additionally, you can modify these parameters with the sap-ui- prefix to use them as URL parameters.<BR /> <H4 id="toc-hId-42178424"><STRONG>2.2. Title</STRONG></H4><BR /> You can set the title with the following snippet in your definition of the view:<BR /> <PRE class="language-abap"><CODE>DATA(view) = z2ui5_cl_xml_view=&gt;factory( ).<BR /> view-&gt;_z2ui5( )-&gt;title( i_client-&gt;_bind_edit( `My Title` )</CODE></PRE><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-14-um-13.57.42.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 with changed title</P><BR /> Check out the following <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_125.clas.abap" target="_blank" rel="nofollow noopener noreferrer">sample.</A></STRONG><BR /> <H4 id="toc-hId--154335081"><STRONG>2.4. Synchronize the Configuration</STRONG></H4><BR /> You can also synchronize your configurations with all other ui5 apps in your system by reading the customizing from the following table prior to making the method call (Enjoy the view – this is the only SAP GUI screenshot included in this blog series <span class="lia-unicode-emoji" title=":winking_face:">😉</span><span class="lia-unicode-emoji" title=":disappointed_face:">😞</span><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/228519154-7938e4eb-c582-41e5-8e87-1d6ecf3c6c85.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Configuration SAP UI5 Bootstrapping</P><BR /> <BR /> <H4 id="toc-hId--350848586"><STRONG>2.4. Theme</STRONG></H4><BR /> The most common change is to the theme. You can find all available themes <A href="https://sapui5.hana.ondemand.com/sdk/#/topic/da0d2e78e5414e199507cd6365d3add2" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here</STRONG></A>. The newest theme is Horizon (sap_horizon) and it is used in all the demos of this blog series. Other popular themes are:<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR style="height: 10px"><BR /> <TD style="width: 49.92%;height: 10px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/sap_belize.gif" /></TD><BR /> <TD style="width: 49.92%;height: 10px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/sap-fiori3.gif" /></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 49.92%"><SPAN class="ph uicontrol">Belize (sap_belize)</SPAN></TD><BR /> <TD style="width: 49.92%">Quartz Light (sap_fiori_3)</TD><BR /> </TR><BR /> <TR style="height: 10px"><BR /> <TD style="width: 49.92%;height: 10px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_dark.gif" /></TD><BR /> <TD style="width: 49.92%;height: 10px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_hcb.gif" /></TD><BR /> </TR><BR /> <TR style="height: 10px"><BR /> <TD style="width: 49.92%;height: 10px"><SPAN class="ph uicontrol">Evening Horizon (sap_horizon_dark)</SPAN></TD><BR /> <TD style="width: 49.92%;height: 10px">High Contrast Black (sap_horizon_hcb)</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <H4 id="toc-hId--547362091"><STRONG>2.5. Bootstrapping</STRONG></H4><BR /> In an on-premise landscape, you can bootstrap the UI5 library from your local system. Typically, the path is "/sap/public/bc/ui5_ui5/resources/sap-ui-core.js" or "resources/sap-ui-core.js". In a cloud scenario, you can refer to SAP guidelines available <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/topic/2d3eb2f322ea4a82983c1c62a33ec4ae.html" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <H4 id="toc-hId--1241592691"><STRONG>2.6. Launchpad</STRONG></H4><BR /> Abap2UI5 is based on a single-page index.html, which makes it not compatible with FLP out-of-the-box (since FLP replaces the index.html). However, it is no problem to encapsulate abap2UI5 in a UI5 standard app for the use with launchpads. Check out and install this additional <A href="https://github.com/abap2UI5/ext-service_integration" target="_blank" rel="nofollow noopener noreferrer"><STRONG>repository.</STRONG></A><BR /> <H4 id="toc-hId--1438106196"><STRONG>2.7. CSS</STRONG></H4><BR /> You can change the CSS by sending HTML with your View in your app. An example can be found <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_app_demo_50.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here:</STRONG></A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-06-um-20.56.06.png" height="164" width="466" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 app with changed CSS</P><BR /> <BR /> <H3 id="toc-hId--1341216694"><STRONG>3. Security</STRONG></H3><BR /> At the backend, abap2UI5 is a plain HTTP handler that every user creates and configures by themselves (visibility, authentication &amp; other security parameters). In the implementation of your apps you have to take care of a secure programming style like always when developing HTTP-Handlers (call authorization checks, avoid dynamic SQL etc.). Check <A href="https://www.dsag.de/wp-content/uploads/2021/12/dsag_recommendation_abap_development.pdf" target="_blank" rel="nofollow noopener noreferrer"><STRONG>this</STRONG></A> for more information.<BR /> <BR /> At the frontend, abap2UI5 is a normal one page UI5 application. It loads the external library UI5 from a CDN or your own customized directory. The UI5 framework is used to render the HTML and only methods of the UI5 framework are called to handle the all events.<BR /> <BR /> Additionally to prevent cross-site-scripting the following parameter are set in the index.html:<BR /> <PRE class="language-markup"><CODE>&lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval' ui5.sap.com *.ui5.sap.com sdk.openui5.org *.sdk.openui5.org cdn.jsdelivr.net *.cdn.jsdelivr.net"/&gt;</CODE></PRE><BR /> It only allows libraries from the same server, ui5.sap.com, openui5.com or cdn.jsdelivr.net, which we needed to use for some external libraries. Adjust the importing parameter 'content-security-policy' when you want to include more external URLs:<BR /> <PRE class="language-abap"><CODE>DATA(lv_resp) = SWITCH #( request-&gt;get_method( )<BR /> WHEN 'GET' THEN z2ui5_cl_fw_http_handler=&gt;http_get(<BR /> content_security_policy = `&lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval' ui5.sap.com *.ui5.sap.com sdk.openui5.org *.sdk.openui5.org cdn.jsdelivr.net *.cdn.jsdelivr.net"/&gt;` ) <BR /> WHEN 'POST' THEN z2ui5_cl_fw_http_handler=&gt;http_post( request-&gt;get_text( ) ) ).</CODE></PRE><BR /> You can find more information about CSP <A href="https://content-security-policy.com/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here.</STRONG></A><BR /> <H3 id="toc-hId--1537730199"><STRONG>4. Debugging</STRONG></H3><BR /> When your app is in the development process, you can activate the debugging tools by changing the following parameter:<BR /> <PRE class="language-abap"><CODE>DATA(lv_resp) = SWITCH #( request-&gt;get_method( )<BR /> WHEN 'GET' THEN z2ui5_cl_fw_http_handler=&gt;http_get(<BR /> check_debugging = abap_true )<BR /> WHEN 'POST' THEN z2ui5_cl_fw_http_handler=&gt;http_post( request-&gt;get_text( ) ) ).</CODE></PRE><BR /> <H4 id="toc-hId--2027646711"><STRONG>4.1. Frontend</STRONG></H4><BR /> <P style="overflow: hidden;margin-bottom: 0px">After that, you can can start an app and press the shortcut STRG+A and the debugging tools are displayed:<BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirmfoto-2023-12-24-um-14.41.48.png" height="344" width="604" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Debugging Tools</P><BR /> Next follow the left menu and press for example View XML:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirmfoto-2023-12-24-um-14.44.03.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Debugging Tools - XML-View</P><BR /> Most of the issues arise because the XML is not valid. You can check it there or copy &amp; paste it to an XML validator. Another good way to test the XML are UI5 sandboxes, such as the <STRONG><A href="https://codesandbox.io/s/ui5-example-pglil?from-embed=&amp;file=/webapp/App.view.xml" target="_blank" rel="noopener nofollow noreferrer">OpenUI5 Sandbox.</A></STRONG><BR /> <BR /> You can also check the View Model and previous request here. If a parameter is bound with _bind_one, it should be written in the oViewModel. If a parameter is bound with _bind, it should be written in oUpdate.&nbsp;You can also check the last request to ensure that all updated values have been sent to the server.<BR /> <BR /> To take a more detailed look at the UI, use the <A href="https://chrome.google.com/webstore/detail/ui5-inspector/bebecogbafbighhaildooiibipcnbngo" target="_blank" rel="nofollow noopener noreferrer"><STRONG>UI5 Inspector</STRONG></A>. This tool is helpful for analyzing and checking certain controls:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-03-um-14.38.51.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5 Inspector with an abap2UI5 app</P><BR /> You can find more guidelines <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/topic/76e789ea418a48a1a27916b63a30fb72" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <BR /> Also, keep in mind that abap2UI5 is based on REST, so you don't need to restart the app all the time after a change, like in the former screen logic where changes were only visible after restarting. Just triggering a server roundtrip is enough to see the changes:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_dv.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">View Development in abap2UI5</P><BR /> <BR /> <H4 id="toc-hId-2070807080"><STRONG>4.2. Backend</STRONG></H4><BR /> Set a breakpoint in your app and check the values that abap2UI5 provides you, as well as the values you give back to abap2UI5. Check if the view XML is filled and if it is valid. Normally, abap2UI5 throws an exception if something unexpected happens, which can help you to identify the problem. If you want to gain a deeper understanding, you can also debug the framework itself.<BR /> <BR /> The framework is based on a single http handler. Set a breakpoint here and check incoming requests and outgoing responses:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-17.33.52.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 HTTP Handler</P><BR /> The initial request loads the UI5 index.html, which is independent of your application and should normally not cause any problems:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-17.35.48.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Get Handler (index.html)</P><BR /> After this, the AJAX roundtrip logic begins. Every event and interaction creates a new HTTP Post request, which triggers the following method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-17.36.51.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Post Handler</P><BR /> As you can see, we call the user's app on line 44. You can also check if your app has been successfully updated after the frontend on line 39 and check the following method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-13-um-09.18.50.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Update app after frontend (PAI)</P><BR /> And the reverse direction, setting the response with the values of your app in this method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-13-um-09.19.47.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">Create frontend model before output (PBO)</P><BR /> If you find a bug in the framework or running into problems with your app, feel free to open an <STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue.</A></STRONG><BR /> <H3 id="toc-hId--2127270714"><STRONG>5. Conclusion</STRONG></H3><BR /> This was part six of this introduction to <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abap2UI5.</STRONG></A> You now have an understanding how to install &amp; configure it and got insights into troubleshooting &amp; debugging.<BR /> <BR /> In the next <A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>blog post</STRONG></A>, we will focus on the technical background of this framework and summarize all the project's key ideas by covering topics such as its architecture, codebase and compatibility.<BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, create an&nbsp;<STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG>&nbsp;or leave a comment. 2023-04-14T17:28:49+02:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-isu-intercompany-and-data-exchange-choice/ba-p/13556462 SAP ISU Intercompany and Data Exchange : Choice 2023-04-21T01:26:31+02:00 mayankchourasia https://community.sap.com/t5/user/viewprofilepage/user-id/760782 <P id="a479" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">In this blog I will discuss about what do you mean by Intercompany and Data Exchange.</P><BR /> <P id="047a" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">Let’s Consideration and Scenario where in your area Electricity is providing from various Supplier A, Supplier B , Supplier C, etc. Generally in deregulated market we have this option to choose the energy suppliers.<BR /> Deregulated in Utilities Market means where you will purchase the Electricity and then Supply to the Customers in short you will not generate the electricity you will purchase and then sell the electricity, where as Regulated in Utilities Market means generating electricity and distribution to the customers up to services you will give.</P><BR /> <P id="e214" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">Deregulation of market has given consumers the freedom to choose their energy suppliers and to change the supplier if they are not satisfied with the services of the supplier they can leave the exciting supplier and choose a new supplier.</P><BR /> <P id="1b7d" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">For Deregulated market it will not possible to manage lots of data of the customers keeping a track because lots of data will be shared between retailer and distributor. To help this&nbsp;<STRONG class="mo hy">SAP&nbsp;</STRONG>comes up a sub module called&nbsp;<STRONG class="mo hy">Intercompany Data Exchange {IDE}</STRONG>. This will helps to automates data between retailer and distributor in a deregulated market.</P><BR /> <P id="8953" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">In IDE {<STRONG class="mo hy">Intercompany Data Exchange}&nbsp;</STRONG>will contain 3 main parts.<BR /> 1. Grid.</P><BR /> <P id="69eb" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">2. Communication Control.</P><BR /> <P id="4fda" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">3. Process management.</P><BR /> <P id="12e2" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">Let’s understand one by one.</P><BR /> <BR /> <UL class=""><BR /> <LI id="5c2b" class="uo up sl mo b tj tk tm tn tp uq tt ur tx us ub ut uu uv uw bi" data-selectable-paragraph="">Grid: It contains the generation of service and distribution of service to particular period.<BR /> For example a customer is on Supplier A with for 10 years and now want to switch to new Supplier i.e. Supplier B. This will help in technical way to understand which supplier had supplied in a particular range of Months or Years.</LI><BR /> <LI id="327f" class="uo up sl mo b tj ux tm uy tp uz tt va tx vb ub ut uu uv uw bi" data-selectable-paragraph="">Communication Control: The flow of data will be sending and receiving. In SAP it is possible with the help of IDOC’s.</LI><BR /> <LI id="c978" class="uo up sl mo b tj ux tm uy tp uz tt va tx vb ub ut uu uv uw bi" data-selectable-paragraph="">Process Management: Let’s a customer wants to update the Mobile number then retail supplier should update the info accordingly.</LI><BR /> </UL><BR /> <P id="00ca" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">IDE process allows processing of multiple message formats, thus providing options for using the same system to support different markets scenario’s.</P><BR /> <P id="dbfd" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">In short we can modify the details customer details, switching the customers to different provider, etc.</P><BR /> <P id="a5db" class="pw-post-body-paragraph th ti sl mo b tj tk jj tl tm tn jn to tp tq tr ts tt tu tv tw tx ty tz ua ub el bi" data-selectable-paragraph="">Thanks for reading the blog.</P> 2023-04-21T01:26:31+02:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-7-technical-background-under-the-hood-of-abap2ui5/ba-p/13566459 abap2UI5 – (7) Technical Background: Under the Hood of abap2UI5 2023-04-26T10:37:54+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 7 of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A>&nbsp;</STRONG>— an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>This post will focus on the technical background and summarize all the project's key ideas by covering topics such as its architecture, codebase and compatibility.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and be sure to explore the other articles of this blog series:<BR /> <TABLE border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; Troubleshoooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px">(7) Technical Background: Under the Hood of abap2UI5 (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <DIV><BR /> <DIV><BR /> <DIV><BR /> <DIV><BR /> <DIV data-testid="conversation-turn-61"><BR /> <DIV><BR /> <DIV><BR /> <DIV><BR /> <DIV><BR /> <DIV><BR /> <DIV data-message-author-role="assistant" data-message-id="9be8eaeb-08e0-4235-8652-3ed4d9d41be0"><BR /> <DIV><BR /> <BR /> This post delves into the inner workings of abap2UI5, guiding you from the basics to more advanced concepts. Simply follow the sections from (1) to (30), and at the end, you'll find a concise summary.<BR /> <BR /> &nbsp;<BR /> <BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> </DIV><BR /> <H3 class="p1" id="toc-hId-1092174820"><STRONG>Technical Background</STRONG></H3><BR /> abap2UI5 is designed as an open-source project. The goal in doing this is not only to make it accessible to everyone, but also allow for exchange of ideas. Therefore, this last blog post contains all technical details: It shares the underlying concept behind this approach, explains its adaptation to the ABAP Environment, its differences to RAP and finally focuses on its code line. While my background is mostly in traditional ABAP and UI5 areas, I am not an expert in all of the topics I will touch upon, but I was interested in what they can bring to the project. This being said, if you catch any mistakes, please feel free to correct me. As always, I welcome all feedback.<BR /> <BR /> <STRONG>(1) HTML Over the Wire</STRONG><BR /> <BR /> Let's start by taking a closer look at the concept of "HTML Over the Wire", an approach that influenced abap2UI5 and is well explained in this <A href="https://m.signalvnoise.com/html-over-the-wire/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>blog post:</STRONG></A><BR /> <BLOCKQUOTE><EM>You can write fast, modern, responsive web applications by generating your HTML on the server, and delivering that (with a little help) directly to the browser. You don’t need JSON as an in-between format. You don’t need client-side MVC frameworks. You don’t need complicated bundling and transpiling pipelines. But you do need to think different. [...] </EM><BR /> <BR /> <EM>This is what HTML Over The Wire is all about. It’s a celebration of the simplicity in HTML as the format for carrying data and presentation together, whether this is delivered on the first load or with subsequent dynamic updates.</EM></BLOCKQUOTE><BR /> I came across this concept on SCN when I read this <STRONG><A href="https://blogs.sap.com/2022/02/10/fiori-like-web-app-development-in-pure-abap-with-htmx-and-fundamental/" target="_blank" rel="noopener noreferrer">blog post,</A></STRONG>&nbsp;which explained how to use <SPAN class="name"><SPAN class="innerContentContainer"><STRONG><A href="https://htmx.org/" target="_blank" rel="nofollow noopener noreferrer">htmx</A></STRONG></SPAN></SPAN> to create Fiori-like apps. Over-the-wire approaches include server-side rendering (SSR) similar to that of a multi-page application (MPA). However, after the initial request, the browser retrieves only HTML fragments asynchronously via AJAX, so the entire page is not re-rendered anymore. Unlike a single-page application (SPA), the server handles also the application's logic and state:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-16.08.57.png" height="203" width="399" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">HTML "Over the Wire" Lifecycle <STRONG><A href="https://blogs.sap.com/2022/02/10/fiori-like-web-app-development-in-pure-abap-with-htmx-and-fundamental/" target="_blank" rel="noopener noreferrer">(Quelle)</A></STRONG></P><BR /> The idea of combining View &amp; Data and transferring them together to the frontend is significantly distinct from most of the current approach where HTML, CSS &amp; JavaScript are strictly separated and stored at the frontend whereas the data is sent by the backend.<BR /> <BR /> <STRONG>(2) Hypermedia Driven Application (HDA)</STRONG><BR /> <BR /> This leads to a concept that we could refer to as a hypermedia-driven application (HDA), which is introduced <A href="https://htmx.org/essays/hypermedia-driven-applications/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here.</STRONG></A> Let's compare this approach to that of multi-page applications (MPA) and single-page applications (SPA):<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-30-um-20.28.26.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">MPA vs. SPA vs. HDA <STRONG><A href="https://craftcms.com/events/dot-all-2022/sessions/a-practical-guide-to-html-over-the-wire" target="_blank" rel="nofollow noopener noreferrer">(Quelle)</A></STRONG></P><BR /> In a hypermedia-driven application (HDA), the browser is limited to displaying HTML, processing JavaScript and CSS, but has no knowledge of the application's state (i.e., what has happened before and what will happen next). The application's logic is completely maintained on the server. In contrast, in a single-page application (SPA), all routes and potential actions are defined upfront and implemented at the frontend. As a result, any modifications to the application requires rebuilding the frontend app (more information <A href="https://htmx.org/essays/hateoas/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here).</STRONG></A><BR /> <BR /> <STRONG>(3) Separation of Concerns</STRONG><BR /> <BR /> In a HDA, the idea of separation of concerns is not highly prioritized. CSS, JavaScript, and HTML are not cleanly separated, and the backend is responsible not only for the data but also for generating the UI and the program flow. However, the advantage of this approach is that we can maintain and customize everything in one place, as we're accustomed to in the past for example in former SAP GUI applications (more information <A href="https://htmx.org/essays/locality-of-behaviour/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here).</STRONG></A><BR /> <BR /> <STRONG>(4) Dive Deeper</STRONG><BR /> <BR /> The first approaches in this direction were introduced back in <STRONG><SPAN class="name" data-wfid="24bd526b66d7"><SPAN class="innerContentContainer"><A href="https://elixirforum.com/t/phoenix-liveview-info/16569" target="_blank" rel="noopener nofollow noreferrer">Phoenix LiveView (2018)</A></SPAN></SPAN></STRONG> and in <STRONG><SPAN class="name"><SPAN class="innerContentContainer"><A href="https://calebporzio.com/proof-of-concept-phoenix-liveview-for-laravel" target="_blank" rel="noopener nofollow noreferrer">Laravel Livewire (2019).</A></SPAN></SPAN></STRONG>&nbsp;Now, there are several frameworks that work on similar principles, such as <SPAN class="name"><SPAN class="innerContentContainer"><STRONG><A href="https://htmx.org/" target="_blank" rel="nofollow noopener noreferrer">htmx</A></STRONG></SPAN></SPAN>, <SPAN class="name"><SPAN class="innerContentContainer"><STRONG><A href="https://hotwired.dev/" target="_blank" rel="nofollow noopener noreferrer">hotwire</A> </STRONG>or</SPAN></SPAN> <STRONG><SPAN class="name"><SPAN class="innerContentContainer"><A href="https://unpoly.com/" target="_blank" rel="nofollow noopener noreferrer">unpoly</A> </SPAN></SPAN></STRONG><SPAN class="name"><SPAN class="innerContentContainer">(c</SPAN></SPAN>heck out newer blog posts <STRONG><A href="https://thenewstack.io/javascript-framework-unpoly-and-the-html-over-the-wire-trend/" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG> and <STRONG><A href="https://blog.codecentric.de/hotwire-new-approach-for-modern-web-applications" target="_blank" rel="nofollow noopener noreferrer">here)</A></STRONG>.<BR /> <BR /> In the end, all of these concepts share the belief that it's possible to develop apps with much less complexity, but only slightly lower level of UI fidelity compared to SPAs. Or, when we try to illustrate it visually, they aim to find a "sweet spot" between MPAs and SPAs:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-27-um-23.09.40.png" height="241" width="421" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">"Sweet Spot" between SPA and MPA <STRONG><A href="https://unpoly.com/" target="_blank" rel="nofollow noopener noreferrer">(Quelle)</A></STRONG></P><BR /> Most of my knowledge about this subject comes from this <A href="https://htmx.org/essays/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>blog posts</STRONG></A>, and it's still relatively new to me (so I don't consider myself an expert). However, it's fascinating to see the existing frameworks and to contemplate what might be achievable in the future, such as selectively re-rendering specific parts of the view or implementing smoother page transitions. I recommend taking an hour to watch this <A href="https://craftcms.com/events/dot-all-2022/sessions/a-practical-guide-to-html-over-the-wire" target="_blank" rel="nofollow noopener noreferrer"><STRONG>video</STRONG></A>, where all of these concepts are presented very well.<BR /> <BR /> But now let's start to ask what we can bring of this concept to UI5 and the ABAP environment?<BR /> <BR /> <STRONG>(5) UI5 Architecture</STRONG><BR /> <BR /> <A href="https://sapui5.hana.ondemand.com/#/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>UI5</STRONG></A> differs significantly from frameworks like <SPAN class="name"><SPAN class="innerContentContainer"><STRONG><A href="https://htmx.org/" target="_blank" rel="nofollow noopener noreferrer">htmx</A></STRONG></SPAN></SPAN> and <STRONG><SPAN class="name"><SPAN class="innerContentContainer"><A href="https://unpoly.com/" target="_blank" rel="nofollow noopener noreferrer">unpoly</A></SPAN></SPAN></STRONG>. In an UI5 app, all of the logic is handled at the frontend, while the backend utilizes an OData-Implementation. This means that ABAP is only used for delivering data and has no opportunities to implement its own logic or UI. We have a "heavy javascript" approach here in a classic SPA architecture (we'll take a closer look at RAP later).<BR /> <BR /> But one specific characteristic we should examine closely is how the UI5 framework creates views. Each HTML output is rendered from an XML-View (let's ignore the former HTML/JS/JSON-Views), with its associated data from the server. The view is stored at the frontend as part of the app:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-10-um-16.56.08.png" height="168" width="420" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5 normally - ABAP delivers only Data</P><BR /> <STRONG>(6) "UI5 Over the Wire" Architecture</STRONG><BR /> <BR /> And here is now the trick: what if, in addition to sending data from the backend, we also send the view?<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-30-um-20.50.18.png" height="167" width="422" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">"UI5 Over the Wire" - ABAP delivers Data &amp; View together</P><BR /> <P style="overflow: hidden;margin-bottom: 0px">Despite still relying on frontend HTML rendering, all necessary information (view &amp; data) is now retrieved via AJAX from the backend. As a result, the UI5 app remains a SPA, but its role is now reduced to that of a HDA, which is responsible solely for displaying the view and its data:</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-30-um-20.47.34.png" height="131" width="482" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5 app downgraded to an HDA - Displaying Data &amp; View received from the server</P><BR /> This means that the frontend app is not aware of what it is currently displaying (whether it's a table, list or input) and neither is it aware of what actions will be taken next. The app logic remains completely on the server and the frontend app is just a small HDA transmitted with the first request:<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-19.34.39.png" height="294" width="510" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">"UI5 Over the Wire" - Server to Client Communication</P><BR /> The HDA displays the view with its data and sends back each event to the server for determination of the next action and output. This process is somewhat similar to the PAI/PBO process used in former SAP GUI apps:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-19.55.11.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5 vs. "UI5 Over the Wire" - Communication</P><BR /> We use an AJAX roundtrip logic similar to "HTML Over the Wire" approaches, but in this case, we cannot send HTML directly. Instead, we send a View combined with its Data. This results in a concept that we could refer to as "UI5-View Over the Wire".<BR /> <BR /> <STRONG>(7) Carrying Data and Presentation together</STRONG><BR /> <BR /> A typical "UI5-View Over the Wire" response looks like this:<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-03-um-13.53.51.png" height="228" width="539" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">"UI5 Over the Wire" - Response with View &amp; Data together</P><BR /> But is this maybe just the same like <A href="https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/289477a81eec4d4e84c0302fb6835035.html" target="_blank" rel="noopener noreferrer"><STRONG>RAP,</STRONG></A> but in a different format?<BR /> <BR /> <STRONG>(8) RAP</STRONG><BR /> <BR /> <A href="https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/289477a81eec4d4e84c0302fb6835035.html" target="_blank" rel="noopener noreferrer"><STRONG>RAP</STRONG></A> also aims to find a "sweet spot" between a SPA and MPA. I am not certain of the exact approach they use to bring their view and model to the frontend, but they enrich responses either within the JSON itself or within the metadata of the initial OData-Request and the view and the model is defined previously in CDS Views in the backend:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-07.25.09.png" height="527" width="462" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">RAP - Definition of Views with UI Annotations</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-07.27.04.png" height="311" width="460" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">RAP - Definition of Data Models with DDL</P><BR /> This approach also leads to an architecture with a thin frontend and a strong backend similar to an HDA. But RAP aims to achieve this in a well-organized and controlled manner: Every API is based on the OData-Protocol, Views are defined with UI Annotations, Data Models are defined in DDL, Model updates are developed in local implementations of RAP classes and everything is separated in different layers that are orchestrated in a <STRONG><A href="https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/8308e6d301d54584a33cd04a9861bc52/0a875bc7a005465aad92c08becc11776.html" target="_blank" rel="noopener noreferrer">Virtual Data Model.</A></STRONG> Finally, this approach ensures a highly organized development process which is effective in most use cases.<BR /> <BR /> However, in situations where significant Model and View changes are needed, especially at runtime, this approach can be a bit too unflexibel. Model changes with RTTI are not supported, and extending the view quickly goes beyond the functional scope of backend annotations, requiring development of Apps with <A href="https://sapui5.hana.ondemand.com/sdk/#/topic/03265b0408e2432c9571d6b3feb6b1fd" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Fiori Elements</STRONG></A> (with the need for extra deployment again).<BR /> <BR /> Overall RAP does not mix View, Model and Logic as radically as the "Over the Wire" approaches. Luckily in an open-source project we do not need to take care of any conventions and can risk a little bit more. As we have seen in (6) where the first trick was sending Views from the backend instead of storing them at the frontend app, we can now further enhance flexibility (9)(10).<BR /> <BR /> <STRONG>(9) Define one generic HTTP-Service for all Apps</STRONG><BR /> <BR /> First, we do not define a specific HTTP-Service for transmitting the View and the Data. Instead, every app uses the same generic HTTP-Handler including two strings (one for the View and one for the Data) eliminating the need to develop individual OData-Services with SEGW or CDS. During runtime the ABAP variables &amp; tables are transformed into a JSON-Model and transmitted as a string to the frontend. In JavaScript it is parsed again into a JSON-Model and binded to the UI5-View:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-06.30.11.png" height="174" width="523" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Data Transfer in abap2UI5 - ABAP variables &amp; tables are automatically synchronized with the UI5-Model</P><BR /> Furthermore we not only send the data but also the metadata (Data Model) with every request (7). This is different from classic OData communication, where the metadata is sent with the initial OData request to establish the model at the beginning, and only the data is exchanged afterward. With this approach, we can now send different models with every request:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-06.43.22.png" height="215" width="553" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">OData vs. UI5 Over the Wire - Model &amp; Data transfer</P><BR /> <STRONG>(10) Define Model at Runtime</STRONG><BR /> <BR /> This enables the possibility to define models not only at design time, but also at runtime. The user doesn't have to do any extra work because abap2UI5 handles the entire process in the background during every AJAX request:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-17.40.48.jpeg" height="326" width="469" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Dynamic Data Binding &amp; Model Creation</P><BR /> In apps we can use RTTI now again in a way that is similar to how it was used with ALVs. This means that there is no need to create separated apps for each model. In <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_061.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>this demo,</STRONG></A> you can see an abap2UI5 app with a view including a table output that displays a generic table and its type is created and modified at runtime (similar to SE16):<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_se16_2.gif" height="354" width="547" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Replacing the Model (metadata) at Runtime</P><BR /> <STRONG>(11) Define View at Runtime</STRONG><BR /> <BR /> Same for the view: In RAP, only certain predefined control attributes can be modified at runtime, while the view is defined in CDS artifacts with UI annotations previously. However, in an abap2UI5 app, it is possible to replace entire view controls. For example, in the <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_046.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>following app</STRONG></A>, a table control is replaced with a list control and vice versa:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_ui_change2-1.gif" height="314" width="502" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Replacing the View at Runtime</P><BR /> <STRONG>(12) View &amp; Model independent from the HTTP-Service</STRONG><BR /> <BR /> In the end, the View &amp; Model are defined independent from the HTTP-Service and we are no longer forced to deliver a predefined static OData-Service for every app, as is the case in RAP. The number of backend artifacts is significantly reduced:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-27-um-23.26.34.png" height="259" width="396" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">RAP vs. Model &amp; View decoupled from the (single &amp; generic) HTTP-Service</P><BR /> Let's take a look to the HTTP-Handler that provides us with this flexibility.<BR /> <BR /> <STRONG>(13) HTTP-Service</STRONG><BR /> <BR /> All apps and data models use the same single generic HTTP-Handler, which can be observed by setting a breakpoint in your app and examining the call stack.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-13.43.14.png" height="146" width="463" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Call stack of an abap2UI5 app</P><BR /> Every app implementation is a REST-based HTTP-Post implementation, in which no session is maintained between two requests.<BR /> <BR /> <STRONG>(14) REST</STRONG><BR /> <BR /> This makes it compatible with all mobile use cases and devices, as well as with 'RESTful' Environments such as the BTP ABAP Environment and the new language version 'ABAP Cloud'. Similar to an OData-Implementation, where data changes are reflected in the app without requiring an app restart, it is now possible to develop the entire application and modify its view without restarting the frontend app. Take a look at this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_dev.gif" height="313" width="633" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Developing the ABAP class without restarting the frontend app</P><BR /> We get also the advantage shared by all over-the-wire approaches that there is no need for cache busting anymore, as the frontend app remains unchanged during the development process.<BR /> <BR /> Up until now, we have observed that the abap2UI5 frontend app is unaware of the specific application, just like the generic HTTP-Service on the server, which has also no knowledge of the particular model and view it is transmitting. So, which layer ultimately defines what happens in this architecture?<BR /> <BR /> <STRONG>(15) The abap2UI5 App</STRONG><BR /> <BR /> The only non-generic part of this concept is the app of the user implementing the interface z2ui5_if_app:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-17.52.43.png" height="512" width="478" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 app - one place for everything</P><BR /> In this architecture, the app has complete freedom in creating the view and the model, but it also bears full responsibility for ensuring that everything else functions correctly.&nbsp;The app must handle the program logic, application states, and remember where it was coming from and where it want to go next. All of this is concentrated in this single app layer.<BR /> <BR /> However, this is not a big deal for ABAP! From an ABAP perspective, this is similar to past practices of using selection screens or working with ALVs. Every SAP GUI app was, in a way, an HDA where ABAP performs all the necessary functions (it was just not a browser-based environment). Moreover, in this architecture, we are not limited to implementing an OData-Service or confined to a local implementation of a global RAP class with restrictions, such as commit sequences, anymore. We can now leverage the full capabilities of the ABAP stack again. Creating data models based on internal tables is straightforward, working with generic data models, as seen in (10), is easily achievable at runtime with RTTI and extended ABAP concepts like serialization are also applicable, as we will see in the next section.<BR /> <BR /> <STRONG>(16) Draft</STRONG><BR /> <BR /> With RAP, users can save interim results in drafts, giving them the opportunity to interrupt their work and continue later. The abap2UI5 architecture works as if we send a completely new app to the frontend after every event, but we still want to preserve the inputs and state that the user has made before. To achieve this, the z2ui5_if_app interface includes the if_serializable_object interface, which enables us to serialize and persist all important information of every request (such as the current view or its status):<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-13.52.24.png" height="124" width="487" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">z2ui5_t_draft - the abap2UI5 persistence for interim results</P><BR /> Furthermore, these drafts help us jump back to previous states with minimal effort, reducing the complexity that we would typically encounter in an HDA scenario when implementing a cancel or exit event of a view. Similar to the HTTP-Service, these drafts are also defined only in a generic way, eliminating the need to manually create typed draft tables for every data model, as required in RAP, and reducing again the number of backend artifacts:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-27-um-23.30.50.png" height="255" width="444" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">RAP vs. Single (generic) Draft Table in abap2UI5</P><BR /> With this approach, we achieve a stateful-like PAI/PBO feeling similar to SAP GUI apps, even though we are still operating within the AJAX roundtrip logic. Furthermore since every request can be made to a different application server, abap2UI5 is compatible with scalable cloud environments, ensuring compatibility for future use:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-29-um-11.53.23.png" height="283" width="513" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">SAP GUI (stateful) vs. abap2UI5 (restful)</P><BR /> However, it is important to note that this feature should only be used for interim results and be cautious when serializing other parts of your app.<BR /> <BR /> We have gained a lot of flexibility with (9) (10) (11) (16), now the next sections will focus more on how the framework tries to reduce its complexity. Let's begin by taking a look at the initial request.<BR /> <BR /> <STRONG>(17) Initial Request</STRONG><BR /> <BR /> The first GET request sends the artifacts of the UI5 (HDA) app to the browser. Typically, we would deploy a BSP to the ABAP stack for this, but in abap2UI5, the code is copied as a string into the implementation of the initial request of the HTTP-Handler:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-14.40.14.png" height="153" width="481" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">index.html stored in ABAP Source Code instead of using a BSP</P><BR /> This provides us a 100% abapGit project that solely uses ABAP source code, making it easily installable on every ABAP system by eliminating the need for separated frontend artifacts or deployments.<BR /> <P class="p1"><B>(18) Everything is maintained &amp; developed in the Backend</B></P><BR /> Considering the fact that all user apps are also in pure ABAP, we can now maintain and develop everything in the backend. Duplicating apps, making changes, renaming or other refactoring takes only a few moments. The deployment process is reduced to just activating an ABAP class, enabling us to create many apps in a short amount of time. For example, all the apps of the <A href="https://github.com/abap2UI5/abap2UI5-samples/tree/main/src/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>sample section</STRONG></A> were created rapidly using mostly copy-pasting, which would have been unfeasible for separately developed and deployed frontend apps. This represents a significant reduction in complexity and an advantage of all 'Over the Wire' apps, as we observed in (3).<BR /> <BR /> <STRONG>(19) No Extra Layer </STRONG><BR /> <BR /> Another way to reduce complexity is by avoiding the creation of extra customizing layers. As shown in (13), there is only one stack call between the user's app and the HTTP-Handler, and there are no additional layers such as OData, SADL or Gateway. This allows us to bring the UI5 frontend framework and its functionality as pure as possible to the abap2UI5 apps in the backend.<BR /> <BR /> UI5 is evolving rapidly, and additional layers can quickly become outdated. With this approach, all UI5-Controls which will be released in the future will also be automatically useable in abap2UI5. However, a potential downside is that we have to deal with the complexity of the frontend UI5 API and learn the concepts of XML-Views and UI5 Controls. Ultimately, it comes down to personal preference whether you prefer to learn <A href="https://help.sap.com/docs/SAP_NETWEAVER_750/cc0c305d2fab47bd808adcad3ca7ee9d/f8af07bb0770414bb38a25cae29a12e9.html" target="_blank" rel="noopener noreferrer"><STRONG>UI Annotations</STRONG></A> or directly learn the concepts of <STRONG><A href="https://sapui5.hana.ondemand.com/#/topic" target="_blank" rel="nofollow noopener noreferrer">SAP UI5.</A></STRONG><BR /> <BR /> <STRONG>(20) No Hiding of Complexity</STRONG><BR /> <BR /> But not having an extra layer also means that the framework does not necessarily abstract away complexity, unlike what other frameworks aim for. In abap2UI5, the user directly sends his XML-View to the frontend and is responsible for ensuring that it is valid and executable:<BR /> <P class="p1" style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-20-um-16.36.26.png" height="83" width="504" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">XML-View created by the user and ready for the 'Wire'</P><BR /> Luckily, we can significantly simplify the creation process by creating utility classes. For instance, by offering with <A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/z2ui5_cl_xml_view.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>z2ui5_cl_xml_view</STRONG></A> a class-based approach to create views that provide access to the <A href="https://sapui5.hana.ondemand.com/#/api" target="_blank" rel="nofollow noopener noreferrer"><STRONG>UI5 API</STRONG> </A>via ADT code completion:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-21-um-11.06.21.png" height="139" width="422" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">z2ui5_cl_xml_view - UI5 API (frontend) used for Code Completion in ADT (backend)</P><BR /> This is in contrast to RAP, where you benefit of well-documented and organized extra layers, but sometimes they have limited functionality. Take side effects for example. In RAP, you are restricted to use the +, -, and * operators. In abap2UI5 you have to write JavaScript directly, which requires a lot more knowledge, but it provides the benefit of accessing the full expression binding functionality available at the frontend:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-20-um-16.22.14.png" height="78" width="497" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Expression Binding (Side Effects) in abap2UI5 - Mixture of ABAP and JavaScript</P><BR /> <B>(21) Separated _bind and _event method</B><BR /> <P class="p1">In the <A href="https://blogs.sap.com/2023/01/22/abap2ui5-project-development-of-ui5-selection-screens-in-pure-abap-no-app-deployment-or-javascript-needed/" target="_blank" rel="noopener noreferrer"><STRONG>first approach</STRONG></A> of this framework the event and data binding were included in every method call:</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-19-um-12.56.13.png" height="170" width="446" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">First approach - Data binding and events are not separated from the view</P><BR /> In the current approach, they are separated from the view and created using additional methods. Moreover, the entire process of data binding and transfer is automatically handled by the framework (9):<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-20-um-16.34.00.png" height="171" width="490" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Actual Approach - extra methods for the event and binding</P><BR /> This is a difference from many other UI rendering processes, where data and UI are usually imported together. Separating them here simplifies the view creation process, avoids data redundancies, and prevent the framework from becoming messy. The current approach has fewer lines of code than the <A href="https://blogs.sap.com/2023/01/22/abap2ui5-project-development-of-ui5-selection-screens-in-pure-abap-no-app-deployment-or-javascript-needed/" target="_blank" rel="noopener noreferrer"><STRONG>first approach</STRONG></A> that only focused on selection screens, because the entire view creation process is clearly separated from the rest now and kept outside of the framework.<BR /> <P class="p1"><B>(22) "Over the Wire" sending JS, HTML &amp; CSS&nbsp;</B></P><BR /> Furthermore we can also <STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">add extra functionality</A></STRONG> (JS, HTML, CSS) without extending the framework itself or changing the abap2UI5 frontend app. For instance, let's take the <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_app_demo_75.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Upload Files App</STRONG></A> as an example, which has its own custom control that is not part of the framework and is sent "Over the Wire" after calling the app:<BR /> <P class="p1" style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-19-um-12.52.40.png" height="183" width="487" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">App delivering its own JavaScript "Over the Wire"</P><BR /> With any request there is the chance to sent own JavaScript or Custom Controls to the frontend. The abap2UI5 framework just sends it as it is to the frontend. All upcoming requests can now use this JavaScript for example to use Custom Controls in their UI5 Views:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-01-um-17.31.45.png" height="279" width="508" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 app sending custom Javascript to the client</P><BR /> <STRONG>(23) As simple as possible</STRONG><BR /> <BR /> So, we have seen in (22), apps can be made very complex, but the opposite is also possible - we can make them extremely simple. One beautifully minimalistic approach is the use of if_oo_adt_classrun. By implementing just one method, we can generate an output with a single click (F9). This is extremely efficient and was one of the role models for abap2UI5. Here's a comparison of both approaches:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-23-um-21.13.40-1.png" height="245" width="403" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">if_oo_adt_classrun vs. abap2UI5</P><BR /> To summarize what we have covered so far, abap2UI5 is built in a highly generic manner, placing most of the responsibility on the user's apps. As a result, we gain a a lot of flexibility and freedom in the app implementation, but we also have full responsibility for the view creation and the program flow. Furthermore we have to keep the following downsides in mind.<BR /> <BR /> <STRONG>(24) Downsides compared to UI5 &amp; RAP</STRONG><BR /> <BR /> Most notably, compared to UI5, we cannot implement offline capabilities because in such a situation we cannot continuously ask the server after every event to determine what will happen next.<BR /> <BR /> Furthermore, using HANA DB capabilities directly at the frontend leads to problems. By using the same generic HTTP-Service for every app, we have decoupled the UI from the rest. However, in a RAP scenario, they use a typed OData and can directly touch HANA capabilities via a CDS View (and skip the ABAP layer). With this approach, pagination or fuzzy searchs can be easily integrated in UI5 freestyle or RAP apps. The combination of OData-Service directly calling a CDS View of HANA is extremely effective here.<BR /> <BR /> Of course, we can also select from CDS Views in an abap2UI5 app and send the result to the frontend. But implementing this manually requires more effort, and we cannot render a fuzzy search help at the frontend, because we are forced to replace the entire view after every request with this approach. As always, every advantage we gain with abap2UI5, such as flexibility in creating models, comes with a corresponding trade-off of lower functionality in other areas.<BR /> <BR /> Additionally Fiori Elements with all its floorplans &amp; templates is very straightforward and will also get a lot of updates in the future. In the end the wide range of UI5 use cases makes a comparison of the different approaches very difficult and cannot bet finally discussed here. Now, let's continue to the last part of this blog post and take a closer look at the framework's code line.<BR /> <BR /> <STRONG>(25) System Footprint</STRONG><BR /> <BR /> The system footprint is kept as small as possible, abap2UI5 is based only on ABAP classes without the use of CDS and RAP artifacts. Most of the coding is outside of the framework delegated to the user (21) (22). In total the framework consists only around of 2,300 lines of code, spread over one HTTP-Handler, two interfaces and one database table:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-13.53.27.png" height="134" width="410" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">System footprint of abap2UI5</P><BR /> The entire framework logic is implemented in the HTTP-Handler class:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-24-um-15.03.53.png" height="322" width="434" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">This is all that abap2UI5 does</P><BR /> The functionality focuses solely on the communication between the backend and frontend, controlling the application flow, and creating the view model. We saw the initial GET request in (17). The POST request is handled by this implementation:<SPAN style="font-size: 1rem"><BR /> </SPAN><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-23-um-21.27.09.png" height="296" width="515" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">AJAX Post Handler</P><BR /> In the end, we get a pure source code-based framework, which offers us the following possibility.<BR /> <BR /> <STRONG>(26) Running Everywhere Apps</STRONG><BR /> <BR /> Essentially, abap2UI5 generates two strings, one containing an XML-View and the other containing the JSON-View-Model. These strings are then transmitted to and from the frontend. As a result, there is no need for a high ABAP release, as this can be accomplished even with very old releases. This approach allows us to run on both the latest ABAP Cloud stack and on-premise systems, as well as very old releases, making it a release-independent solution. Additionally, we do not necessarily lose access to new UI5 features, as we have the option to bootstrap the UI5 framework at the frontend from a Content Delivery Network (CDN) and use the latest UI5 version even on very old releases:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-16.32.35.png" height="158" width="406" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Local Bootstrapping - UI5 version depends on the SAP release</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-16.32.41.png" height="213" width="412" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">CDN Bootstrapping - UI5 version independent from the SAP release</P><BR /> As a result, abap2UI5 apps can also be developed to be portable across various SAP systems, releases, and environments. If an app is developed once on ABAP Cloud 2305, it can also be used on lower releases. Similarly, apps developed on older Netweaver releases can run on BTP ABAP Environment or S/4 Public Cloud ABAP Environment. However, for this compatibility to be possible, abap2UI5 and its apps need to be designed to work with both language versions, 'ABAP Cloud' and 'Standard ABAP'. To avoid redundancy, abap2UI5 tries to achieve this by using a single code line.<BR /> <BR /> <STRONG>(27) One-Code-Line</STRONG><BR /> <BR /> With this approach, the use of dependencies is limited to cloud-released APIs and functions available in lower Netweaver releases simultaneously. To handle this, abap2UI5 only uses SAP dependencies when it is really needed -- for instance in the GUID creation:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Bildschirm­foto-2023-03-30-um-09.01.34.png" height="188" width="461" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GUID creation compatible to ABAP Cloud and Standard ABAP</P><BR /> As you can see, creating methods that are compatible with both 'ABAP Cloud' and 'Standard ABAP' is considerably more complex. Fortunately, abapUI5 only requires GUIDs as a dependency. However, when developing apps, you must be aware of this (and I have no experience if this is feasable). But in the end, it does have a key advantage: abap2UI5 runs on ABAP 2305 and is still portable down to NetWeaver v702.<BR /> <BR /> <STRONG>(28) Compatibility &amp; Downporting</STRONG><BR /> <BR /> Downporting abap2UI5 code normally would result in a release that is difficult to maintain and debug. To avoid this, abap2UI5 is divided into two repositories: a <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="nofollow noopener noreferrer"><STRONG>main repository</STRONG></A> (compatible from NW 7.50 to ABAP 2305) and a <A href="https://github.com/abap2UI5/abap2UI5-downport" target="_blank" rel="nofollow noopener noreferrer"><STRONG>downport repository</STRONG></A>&nbsp;(compatible down to NW 7.02).<BR /> <BR /> The low-syntax branch is automatically generated using <A href="https://abaplint.app/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abaplint</STRONG></A>. The separate branch enables development with all new ABAP expressions available since ABAP v750 while still ensuring that all abap2UI5 features added in the future are automatically downported and available for ABAP v702.<BR /> <BR /> I'd like to extend a thank you to <STRONG><SPAN class="mention-scrubbed">lars.hvam</SPAN></STRONG> here -- he both recommended using a separated downport version and kindly helped to set <STRONG><A href="https://abaplint.app/" target="_blank" rel="nofollow noopener noreferrer">abaplint</A></STRONG> up for this project. At a point when I was tediously downporting everything manually, this was a great shortcut. The functionality of automated ABAP downporting is impressive and greatly improves efficiency. Check out the <A href="https://abaplint.app/stats/abap2UI5/abap2UI5" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abaplint dashboard</STRONG></A> of this project and the tool <STRONG><A href="https://abaplint.app/" target="_blank" rel="nofollow noopener noreferrer">abaplint.</A></STRONG><BR /> <BR /> <STRONG>(29) Contribution</STRONG><BR /> <BR /> Furthermore it has been great merging every PR that has worked with and improved the project. Thank you at this point to the following who contributed their code: <STRONG><SPAN class="mention-scrubbed">jacques.nomssi</SPAN>, <SPAN class="mention-scrubbed">marcbernardtools</SPAN>, <A href="https://github.com/sun-tassein" target="_blank" rel="nofollow noopener noreferrer">Sun-Tassein</A>, <SPAN class="mention-scrubbed">christian.guenter</SPAN>, <SPAN class="mention-scrubbed">axel.mohnen.ctie</SPAN> <SPAN class="mention-scrubbed">lars.hvam</SPAN> </STRONG>And, thank you to those who featured the project in their channels: <STRONG><SPAN class="mention-scrubbed">rich.heilman</SPAN>, <SPAN class="mention-scrubbed">thomas.jung</SPAN>,&nbsp;<SPAN class="mention-scrubbed">jelena.perfiljeva</SPAN>, <SPAN class="mention-scrubbed">paul.modderman.01</SPAN> </STRONG>And also let's not forget, besides <STRONG><A href="https://abaplint.app/" target="_blank" rel="nofollow noopener noreferrer">abaplint</A></STRONG> this framework uses <A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abapGit</STRONG></A> and benefits from the work <A href="https://abapgit.org/sponsor.html" target="_blank" rel="nofollow noopener noreferrer"><STRONG>of the people who built it:</STRONG></A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-17.04.22.png" height="157" width="483" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 runs on every system with abapGit &amp; abaplint</P><BR /> Lastly, I'd like to say that abap2UI5 did not just emerge out of thin air. Since I've started developing in ABAP I've been looking to SCN blog posts on topics like serialization, JSON parsing, HTTP-Communication, OData and UI5. I'd like to express my gratitude to those who've devoted time to sharing their knowledge, this project certainly wouldn't have been possible without it.<BR /> <P class="p1"><STRONG>(30) Finish &amp; Begin</STRONG></P><BR /> This was the explanation of the technical background. If you are interested in more information, take a look at the previous version of this project. It provides a more in-depth explanation of the server-client communication and you can see how it all started: <STRONG><A href="https://blogs.sap.com/2023/01/22/abap2ui5-project-development-of-ui5-selection-screens-in-pure-abap-no-app-deployment-or-javascript-needed/" target="_blank" rel="noopener noreferrer">abap2UI5 - Development of UI5 Selection Screens in pure ABAP.</A></STRONG><BR /> <H3 id="toc-hId-895661315"><STRONG>Summary</STRONG></H3><BR /> <P class="p1">Long blog post short: Inspired by "HTML Over the Wire" (1)(2)(3) we mixed UI and Data together (7) and created an "UI5 Over the Wire" approach by sending the XML-View from the server (6). Then we used a single generic HTTP-Service for all apps (13) independent from the View and Data Model (12). It provides us with great flexibility allowing us to dynamically create Data Models (10) and Views (11) at runtime, resulting in a significantly reduced number of backend artifacts.</P><BR /> Next, we explored various ideas on how the framework reduces its own complexity by avoiding frontend artifacts (17), eliminating extra customizing layers (19), and separating the view from the framework (21), as well as app-specific JS or HTML (22). Finally, we got a pure source code approach with only one database table, two interfaces, one class and just 2,300 lines of code (25). It is developed in a single code line (27), making it cloud and on-premises ready and downportable to old releases (28). Its apps in combination with abapGit can be developed that they are running on nearly every release (29).<BR /> <BR /> All in all, with abap2UI5, you need to disregard some common rules: there is no separation between View and Model in the HTTP communication (12), HTML &amp; JavaScript are stored directly in the source code (17) (22), we don't use OData or RAP (7) and there are other downsides to consider (24). However, if you accept all of this, you get a very minimalistic approach where you only need to implement a single method to develop standalone UI5 applications (15).<BR /> <H3 id="toc-hId-699147810"><STRONG>Conclusion</STRONG></H3><BR /> Going into this, I had no idea whether or not this idea would be interesting or find its audience. It surprised me how many people were installing it, and it really inspired me to keep putting ideas into the project over the past couple month. I’m not sure how many of these apps will find themselves in a productive system or if they’ll just stay as testing or tooling for developers, but regardless I hope working with abap2UI5 has been fun. I’d like to thank everyone who was willing to give this approach a try and 'hop over the wire'. <span class="lia-unicode-emoji" title=":upside_down_face:">🙃</span><BR /> <BR /> In the<STRONG>&nbsp;<A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer">next part</A>,</STRONG> we will see how the project is organized on GitHub with the tools abapGit, open-abap and abaplint.<BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, leave a comment or create an&nbsp;<STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG>. 2023-04-26T10:37:54+02:00 https://community.sap.com/t5/technology-blogs-by-members/error-quot-person-already-hired-quot-while-replicating-employee-master-data/ba-p/13551949 Error "Person Already Hired" While Replicating Employee Master Data From SAP SuccessFactors Employee Central To SAP S/4HANA Or SAP ERP HCM System. 2023-06-11T09:29:51+02:00 zainabfatima https://community.sap.com/t5/user/viewprofilepage/user-id/117288 <SPAN style="font-weight: 400">Hello Reader,</SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="font-weight: 400">How are you? I hope you are fine. Today I will be sharing with you one of the reasons of the error “person already hired” while trying to replicate the Employee Master data from SAP SuccessFactors Employee Center to SAP S∕4HANA . If you are an Integration Consultant and you are a beginner at Replication of Employee Master Data from SAP SuccessFactors Employee Center to SAP S∕4HANA then this blog is for you. Even if you have a little bit of experience, you can also read the blog and provide any comments or suggestions about the topic and also provide your valuable feedback.</SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="font-weight: 400">So let us start the blog.</SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="font-weight: 400">If you are integrating the SAP SuccessFactors Employee Center with the On-premise SAP S∕4HANA system then the first step is data migration. You first need to migrate the existing employee master data and organizational data from SAP S∕4HANA to SAP SuccessFactors Employee Central. It is strongly recommended to use standard SAP Infoporter tool for the migration in order to avoid any errors while replicating back the employee master data to SAP S∕4HANA.</SPAN><BR /> <BR /> <SPAN style="font-weight: 400">But you can also migrate the data by custom approach for example by CSV import of all data into SAP SuccessFactors Employee Central. Which in turn can cause problems while replicating master data back to SAP S/4HANA.</SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Why not using an SAP infoporter tool can cause problems?</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="font-weight: 400">When we use the standard SAP infoporter tool for migration of data from SAP S/4HANA to SAP SuccessFactors Employee Central, all the employees that we migrate from SAP S/4HANA to SAP SuccessFactors Employee Central will have their PERNR ( employee id / userId) stored in a Employee Key mapping table (ECPAO_EE_KMAP). So that when we run the replication of all employees from SAP SuccessFactors Employee Central to SAP S/4HANA, the existing PERNR are utilized instead of assigning new PERNR.&nbsp;</SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="font-weight: 400">If you do not use the standard approach for migration of data then the Employee Key mapping table would not get populated. When we run the replication of all employees from&nbsp; SAP SuccessFactors Employee Central to SAP S/4HANA, all the employees will try to create a new PERNR in SAP S/4HANA. But for employees that already exist in SAP S/4HANA with the same PERNR, the replication process would throw an error that says “person already hired”.&nbsp;</SPAN><BR /> <BR /> <SPAN style="font-weight: 400">Now you are not trying to rehire the employee but still you are getting this error. This is because when the system is checking for the PERNR in employee key mapping table (ECPAO_EE_KMAP), it does not find it so the program considers it as a new employee so it tries to hire it in the system but since the employee already exist in the system, it will resist and hence throw the error “person already hired” ( as shown in screenshot below).</SPAN><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/06/Untitled-1.jpeg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Error person already hired</P><BR /> <SPAN style="font-weight: 400"><STRONG>Resolution:</STRONG>&nbsp;</SPAN><BR /> <BR /> <SPAN style="font-weight: 400">Now that you have used a custom approach to migrate the data from SAP S/4HANA to SAP SuccessFactors Employee Central and you do not have any entries in employee key mapping table (ECPAO_EE_KMAP) for the existing employees in SAP S/4HANA, you would have to populate the ECPAO_EE_KMAP table for all the employees that already exist in SAP S/4HANA.</SPAN><BR /> <BR /> <SPAN style="font-weight: 400">Since there is no standard report for this, you would need to create a custom report to fill this data in the ECPAO_EE_KMAP table. You can check the table in transaction se16 and then search for ECPAO_EE_KMAP table.</SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="font-weight: 400">Now try to replicate the employee master data, you will no longer get the error “person already hired”.</SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Conclusion:</STRONG><BR /> <BR /> In this article, we can conclude that we should always follow the standard approach (Infoporter) while migrating data from SAP S/4HANA system to SAP SuccessFactors Employee Central. But if you have already followed the custom approach, we still have a work around as given in this blog.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Similar articles:</STRONG><BR /> <BR /> <A href="https://userapps.support.sap.com/sap/support/knowledge/en/2758271" target="test_blank" rel="noopener noreferrer">https://userapps.support.sap.com/sap/support/knowledge/en/2758271</A><BR /> <BR /> <A href="https://answers.sap.com/questions/209772/employee-key-mapping-from-ec-to-sap.html" target="test_blank" rel="noopener noreferrer">https://answers.sap.com/questions/209772/employee-key-mapping-from-ec-to-sap.html</A><BR /> <BR /> &nbsp;<BR /> <BR /> Thank you for reading this blog. Please comment if you have any queries, also share your valuable feedbacks.<BR /> <BR /> &nbsp;<BR /> <BR /> Thank you,<BR /> <BR /> Zainab Fatima 2023-06-11T09:29:51+02:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/how-to-provide-developer-access-key-object-keys-in-sap/ba-p/13561909 How to provide Developer Access Key/ Object Keys in SAP 2023-06-19T15:44:50+02:00 former_member778236 https://community.sap.com/t5/user/viewprofilepage/user-id/778236 <DIV><BR /> <BR /> My Second Blog post!<BR /> <BR /> In this blog, I will explain on how to generate developer keys or object access keys &amp; also explain on the below topics:<BR /> <UL><BR /> <LI>What is Developer Key</LI><BR /> <LI>What is Object Key</LI><BR /> <LI>Which table stores them?</LI><BR /> </UL><BR /> <STRONG>Developer Key:</STRONG><BR /> <BR /> Developer key is required to register user as developer in SAP service marketplace so that they perform customization in SAP system. Whenever developer try to create and changes program (or) object, it will ask to enter developer key to perform the changes.<BR /> <BR /> There are two types of objects:<BR /> <UL><BR /> <LI>Repository Objects</LI><BR /> <LI>Customer specific objects</LI><BR /> </UL><BR /> Changing a repository object requires you both Developer Key and Object Key (also called as Object Access Key, Developer Access Key).<BR /> <BR /> <STRONG>Object Access Key:</STRONG><BR /> <BR /> For every object you change it will ask for an <STRONG>Object Access key</STRONG>, with which can change SAP source or SAP dictionary object; this task is in general done by Basis team. User sends a request to Basis team for generating the key.<BR /> <BR /> <STRONG>Note: In some cases, security team provides Developer access key or object key.</STRONG><BR /> <BR /> The developer key is issued by SAP for an individual developer user account, and Object access keys are issued for the development object that needs to be changed.<BR /> <BR /> However, changing a program /object starting Z* i.e. customer specific object, you just need a developer key.<BR /> <BR /> It can be access in Service Market Place at&nbsp;<A href="http://service.sap.com/sscr" target="_blank" rel="noopener noreferrer">http://service.sap.com/sscr</A><BR /> <BR /> </DIV><BR /> <DIV></DIV><BR /> <DIV><STRONG>Steps to register developer key:</STRONG></DIV><BR /> <DIV></DIV><BR /> <DIV>1. Select&nbsp; <STRONG>Launch the SCCR Application,&nbsp;</STRONG>a new dialog box appears to enter S-User ID &amp; password. Security/basis people will logon with their S-User ID credentials.</DIV><BR /> <DIV></DIV><BR /> <DIV>2. On the left pane--&gt; you will see the option&nbsp;<STRONG>Developer--&gt;&nbsp;</STRONG>click on developer.</DIV><BR /> <DIV></DIV><BR /> <DIV>3. On the below right screen, you will see an option to register developer. Click on&nbsp;<STRONG>Register&nbsp;</STRONG>button. A pop-screen will appear.</DIV><BR /> <DIV></DIV><BR /> <DIV>4. Enter the user ID, whose ID needs to registered as a developer &amp; in the below tab select the SAP system installation number.</DIV><BR /> <DIV></DIV><BR /> <DIV>5. SAP installation number can be find from SAP system --&gt;<STRONG>status screen.</STRONG></DIV><BR /> <DIV></DIV><BR /> <DIV>6.Once the details are filled, click on submit to complete the process.</DIV><BR /> <DIV></DIV><BR /> <DIV>7. You will get a message on top screen that the developer is register successfully &amp; you can see the developer key in the message. copy &amp; provide these details with the user.</DIV><BR /> <DIV></DIV><BR /> <DIV>Developer access key details are stored in a&nbsp;<STRONG>DEVACCESS&nbsp;</STRONG>table if user is already registered as a developer for a particular SAP system.</DIV><BR /> <DIV>Execute SE16 t-code --&gt; enter the table&nbsp;<STRONG>DEVACCESS--&gt;&nbsp;</STRONG>Enter the User ID &amp; execute to see the DEV key details for the user.</DIV><BR /> <DIV></DIV><BR /> <DIV><STRONG>Steps to register Object key:</STRONG></DIV><BR /> <DIV><BR /> <DIV>1. Select&nbsp; <STRONG>Launch the SCCR Application,&nbsp;</STRONG>a new dialog box appears to enter S-User ID &amp; password. Security/basis people will logon with their S-User ID credentials.</DIV><BR /> <DIV></DIV><BR /> <DIV>2. On the left pane--&gt; you will see the option&nbsp;<STRONG>Objects--&gt; </STRONG>click on object button.</DIV><BR /> <DIV></DIV><BR /> <DIV>3. On the below right screen, you will see an option to register object keys. Click on <STRONG>Register&nbsp;</STRONG>button. A pop-screen will appear.</DIV><BR /> <DIV></DIV><BR /> <DIV>4. Enter the Basis release details, Program ID, Type &amp; Object name details received from user &amp; select the installation number.</DIV><BR /> <DIV></DIV><BR /> <DIV>5. SAP installation number can be find from SAP system --&gt;<STRONG>status screen.</STRONG></DIV><BR /> <DIV></DIV><BR /> <DIV>6.Once the details are filled, click on submit to complete the process.</DIV><BR /> <DIV></DIV><BR /> <DIV>7. You will get a message on top screen that the Object key is register successfully &amp; you can see the <STRONG>object key</STRONG> in the message. copy &amp; provide these details with the user.</DIV><BR /> </DIV><BR /> <DIV></DIV><BR /> <DIV><STRONG>Tables storing them:</STRONG></DIV><BR /> <DIV><BR /> <DIV></DIV><BR /> <DIV>Developer access key details are stored in a&nbsp;<STRONG>DEVACCESS&nbsp;</STRONG>table if user is already registered as a developer for a particular SAP system.</DIV><BR /> <DIV></DIV><BR /> <DIV>Execute SE16 t-code --&gt; enter the table&nbsp;<STRONG>ADIRACCESS--&gt; </STRONG>Enter the Program ID, Type &amp; Object name &amp; execute to see the DEV key details for the user.</DIV><BR /> </DIV><BR /> <DIV></DIV><BR /> <DIV><EM><A href="https://launchpad.support.sap.com/#/notes/2501703" target="_blank" rel="noopener noreferrer">2501703</A>&nbsp;- Frequently asked questions about SAP Software Change Registration (SSCR)</EM></DIV><BR /> <DIV><BR /> <BR /> I hope in this blog you have learned what is a developer key or object access key, the steps to generate them &amp; the tables storing them.<BR /> <BR /> In case you have any queries, leave a comment below. I will help you.<BR /> <BR /> Or you can post your questions in our community <A href="https://answers.sap.com/tags/01200615320800000659" target="_blank" rel="noopener noreferrer">Ask Questions</A><BR /> <BR /> </DIV> 2023-06-19T15:44:50+02:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/what-is-condition-update-in-sap-sd/ba-p/13578396 What is Condition Update in SAP SD 2023-08-12T16:36:00+02:00 meghnadwivedi https://community.sap.com/t5/user/viewprofilepage/user-id/665152 <P id="f24b" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">As an SAP SD consultant, I come across many such magical configurations and settings after analyzing the screens day in and day out. Here are my findings for all SAP Consultants out there, making their life easier.</P><BR /> <P id="303a" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">So, today we are going to talk about the use of "Condition Update" in SAP SD. This is one of the most commonly asked questions in SAP SD Interviews too.</P><BR /> <P data-selectable-paragraph="">Pre-req: You should be well aware of SAP SD Pricing Procedure configuration and assignment.</P><BR /> <P id="356c" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">What does every SAP Consultant know?</P><BR /> <P data-selectable-paragraph="">"Condition Update" is one of the characteristics of "Condition Type" that helps control discounts. It lets us set limits on how much discount or how many orders can get a particular discount. It's useful to manage discounts and make sure they are used the way we want.</P><BR /> <P data-selectable-paragraph="">Now what is Condition Type? Condition type is an element assigned to each category of pricing element while setting up the pricing. For eg: Freight, Discount, Surcharge, Tax, List Price, Min Order Charge, etc are all different type of pricing elements that sums up to reach the final price for a product. These are all Condition Types. Enough of condition type! (Tcode: V/06) Can we get back to the original topic? CONDITION UPDATE!</P><BR /> <P data-selectable-paragraph="">So, the condition update is a boolean attribute that can be checked or unchecked in the Condition Type configuration screen. This attribute sets a limit on Condition type based on the below restrictions:</P><BR /> <BR /> <OL><BR /> <LI>Maximum Cond. Value</LI><BR /> <LI>Maximum Number of Sales Orders</LI><BR /> <LI>Maximum Cond. Base Value</LI><BR /> </OL><BR /> If either of the above settings is maintained then the condition type would behave according to it. If Max. cond. value is reached then the condition type would not trigger an additional discount.<BR /> <P data-selectable-paragraph="">Which information do SAP Consultants miss out on?</P><BR /> <P data-selectable-paragraph="">Well, all of the above makes sense, but how does it work in action? How system identifies that the above condition type is not applicable anymore as it had a "condition update" setup as per either of the three criteria?</P><BR /> <P data-selectable-paragraph="">Let's dive deeper.</P><BR /> <P data-selectable-paragraph="">Condition Update in action:</P><BR /> As we enable this "Condition Update" configuration in the condition type config screen, its impact would be visible while maintaining the condition record (Tcode: VK13). Each condition record created for the above condition type would have the option to set up any of the below three condition update settings.<BR /> <BR /> <STRONG>Maximum Condition Value:</STRONG><BR /> <BR /> For Example: if we set up a Maximum Condition Value of 100 Euros in the discount condition record for a discount condition type, that means this condition type would be triggered in orders and show the corresponding discount condition value till the maximum discount of 100 Euros is not reached. If the discount condition value comes out to be more than 100 Euros, then the discount condition value will reflect a maximum discount of 100 Euros only and not the expected discount of 125 Euros.<BR /> <BR /> MRP of Heater: 100 Eu<BR /> <TABLE style="border-collapse: collapse;width: 167pt" width="222"><BR /> <TBODY><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="width: 84pt;height: 15.0pt" width="112" height="20">Discount scheme</TD><BR /> <TD class="xl16" style="width: 83pt" width="110">25 Eu per heater</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15.0pt" height="20">Max Cond. Value</TD><BR /> <TD class="xl16">100 Eu</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <TABLE style="border-collapse: collapse;width: 368pt" width="491"><BR /> <TBODY><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="width: 84pt;height: 15.0pt" width="112" height="20">Transactions</TD><BR /> <TD class="xl16" style="width: 48pt" width="64">Prod</TD><BR /> <TD class="xl16" style="width: 48pt" width="64">Qty</TD><BR /> <TD class="xl16" style="width: 48pt" width="64">MRP</TD><BR /> <TD class="xl67" style="width: 48pt" width="64">Discount</TD><BR /> <TD class="xl16" style="width: 92pt" width="123">Expected Discount</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15.0pt" height="20">Order 1</TD><BR /> <TD class="xl16">Heater</TD><BR /> <TD class="xl16" align="right">5</TD><BR /> <TD class="xl16" align="right">500</TD><BR /> <TD class="xl67" align="right">100</TD><BR /> <TD class="xl68" align="right"><EM><STRONG>125</STRONG></EM></TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15.0pt" height="20">Order 2</TD><BR /> <TD class="xl16">Heater</TD><BR /> <TD class="xl16" align="right">2</TD><BR /> <TD class="xl16" align="right">200</TD><BR /> <TD class="xl67" align="right">50</TD><BR /> <TD class="xl69" align="right">50</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <BR /> Real-time scenario: If you buy a heater from us, you will get a discount of 2000 per piece maximum of up to 10000 Rs.<BR /> <BR /> <STRONG>Maximum Number of sales orders:</STRONG><BR /> <BR /> For Example: If the Maximum Number of sales orders = 2 for X001 condition type.<BR /> <BR /> The condition type X001 would not trigger from the 3rd order onwards which would have otherwise expected.<BR /> <TABLE style="border-collapse: collapse;width: 170pt" width="227"><BR /> <TBODY><BR /> <TR style="height: 18.75pt"><BR /> <TD class="xl16" style="width: 88pt;height: 18.75pt" width="117" height="25">Discount Scheme</TD><BR /> <TD class="xl16" style="width: 83pt" width="110">25% per heater</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15.0pt" height="20">Max no. of orders</TD><BR /> <TD class="xl16" align="right">2</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <TABLE style="border-collapse: collapse;width: 368pt" width="491"><BR /> <TBODY><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="width: 84pt;height: 15.0pt" width="112" height="20">Transactions</TD><BR /> <TD class="xl16" style="width: 48pt" width="64">Prod</TD><BR /> <TD class="xl16" style="width: 48pt" width="64">Qty</TD><BR /> <TD class="xl16" style="width: 48pt" width="64">MRP</TD><BR /> <TD class="xl67" style="width: 48pt" width="64">Discount</TD><BR /> <TD class="xl16" style="width: 92pt" width="123">Expected Discount</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15.0pt" height="20">Order 1</TD><BR /> <TD class="xl16">Heater</TD><BR /> <TD class="xl16" align="right">5</TD><BR /> <TD class="xl16" align="right">500</TD><BR /> <TD class="xl67" align="right">125</TD><BR /> <TD class="xl68" align="right">125</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15.0pt" height="20">Order 2</TD><BR /> <TD class="xl16">Heater</TD><BR /> <TD class="xl16" align="right">2</TD><BR /> <TD class="xl16" align="right">200</TD><BR /> <TD class="xl67" align="right">50</TD><BR /> <TD class="xl69" align="right">50</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15.0pt" height="20">Order 3</TD><BR /> <TD class="xl16">Heater</TD><BR /> <TD class="xl16" align="right">1</TD><BR /> <TD class="xl16" align="right">100</TD><BR /> <TD class="xl67" align="right">0</TD><BR /> <TD class="xl69" align="right"><EM><STRONG>25</STRONG></EM></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <BR /> Real-time scenario: 50% discount for the first three orders.<BR /> <BR /> <STRONG>Maximum Cond. Base Value:&nbsp;</STRONG><BR /> <BR /> It is named as Base value but it is actually a quantity indicator.<BR /> <BR /> For Example: If we set up a Maximum Cond. base Value of 10 Each for a discount condition type X001. That means this condition type would be triggered in orders and show the corresponding discount till the maximum discount of 10 quantities of that line item is not reached. If the quantity comes out to be more than 10 Each, then the discount condition value will reflect a maximum discount of 10 quantities only and not what is otherwise expected.<BR /> <TABLE style="border-collapse: collapse;width: 411px;height: 60px" width="331"><BR /> <TBODY><BR /> <TR style="height: 18.75pt"><BR /> <TD class="xl16" style="width: 181px;height: 18.75pt" height="25">Discount Scheme</TD><BR /> <TD class="xl16" style="width: 264px">10 Eu Discount per heater for 10 heaters</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15pt;width: 181px" height="20">Max Cond. Base value</TD><BR /> <TD class="xl16" style="width: 264px" align="right">10</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <TABLE style="border-collapse: collapse;width: 368pt" width="491"><BR /> <TBODY><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="width: 112px;height: 15pt" width="112" height="20">Transactions</TD><BR /> <TD class="xl16" style="width: 65px" width="64">Prod</TD><BR /> <TD class="xl16" style="width: 63px" width="64">Qty</TD><BR /> <TD class="xl16" style="width: 64px" width="64">MRP</TD><BR /> <TD class="xl67" style="width: 66px" width="64">Discount</TD><BR /> <TD class="xl16" style="width: 183px" width="123">Expected Discount</TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15pt;width: 112px" height="20">Order 1</TD><BR /> <TD class="xl16" style="width: 65px">Heater</TD><BR /> <TD class="xl16" style="width: 63px" align="right">12</TD><BR /> <TD class="xl16" style="width: 64px" align="right">1200</TD><BR /> <TD class="xl67" style="width: 66px" align="right">100</TD><BR /> <TD class="xl68" style="width: 183px" align="right"><EM><STRONG>120</STRONG></EM></TD><BR /> </TR><BR /> <TR style="height: 15.0pt"><BR /> <TD class="xl16" style="height: 15pt;width: 112px" height="20">Order 2</TD><BR /> <TD class="xl16" style="width: 65px">Heater</TD><BR /> <TD class="xl16" style="width: 63px" align="right">5</TD><BR /> <TD class="xl16" style="width: 64px" align="right">500</TD><BR /> <TD class="xl67" style="width: 66px" align="right">50</TD><BR /> <TD class="xl69" style="width: 183px" align="right">50</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <BR /> Real-time scenario: If you buy a laptop from us, you will get Rs.1000 discount per laptop for the first 4 quantities.<BR /> <BR /> Now how system remembers these updates like 9 quantities are ordered and now only 1 more quantity can have a discount. Post that, stop giving discounts. That is stored in an info structure: S071 (Tcode: OMO1, Table: S071). Orders containing that condition type (with condition update) would be recorded in this info structure and the same record would keep updating and help determine the restriction during sales order creation.<BR /> <BR /> Wait a sec, What is info structure? How it's different than regular tables? Well! info structure is again a table but is maintained for a different purpose. This table is created for operative purposes, that stores data along with frequency. Three main fields of info structure are period units, characteristics, and key figures. Period stores frequency like a day week, month, etc, and characteristic is master data that stores data like plant, company code. etc and key figures store transactional data like sales volume, value, etc. Want to know more? click <A href="https://blogs.sap.com/2013/05/31/information-structures-in-sap/" target="_blank" rel="noopener noreferrer">here</A>.<BR /> <BR /> Key Pointers:<BR /> <OL><BR /> <LI>This config. is generally used during NPI (New Product introduction) when the seller tries to increase product adoption. So, you might not find it used often.</LI><BR /> <LI>For percentage condition types (like K007), Maximum Cond. Base Value - Condition Update setting is not present as a parameter to restrict condition types.</LI><BR /> <LI>SAP Gap: SAP ECC allows only "01"-"03" as input for the "Maximum Number of Orders" field. For more than that, additional ABAP changes (code changes) would be required.</LI><BR /> <LI>Generally, "Maximum Cond. Value" is utilized for providing discounts. So when you maintain it in the VK13 condition record, make sure you input "-" minus along with the amount and unit of measurement as well.</LI><BR /> <LI>"Maximum Number of sales orders" is generally used for the condition types where "Calculation type" is equal to a percentage (Calcul. Type: A).</LI><BR /> <LI>"Maximum Cond. Base Value" does not work for the condition types where "Calculation type" is equal to a percentage (Calcul. Type: A).</LI><BR /> <LI>Pricing Tables-fields: Maximum Cond. Value = KONP-KOMXWRT, Maximum No. of Orders = KONP-ANZAUF, Maximum Cond. Base Value = MXKBAS.</LI><BR /> </OL><BR /> <P id="44fb" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">I hope this will help you. Please leave comments in case I missed anything.</P><BR /> <P id="d6c3" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">Thank you.</P><BR /> <P id="82a3" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">Happy learning <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></P> 2023-08-12T16:36:00+02:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/what-is-sales-area-in-sap-sd/ba-p/13578941 What is Sales Area in SAP SD? 2023-08-15T11:22:18+02:00 meghnadwivedi https://community.sap.com/t5/user/viewprofilepage/user-id/665152 This is probably the first thing you learn when you start with SAP SD Module. I know there are many articles, blogs, and videos on this topic and you probably would think what else this article is going to offer?<BR /> <BR /> Well! Stay with me for a few more minutes.<BR /> <BR /> Let's start with:<BR /> <BR /> What does every SAP Consultant know?<BR /> <BR /> In simple terms, Sales Area = Sales Org + Dist. Channel + Division. We maintain this assignment in SPRO.<BR /> <BR /> By definition, Sales Area is a combination of three organizational units that define customer and material reach. It excludes non-required or unfeasible combinations of different organizational units. It looks pretty simple, but what if I tell you have missed a lot of things?<BR /> <BR /> Components of Sales Area:<BR /> <BR /> Sales Org: It is an organization unit that sells, distributes, and negotiates terms of sales for products.<BR /> <BR /> Distribution Channel: This is a channel via which products/services reach customers. For e.g.: Retail, Online, E-commerce, and direct sales.<BR /> <BR /> Division: It is a grouping of broad categories of products in one organization unit. For every division, you can make customer-specific agreements on, for example, partial deliveries, pricing, and terms of payment.<BR /> <BR /> Which information do SAP Consultants miss out on?<BR /> <BR /> The Sales Area assignment sets the base of your ERP Implementation. Most of the companies which are already on SAP ERP have this assignment in place and would rarely change it. The scenario where a company would need a new Sales Area assignment would be during introducing a new Distribution Channel or introducing a new division of products.<BR /> <BR /> Sales Area is more than just an assignment. We should define sales areas considering a lot of factors like Pricing Strategy, Legal observation, Business Practices, etc. It touches every point of the Order to Cash (OTC) cycle from quotation to revenue recognition. <SPAN style="font-size: 1rem">Let's dive deeper to understand how Sales Area and its associated data impacts on overall organization's ERP setup:</SPAN><BR /> <BR /> What all gets Influenced by the Sales Area:<BR /> <OL><BR /> <LI>Pricing: One of the most important impacts of the Sales Area is on product pricing strategies. We can maintain different product pricing in different Sales Areas. We can configure SAP Sales order pricing for the same product &amp; customer based on <STRONG>Sales Area.&nbsp;</STRONG></LI><BR /> <LI>Master Data Defaults: There are some sales region-specific attributes that should be present in the system prior to successful order processing. We store all these customer-specific attributes in Customer Master Data (Tcode: VD03) and material-specific attributes in Material Master Data (Tcode: MM03) under Sales Area Specific section. If plan to create only Sale Area but you see a lot of multi-valued attributes and you cannot fit them all under one sales area, then probably you should go back and check if you need to create one more sales area? Some examples of these attributes are: Customer Group, Sales District, Default Currency, Terms of payment, Invoicing Dates, Shipping conditions, Delivery priority, Business Partners, Material Group, Unit of measurement, Tax settings, etc. This information gets defaulted in the sales order as per your selection of Sales Area but can be modified in the sales order manually if needed. Remember, changing important parameters like tax setting, and incoterm in sales orders will re-trigger the order pricing.</LI><BR /> <LI>Reporting: Sales Area is your first differentiator in all your business reports. Be it sales orders created in the past month, or orders invoiced in the past year, sales area becomes one of the most important factors for business reports.</LI><BR /> <LI>Sales Order Processing: Each sales order you process in SAP requires Sales Area as a pre-requisite. So when you provide a sales area, you narrow down the region &amp; rules in which customers and materials should transact.</LI><BR /> <LI>Shipping &amp; Deliveries: You would say that shipping point determination is determined based on the storage location, delivering Plant, and loading group. So the Sales area is not directly involved. However, one attribute, "Delivering Plant" is determined from Master Data - Sales Area tab. Delivery attributes for the same customer may vary for each sales region and hence we should have sales area data as an umbrella to hold all sales region-specific master data attributes.</LI><BR /> <LI>Credit Management: Credit limits, exposure, and risk categories may vary per sales region.</LI><BR /> <LI>Localization<STRONG>:</STRONG> Sales Area Data allows localization of sales operations, considering local business practices, languages, and legal requirements.</LI><BR /> <LI>Compliance and Legal Requirements: Different sales areas might have unique legal and compliance requirements, which can be managed effectively through sales area data.</LI><BR /> <LI>Listings &amp; Exclusions (L&amp;E): When any organization receives an order to produce a product exclusive to a particular client, then they would have to hide that product from other clients. In that case, you use the L&amp;E feature in SAP. This feature allows you to set the rules based on Sales Area.</LI><BR /> <LI>Intercompany Sales: This is an internal sale between two wings of the same company. In this scenario, the purchasing company should be extended to the Sales Area of the Selling Company.</LI><BR /> </OL><BR /> Remember: Once you create Sales Area Data in Customer or Material Master, you can not delete it.<BR /> <P id="44fb" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">I hope this will give you a holistic perspective.</P><BR /> <P class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">For Sure, I am missing many more such Sales Area dependencies. Please add them to the comments.</P><BR /> <P id="82a3" class="pw-post-body-paragraph abw abx wu nj b aby abz aca acb acc acd ace acf mt acg ach aci my acj ack acl nd acm acn aco acp jy bp" data-selectable-paragraph="">Happy learning&nbsp;<span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></P> 2023-08-15T11:22:18+02:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-8-repository-organization-working-with-abapgit-abaplint-open-abap/ba-p/13562086 abap2UI5 - (8) Repository Organization: Working with abapGit, abaplint & open-abap 2023-08-21T08:07:06+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 8 of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A>&nbsp;</STRONG>— an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> This post delves into the repository organization of abap2UI5 and its utilization of <STRONG><A href="https://github.com/" target="_blank" rel="nofollow noopener noreferrer">GitHub</A></STRONG>, <STRONG><A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer">abapGit</A></STRONG>, <STRONG><A href="https://abaplint.org/" target="_blank" rel="nofollow noopener noreferrer">abaplint</A></STRONG> and <STRONG><A href="https://github.com/open-abap" target="_blank" rel="nofollow noopener noreferrer">open-abap</A></STRONG>. In my prior experience, I was mainly working on projects following classic CTS and only occasionally using abapGit to pull in open-source projects. However, this project offered a valuable opportunity to understand how to establish a thoroughly tested Git repository for the ABAP community, and it was a great learning experience! While seasoned ABAP developers might be familiar with these tools, my aim is to introduce them to those less acquainted with them.<BR /> <BR /> <STRONG>This post will lead you through the abap2UI5 repository setup, step by step, beginning with abapGit, and then progressively introducing additional settings and tools.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on&nbsp;<STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub</A>&nbsp;</STRONG>and stay up-to-date by following on&nbsp;<STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter.</A></STRONG>&nbsp;Also, make sure to explore the other articles in this blog series.<BR /> <TABLE border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px">(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> This post covers the following areas:<BR /> <OL><BR /> <LI>Git - GitHub &amp; abapGit</LI><BR /> <LI>GitHub - Working with Separated Branches</LI><BR /> <LI>abaplint - Syntax Check &amp; Code Compatibility</LI><BR /> <LI>abaplint - Static Code Analysis</LI><BR /> <LI>abaplint - Quickfixes</LI><BR /> <LI>abaplint - Cross Checks</LI><BR /> <LI>abaplint - Dashboard</LI><BR /> <LI>GitHub - Contribution with Forks &amp; Pull Requests</LI><BR /> <LI>GitHub - Branch Protection</LI><BR /> <LI>open-abap - Downport Functionality</LI><BR /> <LI>open-abap - Unit Testing</LI><BR /> <LI>open-abap - abap2UI5-web</LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Let’s begin with the first topic.<BR /> <H3 id="toc-hId-1092051902"><STRONG>1. Git - GitHub &amp; abapGit</STRONG></H3><BR /> The codebase of abap2UI5 is version-controlled in a public Git repository on <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="nofollow noopener noreferrer"><STRONG>GitHub</STRONG>.</A> This means that the code is not managed on an SAP system, as is typically done with ABAP projects and from where it can be transported to other systems. Instead, it is centrally stored in a public repository, allowing the current state of the project to be accessible at any time to everyone and installable on any system:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.41.20.png" height="225" width="386" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Public Repository of abap2UI5</P><BR /> Before making changes, the current code state is initially pulled (downloaded) onto a private ABAP system and after implementing the changes, the updated code is always pushed back to the public GitHub repository. The current coding state on the ABAP system is thus used solely as temporary storage:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-20-um-21.47.09.png" height="136" width="462" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Code Changes of the public abap2UI5 repository</P><BR /> And the leading and authoritative code version is the one stored on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.43.43.png" height="209" width="391" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/z2ui5_cl_fw_app_hello_world.clas.abap" target="_blank" rel="nofollow noopener noreferrer">Source Code</A></STRONG> of abap2UI5</P><BR /> In addition to public accessibility, this approach offers the advantage that the entire project exists independently of an ABAP system, and changes can be developed periodically on various systems, such as shared ABAP Cloud Trial, ABAP Dev Edition, or S/4. For instance, a significant portion of the project was created using the shared ABAP Cloud Trial on which you cannot guarantee that no one will modify your code or that your changes won't be removed after a few days. But storing the code on GitHub solves this concern.<BR /> <BR /> Furthermore, all the features of GitHub can now be utilized. To highlight just two examples, take a closer look at the <STRONG><A href="https://github.com/abap2UI5/abap2UI5/issues" target="_blank" rel="nofollow noopener noreferrer">issue management</A></STRONG>:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.50.10.png" height="240" width="421" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Overview of Issues</P><BR /> Or tracking code changes with the <STRONG><A href="https://github.com/abap2UI5/abap2UI5/commits/main" target="_blank" rel="nofollow noopener noreferrer">commit history</A></STRONG>:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.51.49.png" height="236" width="410" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Commit History</P><BR /> This significantly enhances the transparency of the entire project! Changes can be retraced, actual problems are documented in issues, new requirements can be collected and evaluated. This is only possible because of the open-source project <STRONG><A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer">abapGit</A></STRONG>, which integrates every ABAP system from version 702 and higher with GitHub.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.53.33.png" height="89" width="299" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abapGit - Git Client for ABAP</P><BR /> If you're new to Git and <STRONG><A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer">abapGit</A></STRONG>, the following <STRONG><A href="https://blogs.sap.com/2017/06/21/abapgit-so-easy/" target="_blank" rel="noopener noreferrer">blog post</A></STRONG> is a good starting point. A big thank you to this excellent tool and and the <STRONG><A href="https://abapgit.org/sponsor.html" target="_blank" rel="nofollow noopener noreferrer">team</A></STRONG> behind it.<BR /> <H3 class="p1" id="toc-hId-895538397"><STRONG>2. GitHub - Working with Separated Branches</STRONG></H3><BR /> Given this setup, a question arises: what happens when I pause my work and fail to complete my current task? It's possible that I've just begun making a change but have been unable to test and finish it, which leaves the code in an incomplete state. Pushing this into the main branch would result in a scenario where everyone could potentially download a non-functional abap2UI5 version containing errors.<BR /> <BR /> To address this, the code within each git repository can be segmented into multiple branches. For simplicity, we'll only divide the repository into two branches now. The initial repository stands as our main branch, housing the latest functioning "stable" version and remains available for others to download. The second branch assumes the role of a <STRONG><A href="https://github.com/abap2UI5/abap2UI5/tree/_dev" target="_blank" rel="nofollow noopener noreferrer">development branch</A></STRONG> ("dev"), which is a duplicate of the code and is intended for active changes:<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-09.55.56.png" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Separated Development Branch for working on a New Feature</P><BR /> The "dev" branch contains the changes until the new feature is ready. Upon completion, it is merged into the main branch with a Pull Request (PR), making the feature accessible to everyone:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.18.06.png" height="250" width="433" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub Pull Request - Incorporating Changes from the Dev Branch into the Main Branch</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-09.57.39.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Repository after Merge - Both Branches Now Contain the Updated Source Code</P><BR /> As you can see the separate branch ensures that only finalized and tested features find their way into the main branch.<BR /> <H3 id="toc-hId-699024892"><STRONG>3. abaplint - Syntax Check and Code Compatibility</STRONG></H3><BR /> But how can we guarantee that the code we push to the main branch, tested on one system, will function across all the other ABAP systems it's downloaded to?<BR /> <BR /> As previously mentioned, a significant portion of abap2UI5 is developed on a shared ABAP Cloud Trial System, containing types and functions that are unavailable on lower releases like NetWeaver v7.50. Additionally, there are two language flavors: 'Standard ABAP' and 'ABAP for Cloud,' both requiring consideration. Fortunately, the open-source project <A href="https://abaplint.org/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abaplint</STRONG></A> addresses these concerns:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.26.15.png" height="237" width="354" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Static Code Analysis</P><BR /> The tool <A href="https://abaplint.org/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abaplint</STRONG></A> can be setup in various ways; in the case of abap2UI5, it is used as a GitHub Addon:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.28.06.png" height="107" width="408" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Installation as a GitHub Add-on</P><BR /> For the project-specific setup, simply add an&nbsp;<STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/abaplint.jsonc" target="_blank" rel="nofollow noopener noreferrer">abaplint.json</A></STRONG> file to the repository. This file contains all settings and is structured as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.29.32.png" height="178" width="324" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/abaplint.jsonc" target="_blank" rel="nofollow noopener noreferrer">Configuration</A></STRONG> via abaplint.json</P><BR /> First we aim to ensure that the written code is executable down to Netweaver version 7.50 by configuring the following option in line 12:<BR /> <PRE class="language-javascript"><CODE> "syntax": {<BR /> "version": "v750",</CODE></PRE><BR /> You can choose the version that suits your needs. With this setup, abaplint now checks the source code after each change, ensuring syntax validity down to ABAP v7.50:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.40.19.png" height="208" width="455" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Checking the ABAP code</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.40.53.png" height="166" width="456" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Identifying Incompatible Syntax</P><BR /> In this case we used the "cmis_string" type, which is unavailable in NetWeaver 7.50 and causing findings:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.41.03.png" height="245" width="447" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Detailed Overview of Identified Issues</P><BR /> These checks provide us with the opportunity to address issues before they are integrated into the main branch and preventing potential problems during the installation on other systems. This serves as an aid in identifying mistakes at an early stage and reduces significantly the effort required to solve them. After fixing the error, abaplint performs another check:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.44.03.png" height="172" width="480" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Checks Passed Succesfully</P><BR /> This time, no issues are found anymore, and the code changes can be merged into the main branch with confidence it'll function on any release down to NW 7.50. The setup now appears as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.02.19.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Setup - Repository with abaplint Syntax Check for Different ABAP Systems</P><BR /> But this was just the beginning; abaplint is more than only a syntax checking tool to regain control over all the different ABAP releases and language flavors (although this alone would be impressive enough) -- it is a static code analysis tool with a lot of more possibilities, which we'll delve into next.<BR /> <H3 id="toc-hId-502511387"><STRONG>4. abaplint - Static Code Analysis</STRONG></H3><BR /> When developing new features, static code checks play a significant role in enhancing code quality. We can achieve this using abaplint and have access to over 159 distinct rules. You can check them <A href="https://rules.abaplint.org/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here</STRONG>:</A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.59.58.png" height="417" width="379" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Rules for Static Code Analysis</P><BR /> The <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/36c4c10101df018e1e374ba6ff7d91156573c571/abaplint.jsonc#L16" target="_blank" rel="nofollow noopener noreferrer">configuration</A></STRONG> file shows which ones are activated for the project:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-20.01.36.png" height="202" width="355" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Rule Configuration via Package.json</P><BR /> For example, classic checks like "no database access in loops" <A href="https://rules.abaplint.org/db_operation_in_loop/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>(here)</STRONG></A>:<BR /> <PRE class="language-javascript"><CODE> "db_operation_in_loop": true,</CODE></PRE><BR /> Or <A href="https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md" target="_blank" rel="nofollow noopener noreferrer"><STRONG>ABAP Style Guideline</STRONG></A>-influenced recommendations, such as better boolean usage <STRONG><A href="https://rules.abaplint.org/prefer_xsdbool/" target="_blank" rel="nofollow noopener noreferrer">(here):</A></STRONG><BR /> <PRE class="language-javascript"><CODE> "prefer_xsdbool": true,</CODE></PRE><BR /> Checks for unused variables and types (in cases where we might have overlooked this in Eclipse)<A href="https://rules.abaplint.org/unused_variables/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>(here)</STRONG></A>:<BR /> <PRE class="language-javascript"><CODE> "unused_types": true,<BR /> "unused_variables": {<BR /> "severity": "Error",<BR /> "exclude": ["z2ui5_cl_fw_utility.clas.testclasses.abap"],<BR /> "skipNames": ["lv_dummy", "i_mv_editor"]<BR /> },</CODE></PRE><BR /> Analyses of the overall code complexity of functions, for example the <STRONG><A href="https://www.mathworks.com/discovery/cyclomatic-complexity.html#:~:text=Cyclomatic%20complexity%20metrics%20are%20an%20important%20indicator%20of%20your%20source,and%20other%20code%20complexity%20metrics." target="_blank" rel="nofollow noopener noreferrer">cyclomatic complexity</A> <A href="https://rules.abaplint.org/cyclomatic_complexity/" target="_blank" rel="nofollow noopener noreferrer">(here)</A>:</STRONG><BR /> <PRE class="language-javascript"><CODE>"cyclomatic_complexity": {<BR /> "exclude": [],<BR /> "severity": "Error",<BR /> "max": 20<BR /> }</CODE></PRE><BR /> Or checks enhancing readibilty, like avoiding 'exporting' in method calls <A href="https://rules.abaplint.org/exporting/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>(here)</STRONG></A>:<BR /> <PRE class="language-javascript"><CODE>"exporting" : true</CODE></PRE><BR /> I recommend reviewing all of these rules; some are vital for quality maintenance, while others suit personal or project-specific needs. Collectively, they elevate the codebase significantly. With activated rules and abaplint as a GitHub AddOn, the code is checked now with each push to the main branch:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.08.21.png" height="208" width="433" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Pull Request successfully checked with abaplint</P><BR /> Of course, this isn't a guarantee that everything will function flawlessly, but it does provide a robust additional safeguard. The project setup appears with this as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.05.00.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">abap2UI5 Setup - Repository Organization with Static Code Checks using abaplint</P><BR /> But why not perform this directly in Eclipse and conduct static code analysis with ATC? One downside is that ATC checks are system-dependent, which means that if I want to make changes today on system A and continue tomorrow on system B, I have to set up ATC again. This can also pose challenges when different people on various systems collaborate. With abaplint, we can carry out centralized static code checks at the repository level on GitHub, which is a significant advantage over ATC.<BR /> <H3 id="toc-hId-305997882"><STRONG>5. abaplint - Quickfixes</STRONG></H3><BR /> Abaplint also provides Quickfixes as we know them from ATC. They are accessible directly on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.25.32.png" height="268" width="363" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Quickfixes on GitHub</P><BR /> Alternatively, they can be accessed via the command line. In the following example, we use GitHub Spaces. After installing abaplint, we can add a new check and execute automated Quickfixes:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/afix01-1.gif" height="296" width="512" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Installation and Automated Quickfixes (Part I)</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/afix02.gif" height="298" width="516" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Installation and Automated Quickfixes (Part II)</P><BR /> In this case, a fix is added to remove double spaces (more complex fixes are also available). You can observe abaplint's code adjustments:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-12-um-19.27.19.png" height="286" width="497" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Code Adjusted by abaplint</P><BR /> Lastly, we simply need to merge these modifications back into the _dev branch concluding the process -- everything only takes a few moments. Visit the <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="nofollow noopener noreferrer">repository</A></STRONG> and explore for yourself! Begin by initiating a new GitHub Codespace and executing the following commands in the terminal:<BR /> <OL><BR /> <LI>Install the abaplint CLI globally by running:<BR /> <PRE class="language-javascript"><CODE>npm install @abaplint/cli -g</CODE></PRE><BR /> </LI><BR /> <LI>Perform automated code fixing by entering:<BR /> <DIV><BR /> <DIV><BR /> <PRE class="language-javascript"><CODE>abaplint --fix</CODE></PRE><BR /> </DIV><BR /> </DIV></LI><BR /> </OL><BR /> But might we be encompassing functionalities that are also offered, for example, by <A href="https://github.com/SAP/abap-cleaner" target="_blank" rel="nofollow noopener noreferrer"><STRONG>ABAP Cleaner</STRONG></A>? While ABAP Cleaner is unquestionably a valuable tool, abaplint boasts a multitude of capabilities beyond code verification and aesthetics, as we'll explore further later on. But the reason I once again prefer abaplint is because of its project-level configuration on GitHub, which eliminates the requirement to install and set up a local Eclipse AddOn (a step that would also be necessary for everyone undertaking a code modification) which saves a lot of time.<BR /> <BR /> For further information on setting up abaplint you can also check out this<STRONG><A href="https://blogs.sap.com/2023/02/16/getting-started-with-abaplint/" target="_blank" rel="noopener noreferrer"> blog post</A></STRONG> and now let's delve into another very useful feature of this tool: its cross-checks.<BR /> <H3 id="toc-hId-109484377"><STRONG>6. abaplint - Cross Checks</STRONG></H3><BR /> The <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples" target="_blank" rel="nofollow noopener noreferrer">abap2UI5-samples</A></STRONG> repository depends on artifacts from abap2UI5. For example, when both are installed on an ABAP server, syntax checks verify method calls and API compatibility. But how to manage these dependencies when both repositories are on GitHub, and changes occur independently in different systems? The abaplint Cross Check offers a solution for this. Project dependencies can be customized in the abalint.json file of each repository, as demonstrated <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/f71a3419afbc19bf899a340a1ba60ac88df404e6/abaplint.jsonc#L12" target="_blank" rel="nofollow noopener noreferrer">here:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-13-um-17.35.01.png" height="201" width="461" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Define Dependencies</P><BR /> Now, modifying a method in the main abap2UI5 repository automatic triggers checks for syntax compatibility of the samples repository. To illustrate, we change the importing parameters of an abap2UI5 method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-15-um-08.26.21.png" height="118" width="376" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Incompatible Code Change in the Main Repository</P><BR /> Attempting to update the abap2UI5 main branch with a PR now encounters abaplint cross-check failures and triggers errors:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-15-um-08.24.40.png" height="221" width="462" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Cross Check Failures due to Missing Importing Parameter used by the Samples Repository</P><BR /> The more apps utilizing abap2UI5, the harder managing dependencies gets. Cross-checks significantly assist in handling this complexity. If you have a GitHub project using abap2UI5, set up abaplint and customize a dependency to abap2UI5. This way, you will receive early warnings about incompatible changes. The repository configuration is now as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.32.50.png" height="203" width="514" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Setup - Repository with abaplint Cross-Checks</P><BR /> For more details about cross-checks, refer also to this <STRONG><A href="https://blogs.sap.com/2022/05/03/cross-repository-syntax-check-before-merge/" target="_blank" rel="noopener noreferrer">blog post.</A></STRONG><BR /> <H3 id="toc-hId--87029128"><STRONG>7. abaplint - Dashboard</STRONG></H3><BR /> Abaplint is powerful, with much more to explore, while we only focused on a few aspects. For a good overview of all features you can also take a look at the <STRONG><A href="https://abaplint.app/stats" target="_blank" rel="nofollow noopener noreferrer">dashboards</A></STRONG> of public ABAP projects using abaplint:<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR><BR /> <TD style="width: 50%"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.30.51.png" /></TD><BR /> <TD style="width: 50%"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.31.04.png" /></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 50%"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.31.48.png" /></TD><BR /> <TD style="width: 50%"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.32.23.png" /></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> All these charts and statistics provide a comprehensive and transparent overview of the code quality of each project. This can also help you make informed decisions when you are uncertain about public repositories and whether you want to download it or not.<BR /> <H3 id="toc-hId--283542633"><STRONG>8. GitHub - Contribution with Forks &amp; Pull Requests</STRONG></H3><BR /> Abap2UI5 is open source and developed alongside other projects or during free time. Contributions to this project are greatly appreciated, check out this <STRONG><A href="https://github.com/abap2UI5/abap2UI5-documentation/blob/main/CONTRIBUTING.md" target="_blank" rel="nofollow noopener noreferrer">contribution guideline.</A></STRONG> But what happens when someone wants to make a modification to the actual source code of the project? In this case they can create a Fork of the repository, obtaining a personal copy of the complete repository to implement changes:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-14.38.16.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Create a new Fork</P><BR /> Upon completion, they open a Pull Request, notifying the abap2UI5 repository owner about the change:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Unbenanntes-Bild.png" height="219" width="507" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Create a Pull Request from a new Fork</P><BR /> The changes can now be reviewed by the repository owner and additionally abaplint runs its checks. Very useful: The PR creator is also promptly notified about the abaplint results upon opening the PR:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Unbenanntes-Bild2.png" height="274" width="435" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - abaplint checks Pull Requests</P><BR /> On this way the contributor gains access to all the essential information regarding the required Code Standards of the project and is enabled to improve the code of the Pull Request also by himself. The inclusion of abaplint checks on GitHub streamlines this contribution process and significantly reduces coordination efforts. The whole setup appears now as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-15-um-08.00.29.png" height="229" width="414" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Setup - Contribution with Forks</P><BR /> Check out all Forks of abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5/forks" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG> and see who already contributed to the project <STRONG><A href="https://github.com/abap2UI5/abap2UI5/graphs/contributors" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <H3 id="toc-hId--480056138"><STRONG>9. GitHub - Branch Protection</STRONG></H3><BR /> When collaborating, another feature enhances teamwork. All abaplint checks configured thus far (syntax check, static code checks, cross checks) can be made mandatory. This prevents accidental pushing of changes to the main branch or bypassing these tests. This feature is provided by GitHub's branch protection rules:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.55.36.png" height="180" width="341" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub - Setup Branch Protection Rules</P><BR /> Now, merging is deactivated until all tests run successfully, and the repository setup appears as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.05.38.png" height="258" width="477" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Setup - Repository with Branch Protection</P><BR /> <BR /> <H3 id="toc-hId--676569643"><STRONG>10. open-abap - Unit Testing</STRONG></H3><BR /> Now, returning to code quality: Good code quality encompasses more than just static checks&nbsp; and one important aspect we haven't examined yet are unit tests. ABAP unit tests are typically executed on the ABAP Server (initiated through Eclipse or a background job):<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-09.02.10.png" height="123" width="434" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Unit Tests running on an ABAP Server</P><BR /> But how do we ensure Pull Request submitters perform unit tests, confirming their changes are well-tested? Therefore, in addition to conducting static code checks, it is essential to run unit tests on GitHub as well. The challenge lies in being able to run these tests in a non-ABAP environment and automating this process.<BR /> To achieve automation, we can leverage GitHub Actions and for running unit tests we can use the open-source project <STRONG><A href="https://github.com/open-abap" target="_blank" rel="nofollow noopener noreferrer">open-abap</A>:</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.12.16.png" height="106" width="502" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">open-abap - Any platform ABAP, serverless ABAP, ABAP on Node.js</P><BR /> Open-abap transpiles ABAP code into JavaScript, enabling its execution on a Node.js server. This capability permits us to run unit tests on Node.js directly on GitHub within a GitHub Action. The configuration for this action looks like <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/_dev/.github/workflows/test.yml" target="_blank" rel="nofollow noopener noreferrer">this:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.19.46.png" height="264" width="442" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">GitHub Action - Unit Tests with open-abap</P><BR /> With each code change the unit tests are now running as you can see for example <STRONG><A href="https://github.com/abap2UI5/abap2UI5/actions/runs/5848523872/job/15855913768?pr=483" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.21.41.png" height="248" width="426" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub Action - Running Unit Tests with open-abap</P><BR /> This feature is truly remarkable! It decouples the entire testing process from any specific ABAP server and ensures that only thoroughly tested code makes its way to the main branch. The project setup is as follows now:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.24.33.png" height="258" width="457" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Setup - Running Unit Tests with open-abap</P><BR /> <BR /> <H3 id="toc-hId--948314517"><STRONG>11. abaplint - Downport Functionality</STRONG></H3><BR /> After configuring multiple static checks and unit tests, we now circle back to where we began: Syntax checking for different systems. While we have ensured compatibility down to ABAP 750, let's now delve into what I consider one of abaplint's most valuable features: its downport functionality.<BR /> <BR /> It's somewhat discreetly accessible as a quick fix, yet it holds a strong functionality playing a significant importance for the project. This function facilitates automatic downporting from higher releases to lower ones. In practical terms, this means we can maintain the main branch using 750 syntax with all its new language features, while still ensuring the project remains installable on an ABAP 702 system through abaplint's downport capability.<BR /> <BR /> The function can be executed by adjusting the syntax to 702 in the abaplint configuration and then initiating the downport via automated quickfixes. You can see a demonstration here:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/gif_downport_01.gif" height="260" width="450" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Downporting 7.50 Syntax down to 7.02 Syntax (Part I)</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/gif_downport_2.gif" height="263" width="455" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint - Downporting 7.50 Syntax down to 7.02 Syntax (Part II)</P><BR /> Check the <STRONG><A href="https://github.com/abap2UI5/abap2UI5-downport" target="_blank" rel="nofollow noopener noreferrer">downport repository</A></STRONG> to see that all new language features are downported to compatible 702 syntax:<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR style="height: 288px"><BR /> <TD style="width: 50%;height: 288px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.38.59.png" /></TD><BR /> <TD style="width: 50%;height: 288px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.38.06.png" /></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 50%;height: 14px">Before: 7.50 Syntax</TD><BR /> <TD style="width: 50%;height: 14px">After: 7.02 Syntax</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> Furthermore, to eliminate manual effort, this process can be also automated using a GitHub Action, similar to what we have already employed for unit tests. We establish an additional <STRONG><A href="https://github.com/abap2UI5/abap2UI5-downport" target="_blank" rel="nofollow noopener noreferrer">downport repository</A></STRONG> that automatically receives updates with every code change from the abap2UI5 main branch. The GitHub Action responsible for this task is configured&nbsp;<STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/.github/workflows/build_downport.yaml" target="_blank" rel="nofollow noopener noreferrer">here:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.43.17.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">GitHub Action - Automated Downporting with abaplint</P><BR /> <P style="overflow: hidden;margin-bottom: 0px">And the downported code is stored <STRONG><A href="https://github.com/abap2UI5/abap2UI5-downport" target="_blank" rel="nofollow noopener noreferrer">here:</A><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.44.48.png" /></STRONG></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Downport Repository</P><BR /> This is once again an impressive feature! Attempting to downport every abap2UI5 version manually would remain unfeasible especially in a hobby-like project. And beginning development entirely in 702 would render the code quite challenging to understand and maintain (not to mention, it would also be unenjoyable to write).<BR /> <BR /> Ultimately, we add now one final GitHub Action which tests and guarantees the error-free downportability of the code before merging it into the main branch. As a result, the definitive setup for abap2UI5 is as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.46.26.png" height="320" width="566" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Setup - Final Configuration</P><BR /> <BR /> <H3 id="toc-hId--1144828022"><STRONG>12. abap2UI5-web with </STRONG><STRONG>open-abap</STRONG></H3><BR /> Details of the tools' inner workings are beyond this article's scope. Essentially, during unit tests, code is initially downported to version 702 and transpiled to JavaScript. It's then executed on a Node.js server. However, if it's executable there, why not directly use Node.js to use abap2UI5?<BR /> <BR /> As a final showcase, let's turn our attention to the project <STRONG><A href="https://github.com/larshp/abap2ui5-web" target="_blank" rel="nofollow noopener noreferrer">abap2UI5-web</A></STRONG>, which demonstrates the capabilities of all the tools we've utilized in this blog post. In this project, the complete abap2UI5 source code is transpiled and executed on a Node.js server. This enables the launch of abap2UI5 apps directly from GitHub Codespaces without any reliance on an ABAP server.<BR /> <BR /> Don't miss to try this out yourself! Simply navigate to the <STRONG><A href="https://github.com/larshp/abap2ui5-web" target="_blank" rel="nofollow noopener noreferrer">repository</A></STRONG> and initiate a new GitHub Codespace. Then, open a new terminal and execute the following commands:<BR /> <PRE class="language-javascript"><CODE>npm install<BR /> npm test</CODE></PRE><BR /> And that's it! You can now try abap2UI5 apps on a Node.js server. Explore this final demonstration:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/a2ui5-web_01.gif" height="276" width="478" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5-web - Running abap2UI5 on Node.js (Part I)</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/a2ui5-web_02.gif" height="273" width="472" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5-web - Running abap2UI5 on Node.js (Part II)</P><BR /> The ABAP Server is now entirely bypassed! Regard this as an experiment, yet it underscores the potential that these tools hold for the future. Can we also create UIs in ABAP using browser based <STRONG><A href="https://sapui5.hana.ondemand.com/#/liveEditor" target="_blank" rel="nofollow noopener noreferrer">playgrounds</A></STRONG> similar to those found in UI5? The capability to directly modify and execute ABAP code in a browser is still available as you can try <STRONG><A href="https://transpiler.abaplint.org/" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG> and <STRONG><A href="https://playground.abaplint.org/" target="_blank" rel="nofollow noopener noreferrer">here:</A><BR /> </STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-16-um-12.29.13.png" height="158" width="400" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">ABAP Code transpiled to JavaScript <STRONG><A href="https://transpiler.abaplint.org/" target="_blank" rel="nofollow noopener noreferrer">(Demo)</A></STRONG></P><BR /> <BR /> <H3 id="toc-hId--1341341527"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-16-um-12.28.52.png" height="234" width="396" /></H3><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abaplint running on open-abap <STRONG><A href="https://playground.abaplint.org/" target="_blank" rel="nofollow noopener noreferrer">(Demo)</A></STRONG></P><BR /> If you want to learn more about this topic, check out this <STRONG><A href="https://blogs.sap.com/2022/02/04/writing-multitarget-abap-applications/" target="_blank" rel="noopener noreferrer">blog post.</A></STRONG><BR /> <H3 id="toc-hId--1537855032"><STRONG>13. Conclusion</STRONG></H3><BR /> This concludes the journey through the tooling utilized by abap2UI5. As you have likely gathered from this article, I am truly impressed! I never anticipated such seamless integration of these tools (abapGit, abaplint, open-abap) with ABAP, a language deeply intertwined with SAP's proprietary environments and solutions (SE80, ADT, CTS or gCTS).<BR /> <BR /> Going the open-source way and configuring these tools on GitHub for an ABAP project has been an enlightening experience! Many thanks to <STRONG><SPAN class="mention-scrubbed">lars.hvam</SPAN></STRONG> for the exceptional work and support in setting this up, as well as to all other contributors who have played a role in developing these tools. <span class="lia-unicode-emoji" title=":folded_hands:">🙏</span><BR /> <BR /> Their continuous efforts over the years in developing these tools have not only made organizing an ABAP Project on GitHub possible but have also elevated Static Code Checks and DevOps to a very high standard. Attempting to achieve all of this without these tools or solely on an ABAP Server would have required much more effort (or maybe even been impossible).<BR /> <BR /> I hope that this article sparked your interest and motivated you to give these tools a try. Perhaps you now also want to manage your upcoming ABAP project with abapGit and abaplint? Feel free to share your ideas and experiences, or if there's something I missed out on, I welcome your insights.<BR /> <BR /> In the <STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">next part</A>,</STRONG> we'll explore various new features added over recent months to abap2UI5.<BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, leave a comment or create an&nbsp;<STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG>. 2023-08-21T08:07:06+02:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-9-update-i-community-feedback-new-features-september-2023/ba-p/13561966 abap2UI5 - (9) Update I: Community Feedback & New Features - September 2023 2023-09-11T07:47:21+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 9 of this blog series introducing <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abap2UI5</STRONG></A> — an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>In the last few months, a bunch of new features – both big and small – have been added to abap2UI5. Some were in response to issues, some from pull requests and some were inspired by SAP UI5 documentation. These all work to further enhance the functionality of abap2UI5 – which we'll explore in this blog post.</STRONG><BR /> <BR /> We'll begin with tree controls and move on to partial rerendering with model updates &amp; nested views. Then we explore the use of dynamically created data models, for example, for importing CSVs. Additionally, we'll examine additional UI5 controls like Navigation Container, Gantt Charts, Planning Calendars, Message Managers, and extensions related to Excel Downloads and Generic Search Helps. Finally, we'll delve into a full demo app and explore the use of abap2UI5 in different ABAP extensibility scenarios.<BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on&nbsp;<STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub</A>&nbsp;</STRONG>and stay up-to-date by following on&nbsp;<STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter.</A></STRONG>&nbsp;Also, make sure to explore the other articles in this blog series.<BR /> <TABLE border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px">(9) Update I: Community Feedback &amp; New Features - Sep. 2023 (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> This post covers the following areas:<BR /> <OL><BR /> <LI>Tree Controls</LI><BR /> <LI>Partly View Rendering with Model Updates</LI><BR /> <LI>Partly View Rendering with Nested Views</LI><BR /> <LI>Displaying Dynamic Data with S-RTTI</LI><BR /> <LI>CSV Upload/Download</LI><BR /> <LI>Excel Upload/Download</LI><BR /> <LI>Navigation Container</LI><BR /> <LI>Visualization with Planning Calender, Gantt Charts and Process Flows</LI><BR /> <LI>Message Manager</LI><BR /> <LI>Generic Search Help</LI><BR /> <LI>Developer Code Challenge</LI><BR /> <LI>Demo &amp; Samples Repository</LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Let’s begin with the first topic.<BR /> <H3 id="toc-hId-1092030698"><STRONG>1. Tree Controls</STRONG></H3><BR /> In addition to displaying tables and lists, it is now also possible to use controls based on tree models. This enables the visualization of hierarchies:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-19-um-14.06.05.png" height="174" width="628" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Displaying UI5 Tree Controls</P><BR /> Among many other use cases, tree structures can also be used to create popups for selecting items:<BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/gif_popup_tree.gif" height="427" width="573" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Popup with Tree Control to Select an Item</P><BR /> To generate the output shown above, you need to define a nested structure in ABAP as follows:<BR /> <PRE class="language-abap"><CODE>TYPES: <BR /> BEGIN OF ts_tree_row_base,<BR /> object TYPE string,<BR /> col2 TYPE string,<BR /> col3 TYPE string,<BR /> col4 TYPE string,<BR /> END OF ts_tree_row_base.<BR /> <BR /> TYPES: <BR /> BEGIN OF ts_tree_level2.<BR /> INCLUDE TYPE ts_tree_row_base,<BR /> END OF ts_tree_level2.<BR /> <BR /> TYPES tt_tree_level2 TYPE STANDARD TABLE OF ts_tree_level2 WITH KEY object.<BR /> <BR /> TYPES:<BR /> BEGIN OF ts_tree_level1,<BR /> INCLUDE TYPE ts_tree_row_base,<BR /> categories TYPE tt_tree_level2.<BR /> END OF ts_tree_level1.<BR /> <BR /> TYPES tt_tree_level1 TYPE STANDARD TABLE OF ts_tree_level1 WITH KEY object.</CODE></PRE><BR /> And the <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.m.Tree" target="_blank" rel="nofollow noopener noreferrer">UI5 Tree Control</A></STRONG> is used in the view definition:<BR /> <PRE class="language-abap"><CODE>DATA(tab) = page-&gt;tree_table(<BR /> rows = `{path:'` &amp;&amp; client-&gt;_bind( val = mt_tree path = abap_true ) &amp;&amp; <BR /> `', parameters: {arrayNames:['CATEGORIES']}}` ).<BR /> tab-&gt;tree_columns( )-&gt;tree_column( label = 'Object'<BR /> )-&gt;tree_template(<BR /> )-&gt;text( text = '{OBJECT}')-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;tree_column( label = 'Column2'<BR /> )-&gt;tree_template(<BR /> )-&gt;text( text = '{COL2}')-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;tree_column( label = 'Column3'<BR /> )-&gt;tree_template(<BR /> )-&gt;text( text = '{COL3}')-&gt;get_parent( )-&gt;get_parent(<BR /> )-&gt;tree_column( label = 'Column4'<BR /> )-&gt;tree_template(<BR /> )-&gt;text( text = '{COL4}').</CODE></PRE><BR /> You can check the full source code of these examples <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_007.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A> </STRONG>and<STRONG> <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_068.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>Thank you to <STRONG><A href="https://github.com/axelmohnen" target="_blank" rel="nofollow noopener noreferrer">axelmohnen</A></STRONG> and <STRONG><A href="https://github.com/WegnerDan" target="_blank" rel="nofollow noopener noreferrer">WegnerDan</A></STRONG> for their contributions and examples in this direction.<BR /> <H3 class="p1" id="toc-hId-895517193"><STRONG>2. Partly View Rendering I (Model Update)</STRONG></H3><BR /> In the initial version of abap2UI5, the standard approach involved rerendering the entire view after each request. This approach can be beneficial when making full changes to the entire application or when the entire UI changes with a page transition. However, in cases where only specific entries in a table or the values of an input field need to change, repeatedly rerendering the entire view can result in an uncomfortable user experience. For example it disrupts the user's current focus and scroll position. Therefore, abap2UI5 has now been extended to allow updating only the view model and keeping the view stable during a backend request. Rerendering is now controlled by two different methods:<BR /> <OL><BR /> <LI>view_display - This method rerenders the entire view</LI><BR /> <LI>view_model_update - This method updates only the view model, and the UI5 framework will rerender only the affected controls<CODE></CODE></LI><BR /> </OL><BR /> Let's consider the following example: Initially, a new view is created with a table and a search field. Subsequently, with each input change, the backend sends the newly matching table, and only the table entries in the UI are rerendered. The rest of the UI remains stable and the focus also stays unchanged in the input field:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_filter.gif" height="349" width="617" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Model Update after Input Change</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_059.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>This becomes even more useful when you have a table and have scrolled to a certain position. Take a look at <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_028.clas.abap" target="_blank" rel="nofollow noopener noreferrer">this demo</A> </STRONG>where new entries are added to a table every few seconds, and the scroll position and focus remain unchanged:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_scroll.gif" height="348" width="615" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Stable Focus and Scroll Position after Backend Model Updates</P><BR /> As a general recommendation, it is advisable not to rerender the whole view unnecessarily, but only when it is required. While some UI5 Controls may need a complete rerendering, most cases can avoid it. However, it is essential to ensure that the entire view is rerendered after leaving or returning to an app. For this purpose, the event 'on_navigated' can now be checked, which is always true after an app navigation:<BR /> <PRE class="language-abap"><CODE>if client-&gt;get( )-check_on_navigated = abap_true.<BR /> "rerender the whole View<BR /> endif.</CODE></PRE><BR /> Next, let's explore another method for partial rerendering.<BR /> <H3 id="toc-hId-699003688"><STRONG>3. Partly View Rendering II (Nested Views)</STRONG></H3><BR /> Another approach for selectively rerendering views involves using nested views. This allows you to create, for example, a master-detail page. You can use two independent views displaying a tree control on the left side and another view with inputs and buttons on the right side. Take a look at <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_066.clas.abap" target="_blank" rel="nofollow noopener noreferrer">this example:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_master_detail.gif" height="356" width="628" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Master-Detail Layout with Nested Views</P><BR /> Many other use cases are possible. To mention just one more, you can display two tables and move entries from the left one to the right table:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_two_tabs.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Nested Views with Interacting Tables</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_097.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>The nested view is added to the main view with the following function:<BR /> <PRE class="language-abap"><CODE>client-&gt;nest_view_display(<BR /> val = lo_view_nested-&gt;stringify( )<BR /> id = `ParentView`<BR /> method_insert = 'addMidColumnPage'<BR /> method_destroy = 'removeAllMidColumnPages'<BR /> ).</CODE></PRE><BR /> And the methods to rerender the nested view are similar to the ones of the main view:<BR /> <OL><BR /> <LI>nest_view_display - This method rerenders the entire nested view</LI><BR /> <LI>nest_view_model_update - This method updates only the view model, and the UI5 framework will rerender only the affected controls in the nested view</LI><BR /> </OL><BR /> A big thank you to <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG> for the example and testing abap2UI5 with nested views.<BR /> <H3 id="toc-hId-502490183"><STRONG>4. Displaying Generic Data References with S-RTTI</STRONG></H3><BR /> One common requirement in ABAP is displaying tables which are typed during runtime. Sometimes you only know during runtime which database table you need to display or have to create a table with RTTI depending on local created types. When it comes to ALVs, this is not a problem because you can also create field catalogs dynamically. Here the abap2UI5 approach reaches its limits because we serialize the app with XSLT after every request and unfortunately generic data references with locally created types cause XSLT errors during serialization:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-19-um-14.23.22.png" height="317" width="441" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">XSLT Serialization Error - Locally Created Types not supported</P><BR /> Fortunately the open source project <STRONG><A href="https://github.com/sandraros/S-RTTI" target="_blank" rel="nofollow noopener noreferrer">S-RTTI</A></STRONG> solves this problem:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-19-um-14.15.35.png" height="327" width="543" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Open Source Project S-RTTI</P><BR /> With S-RTTI, we can serialize and save the RTTI of every variable, enabling us to clear it at the end of each request. Then, with the next request, the variable is recreated again based on the S-RTTI information. When encountering XSLT errors, abap2UI5 now automatically checks if this framework is installed and uses S-RTTI for serialization. As a result, generic data references with locally created types can now be seamlessly used with abap2UI5. Many thanks to <STRONG><SPAN class="mention-scrubbed">sandra.rossi</SPAN></STRONG> for this idea and excellent <STRONG><A href="https://github.com/sandraros/S-RTTI" target="_blank" rel="nofollow noopener noreferrer">project.</A></STRONG><BR /> <H3 class="p1" id="toc-hId-305976678"><STRONG>5. CSV Upload &amp; Download</STRONG></H3><BR /> One compelling use case for the functionality described above is the import of tables via CSV. The following application reads the file and, based on its contents, creates an internal table with the data from the CSV. Finally, it displays the table in a UI5 Table Control. Take a look at this example:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_csv.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Upload CSV and Create Internal Table with its Content</P><BR /> By utilizing S-RTTI in combination with abap2UI5, only about 153 lines of ABAP are needed to fulfill this requirement. You can check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_074.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <H3 id="toc-hId-109463173"><STRONG>6. Excel Upload &amp; Download</STRONG></H3><BR /> Besides CSV, another common requirement is the use of Excel files, especially downloading internal tables as Excel files. In UI5, this is achieved using the <A href="https://sapui5.hana.ondemand.com/#/entity/sap.ui.export.Spreadsheet" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Spreadsheet Control</STRONG></A>. However, they rely on frontend JavaScript logic and are not usable without additional work in abap2UI5. Fortunately, <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG> contributed a custom control that encapsulates the frontend logic within a UI5 control, making it usable in a view definition of abap2UI5. Take a look at this example:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_excel.gif" height="280" width="501" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Excel Download via Custom Control</P><BR /> You can find the logic of the custom control <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/z2ui5_cl_xml_view.clas.abap#L5137" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG> and the source code of the demo <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_077.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>This approach combines JavaScript Logic at the frontend with ABAP Logic at the backend. Thank you <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG> for this extension.<BR /> <BR /> Another approach for handling Excel files could be to keep the entire logic in the backend and send and receive only the final file to the frontend, similar to what we did with the CSV. You can achieve this by using the project <A href="https://github.com/abap2xlsx/abap2xlsx" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abap2xlsx</STRONG></A> combined with abap2UI5. Currently, there is no working Excel functionality usable in both language versions ('ABAP for Cloud' and 'Standard ABAP'), but maybe in the future, there will be a chance for this, allowing for the entire logic to be held in ABAP without the need for extra JavaScript or the use of UI5 Spreadsheet Controls (pure ABAP <span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:">😍</span>). Feel free to support this idea <STRONG><A href="https://blogs.sap.com/2023/07/18/abap-excel-why-cant-we-just-have-something-nice/" target="_blank" rel="noopener noreferrer">here.</A></STRONG><BR /> <BR /> Next let's explore some more UI5 Controls.<BR /> <H3 class="p1" id="toc-hId--87050332"><STRONG>7. Navigation Container</STRONG></H3><BR /> First we take a look at the <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/api/sap.m.NavContainer" target="_blank" rel="nofollow noopener noreferrer">UI5 Navigation Container</A></STRONG>. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_nav_cont.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - nav container</P><BR /> You can find the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_088.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>. The Navigation Container allows you to structure your output with multiple views, switching between them using an event. You can achieve this behavior by calling the following method in abap2UI5:<BR /> <PRE class="language-abap"><CODE>client-&gt;_event_client( val = 'NAV_TO' t_arg = VALUE #( ( `NavCon` ) ( mv_selected_key ) ) ).</CODE></PRE><BR /> Furthermore, a lot of new controls for visualization are available.<BR /> <H3 id="toc-hId--283563837"><STRONG>8. Visualization with Planning Calender, Gantt Chart and Process Flow</STRONG></H3><BR /> Look for example at this demo with <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.gantt.simple.GanttChartWithTable" target="_blank" rel="nofollow noopener noreferrer">UI5 Gantt Charts:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/Bildschirmfoto-2023-09-06-um-14.08.53.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Gantt Chart</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_076.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>Or the <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.m.PlanningCalendar" target="_blank" rel="nofollow noopener noreferrer">UI5 Planning Calender:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/Bildschirmfoto-2023-09-06-um-14.09.06.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Planning Calender</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_080.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>And the <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.suite.ui.commons.ProcessFlow" target="_blank" rel="nofollow noopener noreferrer">UI5 Process Flow:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/Bildschirmfoto-2023-09-06-um-14.09.20.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Process Flow</P><BR /> Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_091.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>All of these controls assist in visualizing your data in a format other than a table or list. Thank you <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG> for these extensions.<BR /> <H3 id="toc-hId--480077342"><STRONG>9. Message Manager</STRONG></H3><BR /> Message Handling can be done in UI5 with the <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/api/sap.ui.core.message.MessageManager" target="_blank" rel="nofollow noopener noreferrer">Message Manager.</A></STRONG> Depending an input field types it is automatically filled with message and the output is seamlessly integrated to the UI. Look at this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_message_manager.gif" height="343" width="614" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Message Manager</P><BR /> In abap2UI5, you can now add messages, delete messages, or read its messages. Thank you <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG> for the demo, you can find the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_084.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <H3 class="p1" id="toc-hId--676590847"><STRONG>10. Generic Search Help</STRONG></H3><BR /> When users input data, in addition to the message manager, search helps are a valuable assistance to fill input fields. While, of course, with abap2UI5, you have the capability to create your own popups and develop search helps manually, wouldn't it be nice to leverage the search helps that are still available in the ABAP System?<BR /> <BR /> Fortunately, <STRONG><A href="https://github.com/axelmohnen" target="_blank" rel="nofollow noopener noreferrer">axelmohnen</A></STRONG> put in some effort and created an initial approach in the form of a generic Search Help Popup App. This app reads the standard SAP Search help and generates an abap2UI5 Popup from it, reminiscent of the previous SAP GUI popups:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_search.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Generic Search Help (Activated DDIC Objects)</P><BR /> As an example the demo above shows the search help for all activated Dictionary Objects. Check out the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_105.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A> </STRONG>and the generic popup app <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_104.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A> </STRONG>Of course, there is still some work to do, but even now it shows how easily you can work with generic typed tables and generic created popups in abap2UI5. Once again, the open-source project S-RTTI is used for realizing generic serialization. Thank you a lot <STRONG><A href="https://github.com/axelmohnen" target="_blank" rel="nofollow noopener noreferrer">axelmohnen</A></STRONG> for your contribution and for sharing this idea.<BR /> <H3 id="toc-hId--948335721"><STRONG>11. Developer Code Challenge</STRONG></H3><BR /> During the <STRONG><A href="https://blogs.sap.com/2023/05/10/sap-developer-code-challenge-open-source-abap/" target="_blank" rel="noopener noreferrer">SAP ABAP Developer Challenge</A></STRONG> last May,&nbsp;abap2UI5 was used to create text adventure games based on <STRONG><A href="https://github.com/Ennowulff/axage" target="_blank" rel="nofollow noopener noreferrer">Axage</A></STRONG> by <STRONG><SPAN class="mention-scrubbed">enno.wulff</SPAN></STRONG>. One particularly remarkable solution was developed by <SPAN class="mention-scrubbed">jacques.nomssi</SPAN>, which includes images, text areas, input controls and many more. Look at this solution:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/thequest_view.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Open-Source Axage with Magical World in ABAP</P><BR /> For more information about this project, you can refer to his blog post about the "Magical World in ABAP" <A href="https://blogs.sap.com/2023/07/09/discover-a-magical-world-in-abap/" target="_blank" rel="noopener noreferrer"><STRONG>here</STRONG></A>. He also has developed an abap2UI5 version of his <STRONG><A href="https://blogs.sap.com/2018/02/01/announcing-the-abap-scheme-workbench/" target="_blank" rel="noopener noreferrer">ABAP Scheme</A></STRONG> project. Thank you <SPAN class="mention-scrubbed">jacques.nomssi</SPAN><BR /> <H3 id="toc-hId--1144849226"><STRONG>12. Demo &amp; Sample Repository</STRONG></H3><BR /> Let's conclude the blog post with a complete demo where we can see that by combining a variety of controls, we are able to create apps with comprehensive functionality. This demo showcases tables, item navigation, rating indicators, pictures, text areas, search functionalities, and many more features:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_demo.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Complete Demo</P><BR /> The source code is a bit more complex, as you can see <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_085.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG> However, it shows that creating more intricate apps is also possible. While abap2UI5 apps only implement a single method of an interface, you can easily also further encapsulate your apps to manage the growing logic of your views and controller. A big thank you to <A href="https://github.com/Th0masMa" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Th0masMa</STRONG></A> for this great demo!<BR /> <BR /> All code snippets and demos in the blog series are collected in the <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/tree/main" target="_blank" rel="nofollow noopener noreferrer">abap2UI5 samples repository:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gut.png" height="549" width="446" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Samples</P><BR /> Feel free to explore it; the code snippets can be quickly copied &amp; pasted and are ready-to-use for your own development.<BR /> <H3 id="toc-hId--1341362731"><STRONG>13. Conclusion</STRONG></H3><BR /> This concludes the update on the functionalities of abap2UI5. Feel free to try out the new features in your own abap2UI5 apps, and should you encounter any problems, please don’t hesitate to open an <STRONG><A href="https://github.com/abap2UI5/abap2UI5/issues" target="_blank" rel="nofollow noopener noreferrer">issue</A></STRONG>. Many of the new functionalities have been developed in response to issues raised in the past months. This proactive approach helps to identify areas where additional functionality is needed and it makes sense to extend abap2UI5.<BR /> <BR /> I also encourage everyone to contribute to the project by submitting pull requests or expanding the samples repository. With abap2UI5, copying &amp; pasting apps or functionalities is straightforward, so the more publicly available code snippets exist, the easier it gets to create apps with abap2UI5. Therefore, if you create your own app, also consider sharing it via a public git repository or as a pull request to the samples repository. Up until now, the number of samples has grown to nearly 100, which was only possible with the help of contributors from the ABAP community. <span class="lia-unicode-emoji" title=":folded_hands:">🙏</span><BR /> <BR /> In the<STRONG>&nbsp;<A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">next part</A>,</STRONG> we will extend abap2UI5 with external libraries.<BR /> <DIV><BR /> <DIV><BR /> <DIV><BR /> <BR /> Thank you for reading! Your questions, comments and wishes for this project are always welcome, leave a comment or create an&nbsp;<STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue.</A></STRONG><BR /> <BR /> </DIV><BR /> </DIV><BR /> </DIV> 2023-09-11T07:47:21+02:00 https://community.sap.com/t5/human-capital-management-blogs-by-members/creation-and-mapping-of-a-new-pay-group-from-successfactors-to-the-s-4/ba-p/13573657 Creation and mapping of a new pay group from SuccessFactors to the S/4 system in SAP 2023-11-02T15:53:12+01:00 aravind2 https://community.sap.com/t5/user/viewprofilepage/user-id/170198 <P style="color: #252525;text-align: justify">Dear all,</P><BR /> <P style="color: #252525;text-align: justify">In this blog, I am discussing the creation and mapping of a new pay group from SuccessFactors to the SAP S/4 system. I will be explaining each step of the process, from creating a new pay group in SF to mapping to the S/4 system, followed by the data replication process.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px;color: #252525;text-align: justify"><STRONG style="color: #252525">1. Creating a new pay group in SuccessFactors</STRONG></P><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px;color: #252525;text-align: justify">In manage data, create a new pay group with your preference. It is recommended to have two digits as an external code for your pay group. Once the pay group external code is provided, enter the description and set the status to active. Parallelly, enter the payment frequency as per your requirement. Finally, map the legal entity for which this pay group you are creating and save it. Below is the screenshot attached for your reference.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-11-1.png" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-9-2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Pay group creation and mapping a legal entity</P><BR /> &nbsp;<BR /> <P style="color: #252525;text-align: justify"><STRONG style="color: #252525">2. Creating a payroll area in the SAP S/4 system</STRONG></P><BR /> <P style="overflow: hidden;margin-bottom: 0px;color: #252525;text-align: justify">Go to: SPRO--IMG--Personnel Management--Personnel Administration--Organisational Data--Organisational Assignment--Create a payroll area.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-10-2.png" height="24" width="535" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px;text-align: left">Once the payroll area is created in the S/4 system, we need to <STRONG style="color: #252525">allow data replication from EC for payroll areas in correction phase</STRONG>. So, even if your payroll control is in the correction phase, it would not affect your data replication. The below step is the way to enable this functionality.</P><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-6-1.png" height="200" width="466" /><BR /> <P style="overflow: hidden;margin-bottom: 0px;text-align: center"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-6-2.png" height="96" width="546" /><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-7-1.png" height="14" width="547" /><EM>Enabling data replication from EC for payroll areas in the correction phase</EM></P><BR /> &nbsp;<BR /> <BR /> In the above image, it is shown that the allow replication check box is enabled for my newly created payroll area. Do not forget to check this box.<BR /> <P style="overflow: hidden;margin-bottom: 0px;color: #252525;text-align: justify"><STRONG style="color: #252525">3. Mapping pay group to payroll area.</STRONG></P><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px;color: #252525;text-align: justify">After doing this step, the real mapping part begins. We need to map the pay group, which is created in SuccessFactors, to the payroll area, which is created in the SAP S/4 system.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px;color: #252525;text-align: justify">Go to SPRO--IMG--Personnel Management--Integration with SuccessFactors Employee Central--Business Integration Builder--Basic Settings--Define value mapping details and execute.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-8.png" height="312" width="422" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px">Then select the EC instance and value mapping entity as the pay group.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-4-3.png" height="220" width="496" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px">Enter the ERP key that you have created as a payroll area code in the SAP S/4 system and the EC key that you have created as a pay group external code in SF.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-4-2.png" height="54" width="554" /><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-5-2.png" height="24" width="556" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Mapping the ERP key to the EC key</P><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px;color: #252525;text-align: justify"><STRONG style="color: #252525">4. Create a payroll control record.</STRONG></P><BR /> &nbsp;<BR /> <P style="color: #252525;text-align: justify">Create a payroll control record for your newly created payroll area in PA03 T-code.</P><BR /> <P style="color: #252525;text-align: justify">Note: Make sure you have created a payroll control record first before starting a replication process from SuccessFactors to the SAP S/4 system.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/14-18.png" height="201" width="340" /></P><BR /> &nbsp;<BR /> <P style="color: #252525;text-align: justify"><STRONG style="color: #252525">5. Pay group change in SuccessFactors and replication of data.</STRONG></P><BR /> <P style="color: #252525;text-align: justify">After completing all the above processes, we need to upload the changes for the pay group for the required employees in SuccessFactors by navigating to import employee data. Download the compensation and job history templates and upload the compensation template first, followed by the job history template with the effective date.</P><BR /> <P style="color: #252525;text-align: justify">Note: Select incremental load for the additional changes, which will keep the previous records in the system. The full purge is for the fresh import, which will clear all the existing data. Based on your requirements, select your purge type. Do not forget to validate your file before importing it into the system.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-14.png" height="204" width="540" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px;text-align: left">You can run replication using the T-code <STRONG>ECPAO_EE_ORG_REPL_QUERY</STRONG>&nbsp;&nbsp;<STRONG>. </STRONG>If you are running replication for one employee, then enter the employee ID in the External Employee ID field, or else ignore that. Followed by selecting the enable payload logging and enable extended verbose logging check boxes and test mode if testing is required.</P><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/MicrosoftTeams-image-10-1.png" height="265" width="547" /></P><BR /> <P style="color: #252525;text-align: justify"><SPAN style="font-size: 1rem;color: #252525">By completing all those steps above, your payroll area will be updated in the SAP S/4 system. Now you are ready to run the payroll for those employees.</SPAN></P><BR /> <P style="color: #252525;text-align: justify">Thanks for referring to my blog. Keep supporting me in posting more blogs.</P><BR /> <P style="color: #252525;text-align: justify">Regards,<BR style="color: #252525" />Aravind R<BR style="color: #252525" />HXM consultant</P> 2023-11-02T15:53:12+01:00 https://community.sap.com/t5/technology-blogs-by-members/cds2alv-generate-alv-list-reports-for-cds-views/ba-p/13581380 cds2alv – Generate ALV list reports for CDS views 2023-11-21T00:27:44+01:00 chris_graw https://community.sap.com/t5/user/viewprofilepage/user-id/46033 Welcome to this blog post introducing <A href="https://github.com/rku-it-GmbH/cds2alv" target="_blank" rel="nofollow noopener noreferrer"><STRONG>cds2alv</STRONG></A>.<BR /> <BR /> <A href="https://github.com/rku-it-GmbH/cds2alv" target="_blank" rel="nofollow noopener noreferrer"><STRONG>cds2alv</STRONG></A> is an open source project offering a framework to generate ALV list reports for CDS Consumption Views similar to Fiori Elements. It was originally created as an environment to allow developers to learn CDS and SAP Fiori independently.<BR /> <BR /> It has since evolved into a tool for quickly creating monitoring transactions based on CDS and serves as an intermediate step in the transition from ALV list reports using ABAP SQL to SAP Fiori apps using CDS and OData.<BR /> <BR /> The project is available on <A href="https://github.com/rku-it-GmbH/cds2alv" target="_blank" rel="nofollow noopener noreferrer"><STRONG>GitHub</STRONG></A> and featured on <STRONG><A href="https://dotabap.org/" target="_blank" rel="nofollow noopener noreferrer">dotabap</A></STRONG>.<BR /> <H1 id="toc-hId-835706592">Features</H1><BR /> <UL><BR /> <LI><STRONG>Easy to learn:</STRONG> Report generation requires no further knowledge apart from CDS</LI><BR /> <LI><STRONG>Consistent User Experience:</STRONG> The generated reports share a common Look and Feel</LI><BR /> <LI><STRONG>Interactive:</STRONG> The generated reports support Intent-Based Navigation similar to SAP Fiori and BOPF actions</LI><BR /> <LI><STRONG>Future Ready:</STRONG> By Design, CDS views created to be used with this framework, can later be used as a basis for SAP Fiori Elements apps offering the same or similar functionality</LI><BR /> <LI><STRONG>Extensible:</STRONG> Reports can be enhanced by additional features that can be switched on or off for each view individually</LI><BR /> </UL><BR /> The project is to be installed using <A href="https://abapgit.org" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abapGit</STRONG></A>. For further information please refer to the <A href="https://github.com/rku-it-GmbH/cds2alv/blob/main/docs/installation_guide.md" target="_blank" rel="nofollow noopener noreferrer"><STRONG>installation guide</STRONG></A>. It is maintained on release R/3 NetWeaver AS ABAP 7.50, and it runs on S/4HANA On-Premise with minor adjustments.<BR /> <H1 id="toc-hId-639193087">Evolution</H1><BR /> The framework came to be as the result of several efforts to streamline and automate various repetitive tasks during the development process of list reports. The desire for this first arose in a project in late 2017. Over the course of this project several reports had the be developed, all of which featured almost the exact same selection screen, selection logic, ALV layout and event handling.<BR /> <BR /> In the end this led to the development of a custom ALV wrapper class with a simplified interface to allow efficient and uniform integration of ALV into custom reports and classes. The other three pain points, uniform treatment of selection screens, selection logic and event handling, remained unsolved for the time being.<BR /> <BR /> The next step towards a solution was the discovery of CDS and the Virtual Data Model (VDM). The Interface Views served as an elegant solution to the problem of reusable selection logic.<BR /> <BR /> Finally, the problem of finding a generic solution for selection screens and event handling could be solved using CDS annotations and Intent-Based Navigation, borrowing the respective solutions from SAP Fiori elements.<BR /> <BR /> The first version of cds2alv was finished in late 2021, but that version was still rather unpolished. Over the course of the last two years it was revised and refined to its present state.<BR /> <BR /> If you want to learn more about the tool‘s history and its underlying ideas, please check out my talk from the ABAPconf 2021 (in German language): <A href="https://www.youtube.com/watch?v=nWr6liYWbJ0" target="_blank" rel="nofollow noopener noreferrer"><STRONG>ABAPConf 2021</STRONG></A><BR /> <H1 id="toc-hId-442679582">Usage</H1><BR /> Reports are generated and executed via transaction code ZCDS_ALV_START. This transaction code works similarly to the classical SE16 transaction. Reports for specific CDS views can be made available individually by means of a parameter transaction.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/11/ZCDS_ALV_START.jpg" /></P><BR /> <P class="image_caption" style="font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif;text-align: left">Initial Screen of Transaction ZCDS_ALV_START</P><BR /> <BR /> <H1 id="toc-hId-246166077">Demo</H1><BR /> The repository contains a subfolder with a simple demo showcasing the basic features. Alternatively, the framework can also provide a demonstration by itself by using it to generate list reports for the framework’s own CDS views.<BR /> <H1 id="toc-hId-49652572">Development Process</H1><BR /> Using cd2alv, developing an ALV list report boils down to creating and annotating the CDS Consumption View and possibly defining a parameter transaction for individual use. An overview of <A href="https://github.com/rku-it-GmbH/cds2alv/blob/main/docs/annotations.md" target="_blank" rel="nofollow noopener noreferrer"><STRONG>supported annotations</STRONG></A> is given as part of the <A href="https://github.com/rku-it-GmbH/cds2alv/tree/main/docs" target="_blank" rel="nofollow noopener noreferrer"><STRONG>documentation</STRONG></A>.<BR /> <H1 id="toc-hId--146860933">Intent-Based Navigation</H1><BR /> There are several possible ways in which cds2alv can handle Intent-Based navigation:<BR /> <OL><BR /> <LI><STRONG>Individual implementation:</STRONG> Handling for a specific CDS view can be implemented using an exit class.</LI><BR /> <LI><STRONG>Standard implementation: </STRONG>Three options for reusable Handling are supported:<BR /> <OL><BR /> <LI><STRONG>Function Module:</STRONG> The value of a cell with in the ALV grid is passed as an importing parameter to a function module.</LI><BR /> <LI><STRONG>Business Object Method:</STRONG> The value of a cell is used as key value to instantiate a BOR object. Subsequently a method of this object is called.</LI><BR /> <LI><STRONG>Transaction call:</STRONG> The value of a cell is stored in a SET-/GET-Parameter, follow by calling a transaction.</LI><BR /> </OL><BR /> </LI><BR /> </OL><BR /> We plan to add support for static methods and instance methods of classes with public parameter-less constructors in the near future. The standard implementations are defined using the framework’s own view cluster ZVC_CDS_ALV_FW.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/11/CDS_ALV_SM34.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Definition of Intent-Based Navigation in View Cluster ZVC_CDS_ALV_FW</P><BR /> <BR /> <H1 id="toc-hId--343374438">Extensibility</H1><BR /> The reports generated by cds2alv can be extended by predefined plug-in extensions. These extensions can enhance several steps of the program flow as described in the <A href="https://github.com/rku-it-GmbH/cds2alv/blob/main/docs/program_extensions.md" target="_blank" rel="nofollow noopener noreferrer"><STRONG>documentation</STRONG></A>. We also plan to offer a selection of ready made extensions as part of a separate repository in the near future.<BR /> <BR /> &nbsp; 2023-11-21T00:27:44+01:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-10-extensions-i-exploring-external-libraries-native-device/ba-p/13576910 abap2UI5 - (10) Extensions I: Exploring External Libraries & Native Device Capabilities 2023-12-04T09:28:37+01:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 10 of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A> </STRONG>— an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>So far, we've focused on utilizing standard UI5 controls and primarily adopting UI5 samples for integration with abap2UI5. However, we also have the opportunity to use third-party libraries or harness native device capabilities at the frontend. This includes functionalities like barcode scanning, image capture, and geolocation services. In this blog, we will delve into these advanced features and their integration with abap2UI5</STRONG><BR /> <BR /> All demos showcased in this blog are ready for use and can be easily tried out by installing the <A href="https://github.com/abap2UI5/abap2UI5-samples" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abap2UI5-samples</STRONG></A> with <A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abapGit</STRONG></A>.<BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> Find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and exploring the other articles of this blog series:<BR /> <TABLE style="height: 98px" border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating Views with XML, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Setup: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Updates I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities (this blog post)</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: <SPAN style="font-family: inherit;font-size: inherit">Guideline for Developing New Features in JavaScript</SPAN></A></STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG><STRONG><BR /> </STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <H3 id="toc-hId-1093103013"><STRONG>Content</STRONG></H3><BR /> This article covers the following areas:<BR /> <OL><BR /> <LI>Displaying Barcodes with bwip-js</LI><BR /> <LI>Scanning Barcodes with the UI5 Barcode Scanner</LI><BR /> <LI>Reading Frontend Information (UI5 Version, Device Information etc.)</LI><BR /> <LI>Reading Geolocation &amp; Visualizing with the UI5 Map Container</LI><BR /> <LI>Capturing Pictures and Sending them to the Backend</LI><BR /> <LI>Highlighting &amp; Providing Contextual Help with driver.js</LI><BR /> <LI>More Libraries (FontAwesome, ImageMapster...</LI><BR /> </OL><BR /> Let's begin with the first topic:<BR /> <H3 id="toc-hId-896589508"><STRONG>(1) Display Barcodes with bwip-js</STRONG></H3><BR /> There are numerous libraries available for rendering barcodes at the frontend. For this example we use the open-source framework bwip-js, although other libraries could also be suitable. You can explore the repository <STRONG><A href="https://github.com/metafloor/bwip-js" target="_new" rel="noopener nofollow noreferrer">here</A></STRONG> and view a demo of all its capabilities at <A href="http://bwip-js.metafloor.com/demo/demo.html" target="_blank" rel="nofollow noopener noreferrer"><STRONG>this</STRONG> <STRONG>link</STRONG>.</A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-11.39.55.png" height="193" width="529" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">JavaScript Framework bwip-js</P><BR /> Many types of barcodes are available, and you can find a list of all supported barcode types <STRONG><A href="http://bwip-js.metafloor.com/" target="_new" rel="noopener nofollow noreferrer">here:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-11.40.09.png" height="395" width="432" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Supported Barcodes of bwip-js</P><BR /> To use this library in abap2UI5, the functionality is encapsulated within a custom control. You can view the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/02/02/z2ui5_cl_cc_bwipjs.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>. The output of the demo app looks like this:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-13.13.14.png" height="220" width="392" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">bwip-js integrated in abap2UI5</P><BR /> This encapsulation allows abap2UI5 app developers to easily utilize bwip-js features through properties, similar to how they do with any other UI5 control. The complexity of the bwip-js framework stays in the custom control, simplifying development at the app level. Take a look at the following view definition, which generates the barcode at the frontend:<BR /> <PRE class="language-abap"><CODE>cont-&gt;simple_form( title = 'Barcode' editable = abap_true<BR /> )-&gt;_z2ui5( )-&gt;bwip_js(<BR /> bcid = ms_barcode-sym<BR /> text = ms_barcode-text<BR /> scale = mv_scale_x<BR /> height = conv string( mv_scale_y + mv_scale_x ) ).</CODE></PRE><BR /> The bwip-js demo in action looks like this:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_barcode.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App in Action: Displaying Barcodes Using bwip-js</P><BR /> As you can observe, it resembles the original demo, but it is now fully integrated into abap2UI5, allowing bwip-js to be used entirely in pure ABAP. The app's source code comprises just 137 lines. You can view the full example on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.20.15.png" height="238" width="488" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code for Displaying Barcodes in Pure ABAP with abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_102.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> The bwip-js library and the Custom Control's code are loaded beforehand. This is done as <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/0d71a1451b94c58d30350788d10170b698723ce8/src/z2ui5_cl_demo_app_102.clas.abap#L119" target="_blank" rel="nofollow noopener noreferrer">follows:</A></STRONG><BR /> <PRE class="language-abap"><CODE>cont-&gt;_generic( ns = `html` name = `script` )-&gt;_cc_plain_xml( z2ui5_cl_cc_bwipjs=&gt;get_js( ) ).</CODE></PRE><BR /> This loading process occurs at the app level to minimize the framework's load time at startup and ensure it is only loaded when necessary. Alternatively, the loading can also be initiated at the framework's start. An importing parameter is available for loading custom JavaScript at startup <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/41f2d056e85546b5de9c7690f86d4c75d7f700cc/src/01/01/z2ui5_cl_fw_http_handler.clas.abap#L18" target="_new" rel="noopener nofollow noreferrer">here</A></STRONG>. Some Custom Controls with basic functionality are always preloaded, as you can find <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/41f2d056e85546b5de9c7690f86d4c75d7f700cc/src/02/01/z2ui5_cl_cc__factory_fw.clas.abap#L21" target="_blank" rel="nofollow noopener noreferrer">here.</A></STRONG><BR /> <H3 id="toc-hId-700076003"><STRONG>(2) Scan Barcodes with the UI5 Barcode Scanner</STRONG></H3><BR /> Displaying barcodes is useful, but their functionality is limited without the ability to scan them. Initially, UI5 lacked native barcode scanning capabilities. This gap was bridged by developing custom controls to integrate libraries like Zbar, ScanBot, or Quagga.js into UI5. However, in recent years, this additional effort has become redundant as UI5 now incorporates scanner libraries built upon the <STRONG><A href="https://github.com/zxing/zxing" target="_blank" rel="nofollow noopener noreferrer">zxing</A></STRONG> scanner engine. These functionalities are encapsulated within the sap.ndc.BarcodeScanner controls. Check out the samples <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.ndc.BarcodeScannerButton" target="_blank" rel="nofollow noopener noreferrer">here:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.01.15.png" height="210" width="515" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5 Barcode Scanner Control</P><BR /> This integration allows them to run seamlessly with both UI5 and abap2UI5 right out of the box. We can simply use this UI5 Control in our view as follows:<BR /> <PRE class="language-abap"><CODE>)-&gt;barcodescannerbutton(<BR /> scansuccess = client-&gt;_event( <BR /> val = 'ON_SCAN_SUCCESS' <BR /> t_arg = VALUE #( ( `${$parameters&gt;/text}` ) <BR /> ( `${$parameters&gt;/format}` ) ) )<BR /> dialogtitle = `Barcode Scanner` ).<BR /> </CODE></PRE><BR /> After each button click, a popup appears, allowing you to scan. The scanned format and text are then sent with the event "ScanSuccess" to the backend. See this demo, recorded on an iPhone:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_scan2.gif" height="563" width="260" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App in Action: Scanning QR-Codes (Running on an iPhone)</P><BR /> Similar to the first example, we can access the entire functionality through the properties of the UI5 control. This simplifies its use with abap2UI5, and only a small implementation logic is required for the above example. You can find the full source code on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.20.15-1.png" height="237" width="486" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code for Scanning Barcodes in Pure ABAP with abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_124.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> <BR /> <H3 id="toc-hId-503562498"><STRONG>(3) Read Frontend &amp; Device Information</STRONG></H3><BR /> Sometimes, you may want to respond within the application based on specific factors like the actual device, UI5 library version, or other frontend information. We can easily send this information to the backend, enabling you to respond in the ABAP code to certain situations. You can obtain some information using the following method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-03-um-09.09.49.png" height="138" width="485" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Return Values of the Method client-&gt;get( )</P><BR /> Additionally, the framework now features a custom control, included <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/02/01/z2ui5_cl_cc_info_frontend.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>, to read more information from the frontend. Explore this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-03-um-09.11.38.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 - Read Frontend Information via Custom Control</P><BR /> It can be utilized in the same manner as all other UI5 Controls, as demonstrated here:<BR /> <PRE class="language-abap"><CODE> client-&gt;view_display( view-&gt;shell(<BR /> )-&gt;page( title = 'abap2UI5'<BR /> )-&gt;_z2ui5( )-&gt;info_frontend(<BR /> finished = client-&gt;_event( `INFO_FINISHED` )<BR /> device_browser = client-&gt;_bind_edit( device_browser )<BR /> device_os = client-&gt;_bind_edit( device_os )<BR /> device_systemtype = client-&gt;_bind_edit( device_systemtype )<BR /> ui5_gav = client-&gt;_bind_edit( ui5_gav )<BR /> ui5_theme = client-&gt;_bind_edit( ui5_theme )<BR /> ui5_version = client-&gt;_bind_edit( ui5_version ) <BR /> )-&gt;stringify( ) ).</CODE></PRE><BR /> Explore the full source code on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-04-um-08.20.58.png" height="243" width="460" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code for Reading Frontend Information in Pure ABAP with abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_122.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> Further enhancements can be added in the future.<BR /> <H3 id="toc-hId-307048993"><STRONG>(4) Reading Geolocation &amp; Visualizing with the UI5 Map Control</STRONG></H3><BR /> The frontend's geolocation can be accessed using the <A href="https://www.w3schools.com/html/html5_geolocation.asp" target="_blank" rel="nofollow noopener noreferrer"><STRONG>Geolocation API</STRONG></A>. For example, the source code for the frontend might look as follows:<BR /> <PRE class="language-markup"><CODE>&lt;script&gt;<BR /> const x = document.getElementById("demo");<BR /> <BR /> function getLocation() {<BR /> if (navigator.geolocation) {<BR /> navigator.geolocation.getCurrentPosition(showPosition);<BR /> } else {<BR /> x.innerHTML = "Geolocation is not supported by this browser.";<BR /> }<BR /> }<BR /> <BR /> function showPosition(position) {<BR /> x.innerHTML = "Latitude: " + position.coords.latitude +<BR /> "&lt;br&gt;Longitude: " + position.coords.longitude;<BR /> }<BR /> &lt;/script&gt;</CODE></PRE><BR /> For integration with abap2UI5, the following <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/02/01/z2ui5_cl_cc_geolocation.clas.abap" target="_blank" rel="nofollow noopener noreferrer">custom control</A></STRONG> encapsulates this functionality and it can be utilized in a view definition like this:<BR /> <PRE class="language-abap"><CODE>)-&gt;_z2ui5( )-&gt;geolocation(<BR /> finished = client-&gt;_event( )<BR /> longitude = client-&gt;_bind_edit( longitude )<BR /> latitude = client-&gt;_bind_edit( latitude )<BR /> altitude = client-&gt;_bind_edit( altitude )<BR /> altitudeaccuracy = client-&gt;_bind_edit( altitudeaccuracy )<BR /> accuracy = client-&gt;_bind_edit( accuracy )<BR /> speed = client-&gt;_bind_edit( speed )</CODE></PRE><BR /> It reads out the latitude, longitude, etc.:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_geo.gif" height="307" width="516" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App in Action: Calling the Geolocation API at the Frontend</P><BR /> However, it becomes fascinating when visualized on a map. While options like Google Maps or OpenStreetMap are available, we opt for a simpler approach by just integrating the UI5 Map Container Control into abap2UI5. Check out the control samples <STRONG><A href="https://ui5.sap.com//#/entity/sap.ui.vk.MapContainer" target="_blank" rel="noopener noreferrer">here:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.43.37.png" height="199" width="446" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5 Map Container Control</P><BR /> The Map Container Control in an abap2UI5 view looks like this:<BR /> <PRE class="language-abap"><CODE> )-&gt;map_container( autoadjustheight = abap_true<BR /> )-&gt;content( ns = `vk`<BR /> )-&gt;container_content(<BR /> title = `Analytic Map`<BR /> icon = `sap-icon://geographic-bubble-chart`<BR /> )-&gt;content( ns = `vk`<BR /> )-&gt;analytic_map(<BR /> initialposition = `9.933573;50;0`<BR /> initialzoom = `6`<BR /> )-&gt;vos(<BR /> )-&gt;spots( client-&gt;_bind( mt_spot )<BR /> )-&gt;spot(<BR /> position = `{POS}`<BR /> contentoffset = `{CONTENTOFFSET}`<BR /> type = `{TYPE}`<BR /> scale = `{SCALE}`<BR /> tooltip = `{TOOLTIP}`</CODE></PRE><BR /> And here is a demo combining the Geolocation and UI5 Map Container in a single, integrated example:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_geolocation.gif" height="339" width="534" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App in Action: Geolocation Information Visualized with the UI5 Map Container</P><BR /> Explore the full source code of the demo on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.25.56.png" height="209" width="414" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code for Reading and Displaying the Geolocation in Pure ABAP with abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_120.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> The map container also offers a lot more functionality - it's possible to display multiple spots or visualize complete routes:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.44.48.png" height="272" width="464" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">UI5 Map Container Control - More Features</P><BR /> <BR /> <H3 id="toc-hId-110535488"><STRONG>(5) Capturing Pictures</STRONG></H3><BR /> Capturing screenshots in modern browsers is accomplished using the <STRONG><A href="https://developer.mozilla.org/en-US/docs/Web/API/Media_Capture_and_Streams_API" target="_blank" rel="nofollow noopener noreferrer">Media Capture and Streams API</A></STRONG>. Similar to previous examples, for integration with abap2UI5, we encapsulate this functionality in a custom control, as shown <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/02/02/z2ui5_cl_cc_camera_picture.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>. It can be utilized in a view definition as follows:<BR /> <PRE class="language-abap"><CODE>page-&gt;_z2ui5( )-&gt;camera_picture(<BR /> value = client-&gt;_bind_edit( mv_picture_base )<BR /> onphoto = client-&gt;_event( 'CAPTURE' ) ).</CODE></PRE><BR /> We send a user command to the backend with the event "onPhoto" and use a two-way binding for the data of the picture. This means when a picture is taken, it's transmitted to the backend in base64 format. To avoid unnecessary data transfer, we immediately clear this property and only send the picture to the frontend when it's needed:<BR /> <PRE class="language-abap"><CODE>CASE client-&gt;get( )-event.<BR /> WHEN 'CAPTURE'.<BR /> INSERT VALUE #( data = mv_picture_base time = sy-uzeit ) INTO TABLE mt_picture.<BR /> CLEAR mv_picture_base.<BR /> client-&gt;view_model_update( ).<BR /> <BR /> "....<BR /> ENDCASE.</CODE></PRE><BR /> A complete demo looks as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/camera.gif" height="589" width="387" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App in Action: Capturing Pictures (Running on an iPad Mini)</P><BR /> Again, the encapsulation into a custom control keeps the abap2UI5 app compact, requiring only 120 lines of code. You can view the complete source code on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.29.12.png" height="261" width="483" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code for Capturing Pictures in Pure ABAP with abap2UI5<STRONG>&nbsp;<A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_137.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> This only represents the basic functionality of the Camera API at the frontend. Looking ahead, there's potential to upgrade the Custom Control to alter resolution or more camera settings. Although this app served primarily as a test case, photos frequently prove invaluable in business contexts, especially for documentation purposes. Whether they are stored as GOS attachments in an on-premise system or used with SAP BTP Document Management Service in cloud scenarios, you can also consider implementing these use cases with abap2UI5.<BR /> <H3 id="toc-hId--85978017"><STRONG>(6) Highlights &amp; Contextual Help with driver.js</STRONG></H3><BR /> A few weeks ago, I received an excellent pull request from <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG>. It introduced the JavaScript framework driver.js designed to present contextual help or highlight specific areas of the screen as user guidance. Check out the framework <STRONG><A href="https://driverjs.com/" target="_blank" rel="nofollow noopener noreferrer">here:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.41.57.png" height="294" width="438" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">JavaScript Framework driver.js</P><BR /> This framework can be seamlessly integrated into abap2UI5. Here's what the demo looks like:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_driverjs.gif" height="281" width="472" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App in Action: Highlights &amp; Contextual Help with driver.js</P><BR /> The full source code is available on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-03-um-15.40.20.png" height="264" width="502" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code for Using driver.js in Pure ABAP with abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_119.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> In this example, only basic functionality is implemented, but it effectively showcases its potential. The combination of UI5 together with driver.js opens up various additional use cases for the future.<BR /> <BR /> Special thanks to <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG> for contributing this custom control and demo to abap2UI5. Another addition from him is Font Awesome and ImageMapster, which we will explore next.<BR /> <H3 id="toc-hId--282491522"><STRONG>(7) More Libraries...</STRONG></H3><BR /> There is a wide range of libraries compatible with both UI5 and abap2UI5. To see what has been integrated thus far, you can visit <STRONG><A href="https://github.com/abap2UI5/abap2UI5/tree/main/src/02" target="_blank" rel="nofollow noopener noreferrer">this folder</A></STRONG>. Smaller libraries can also be quite useful for specific use cases. As an final example, let's take a look at the Font Awesome icons <STRONG><A href="https://fontawesome.com/" target="_blank" rel="nofollow noopener noreferrer">here:</A></STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.33.37.png" height="216" width="409" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App using Font Awesome</P><BR /> And check out the full source code on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.34.48.png" height="240" width="492" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code of Font Awesome used with abap2UI5 <A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_118.clas.abap" target="_blank" rel="nofollow noopener noreferrer"><STRONG>(here)</STRONG></A></P><BR /> Or take a look to the ImageMapster Example:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-15.46.45-scaled.jpeg" height="375" width="530" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App using ImageMapster</P><BR /> It can handle Events by clicking on certain Image areas, check out the full source code on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-15.52.19.png" height="280" width="490" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code of ImageMapster used with abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_142.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> And finally check out <STRONG><A href="https://animate.style/" target="_blank" rel="nofollow noopener noreferrer">Animate.css</A></STRONG>:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_anmiate_css.gif" height="285" width="507" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 App using animate.css</P><BR /> And check out the source code on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-19-um-16.36.40.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code of animate.css used with abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_146.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> <BR /> <H3 id="toc-hId--479005027"><STRONG>Conclusion</STRONG></H3><BR /> It was exciting to experiment with all these features to explore what's possible with the abap2UI5 approach. Although this was just a start, and much more can be developed in the future, it already showcases its potential: The use of native device capabilities with external libraries encapsulated within custom controls allows straightforward accessibility through properties in pure ABAP. It opens up a lot of use cases while keeping the development effort on app level very low.<BR /> <BR /> All these features have now been integrated into the abap2UI5 framework and are ready to run out-of-the-box after installation with <STRONG><A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer">abapGit</A></STRONG>. Storing JavaScript in ABAP classes may seem unconventional, but it ensures full compatibility<STRONG>&nbsp;</STRONG>across any ABAP system and language version. This strategy eliminates the need for deployment of additional frontend artifacts or further configurations beyond the ABAP source code. Additionally, all applications developed using these functionalities also automatically qualify as <STRONG><A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer">abapGit</A></STRONG> apps, facilitating easy transport and exchange between systems.<BR /> <BR /> Are you using external libraries with UI5? Consider contributing them to abap2UI5, I always welcome new pull requests and have recently updated the repository to streamline the process of adding new custom controls.<BR /> <BR /> In the <STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">next part</A></STRONG>, you find a guideline of how to include your own JavaScript functionality to abap2UI5.<BR /> <BR /> Thank you for reading and I hope you enjoy experimenting with the new demos. Your feedback is always appreciated. Feel free to raise an <STRONG><A href="https://github.com/abap2UI5/abap2UI5/issues" target="_blank" rel="nofollow noopener noreferrer">issue</A></STRONG> or leave a comment. 2023-12-04T09:28:37+01:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-11-extensions-ii-guideline-for-developing-new-features-in/ba-p/13576797 abap2UI5 - (11) Extensions II: Guideline for Developing New Features in JavaScript 2023-12-11T11:05:38+01:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 11 of this blog series introducing <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">abap2UI5</A> </STRONG>— an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>In the last post, we explored various additional functionalities and external libraries that can be integrated with abap2UI5, but without delving into the technical background. Now, we aim to address that. This blog post will explain how to enhance abap2UI5 with custom functionalities and additional JavaScript logic. It is designed as a step-by-step guide for UI5 developers, demonstrating how they can develop frontend logic and make it accessible for the use in ABAP through abap2UI5 apps.</STRONG><BR /> <BR /> Check out the the corresponding GitHub repository <A href="https://github.com/abap2UI5/abap2UI5-template_cc_development" target="_blank" rel="nofollow noopener noreferrer"><STRONG>here.</STRONG></A><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> Find all the information about this project on <STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub,</A></STRONG>&nbsp;stay up-to-date by following on <STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter</A> </STRONG>and explore the other articles of this blog series:<BR /> <TABLE style="height: 98px" border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px">(11) Extensions II: Guideline for Developing New Features in JavaScript (this blog post)</TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 603px"><STRONG><A href="https://blogs.sap.com/2024/01/08/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/" target="_blank" rel="noopener noreferrer">(12) Update II: Community Feedback, New Features &amp; Outlook - Jan. 2024</A></STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <H3 id="toc-hId-1093101346"><STRONG>Content</STRONG></H3><BR /> We will start from the ground up, creating a new project and integrating all the essential logic required for frontend and backend communication. Finally, we will adapt this logic into an abap2UI5 artifact and use it in an abap2UI5 app in the backend. The content is structured as follows:<BR /> <OL><BR /> <LI>General Idea &amp;&nbsp; Creating a new UI5 project</LI><BR /> <LI>Frontend Development (JS)<BR /> <OL><BR /> <LI>Creating a new Custom Control</LI><BR /> <LI>Receiving data in the Frontend (JS) sent from the backend</LI><BR /> <LI>Invoking backend functions (ABAP) from the frontend</LI><BR /> <LI>Receiving data in the backend (ABAP) sent from the frontend</LI><BR /> <LI>Calling frontend functions (JS) from the backend</LI><BR /> <LI>Optional I: Implementing faceless controls (without UI)</LI><BR /> <LI>Optional II: Loading external libraries</LI><BR /> </OL><BR /> </LI><BR /> <LI>Backend Development (ABAP)<BR /> <OL><BR /> <LI>Migrating frontend logic to the ABAP Backend</LI><BR /> <LI>Developing an abap2UI5 app using the new Custom Control</LI><BR /> </OL><BR /> </LI><BR /> <LI>Additional Comments</LI><BR /> <LI>Conclusion</LI><BR /> </OL><BR /> Let’s begin with the first topic:<BR /> <H3 id="toc-hId-896587841"><STRONG>1. General Idea &amp; Creating a New UI5 Project</STRONG></H3><BR /> This guideline is centered around one core concept: We rigorously encapsulate all JavaScript logic within a Custom Control (CC). This approach offers the following advantages:<BR /> <OL><BR /> <LI>It ensures that there are no dependencies outside of the Custom Control. This means we can easily copy and paste it into the backend with confidence in its correct functionality</LI><BR /> <LI>We can use the properties of the Custom Control in the XML view for data exchange and communication between JS and ABAP. The Event and Data Binding functionality of the UI5 framework ensure smooth operation and ease of use</LI><BR /> <LI>By avoiding globally defined variables and relying solely on the UI5 API, we guarantee that the application functions correctly even when the UI5 version is updated or when abap2UI5 operates in different contexts, such as the Fiori Launchpad or SAP Build Workzone Service</LI><BR /> </OL><BR /> Let's start by launching your preferred development environment. Here we use Business Application Studio as it comes pre-equipped with UI5 tooling and create a new UI5 freestyle application. Upon completion, your project folder should resemble the following structure:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-06-um-14.51.57.png" height="253" width="481" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Structure of a new UI5 Freestyle App</P><BR /> <BR /> <H3 id="toc-hId-700074336"><STRONG>2.1. Creating a new Custom Control (CC)</STRONG></H3><BR /> Numerous guidelines are available for developing Custom Controls in SAP UI5, such as blog articles and documentation. We will now follow the recommended approach from the <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/topic/d12d2ee6a5454d799358d425f9e7c4db.html" target="_blank" rel="nofollow noopener noreferrer">documentation</A></STRONG> to create a new Custom Control. This process begins with creating a new folder and file:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-09.12.20.png" height="168" width="370" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">New Folder &amp; File for the Custom Control (CC)</P><BR /> Next, copy &amp; paste the following snippet as your starting point:<BR /> <PRE class="language-javascript"><CODE>sap.ui.define("project1/control/MyCustomControl",[<BR /> "sap/ui/core/Control"<BR /> ], (Control) =&gt; {<BR /> "use strict";<BR /> <BR /> return Control.extend("project1.control.MyCustomControl", {<BR /> <BR /> renderer(oRM, oControl) {<BR /> oRM.openStart("div", oControl);<BR /> oRM.openEnd();<BR /> oRM.write( 'test');<BR /> oRM.close("div");<BR /> }<BR /> });<BR /> });</CODE></PRE><BR /> Basic HTML is used for creating a first output. Integrate the new Custom Control (CC) into your XML View by making the following adjustment to the file View1.view.xml:<BR /> <PRE class="language-markup"><CODE>&lt;mvc:View controllerName="project1.controller.View1"<BR /> xmlns:mvc="sap.ui.core.mvc" displayBlock="true"<BR /> xmlns="sap.m" xmlns:z2ui5="project1.control"&gt;<BR /> &lt;Page id="page" title="{i18n&gt;title}"&gt;<BR /> &lt;content&gt;<BR /> &lt;z2ui5:MyCustomControl id="test" /&gt;<BR /> &lt;/content&gt;<BR /> &lt;/Page&gt;<BR /> &lt;/mvc:View&gt;</CODE></PRE><BR /> This XML View will be later created in ABAP on the backend, which means any configurations we establish here can be transmitted from the server. Meanwhile, we can use the CC to add all JavaScript logic we later want to process on the frontend.<BR /> <BR /> Now we will extend step-by-step the functionality of this Custom Control.<BR /> <H3 id="toc-hId-503560831"><STRONG>2.2 Receiving Data in the Frontend (JS) Sent from to the Backend (ABAP)</STRONG></H3><BR /> First we want to send values from ABAP to the frontend Javascript Logic. We start by setting the property value in your XML view (this can later be done in ABAP):<BR /> <PRE class="language-markup"><CODE>&lt;mvc:View controllerName="project1.controller.View1"<BR /> xmlns:mvc="sap.ui.core.mvc" displayBlock="true"<BR /> xmlns="sap.m" xmlns:z2ui5="project1.control"&gt;<BR /> &lt;Page id="page" title="{i18n&gt;title}"&gt;<BR /> &lt;content&gt;<BR /> &lt;z2ui5:MyCustomControl id="test" value="MyBackendValue"/&gt;<BR /> &lt;/content&gt;<BR /> &lt;/Page&gt;<BR /> &lt;/mvc:View&gt;</CODE></PRE><BR /> And we add the property "value" to the Custom Control (together with a setter and getter method) that it can receive its data:<BR /> <PRE class="language-javascript"><CODE>sap.ui.define("project1/control/MyCustomControl",[<BR /> "sap/ui/core/Control"<BR /> ], (Control) =&gt; {<BR /> "use strict";<BR /> <BR /> return Control.extend("project1.control.MyCustomControl", {<BR /> metadata : {<BR /> <BR /> properties : { value: {type : "string" } },<BR /> <BR /> setValue(value){<BR /> this.setProperty("value", value);<BR /> },<BR /> getValue(){<BR /> return this.getProperty("value");<BR /> },<BR /> <BR /> renderer(oRM, oControl) {<BR /> oRM.openStart("div", oControl);<BR /> oRM.openEnd();<BR /> oRM.write( oControl.getValue("value") );<BR /> oRM.close("div");<BR /> } }); });</CODE></PRE><BR /> We display the value in the rendering method to verify if it is correctly transmitted to the frontend. When you begin testing this demo in a terminal (using the command 'npm run start'), you should observe the following result:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-09.27.23.png" height="179" width="430" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">CC - Displaying values sent from the backend</P><BR /> As you can observe, the values are successfully sent to the Custom Control. This illustrates how we can later transmit data from the backend to the frontend. Just add more properties and retrieve the backend values at the frontend by simply reading the control's property using the following command:<BR /> <PRE class="language-javascript"><CODE>oControl.getValue("value");</CODE></PRE><BR /> Next you can use these backend values to implement your JavaScript logic. But at a certain stage, it will become necessary to interact with the backend again. In the next section, we will trigger backend interactions, by focusing on the use of events in Custom Controls.<BR /> <H3 id="toc-hId-307047326"><STRONG>2.3 Invoking Backend Functions (ABAP) from the Frontend</STRONG></H3><BR /> In addition to the properties, we can enhance the Custom Control by adding events. We'll setup a "change" event which is triggered after a delay of 5 seconds. Typically, you would implement logic that culminates in triggering an event; however, for this example, we're adopting a straightforward approach to emphasize the underlying principle. The updated snippet for the Custom Control now appears as follows:<BR /> <PRE class="language-javascript"><CODE>sap.ui.define("project1/control/MyCustomControl",[<BR /> "sap/ui/core/Control"<BR /> ], (Control) =&gt; {<BR /> "use strict";<BR /> <BR /> return Control.extend("project1.control.MyCustomControl", {<BR /> metadata: {<BR /> <BR /> properties: {<BR /> value: { type: "string" }<BR /> },<BR /> events: {<BR /> change: {}<BR /> }<BR /> },<BR /> <BR /> setValue(value) {<BR /> this.setProperty("value", value);<BR /> },<BR /> getValue() {<BR /> return this.getProperty("value");<BR /> },<BR /> <BR /> onAfterRendering() {<BR /> <BR /> setTimeout((oControl) =&gt; {<BR /> oControl.fireChange();<BR /> }, 5000, this);<BR /> <BR /> },<BR /> <BR /> renderer(oRM, oControl) {<BR /> oRM.openStart("div", oControl);<BR /> oRM.openEnd();<BR /> oRM.write(oControl.getValue("value"));<BR /> oRM.close("div");<BR /> }<BR /> });<BR /> });</CODE></PRE><BR /> Next, we need to manage the event in our controller, which is a process we will later replicate in ABAP. To begin, make the following adjustments to the XML:<BR /> <PRE class="language-markup"><CODE>&lt;mvc:View controllerName="project1.controller.View1"<BR /> xmlns:mvc="sap.ui.core.mvc" displayBlock="true"<BR /> xmlns="sap.m" xmlns:z2ui5="project1.control"&gt;<BR /> &lt;Page id="page" title="{i18n&gt;title}"&gt;<BR /> &lt;content&gt;<BR /> &lt;z2ui5:MyCustomControl id="test" value="MyBackendValue" change="onMyBackendChangeHandler" /&gt;<BR /> &lt;/content&gt;<BR /> &lt;/Page&gt;<BR /> &lt;/mvc:View&gt;<BR /> </CODE></PRE><BR /> And the following adjustments to the controller:<BR /> <PRE class="language-javascript"><CODE>sap.ui.define("project1/control/MyCustomControl",[<BR /> "sap/ui/core/mvc/Controller"<BR /> ],<BR /> <BR /> function (Controller) {<BR /> "use strict";<BR /> <BR /> return Controller.extend("project1.controller.View1", {<BR /> <BR /> onMyBackendChangeHandler: function (){<BR /> sap.m.MessageToast.show( 'Frontend Event raised, and processed in the backend');<BR /> }<BR /> });<BR /> });<BR /> </CODE></PRE><BR /> When we test the application again, we observe that the Control is loaded and, after five seconds, the event is triggered. It is then handled in the controller by displaying a message toast. In a later step, we will implement the call of the message toast in ABAP:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-09.44.57.png" height="264" width="440" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">CC - Invoking backend functions from the frontend</P><BR /> We can use this event now and start to process some backend logic. But normally after the frontend logic some data is also changed, consequently, a new question arises: How can we transmit updated frontend values to the backend for processing in our ABAP event handler?<BR /> <H3 id="toc-hId-110533821"><STRONG>2.4 Receiving Data in the Backend (ABAP) Sent from the Frontend</STRONG></H3><BR /> The simplest method is to use data binding, a common practice in UI5 development for monitoring value changes. For instance, this is useful when a user modifies an input field at the UI and you need to track this change in JavaScript. Therefore, instead of directly entering the value into the XML view, we utilize data binding now and adjust the view as follows:<BR /> <PRE class="language-markup"><CODE>&lt;mvc:View controllerName="project1.controller.View1"<BR /> xmlns:mvc="sap.ui.core.mvc" displayBlock="true"<BR /> xmlns="sap.m" xmlns:z2ui5="project1.control"&gt;<BR /> &lt;Page id="page" title="{i18n&gt;title}"&gt;<BR /> &lt;content&gt;<BR /> &lt;z2ui5:MyCustomControl id="test" value="{MY_BINDED_VALUE}" change="onMyBackendChangeHandler" /&gt;<BR /> &lt;/content&gt;<BR /> &lt;/Page&gt;<BR /> &lt;/mvc:View&gt;<BR /> </CODE></PRE><BR /> And we adjust the controller (which again only simulates the ABAP backend and will be replaced later):<BR /> <PRE class="language-abap"><CODE>sap.ui.define("project1/control/MyCustomControl", [<BR /> "sap/ui/core/mvc/Controller"<BR /> ],<BR /> <BR /> function (Controller) {<BR /> "use strict";<BR /> <BR /> return Controller.extend("project1.controller.View1", {<BR /> onInit: function () {<BR /> <BR /> var data = { 'MY_BINDED_VALUE' : "backend value" };<BR /> var oModel = new sap.ui.model.json.JSONModel(data);<BR /> this.oView.setModel( oModel );<BR /> <BR /> },<BR /> onMyBackendChangeHandler: function (oEvent){<BR /> var data = this.oView.getModel().getData();<BR /> sap.m.MessageToast.show( 'Frontend Event raised, and processed in the backend, value: ' + data.MY_BINDED_VALUE );<BR /> }<BR /> });<BR /> });<BR /> </CODE></PRE><BR /> Next we modify this value at the frontend by updating the property. We'll achieve this by enhancing our setTimeout method to include the setValue method call:<BR /> <PRE class="language-javascript"><CODE> setTimeout((oControl) =&gt; {<BR /> oControl.setValue("frontend value");<BR /> oControl.fireChange();<BR /> }, 3000, this);</CODE></PRE><BR /> The outcome appears as follows: initially, the view is rendered using the value received from the backend:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-10.06.23.png" height="233" width="365" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">CC - Initial Load (1/2)</P><BR /> And after 5 seconds, it is replaced with the frontend value set by the JavaScript logic:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-10.06.27.png" height="211" width="336" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">CC - Setting data in the frontend and sent to the backend (2/2)</P><BR /> As you can see, we simply need to update the property using the command:<BR /> <PRE class="language-javascript"><CODE>oControl.setValue("frontend value");</CODE></PRE><BR /> The SAP UI5 framework automatically manages the remaining processes, significantly reducing the complexity that we typically encounter when handling frontend-to-backend data exchange. Furthermore, we will later observe that the abap2UI5 framework also streamlines the transfer of data binding to the attributes of the ABAP classes implementing 'z2ui5_if_app,' requiring no further actions.<BR /> <BR /> Now let's assume that some backend logic is processed in response to the updated frontend values and the event. The final step is to determine a way to trigger a specific function on the frontend from the backend, which we will do next.<BR /> <H3 id="toc-hId--85979684"><STRONG>2.5 Calling Frontend Functions (JS) from the Backend</STRONG></H3><BR /> To prepare for this, we first include in our Custom Control a new frontend function and property:<BR /> <PRE class="language-javascript"><CODE>sap.ui.define("project1/control/MyCustomControl",[<BR /> "sap/ui/core/Control"<BR /> ], (Control) =&gt; {<BR /> "use strict";<BR /> <BR /> return Control.extend("project1.control.MyCustomControl", {<BR /> metadata: {<BR /> <BR /> properties: {<BR /> value: { type: "string" },<BR /> checkCallMyFunction: { type : "boolean" }<BR /> },<BR /> events: {<BR /> change: {}<BR /> }<BR /> },<BR /> <BR /> setValue(value) {<BR /> this.setProperty("value", value);<BR /> },<BR /> getValue() {<BR /> return this.getProperty("value");<BR /> },<BR /> setCheckCallMyFunction(checkCallMyFunction) {<BR /> if (checkCallMyFunction) {<BR /> this.myFrontendFunction();<BR /> }<BR /> this.setProperty("checkCallMyFunction", false);<BR /> },<BR /> init() {<BR /> },<BR /> <BR /> myFrontendFunction(){<BR /> sap.m.MessageToast.show( 'myFrontendFunction called' );<BR /> },<BR /> <BR /> onAfterRendering() {<BR /> <BR /> setTimeout((oControl) =&gt; {<BR /> oControl.setValue("frontend value");<BR /> oControl.fireChange();<BR /> }, 3000, this);<BR /> <BR /> },<BR /> <BR /> renderer(oRM, oControl) {<BR /> oRM.openStart("div", oControl);<BR /> oRM.openEnd();<BR /> oRM.write(oControl.getValue("value"));<BR /> oRM.close("div");<BR /> }<BR /> });<BR /> });</CODE></PRE><BR /> To keep it simple, we just call a message toast, but of course, more complex logic can be implemented here. The key to calling this function from the backend is to use a boolean property that we transport as an attribute and can toggle in the backend to true. Then every time the backend sets it to true, the function is called at the frontend. The following changes to the XML are necessary:<BR /> <PRE class="language-markup"><CODE>&lt;mvc:View controllerName="project1.controller.View1"<BR /> xmlns:mvc="sap.ui.core.mvc" displayBlock="true"<BR /> xmlns="sap.m" xmlns:z2ui5="project1.control"&gt;<BR /> &lt;Page id="page" title="{i18n&gt;title}"&gt;<BR /> &lt;content&gt;<BR /> &lt;z2ui5:MyCustomControl id="test" value="{/MY_BINDED_VALUE}" change="onMyBackendChangeHandler" checkCallMyFunction="true"/&gt;<BR /> &lt;/content&gt;<BR /> &lt;/Page&gt;<BR /> &lt;/mvc:View&gt;<BR /> </CODE></PRE><BR /> And now, when we test the application, we can observe that the function is being called:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-10.30.39.png" height="231" width="355" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">CC - Processing JS function, triggered from the backend</P><BR /> <BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR><BR /> <TD style="width: 100%"><STRONG>Info:</STRONG> We now have established all the essential communication mechanisms between the backend and frontend. Both sides are capable of exchanging data and triggering each other's functions.</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>2.6 Optional I: Implementing Faceless Controls</STRONG><BR /> <BR /> The example above includes the rendering of a UI. However, if your goal is solely to call functions at the frontend or integrate your JavaScript logic, you can opt to skip the rendering part and use it as a 'faceless' Custom Control. In this scenario, only properties are transferred through the XML view, the rendere method is empty and there is no impact on the UI. For example take a look to the CC to set the title <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/01/03/z2ui5_cl_fw_cc_title.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG> or to read frontend information <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/01/03/z2ui5_cl_fw_cc_info_frontend.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>2.7 Optional II: Loading External Libraries</STRONG><BR /> <BR /> More functionality can be included by using external libraries. You can also load these libraries in your custom controls, as demonstrated in the bwip-js custom control example. Check it out <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/02/z2ui5_cl_cc_bwipjs.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <H3 id="toc-hId--282493189"><STRONG>3. Backend Development (ABAP)</STRONG></H3><BR /> Now, we want to transfer the Custom Control functionality to abap2UI5. If you're primarily a UI5 developer, this would be the perfect moment to reach out to your ABAP colleagues for assistance... 🦖🦖🦖<BR /> <H3 id="toc-hId--479006694"><STRONG>3.1 Migrating Frontend Logic to the ABAP Backend</STRONG></H3><BR /> Access your ABAP backend system and create a new ABAP class with a new method named 'get_js' and a single return parameter. Next, ensure that the following option is activated in Eclipse:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-11.09.06.png" height="205" width="320" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Eclipse - Setting to copy &amp; paste large string from the clipboard</P><BR /> Now, we copy &amp; paste the entire Source Code of the Custom Control into Eclipse:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-11.10.57.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">press strg+v now!</P><BR /> The snippet of the ABAP class now looks as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-11.11.34.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Javascript of the CC after copy &amp; paste to ABAP</P><BR /> Next, we replace the namespace for its use in abap2UI5. In our case, the original namespace was 'project1.control'. We will substitute this with 'z2ui5':<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-24-um-14.37.28.png" height="307" width="469" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">CC with replaced Namespaces and with added sap.declare function at the beginning</P><BR /> Check out the full source code on Github:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-08-um-09.13.15.png" height="208" width="371" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-template_cc_development/blob/main/src/zcl_a2ui5_my_custom_control.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> <BR /> <H3 id="toc-hId--675520199"><STRONG>3.2. Developing an abap2UI5 Application Using the New Custom Control</STRONG></H3><BR /> As mentioned earlier, the controller and XML View that we initially developed in JavaScript will now be implemented in ABAP. Therefore, we are now creating an abap2UI5 app. For this, we create another class and implement the interface 'z2ui5_if_app'. In the abap2UI5 app, the XML View with the new CC from above now appears as follows:<BR /> <PRE class="language-abap"><CODE> DATA(view) = z2ui5_cl_xml_view=&gt;factory( ).<BR /> client-&gt;view_display( view-&gt;shell(<BR /> )-&gt;page( 'abap2UI5 - My CC App'<BR /> )-&gt;_generic(<BR /> name = `MyCustomControl`<BR /> ns = `z2ui5`<BR /> t_prop = VALUE #(<BR /> ( n = `value` v = client-&gt;_bind_edit( mv_binded_value ) )<BR /> ( n = `change` v = client-&gt;_event( 'MY_FRONTEND_EVENT' ) )<BR /> ( n = `checkCallMyFunction` v = `true` )<BR /> )<BR /> )-&gt;stringify( ) ).</CODE></PRE><BR /> And the logic for the controller in JavaScript now looks in ABAP in the abap2UI5 app as follows:<BR /> <PRE class="language-abap"><CODE> CASE client-&gt;get( )-event.<BR /> WHEN 'ON_CC_LOADED'.<BR /> display_view( ).<BR /> WHEN 'MY_FRONTEND_EVENT'.<BR /> client-&gt;message_box_display( |Frontend Event raised, and processed in the backend, value: { mv_binded_value }| ).<BR /> WHEN 'BACK'.<BR /> client-&gt;nav_app_leave( client-&gt;get_app( client-&gt;get( )-s_draft-id_prev_app_stack ) ).<BR /> ENDCASE.</CODE></PRE><BR /> Additionally, we need to implement some logic to ensure that the Custom Control is loaded first upon the application's start before we can utilize it in our view. We will set up this process as follows:<BR /> <PRE class="language-abap"><CODE> DATA(view) = z2ui5_cl_xml_view=&gt;factory( ).<BR /> client-&gt;view_display(<BR /> view-&gt;_generic( ns = `html` name = `script` )-&gt;_cc_plain_xml( zcl_a2ui5_my_custom_control=&gt;get_js( )<BR /> )-&gt;_z2ui5( )-&gt;timer( client-&gt;_event( `ON_CC_LOADED` )<BR /> )-&gt;stringify( ) ).</CODE></PRE><BR /> Check out the full source code on GitHub:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-08-um-09.14.11.png" height="242" width="436" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Source Code of the abap2UI5 Demo App <STRONG><A href="https://github.com/abap2UI5/abap2UI5-template_cc_development/blob/main/src/z2cl_a2ui5_my_test_app.clas.abap" target="_blank" rel="nofollow noopener noreferrer">(here)</A></STRONG></P><BR /> Now, you can start the new app. The entire logic that was previously processed as a UI5 frontend application is now integrated into the backend and can be utilized through abap2UI5 apps. The final demo, running in abap2UI5, now appears as follows:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_demo.gif" height="250" width="458" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 app - Demo using the new CC</P><BR /> This concludes our development journey, which began at the frontend, progressed into the backend, and finally ends in the use within an abap2UI5 app. The Custom Control till now just contains basic functions, you can now begin to enhance it with more JavaScript logic.<BR /> <H3 id="toc-hId--947265073"><STRONG>4. Additional Comments</STRONG></H3><BR /> There are multiple ways to develop and encapsulate JavaScript logic and integrate it into abap2UI5. The method explained here is simply the one that has worked best so far. The ease of using data binding and events on the frontend greatly simplifies interaction with the backend. And in the backend, the Custom Control ensures seamless use in ABAP via properties in Views in abap2UI5 apps.<BR /> <BR /> However, improvements are always possible. If you prefer other methods, feel free to use what works best for you. As highlighted in <STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">part 5</A></STRONG> of the series, you can send plain JavaScript, CSS, and HTML to the frontend. Essentially, you have complete freedom in your approach and you might find more suitable methods to meet your specific needs.<BR /> <BR /> Furthermore, this was just a basic example. Custom Controls can be developed to be much more complex, for example with features like aggregations. Be sure to also explore more blog posts about Custom Control development and experiment for yourself.<BR /> <BR /> The full source code is available on GitHub, check it out <STRONG><A href="https://github.com/abap2UI5/abap2UI5-template_cc_development" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>. It's open for future extensions, and you're welcome to create issues and PRs.<BR /> <H3 id="toc-hId--1143778578"><STRONG>5. Conclusion</STRONG></H3><BR /> This concludes our guideline on how to enhance abap2UI5 with new JavaScript logic.<BR /> <BR /> Thank you for reading, and I hope this inspires you to experiment with adding your own functionalities to abap2UI5. 👷‍<span class="lia-unicode-emoji" title=":female_sign:">♀️</span>👷<BR /> <BR /> Your feedback is always appreciated. Feel free to raise an <STRONG><A href="https://github.com/abap2UI5/abap2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG> or leave a comment. 2023-12-11T11:05:38+01:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/third-party-system-approvals-substitution-to-s4-system-through-interface/ba-p/13578916 Third party system approvals substitution to S4 System through interface 2023-12-14T22:07:28+01:00 suryag https://community.sap.com/t5/user/viewprofilepage/user-id/775700 <STRONG>Introduction:</STRONG><BR /> <BR /> The development of this interface will facilitate the entry of delegation values into the standard SAP table HRUS_D2. 3PL system will provide a file that will be sent to SAP nightly utilizing PI for processing. The&nbsp;file will be tab delimited in format and will be placed in be placed in a SAPIN folder: \\saptest\\sapin\erp\\folder<BR /> <BR /> <STRONG>Overview:-</STRONG><BR /> <BR /> <STRONG>1)&nbsp;3PL system will provide a file.</STRONG><BR /> <BR /> <STRONG>2) The file will be tab delimited in format and will be placed in be placed in a SAPIN folder.</STRONG><BR /> <BR /> <STRONG>3) Path \\saptest\\sapin\\erp\\folder</STRONG><BR /> <BR /> <STRONG>4) Check conditions. If yes, based on conditions data will be created or updated or modified&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in HRUS_D2 table. Send log information through email.</STRONG><BR /> <BR /> <STRONG>5) If no, continue business process.</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step By Step Procedure for Creating Proxy</STRONG><BR /> <BR /> 1.The Proxy Service Interface has to be created by PI consultant from PI side. This will further reflect in ABAP side in T-Code “SPROXY”.<BR /> <BR /> 2.Create the Proxy from T-Code “SPROXY”.<BR /> <BR /> 3.The Proxy created from PI side will be reflected with following details in SPROXY.<BR /> Software Component: Service_1.0_of_erp.com<BR /> Namespace:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <A href="http://erp.com//3PLtoSAPService" target="test_blank" rel="nofollow noopener noreferrer">http://erp.com//3PLtoSAPService</A><BR /> Service Interfaces:&nbsp; &nbsp; &nbsp; Service_Async_Out<BR /> <BR /> 4. Proxy Name will be available once we generate the Proxy.<BR /> <BR /> To generate proxy we need to right click on Service Interface “Service_Async_Out” for Outbound and&nbsp; &nbsp; &nbsp;click on “Create Proxy”.<BR /> <BR /> 5.We need to give the “Package” and “Transport Request” to which the Proxy needs to be saved.<BR /> <BR /> 6.Once the proxy is created for a service interface then that Interface will be marked as Green.<BR /> <BR /> 7. we can find the Proxy Name when we double click on the generated Service Interface. In this case since the Outbound Proxy was already generated we can find the Proxy name of that.<BR /> <BR /> 8 .The objects created when we generate a Proxy is as follows<BR /> I. Data Type<BR /> ii. Message Type<BR /> iii. Proxy Class.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Implement proxy class method</STRONG><BR /> <BR /> Switch to the&nbsp;<STRONG>Properties</STRONG> tab. Double-click the implementing class. and then double-click the method.<BR /> <BR /> Maintain the implementation of the method.<BR /> <BR /> <STRONG>Purpose:</STRONG> Upload data into HRUS_D2 table(Substituted by User).using below function modules in our interface.<BR /> <BR /> SAP_WAPI_SUBSTITUTE_DELETE<BR /> SAP_WAPI_SUBSTITUTE_MAINTAIN<BR /> RH_UPDATE_SUBST_LIST_SERVER<BR /> <BR /> Total 3 scenarios are there<BR /> <BR /> Once the file triggers proxy then checking the conditions. Based on conditions data will be created or updated or modified.<BR /> <BR /> <STRONG>Scenario1:</STRONG> If file data not in a table, then it inserts a new record same as in file.<BR /> <BR /> <STRONG>Scenario2:</STRONG> If file data in a table, then it updates existing record same as in file.<BR /> <BR /> <STRONG>Scenario3:</STRONG> Table data not in a file then need to update end date and active with ‘space’.<BR /> <BR /> After file execution sent an email with log information (which email is maintained in ZEMAIL table).<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>METHOD zclii_service_async_in~service_async_in.</STRONG><BR /> <BR /> */ Structure declarations<BR /> TYPES: BEGIN OF ty_input,<BR /> us_name TYPE xubname,<BR /> rep_name TYPE xubname,<BR /> begda TYPE begdatum,<BR /> endda TYPE enddatum,<BR /> reppr TYPE hr_rep_prf,<BR /> active TYPE hs_rep_act,<BR /> END OF ty_input.<BR /> TYPES: BEGIN OF ty_final,<BR /> us_name TYPE xubname,<BR /> rep_name TYPE xubname,<BR /> begda TYPE begdatum,<BR /> endda TYPE enddatum,<BR /> reppr TYPE hr_rep_prf,<BR /> active TYPE hs_rep_act,<BR /> message(100) TYPE c,<BR /> END OF ty_final.<BR /> <BR /> DATA: substituted_obj TYPE swragent,<BR /> substitute TYPE swragent,<BR /> sub_beg TYPE swr_substbegin,<BR /> sub_end TYPE swr_substend,<BR /> sub_pfile TYPE swr_substprof,<BR /> sub_act TYPE swr_substactive,<BR /> lang TYPE sylangu,<BR /> ext_badi TYPE xfeld,<BR /> ret_code TYPE sysubrc,<BR /> msg_lines TYPE TABLE OF swr_messag,<BR /> msg_str TYPE TABLE OF swr_mstruc,<BR /> subs_tab TYPE TABLE OF swragent,<BR /> date(2) TYPE c,<BR /> month(2) TYPE c,<BR /> year(4) TYPE c,<BR /> lv_datum(8) TYPE c,<BR /> lv_dat(8) TYPE c.<BR /> <BR /> */ Data declarations<BR /> DATA:<BR /> */ Internal Tables<BR /> lt_input TYPE TABLE OF ty_input,<BR /> lt_output TYPE TABLE OF ty_input,<BR /> lt_modify TYPE TABLE OF ty_input,<BR /> lt_temp TYPE TABLE OF ty_input,<BR /> lt_insert TYPE TABLE OF ty_input,<BR /> lt_update TYPE TABLE OF ty_input,<BR /> lt_updatex TYPE TABLE OF ty_input,<BR /> lt_deletex TYPE TABLE OF ty_input,<BR /> lt_email_address TYPE ifp_tab_address,<BR /> lt_binary_content TYPE solix_tab,<BR /> lt_email_body TYPE TABLE OF tline,<BR /> <BR /> */ Local Reference<BR /> lo_email TYPE REF TO zcl_gen_utilities,<BR /> <BR /> */ Local Structures<BR /> ls_output TYPE ty_input,<BR /> ls_insert TYPE ty_input,<BR /> ls_update TYPE ty_input,<BR /> ls_updatex TYPE ty_input,<BR /> ls_deletex TYPE ty_input,<BR /> ls_email_body TYPE tline,<BR /> ls_email_address TYPE ifp_str_address,<BR /> <BR /> */ Local Variables<BR /> lv_string TYPE string,<BR /> lv_size TYPE so_obj_len,<BR /> lv_subject(50),<BR /> lv_enddate TYPE sy-datum,<BR /> lv_err TYPE c,<BR /> lc_tab TYPE c VALUE cl_bcs_convert=&gt;lc_tab,<BR /> lc_crlf TYPE c VALUE cl_bcs_convert=&gt;lc_crlf.<BR /> <BR /> DATA:<BR /> subst_tab TYPE STANDARD TABLE OF hrus_d2, "TABLES PARAM<BR /> wa_subst_tab LIKE LINE OF subst_tab,<BR /> err_tab TYPE STANDARD TABLE OF hrscmperr, "TABLES PARAM<BR /> wa_err_tab LIKE LINE OF err_tab.<BR /> <BR /> DATA: lt_final TYPE TABLE OF ty_final,<BR /> ls_final TYPE ty_final,<BR /> lt_hrus TYPE TABLE OF hrus_d2,<BR /> lt_temp TYPE TABLE OF hrus_d2.<BR /> <BR /> */ Constants Declarations<BR /> <BR /> CONSTANTS: lc_eamt_parameters TYPE string VALUE 'ZEMAIL', "<BR /> lc_ricefid_1234 TYPE zparam_name VALUE 'EMAIL1234', "<BR /> lc_param_name TYPE zmaptype1 VALUE 'Z1234_EMAIL'. "<BR /> "lc_eamt_parameters TYPE string VALUE 'ZEAMT_PARAMETERS', "<BR /> <BR /> REFRESH: lt_input, lt_output, lt_update, gt_insert, lt_updatex,<BR /> lt_final, lt_hrus, lt_temp, lt_temp, subst_tab, err_tab, gt_deletex.<BR /> CLEAR: ls_final, ls_output, ls_insert, gs_update, ls_updatex, ls_deletex.<BR /> <BR /> IF input-delegation_update_sap IS NOT INITIAL.<BR /> MOVE-CORRESPONDING input-delegation_update_sap-record TO lt_input.<BR /> <BR /> LOOP AT lt_input INTO DATA(ls_input).<BR /> ls_output-us_name = ls_input-us_name.<BR /> ls_output-rep_name = ls_input-rep_name.<BR /> ls_output-begda = ls_input-begda.<BR /> ls_output-endda = ls_input-endda.<BR /> ls_output-reppr = ls_input-reppr.<BR /> ls_output-active = ls_input-active.<BR /> APPEND ls_output TO lt_output.<BR /> CLEAR:ls_output,<BR /> ls_input.<BR /> ENDLOOP.<BR /> <BR /> LOOP AT lt_output INTO DATA(ls_output) WHERE reppr = '0003'.<BR /> month = ls_output-begda+0(2).<BR /> date = ls_output-begda+2(2).<BR /> year = ls_output-begda+4(4).<BR /> CONCATENATE year month date INTO ls_output-begda.<BR /> <BR /> month = ls_output-endda+0(2).<BR /> date = ls_output-endda+2(2).<BR /> year = ls_output-endda+4(4).<BR /> CONCATENATE year month date INTO ls_output-endda.<BR /> <BR /> SELECT SINGLE * FROM hrus_d2 INTO <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1407137">@DATA</a>(ls_hrus) WHERE us_name = <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1398583">@LieneS</a>_output-us_name<BR /> AND rep_name = <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1398583">@LieneS</a>_output-rep_name<BR /> AND begda = <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1398583">@LieneS</a>_output-begda.<BR /> "Case1 File data not in a table then insert a record<BR /> IF sy-subrc &lt;&gt; 0 AND ls_hrus IS INITIAL.<BR /> MOVE-CORRESPONDING ls_output TO ls_insert.<BR /> APPEND ls_insert TO gt_insert.<BR /> "Case2 File data in a table then update a record<BR /> ELSEIF ls_hrus IS NOT INITIAL.<BR /> <BR /> IF ls_output-endda = ls_hrus-endda. "It triggers Maintain Function module<BR /> MOVE-CORRESPONDING ls_output TO gs_update.<BR /> APPEND ls_update TO lt_update.<BR /> ELSEIF ls_output-endda &lt;&gt; ls_hrus-endda.. "It triggers delete FM and insert a record<BR /> MOVE-CORRESPONDING ls_output TO ls_updatex.<BR /> APPEND ls_updatex TO lt_updatex.<BR /> <BR /> MOVE-CORRESPONDING ls_output TO ls_deletex.<BR /> ls_deletex-endda = ls_hrus-endda. "need<BR /> APPEND ls_deletex TO gt_deletex.<BR /> ENDIF.<BR /> <BR /> ENDIF.<BR /> CLEAR: ls_insert, ls_output, ls_hrus, gs_update, ls_updatex, ls_deletex.<BR /> ENDLOOP.<BR /> <BR /> "Case3 Table data not in a file then need to update enddate and active<BR /> LOOP AT lt_output INTO DATA(gs_modify).<BR /> month = gs_modify-begda+0(2).<BR /> date = gs_modify-begda+2(2).<BR /> year = gs_modify-begda+4(4).<BR /> CONCATENATE year month date INTO gs_modify-begda.<BR /> <BR /> month = gs_modify-endda+0(2).<BR /> date = gs_modify-endda+2(2).<BR /> year = gs_modify-endda+4(4).<BR /> CONCATENATE year month date INTO gs_modify-endda.<BR /> <BR /> APPEND gs_modify TO lt_temp.<BR /> CLEAR: gs_modify.<BR /> ENDLOOP.<BR /> <BR /> IF lt_temp IS NOT INITIAL.<BR /> SELECT * FROM hrus_d2 INTO TABLE lt_temp WHERE reppr = '0003'.<BR /> <BR /> LOOP AT lt_temp INTO DATA(gs_temp).<BR /> DELETE lt_temp WHERE us_name = gs_temp-us_name<BR /> AND rep_name = gs_temp-rep_name<BR /> AND begda = gs_temp-begda.<BR /> CLEAR: gs_temp.<BR /> ENDLOOP.<BR /> lt_hrus = lt_temp.<BR /> <BR /> "Delete the records<BR /> LOOP AT lt_temp INTO DATA(ls_temp) WHERE active = 'X'.<BR /> substituted_obj-otype = 'US'.<BR /> substituted_obj-objid = ls_temp-us_name.<BR /> <BR /> substitute-otype = 'US'.<BR /> substitute-objid = ls_temp-rep_name.<BR /> APPEND substitute TO subs_tab.<BR /> <BR /> sub_beg = ls_temp-begda.<BR /> sub_end = ls_temp-endda.<BR /> <BR /> CALL FUNCTION 'SAP_WAPI_SUBSTITUTE_DELETE'<BR /> EXPORTING<BR /> substituted_obj = substituted_obj<BR /> start_date = sub_beg<BR /> end_date = sub_end<BR /> delete_without_date = 'X'<BR /> lang = sy-langu<BR /> ext_badi = ' '<BR /> IMPORTING<BR /> ret_code = ret_code<BR /> TABLES<BR /> substitutes = subs_tab<BR /> msg_lines = msg_lines<BR /> msg_str = msg_str.<BR /> CLEAR: ls_temp.<BR /> REFRESH: subs_tab.<BR /> ENDLOOP.<BR /> <BR /> "Change end date and active with space<BR /> LOOP AT lt_hrus INTO ls_hrus.<BR /> IF ls_hrus-active = 'X'.<BR /> gs_modify-us_name = ls_hrus-us_name.<BR /> gs_modify-rep_name = ls_hrus-rep_name.<BR /> gs_modify-begda = ls_hrus-begda.<BR /> lv_datum = sy-datum.<BR /> lv_dat = lv_datum - 1.<BR /> year = lv_dat+0(4).<BR /> month = lv_dat+4(2).<BR /> date = lv_dat+6(2).<BR /> CONCATENATE year month date INTO gs_modify-endda. "need to modify<BR /> gs_modify-reppr = ls_hrus-reppr.<BR /> gs_modify-active = ls_hrus-active.<BR /> APPEND gs_modify TO lt_modify.<BR /> CLEAR: gs_modify, ls_hrus, lv_dat.<BR /> ELSE.<BR /> MOVE-CORRESPONDING ls_hrus TO gs_modify.<BR /> APPEND gs_modify TO lt_modify.<BR /> CLEAR: gs_modify, ls_hrus.<BR /> ENDIF.<BR /> ENDLOOP.<BR /> ENDIF.<BR /> <BR /> LOOP AT lt_deletex INTO ls_deletex.<BR /> substituted_obj-otype = 'US'.<BR /> substituted_obj-objid = ls_deletex-us_name.<BR /> substitute-otype = 'US'.<BR /> substitute-objid = ls_deletex-rep_name.<BR /> APPEND substitute TO subs_tab.<BR /> sub_beg = ls_deletex-begda.<BR /> sub_end = ls_deletex-endda.<BR /> <BR /> CALL FUNCTION 'SAP_WAPI_SUBSTITUTE_DELETE'<BR /> EXPORTING<BR /> substituted_obj = substituted_obj<BR /> start_date = sub_beg<BR /> end_date = sub_end<BR /> delete_without_date = 'X'<BR /> lang = sy-langu<BR /> ext_badi = ' '<BR /> IMPORTING<BR /> ret_code = ret_code<BR /> TABLES<BR /> substitutes = subs_tab<BR /> msg_lines = msg_lines<BR /> msg_str = msg_str.<BR /> CLEAR: ls_deletex.<BR /> REFRESH: subs_tab.<BR /> ENDLOOP.<BR /> <BR /> "Case1 Create a new record<BR /> IF lt_insert IS NOT INITIAL.<BR /> <BR /> LOOP AT lt_insert INTO ls_insert.<BR /> substituted_obj-otype = 'US'.<BR /> substituted_obj-objid = ls_insert-us_name.<BR /> substitute-otype = 'US'.<BR /> substitute-objid = ls_insert-rep_name.<BR /> sub_beg = ls_insert-begda.<BR /> sub_end = ls_insert-endda.<BR /> sub_pfile = ls_insert-reppr.<BR /> sub_act = ls_insert-active.<BR /> <BR /> CALL FUNCTION 'SAP_WAPI_SUBSTITUTE_MAINTAIN'<BR /> EXPORTING<BR /> substituted_obj = substituted_obj<BR /> substitute = substitute<BR /> sub_beg = sub_beg<BR /> sub_end = sub_end<BR /> sub_pfile = sub_pfile<BR /> sub_act = sub_act<BR /> lang = sy-langu<BR /> ext_badi = ' '<BR /> IMPORTING<BR /> ret_code = ret_code<BR /> TABLES<BR /> msg_lines = msg_lines<BR /> msg_str = msg_str.<BR /> <BR /> IF ret_code = 0.<BR /> ls_final-us_name = ls_insert-us_name.<BR /> ls_final-rep_name = ls_insert-rep_name.<BR /> ls_final-begda = ls_insert-begda.<BR /> ls_final-endda = ls_insert-endda.<BR /> ls_final-reppr = ls_insert-reppr.<BR /> ls_final-active = ls_insert-active.<BR /> ls_final-message = 'Create a new record'.<BR /> APPEND ls_final TO lt_final.<BR /> ELSE.<BR /> ls_final-us_name = ls_insert-us_name.<BR /> ls_final-rep_name = ls_insert-rep_name.<BR /> ls_final-begda = ls_insert-begda.<BR /> ls_final-endda = ls_insert-endda.<BR /> ls_final-reppr = ls_insert-reppr.<BR /> ls_final-active = ls_insert-active.<BR /> ls_final-message = 'Record is already existed'.<BR /> APPEND ls_final TO lt_final.<BR /> ENDIF.<BR /> <BR /> CLEAR: ls_insert, ls_final.<BR /> ENDLOOP.<BR /> ENDIF.<BR /> "Case2 Update a existing record<BR /> IF lt_update IS NOT INITIAL. "It triggers update a existing record<BR /> LOOP AT lt_update INTO gs_update.<BR /> substituted_obj-otype = 'US'.<BR /> substituted_obj-objid = gs_update-us_name.<BR /> substitute-otype = 'US'.<BR /> substitute-objid = gs_update-rep_name.<BR /> sub_beg = gs_update-begda.<BR /> sub_end = gs_update-endda.<BR /> sub_pfile = gs_update-reppr.<BR /> sub_act = gs_update-active.<BR /> <BR /> CALL FUNCTION 'SAP_WAPI_SUBSTITUTE_MAINTAIN'<BR /> EXPORTING<BR /> substituted_obj = substituted_obj<BR /> substitute = substitute<BR /> sub_beg = sub_beg<BR /> sub_end = sub_end<BR /> sub_pfile = sub_pfile<BR /> sub_act = sub_act<BR /> lang = sy-langu<BR /> ext_badi = ' '<BR /> IMPORTING<BR /> ret_code = ret_code<BR /> TABLES<BR /> msg_lines = msg_lines<BR /> msg_str = msg_str.<BR /> <BR /> IF ret_code = 0.<BR /> ls_final-us_name = gs_update-us_name.<BR /> ls_final-rep_name = gs_update-rep_name.<BR /> ls_final-begda = gs_update-begda.<BR /> ls_final-endda = gs_update-endda.<BR /> ls_final-reppr = gs_update-reppr.<BR /> ls_final-active = gs_update-active.<BR /> ls_final-message = 'Modified Existing Record'.<BR /> APPEND ls_final TO lt_final.<BR /> ELSE.<BR /> ls_final-us_name = gs_update-us_name.<BR /> ls_final-rep_name = gs_update-rep_name.<BR /> ls_final-begda = gs_update-begda.<BR /> ls_final-endda = gs_update-endda.<BR /> ls_final-reppr = gs_update-reppr.<BR /> ls_final-active = gs_update-active.<BR /> ls_final-message = 'Record is already existed'.<BR /> APPEND ls_final TO lt_final.<BR /> ENDIF.<BR /> <BR /> CLEAR: gs_update, ls_final.<BR /> ENDLOOP.<BR /> ENDIF.<BR /> <BR /> IF lt_updatex IS NOT INITIAL. "It triggers delete FM and insert a new record<BR /> <BR /> LOOP AT lt_updatex INTO ls_updatex.<BR /> wa_subst_tab-us_name = ls_updatex-us_name.<BR /> wa_subst_tab-rep_name = ls_updatex-rep_name.<BR /> wa_subst_tab-begda = ls_updatex-begda.<BR /> wa_subst_tab-endda = ls_updatex-endda.<BR /> wa_subst_tab-reppr = ls_updatex-reppr.<BR /> wa_subst_tab-active = ls_updatex-active.<BR /> APPEND wa_subst_tab TO subst_tab.<BR /> <BR /> CALL FUNCTION 'RH_UPDATE_SUBST_LIST_SERVER'<BR /> TABLES<BR /> subst_tab = subst_tab<BR /> err_tab = err_tab<BR /> EXCEPTIONS<BR /> no_wf_plvar = 1<BR /> . " RH_UPDATE_SUBST_LIST_SERVER<BR /> <BR /> IF sy-subrc EQ 0.<BR /> "All OK<BR /> ELSEIF sy-subrc EQ 1. "Exception<BR /> "Add code for exception here<BR /> ENDIF.<BR /> CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'<BR /> EXPORTING<BR /> wait = '1'<BR /> * IMPORTING<BR /> * RETURN =<BR /> .<BR /> WAIT UP TO 1 SECONDS.<BR /> IF sy-subrc = 0.<BR /> ls_final-us_name = ls_updatex-us_name.<BR /> ls_final-rep_name = ls_updatex-rep_name.<BR /> ls_final-begda = ls_updatex-begda.<BR /> ls_final-endda = ls_updatex-endda.<BR /> ls_final-reppr = ls_updatex-reppr.<BR /> ls_final-active = ls_updatex-active.<BR /> ls_final-message = 'Modified Existing Record'.<BR /> APPEND ls_final TO lt_final.<BR /> ELSE.<BR /> ls_final-us_name = ls_updatex-us_name.<BR /> ls_final-rep_name = ls_updatex-rep_name.<BR /> ls_final-begda = ls_updatex-begda.<BR /> ls_final-endda = ls_updatex-endda.<BR /> ls_final-reppr = ls_updatex-reppr.<BR /> ls_final-active = ls_updatex-active.<BR /> ls_final-message = 'Record is already existed'.<BR /> APPEND ls_final TO lt_final.<BR /> ENDIF.<BR /> CLEAR: ls_final, ls_updatex, wa_subst_tab.<BR /> REFRESH: subst_tab.<BR /> ENDLOOP.<BR /> <BR /> ENDIF.<BR /> "Case3 modify a existing record<BR /> IF lt_modify IS NOT INITIAL.<BR /> LOOP AT lt_modify INTO gs_modify WHERE active = 'X'.<BR /> wa_subst_tab-us_name = gs_modify-us_name.<BR /> wa_subst_tab-rep_name = gs_modify-rep_name.<BR /> wa_subst_tab-begda = gs_modify-begda.<BR /> wa_subst_tab-endda = gs_modify-endda.<BR /> wa_subst_tab-reppr = gs_modify-reppr.<BR /> wa_subst_tab-active = ''.<BR /> APPEND wa_subst_tab TO subst_tab.<BR /> CALL FUNCTION 'RH_UPDATE_SUBST_LIST_SERVER'<BR /> TABLES<BR /> subst_tab = subst_tab<BR /> err_tab = err_tab<BR /> EXCEPTIONS<BR /> no_wf_plvar = 1<BR /> . " RH_UPDATE_SUBST_LIST_SERVER<BR /> <BR /> IF sy-subrc EQ 0.<BR /> "All OK<BR /> ELSEIF sy-subrc EQ 1. "Exception<BR /> "Add code for exception here<BR /> ENDIF.<BR /> CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'<BR /> EXPORTING<BR /> wait = '1'<BR /> * IMPORTING<BR /> * RETURN =<BR /> .<BR /> WAIT UP TO 1 SECONDS.<BR /> IF sy-subrc = 0.<BR /> ls_final-us_name = gs_modify-us_name.<BR /> ls_final-rep_name = gs_modify-rep_name.<BR /> ls_final-begda = gs_modify-begda.<BR /> ls_final-endda = gs_modify-endda.<BR /> ls_final-reppr = gs_modify-reppr.<BR /> ls_final-active = ''.<BR /> ls_final-message = 'Modified Existing Record'.<BR /> APPEND ls_final TO lt_final.<BR /> ELSE.<BR /> ls_final-us_name = gs_modify-us_name.<BR /> ls_final-rep_name = gs_modify-rep_name.<BR /> ls_final-begda = gs_modify-begda.<BR /> ls_final-endda = gs_modify-endda.<BR /> ls_final-reppr = gs_modify-reppr.<BR /> ls_final-active = ''.<BR /> ls_final-message = 'Record is already existed'.<BR /> APPEND ls_final TO lt_final.<BR /> ENDIF.<BR /> <BR /> CLEAR: gs_modify, ls_final, wa_subst_tab.<BR /> REFRESH: subst_tab.<BR /> ENDLOOP.<BR /> "table data not in a file then need to update end date and active with ‘space’.<BR /> LOOP AT lt_modify INTO gs_modify WHERE active = ''.<BR /> ls_final-us_name = gs_modify-us_name.<BR /> ls_final-rep_name = gs_modify-rep_name.<BR /> ls_final-begda = gs_modify-begda.<BR /> ls_final-endda = gs_modify-endda.<BR /> ls_final-reppr = gs_modify-reppr.<BR /> ls_final-active = ''.<BR /> ls_final-message = 'Activate with set to space'.<BR /> APPEND ls_final TO lt_final.<BR /> CLEAR: gs_modify, ls_final.<BR /> ENDLOOP.<BR /> <BR /> ENDIF.<BR /> <BR /> */Sending email notification<BR /> <BR /> IF lt_final IS NOT INITIAL. "Email<BR /> <BR /> CREATE OBJECT lo_email.<BR /> <BR /> lv_string = lv_string &amp;&amp;<BR /> 'User Name'(012) &amp;&amp; lc_tab &amp;&amp;<BR /> 'User Name'(013) &amp;&amp; lc_tab &amp;&amp;<BR /> 'Start Date'(014) &amp;&amp; lc_tab &amp;&amp;<BR /> 'End Date'(015) &amp;&amp; lc_tab &amp;&amp;<BR /> 'Substitute Profile'(016) &amp;&amp; lc_tab &amp;&amp;<BR /> 'Substitution Active'(017) &amp;&amp; lc_tab &amp;&amp;<BR /> 'Message'(018) &amp;&amp; lc_crlf.<BR /> <BR /> LOOP AT lt_final ASSIGNING FIELD-SYMBOL(&lt;fs_output&gt;).<BR /> <BR /> lv_string = lv_string &amp;&amp;<BR /> &lt;fs_output&gt;-us_name &amp;&amp; lc_tab &amp;&amp;<BR /> &lt;fs_output&gt;-rep_name &amp;&amp; lc_tab &amp;&amp;<BR /> &lt;fs_output&gt;-begda &amp;&amp; lc_tab &amp;&amp;<BR /> &lt;fs_output&gt;-endda &amp;&amp; lc_tab &amp;&amp;<BR /> &lt;fs_output&gt;-reppr &amp;&amp; lc_tab &amp;&amp;<BR /> &lt;fs_output&gt;-active &amp;&amp; lc_tab &amp;&amp;<BR /> &lt;fs_output&gt;-message &amp;&amp; lc_crlf .<BR /> <BR /> ENDLOOP.<BR /> <BR /> ls_email_body-tdline = 'Hi'.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> ls_email_body-tdline = ''.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> ls_email_body-tdline = ''.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> ls_email_body-tdline = 'Pleae see the attached file for the 3PL Substitution to S4'.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> ls_email_body-tdline = 'Can you please check the records'.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> ls_email_body-tdline = ''.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> ls_email_body-tdline = ''.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> ls_email_body-tdline = 'Thank you'.<BR /> APPEND ls_email_body TO lt_email_body.<BR /> CLEAR ls_email_body.<BR /> <BR /> * Convert the inernal table data into binary format.<BR /> IF lv_string IS NOT INITIAL.<BR /> lo_email-&gt;create_excel_content( EXPORTING<BR /> email_data = lv_string<BR /> IMPORTING<BR /> binary_content = lt_binary_content<BR /> size = lv_size ).<BR /> ENDIF.<BR /> <BR /> * Append all the emails<BR /> DATA(l_util) = NEW zcl_gen_utilities( ).<BR /> l_util-&gt;read_parameters_table( EXPORTING table = lc_eamt_parameters<BR /> name = lc_ricefid_1234<BR /> maptype1 = lc_param_name<BR /> IMPORTING data = DATA(lt_param_tab) ).<BR /> <BR /> CLEAR lt_email_address.<BR /> <BR /> LOOP AT lt_param_tab INTO DATA(lw_param_tab).<BR /> CLEAR ls_email_address.<BR /> ls_email_address-address = lw_param_tab-param1.<BR /> APPEND ls_email_address TO lt_email_address.<BR /> CLEAR ls_email_address.<BR /> ENDLOOP.<BR /> <BR /> CLEAR lv_subject.<BR /> lv_subject = '3PL Substitution to S4'.<BR /> <BR /> IF lt_email_address IS NOT INITIAL.<BR /> <BR /> lo_email-&gt;send_email_with_xls_attachment( EXPORTING<BR /> subject = lv_subject<BR /> email_address = lt_email_address<BR /> binary_content = lt_binary_content<BR /> size = lv_size<BR /> email_body_tab = lt_email_body ).<BR /> <BR /> ENDIF.<BR /> ENDIF. "Email<BR /> <BR /> ENDIF.<BR /> <BR /> <STRONG>ENDMETHOD.</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp; 2023-12-14T22:07:28+01:00 https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-12-update-ii-community-feedback-new-features-outlook-january-2024/ba-p/13575561 abap2UI5 - (12) Update II: Community Feedback, New Features & Outlook - January 2024 2024-01-08T09:16:02+01:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 Welcome to part 12 of this blog series introducing <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="nofollow noopener noreferrer"><STRONG>abap2UI5</STRONG></A> — an open-source project for developing UI5 apps purely in ABAP.<BR /> <BR /> <STRONG>Happy New Year, everyone! <span class="lia-unicode-emoji" title=":fireworks:">🎆</span><span class="lia-unicode-emoji" title=":sparkler:">🎇</span></STRONG><BR /> <BR /> <STRONG>As we enter 2024, let's take a moment to check out the new features added to abap2UI5 towards the end of last year and then delve into the ongoing changes currently underway. Some updates were in response to user issues, while others were inspired by community pull requests.</STRONG><BR /> <BR /> <STRONG>Blog Series &amp; More</STRONG><BR /> <BR /> You can find all the information about this project on&nbsp;<STRONG><A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">GitHub</A>&nbsp;</STRONG>and stay up-to-date by following on&nbsp;<STRONG><A href="https://twitter.com/abap2UI5" target="_blank" rel="noopener nofollow noreferrer">Twitter.</A></STRONG>&nbsp;Also, make sure to explore the other articles in this blog series.<BR /> <TABLE style="height: 168px" border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-development-of-ui5-apps-in-pure-abap-1-3/" target="_blank" rel="noopener noreferrer">(1) Introduction: Developing UI5 Apps Purely in ABAP</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/02/22/abap2ui5-output-of-lists-and-tables-toolbar-and-editable-2-3/" target="_blank" rel="noopener noreferrer">(2) Displaying Selection Screens &amp; Tables</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/03/30/abap2ui5-3-4-flow-logic-pop-ups-f4-help/" target="_blank" rel="noopener noreferrer">(3) Popups, F4-Help, Messages &amp; Controller Logic</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/02/abap2ui5-4-5-additional-features-demos/" target="_blank" rel="noopener noreferrer">(4) Advanced Functionality &amp; Demonstrations</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/12/abap2ui5-5-6-extensions-with-xml-views-html-js-custom-controls/" target="_blank" rel="noopener noreferrer">(5) Creating UIs with XML Views, HTML, CSS &amp; JavaScript</A>&nbsp;</STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><STRONG><A href="https://blogs.sap.com/2023/04/14/abap2ui5-6-7-installation-configuration-debugging/" target="_blank" rel="noopener noreferrer">(6) Installation, Configuration &amp; Troubleshooting</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="height: 14px;width: 603px"><A href="https://blogs.sap.com/2023/04/26/abap2ui5-7-7-technical-background-under-the-hood-of-abap2ui5/" target="_blank" rel="noopener noreferrer"><STRONG>(7) Technical Background: Under the Hood of abap2UI5</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer"><STRONG>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap</STRONG></A></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/09/11/abap2ui5-a2-community-feedback-new-features/" target="_blank" rel="noopener noreferrer">(9) Update I: Community Feedback &amp; New Features - Sep. 2023</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/04/abap2ui5-a3-extensions-i-exploring-external-libraries-native-device-capabilities/" target="_blank" rel="noopener noreferrer">(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px"><STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">(11) Extensions II: Guideline for Developing New Features in JavaScript</A></STRONG></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 603px;height: 14px">(12) Update II: Community Feedback &amp; New Features - Jan. 2024 (this blog post)</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <STRONG>Content</STRONG><BR /> <BR /> This post covers the following areas:<BR /> <OL><BR /> <LI>New Controls<BR /> <OL><BR /> <LI>Splitting Container</LI><BR /> <LI>Timeline</LI><BR /> <LI>Feed Input</LI><BR /> <LI>Side Panel</LI><BR /> </OL><BR /> </LI><BR /> <LI>New Custom Controls<BR /> <OL><BR /> <LI>cl_demo_output</LI><BR /> <LI>Multi Input Ext.</LI><BR /> <LI>Table Filtering Ext.</LI><BR /> </OL><BR /> </LI><BR /> <LI>New Functions<BR /> <OL><BR /> <LI>Nested Views with 3 Levels</LI><BR /> <LI>Data Binding on Cell Level</LI><BR /> <LI>Debugging Tools</LI><BR /> </OL><BR /> </LI><BR /> <LI>Community Feedback<BR /> <OL><BR /> <LI>TechEd</LI><BR /> <LI>Advent of Code</LI><BR /> <LI>Developer News</LI><BR /> </OL><BR /> </LI><BR /> <LI>Actual Changes &amp; Outlook<BR /> <OL><BR /> <LI>Integration with Launchpad &amp; BTP</LI><BR /> <LI>UI5 Version 2.x</LI><BR /> <LI>SAP UI5 Roadmap 2024</LI><BR /> </OL><BR /> </LI><BR /> </OL><BR /> Let’s begin with the first topic.<BR /> <H3 id="toc-hId-1093069534"><STRONG>1. New Controls</STRONG></H3><BR /> An increasing number of controls from the <STRONG><A href="https://sapui5.hana.ondemand.com/#/api" target="_blank" rel="nofollow noopener noreferrer">UI5 API</A></STRONG> are being integrated into abap2UI5 and can be utilized through the class <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/10/01/z2ui5_cl_xml_view.clas.abap" target="_blank" rel="nofollow noopener noreferrer">z2ui5_cl_xml_view</A></STRONG>. A special thanks to <STRONG><A href="https://github.com/choper725" target="_blank" rel="nofollow noopener noreferrer">choper725</A></STRONG> and all others who have contributed PRs in this direction over the last few months.<BR /> <BR /> <STRONG>1.1. Splitting Container</STRONG><BR /> <BR /> Organize your view using a Splitting Container; this control allows you to divide the view as needed and makes the sizes dynamically adjustable. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_splitting.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Splitting Container in abap2UI5</P><BR /> You can find the full source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_103.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>1.2. Timeline</STRONG><BR /> <BR /> Visualize your time-dependent data with the Timeline Control. Check out the following example:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_timeline.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Timeline in abap2UI5</P><BR /> Filtering and sorting on the frontend work out-of-the-box. You can find the full source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_113.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>1.3. Feed Input</STRONG><BR /> <BR /> Display chat and message texts using the Feed Input. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_feed.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Feed Input in abap2UI5</P><BR /> You can find the full source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_101.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>1.4. Side Panel</STRONG><BR /> <BR /> Try out the Side Panel to display a menu alongside your main page:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_side_panel.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Side Panel in abap2UI5</P><BR /> You can find the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_108.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <H3 id="toc-hId-896556029"><STRONG>2. New Custom Controls</STRONG></H3><BR /> Custom controls are an effective way to incorporate additional JavaScript logic into abap2UI5 and access it from the backend. You can find more information about this concept in the previous blog post <STRONG><A href="https://blogs.sap.com/2023/12/11/abap2ui5-a4-extensions-ii-guideline-for-developing-new-features-in-javascript/" target="_blank" rel="noopener noreferrer">here</A></STRONG>. The following new custom controls are now part of abap2UI5.<BR /> <BR /> <STRONG>2.1 CL_DEMO_OUTPUT / IF_OO_ADT_CLASSRUN</STRONG><BR /> <BR /> Building on these two classes, numerous test programs have been created. If you also want to send their output to a browser, you can now do so with abap2UI5. A <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/02/z2ui5_cl_cc_demo_output.clas.abap" target="_blank" rel="nofollow noopener noreferrer">Demo Output Custom Control</A></STRONG> has been developed that sends the HTML output of cl_demo_output to the frontend. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_demo_output.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">cl_demo_output Displayed in abap2UI5</P><BR /> Check out the full source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_115.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>. The same functionality works for the interface that creates output in ADT; check it out <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_116.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>2.2 Multi Input Extension</STRONG><BR /> <BR /> Sometimes, UI5 controls require additional JavaScript logic, because their current state cannot be easily transmitted to the backend through an event. This is particularly true for the Multi Input control, which involves additional token handling that is not automatically sent to the backend with the Multi Input Control's events. To address this, an additional <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/01/03/z2ui5_cl_fw_cc_multiinput_ext.clas.abap" target="_blank" rel="nofollow noopener noreferrer">Multi Input Custom Control</A> </STRONG>has been created to ensure that all tokens are sent to the backend, and vice versa. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/token_gif.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Multi Input &amp; Token Handling in abap2UI5</P><BR /> You can find the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_078.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>2.3 Table Filtering Extension</STRONG><BR /> <BR /> One advantage of the ui.table control is that many functionalities work at the frontend without the need for additional logic. For example, you can use filtering. Unfortunately, when making a backend request and performing a model update, these filters are deleted. To address this, a small <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/01/03/z2ui5_cl_fw_cc_uitable_ext.clas.abap" target="_blank" rel="nofollow noopener noreferrer">Table Custom Control</A></STRONG> has been added which enhances the filter functionality. It saves the current filter values and reapplies them after a model update. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_ui_filter.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Table with Filtered Values After Model Updates in abap2UI5</P><BR /> You can find the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_143.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <H3 id="toc-hId-700042524"><STRONG>3. New Functions</STRONG></H3><BR /> From time to time, the abap2UI5 framework itself requires extensions. The following new features have made their way into abap2UI5 over the last few months:<BR /> <BR /> <STRONG>3.1 Nested Views with 3 Levels</STRONG><BR /> <BR /> Nested views offer a way to partially rerender specific parts of the view. It is now possible to use up to two nested views and for example combine them for displaying positions and item details. Check out this demo:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_nest.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Nested Views with 3 Levels in abap2UI5</P><BR /> You can find the source code <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_098.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>3.2 Binding on Cell Level</STRONG><BR /> <BR /> Previously, it was only possible to bind the value of variables, components of structures, and tables to attributes of the view. Now, you can also bind values to specific cells of internal tables. This is especially helpful, for example, in generating multiple input fields based on table entries. To achieve this, simply extend the _bind method with the table and the index of your row:<BR /> <PRE class="language-abap"><CODE>LOOP AT t_tab REFERENCE INTO DATA(lr_row).<BR /> DATA(lv_tabix) = sy-tabix.<BR /> page-&gt;input( value = client-&gt;_bind_edit( val = lr_row-&gt;title tab = t_tab tab_index = lv_tabix ) ).<BR /> page-&gt;input( value = client-&gt;_bind_edit( val = lr_row-&gt;value tab = t_tab tab_index = lv_tabix ) ).<BR /> ENDLOOP.</CODE></PRE><BR /> This code snippet generates an input control for each cell within the internal table. Here's the code in action:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_cell_binding.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Data Binding on Cell Level in abap2UI5</P><BR /> You can find the full example <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples/blob/main/src/z2ui5_cl_demo_app_144.clas.abap" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> <STRONG>3.3 Debugger Tools</STRONG><BR /> <BR /> The only way to validate the XML View, Models, and Responses was by using the console. Now, by pressing CTRL+F12, a new popup opens, providing all information on Views, Models, and backend communication.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_debugging_tools.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Debugging Tools of abap2UI5</P><BR /> This simplifies issue identification, and further functionalities can be integrated into this popup in the future.<BR /> <H3 id="toc-hId-503529019"><STRONG>4. Community Feedback</STRONG></H3><BR /> It's always gratifying to see the project gaining attention from other developers, being utilized in various projects, or featured in presentations. From this perspective, abap2UI5 enjoyed a very successful conclusion to last year. <span class="lia-unicode-emoji" title=":party_popper:">🎉</span><BR /> <BR /> <STRONG>4.1 SAP TechEd</STRONG><BR /> <BR /> The SAP Developer Advocates highlighted ABAP Open Source projects and showcased a small abap2UI5 demo with a Feed Control during last year's SAP TechEd Developer Keynote.<BR /> <BR /> This achievement wouldn't have been possible without the great <STRONG><A href="https://abapgit.org/" target="_blank" rel="nofollow noopener noreferrer">abapGit</A></STRONG> project, which is essential for open source development in ABAP. I hope I've emphasized enough in this blog series how much abap2UI5 benefits from the contributions of other developers &amp; open source projects. Much of this groundwork was done even before abap2UI5 existed. A big thank you for the showcase and to all developers who are actively engaged in the ABAP Open Source Community! <span class="lia-unicode-emoji" title=":folded_hands:">🙏</span><BR /> <BR /> <A href="https://www.youtube.com/watch?v=kLbF0ooStZs&amp;t=3052s" target="test_blank" rel="nofollow noopener noreferrer">https://www.youtube.com/watch?v=kLbF0ooStZs&amp;t=3052s</A><BR /> <BR /> <STRONG>4.2 Advent of Code</STRONG><BR /> <BR /> This year, in the Advent of Code, <STRONG><SPAN class="mention-scrubbed">jorgen_lindqvist41</SPAN> </STRONG>gave abap2UI5 a try. He created an excellent template for solving the daily puzzles, which you can view in his <STRONG><A href="https://blogs.sap.com/2023/11/27/preparing-for-advent-of-code-2023/" target="_blank" rel="noopener noreferrer">blog post</A></STRONG>. The template is available on GitHub <STRONG><A href="https://github.com/joltdx/abap-advent-2023-template" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>, and his solution can be seen <STRONG><A href="https://github.com/joltdx/abap-advent-2023" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>.<BR /> <BR /> Actually this inspired me to join the Advent of Code as well, but instead of solving puzzles, I ended up adding a new feature - cell binding - to abap2UI5, filling a missing aspect of the framework, as I found in his repository <STRONG><A href="https://github.com/joltdx/abap-advent-2023/blob/9a2b3899d92f937e9543b4b6ab9797d841c42935/src/zcl_advent_2023_a2ui5.clas.abap#L28" target="_blank" rel="nofollow noopener noreferrer">here</A></STRONG>. But perhaps I'll return to it one day or use this template to join again next year. 🧑‍<span class="lia-unicode-emoji" title=":christmas_tree:">🎄</span><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/aba2UI5_advent_01.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Advent of Code with abap2UI5</P><BR /> <STRONG>4.3. SAP Developer News</STRONG><BR /> <BR /> This blog series concluded last year with a final post on extending abap2UI5 with new features using custom controls. A big thank you for featuring this article in the Developer News! Let's see which additional custom controls will find their way into abap2UI5 in 2024!<BR /> <BR /> <A href="https://www.youtube.com/watch?v=CfH9L03WUCg&amp;t=350s" target="test_blank" rel="nofollow noopener noreferrer">https://www.youtube.com/watch?v=CfH9L03WUCg&amp;t=350s</A><BR /> <H3 id="toc-hId-307015514"><STRONG>5. Actual Changes &amp; 2024</STRONG></H3><BR /> Currently, most changes are being made with a focus on ensuring compatibility with upcoming updates of the UI5 library and enabling the integration of abap2UI5 with launchpads and BTP Cloud Services.<BR /> <BR /> <STRONG>5.1. Launchpad &amp; BTP Integration</STRONG><BR /> <BR /> abap2UI5 is designed for simplicity, operating on a single HTTP handler. This design allows easy installation on both 'ABAP Cloud' and 'Standard ABAP'. However, sometimes it's useful to have an independent UI5 app that isn't tied to the ABAP artifacts, making it deployable to BTP or other services. To address this, you have now also the option to use a standalone UI5 app which interacts with the backend via the HTTP handler, displaying abap2UI5 apps:<BR /> <BR /> <STRONG><A href="https://github.com/abap2UI5/abap2UI5-btp_proxy_app" target="_new" rel="noopener nofollow noreferrer">abap2UI5 Extension - BTP Proxy App</A></STRONG><BR /> <BR /> There is still some work to do, but if you're interested in beta testing, please explore this project and report any issues encountered. Upon completion of testing, I might take this opportunity to explore the new SCN blog platform and write a detailed article on this topic.<BR /> <BR /> This integration approach is also applicable for the integration with on-premise launchpads. The following repository offers an UI5 app as a BSP, ensuring a straightforward installation with abapGit:<BR /> <BR /> <STRONG><A href="https://github.com/abap2UI5/abap2UI5-launchpad_on_premise" target="_new" rel="noopener nofollow noreferrer">abap2UI5 Extension - On-Premise Launchpad</A></STRONG><BR /> <BR /> Feel free to explore this repository as well and report any encountered issues.<BR /> <BR /> <STRONG>5.2 UI5 Version 2.x</STRONG><BR /> <BR /> Another current focus is ensuring compatibility with future improvements of the UI5 Library. Towards the end of last year, the initial version of UI5 2.x was released. For more information, refer to this blog post:<BR /> <BR /> <A href="https://blogs.sap.com/2023/12/21/introducing-openui5-2.x/" target="_blank" rel="noopener noreferrer">https://blogs.sap.com/2023/12/21/introducing-openui5-2.x/</A><BR /> <BR /> This new version removes certain dependencies, resulting in limitations on using specific UI5 features. For example, module loading is now constrained, and the use of UI5's jQuery is no longer supported. You can conduct tests by bootstrapping from the following source:<BR /> <BR /> <A href="https://sdk.openui5.org/nightly/2/index.html" target="_blank" rel="nofollow noopener noreferrer">https://sdk.openui5.org/nightly/2/index.html</A><BR /> <BR /> Changes have already been implemented in recent weeks, allowing abap2UI5 to operate with the new UI5 version:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_ui2.gif" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">abap2UI5 Bootstrapped with UI5 Version 2.x</P><BR /> In some custom controls and demos, there are still some changes to be made, but these will be addressed in the future. I also suggest periodically bootstrapping with UI5 2.x to ensure proper functionality of your apps. Should you encounter any problems, please create an issue.<BR /> <BR /> <STRONG>5.3 UI5 Roadmap 2024</STRONG><BR /> <BR /> Moreover, several new functionalities for the UI5 Library are currently under development. You can find more details about them in the UI5 roadmap available here:<BR /> <BR /> <A href="https://roadmaps.sap.com/board?PRODUCT=73554900100800001361" target="_blank" rel="noopener noreferrer">https://roadmaps.sap.com/board?PRODUCT=73554900100800001361</A><BR /> <BR /> It will be exciting to see how many of these changes can also be integrated into abap2UI5.<BR /> <H3 id="toc-hId-110502009"><STRONG>6. Conclusion</STRONG></H3><BR /> This concludes the update on abap2UI5 functionalities. Feel free to experiment with the new features in your own abap2UI5 apps. This project is continuously evolving without a fixed roadmap or specific goal. Every pull request is appreciated, and now I'm eagerly looking forward to what 2024 will bring to the project. <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span><BR /> <BR /> Thank you for reading! Your questions, comments, and wishes for this project are always welcome. Leave a comment or create an <STRONG><A href="https://github.com/abap2UI5/ABAP2UI5/issues" target="_blank" rel="noopener nofollow noreferrer">issue</A></STRONG>. 2024-01-08T09:16:02+01:00