https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/SAP-R3-blog-posts.xml SAP Community - SAP R/3 2026-02-12T12:13:35.671870+00:00 python-feedgen SAP R/3 blog posts in SAP Community https://community.sap.com/t5/enterprise-resource-planning-blog-posts-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-blog-posts-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 <TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Update 01.01.2025<BR /></STRONG><SPAN class="">Please note that some information in this blog article may be outdated. For the most current details, refer to our&nbsp;<STRONG><A href="https://abap2ui5.github.io/docs/" target="_blank" rel="noopener nofollow noreferrer">Documentation</A></STRONG> and s</SPAN><SPAN class="">tay informed by following us on <STRONG><A href="https://www.linkedin.com/company/abap2ui5/" target="_self" rel="nofollow noopener noreferrer">LinkedIn</A></STRONG>.</SPAN><STRONG><BR /></STRONG></TD></TR></TBODY></TABLE><P>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 />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://www.linkedin.com/company/abap2ui5" target="_blank" rel="noopener nofollow noreferrer">LinkedIn</A> </STRONG>and explore the other articles in this blog series:</P><TABLE border="1"><TBODY><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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, Value-Help, Messages &amp; Controller Logic</A></STRONG></TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD>(7) Technical Background: Under the Hood of abap2UI5 (this blog post)</TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR></TBODY></TABLE><P><BR /><STRONG>Content</STRONG></P><DIV><DIV><DIV><DIV><DIV><DIV><DIV><DIV><DIV><DIV><DIV><DIV>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).</DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV><H3 id="toc-hId-1092174820"><STRONG>Technical Background</STRONG></H3><P>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="noopener nofollow noreferrer"><STRONG>blog post:</STRONG></A></P><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><P>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=""><SPAN class=""><STRONG><A href="https://htmx.org/" target="_blank" rel="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-16.08.57.png" border="0" width="399" height="203" /></P><P class="">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><P>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="noopener nofollow noreferrer"><STRONG>here.</STRONG></A> Let's compare this approach to that of multi-page applications (MPA) and single-page applications (SPA):</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-30-um-20.28.26.png" border="0" /></P><P class="">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="noopener nofollow noreferrer">(Quelle)</A></STRONG></P><P>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="noopener nofollow 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="noopener nofollow 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=""><SPAN class=""><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=""><SPAN class=""><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=""><SPAN class=""><STRONG><A href="https://htmx.org/" target="_blank" rel="noopener nofollow noreferrer">htmx</A></STRONG></SPAN></SPAN>, <SPAN class=""><SPAN class=""><STRONG><A href="https://hotwired.dev/" target="_blank" rel="noopener nofollow noreferrer">hotwire</A> </STRONG>or</SPAN></SPAN> <STRONG><SPAN class=""><SPAN class=""><A href="https://unpoly.com/" target="_blank" rel="noopener nofollow noreferrer">unpoly</A> </SPAN></SPAN></STRONG><SPAN class=""><SPAN class="">(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="noopener nofollow noreferrer">here</A></STRONG> and <STRONG><A href="https://blog.codecentric.de/hotwire-new-approach-for-modern-web-applications" target="_blank" rel="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-27-um-23.09.40.png" border="0" width="421" height="241" /></P><P class="">"Sweet Spot" between SPA and MPA <STRONG><A href="https://unpoly.com/" target="_blank" rel="noopener nofollow noreferrer">(Quelle)</A></STRONG></P><P>Most of my knowledge about this subject comes from this <A href="https://htmx.org/essays/" target="_blank" rel="noopener nofollow 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="noopener nofollow 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="noopener nofollow noreferrer"><STRONG>UI5</STRONG></A> differs significantly from frameworks like <SPAN class=""><SPAN class=""><STRONG><A href="https://htmx.org/" target="_blank" rel="noopener nofollow noreferrer">htmx</A></STRONG></SPAN></SPAN> and <STRONG><SPAN class=""><SPAN class=""><A href="https://unpoly.com/" target="_blank" rel="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-10-um-16.56.08.png" border="0" width="420" height="168" /></P><P class="">UI5 normally - ABAP delivers only Data</P><P><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 src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-30-um-20.50.18.png" border="0" width="422" height="167" /><EM>"UI5 Over the Wire" - ABAP delivers Data &amp; View together</EM></P><P>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><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-30-um-20.47.34.png" border="0" width="482" height="131" /></P><P class="">UI5 app downgraded to an HDA - Displaying Data &amp; View received from the server</P><P>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 src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-19.34.39.png" border="0" width="510" height="294" /></P><P class="">"UI5 Over the Wire" - Server to Client Communication</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-19.55.11.png" border="0" /></P><P>&nbsp;</P><P class="">UI5 vs. "UI5 Over the Wire" - Communication</P><P>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 src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-03-um-13.53.51.png" border="0" width="539" height="228" /></P><P class="">"UI5 Over the Wire" - Response with View &amp; Data together</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-07.25.09.png" border="0" width="462" height="527" /></P><P class="">RAP - Definition of Views with UI Annotations</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-07.27.04.png" border="0" width="460" height="311" /></P><P class="">RAP - Definition of Data Models with DDL</P><P>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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-06.30.11.png" border="0" width="523" height="174" /></P><P class="">Data Transfer in abap2UI5 - ABAP variables &amp; tables are automatically synchronized with the UI5-Model</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-02-um-06.43.22.png" border="0" width="553" height="215" /></P><P class="">OData vs. UI5 Over the Wire - Model &amp; Data transfer</P><P><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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-17.40.48.jpeg" border="0" width="469" height="326" /></P><P class="">abap2UI5 - Dynamic Data Binding &amp; Model Creation</P><P>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="noopener nofollow 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):</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_se16_2.gif" border="0" width="547" height="354" /></P><P class="">Replacing the Model (metadata) at Runtime</P><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="noopener nofollow noreferrer"><STRONG>following app</STRONG></A>, a table control is replaced with a list control and vice versa:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_ui_change2-1.gif" border="0" width="502" height="314" /></P><P class="">Replacing the View at Runtime</P><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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-27-um-23.26.34.png" border="0" width="396" height="259" /></P><P class="">RAP vs. Model &amp; View decoupled from the (single &amp; generic) HTTP-Service</P><P>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.</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-13.43.14.png" border="0" width="463" height="146" /></P><P class="">Call stack of an abap2UI5 app</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/gif_dev.gif" border="0" width="633" height="313" /></P><P class="">Developing the ABAP class without restarting the frontend app</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-17.52.43.png" border="0" width="478" height="512" /></P><P class="">abap2UI5 app - one place for everything</P><P>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):</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-13.52.24.png" border="0" width="487" height="124" /></P><P class="">z2ui5_t_draft - the abap2UI5 persistence for interim results</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-27-um-23.30.50.png" border="0" width="444" height="255" /></P><P class="">RAP vs. Single (generic) Draft Table in abap2UI5</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-29-um-11.53.23.png" border="0" width="513" height="283" /></P><P class="">SAP GUI (stateful) vs. abap2UI5 (restful)</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-14.40.14.png" border="0" width="481" height="153" /></P><P class="">index.html stored in ABAP Source Code instead of using a BSP</P><P>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.</P><P class=""><STRONG>(18) Everything is maintained &amp; developed in the Backend</STRONG></P><P>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="noopener nofollow 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="noopener nofollow 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:</P><P class=""><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-20-um-16.36.26.png" border="0" width="504" height="83" /></P><P class="">XML-View created by the user and ready for the 'Wire'</P><P>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="noopener nofollow 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="noopener nofollow noreferrer"><STRONG>UI5 API</STRONG> </A>via ADT code completion:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-21-um-11.06.21.png" border="0" width="422" height="139" /></P><P class="">z2ui5_cl_xml_view - UI5 API (frontend) used for Code Completion in ADT (backend)</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-20-um-16.22.14.png" border="0" width="497" height="78" /></P><P class="">Expression Binding (Side Effects) in abap2UI5 - Mixture of ABAP and JavaScript</P><P><STRONG>(21) Separated _bind and _event method</STRONG></P><P class="">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><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-19-um-12.56.13.png" border="0" width="446" height="170" /></P><P class="">First approach - Data binding and events are not separated from the view</P><P>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):</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-20-um-16.34.00.png" border="0" width="490" height="171" /></P><P class="">Actual Approach - extra methods for the event and binding</P><P>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.</P><P class=""><STRONG>(22) "Over the Wire" sending JS, HTML &amp; CSS&nbsp;</STRONG></P><P>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="noopener nofollow 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:</P><P class=""><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-19-um-12.52.40.png" border="0" width="487" height="183" /></P><P class="">App delivering its own JavaScript "Over the Wire"</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-05-01-um-17.31.45.png" border="0" width="508" height="279" /></P><P class="">abap2UI5 app sending custom Javascript to the client</P><P><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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-23-um-21.13.40-1.png" border="0" width="403" height="245" /></P><P class="">if_oo_adt_classrun vs. abap2UI5</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-17-um-13.53.27.png" border="0" width="410" height="134" /></P><P class="">System footprint of abap2UI5</P><P>The entire framework logic is implemented in the HTTP-Handler class:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-24-um-15.03.53.png" border="0" width="434" height="322" /></P><P class="">This is all that abap2UI5 does</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-23-um-21.27.09.png" border="0" width="515" height="296" /></P><P class="">AJAX Post Handler</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-16.32.35.png" border="0" width="406" height="158" /></P><P class="">Local Bootstrapping - UI5 version depends on the SAP release</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-16.32.41.png" border="0" width="412" height="213" /></P><P class="">CDN Bootstrapping - UI5 version independent from the SAP release</P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Bildschirm­foto-2023-03-30-um-09.01.34.png" border="0" width="461" height="188" /></P><P class="">GUID creation compatible to ABAP Cloud and Standard ABAP</P><P>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="noopener nofollow 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="noopener nofollow 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="noopener nofollow 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 />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="noopener nofollow noreferrer"><STRONG>abaplint dashboard</STRONG></A> of this project.<STRONG>&nbsp;</STRONG>Besides <STRONG><A href="https://abaplint.app/" target="_blank" rel="noopener nofollow noreferrer">abaplint</A></STRONG> this framework uses <A href="https://abapgit.org/" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abapGit</STRONG></A> and benefits from the work <A href="https://abapgit.org/sponsor.html" target="_blank" rel="noopener nofollow noreferrer"><STRONG>of the people who built it:</STRONG></A></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/04/Bildschirm­foto-2023-04-28-um-17.04.22.png" border="0" width="483" height="157" /></P><P class="">abap2UI5 runs on every system with abapGit &amp; abaplint</P><H3 id="toc-hId-895661315"><STRONG>Summary</STRONG></H3><P class="">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><P class="">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).</P><H3 id="toc-hId-699147810"><STRONG>Conclusion</STRONG></H3><P>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>.</P> 2023-04-26T10:37:54+02:00 https://community.sap.com/t5/technology-blog-posts-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 zainabfatima28 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-blog-posts-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-blog-posts-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-blog-posts-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-blog-posts-by-members/abap2ui5-8-repository-organization-working-with-abapgit-abaplint-amp-open/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 <TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Update 01.01.2025<BR /></STRONG><SPAN class="">Please note that some information in this blog article may be outdated. For the most current details, refer to our&nbsp;<STRONG><A href="https://abap2ui5.github.io/docs/" target="_blank" rel="noopener nofollow noreferrer">Documentation</A></STRONG> and s</SPAN><SPAN class="">tay informed by following us on <STRONG><A href="https://www.linkedin.com/company/abap2ui5/" target="_self" rel="nofollow noopener noreferrer">LinkedIn</A></STRONG>.</SPAN><STRONG><BR /></STRONG></TD></TR></TBODY></TABLE><P>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="noopener nofollow noreferrer">GitHub</A></STRONG>, <STRONG><A href="https://abapgit.org/" target="_blank" rel="noopener nofollow noreferrer">abapGit</A></STRONG>, <STRONG><A href="https://abaplint.org/" target="_blank" rel="noopener nofollow noreferrer">abaplint</A></STRONG> and <STRONG><A href="https://github.com/open-abap" target="_blank" rel="noopener nofollow 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 />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://www.linkedin.com/company/abap2ui5" target="_blank" rel="noopener nofollow noreferrer">LinkedIn</A> </STRONG>and explore the other articles in this blog series:</P><TABLE border="1"><TBODY><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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, Value-Help, Messages &amp; Controller Logic</A></STRONG></TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD>(8) Repository Organization: Working with abapGit, abaplint &amp; open-abap (this blog post)</TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR></TBODY></TABLE><P><STRONG>Content</STRONG><BR /><BR />This post covers the following areas:</P><OL><OL><LI>Git - GitHub &amp; abapGit</LI><LI>GitHub - Working with Separated Branches</LI><LI>abaplint - Syntax Check &amp; Code Compatibility</LI><LI>abaplint - Static Code Analysis</LI><LI>abaplint - Quickfixes</LI><LI>abaplint - Cross Checks</LI><LI>abaplint - Dashboard</LI><LI>GitHub - Contribution with Forks &amp; Pull Requests</LI><LI>GitHub - Branch Protection</LI><LI>open-abap - Downport Functionality</LI><LI>open-abap - Unit Testing</LI><LI>open-abap - abap2UI5-web</LI><LI>Conclusion</LI></OL></OL><P>And here we go...</P><H3 id="toc-hId-1092051902"><STRONG>1. Git - GitHub &amp; abapGit</STRONG></H3><P>The codebase of abap2UI5 is version-controlled in a public Git repository on <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.41.20.png" border="0" width="386" height="225" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - Public Repository of abap2UI5</EM></P><P class="">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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-20-um-21.47.09.png" border="0" width="462" height="136" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - Code Changes of the public abap2UI5 repository</EM></P><P>And the leading and authoritative code version is the one stored on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.43.43.png" border="0" width="391" height="209" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/src/z2ui5_cl_fw_app_hello_world.clas.abap" target="_blank" rel="noopener nofollow noreferrer">Source Code</A></STRONG> of abap2UI5</EM></P><P>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="noopener nofollow noreferrer">issue management</A></STRONG>:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.50.10.png" border="0" width="421" height="240" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - Overview of Issues</EM></P><P>Or tracking code changes with the <STRONG><A href="https://github.com/abap2UI5/abap2UI5/commits/main" target="_blank" rel="noopener nofollow noreferrer">commit history</A></STRONG>:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.51.49.png" border="0" width="410" height="236" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - Commit History</EM></P><P>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="noopener nofollow noreferrer">abapGit</A></STRONG>, which integrates every ABAP system from version 702 and higher with GitHub.</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-15.53.33.png" border="0" width="299" height="89" /></P><P class="lia-align-center" style="text-align: center;"><EM>abapGit - Git Client for ABAP</EM></P><P>If you're new to Git and <STRONG><A href="https://abapgit.org/" target="_blank" rel="noopener nofollow 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="noopener nofollow noreferrer">team</A></STRONG> behind it.</P><H3 id="toc-hId-895538397"><STRONG>2. GitHub - Working with Separated Branches</STRONG></H3><P class="lia-align-left" style="text-align : left;">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.</P><P class="lia-align-left" style="text-align : left;">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="noopener nofollow noreferrer">development branch</A></STRONG> ("dev"), which is a duplicate of the code and is intended for active changes:<IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-09.55.56.png" border="0" /><EM>GitHub - Separated Development Branch for working on a New Feature</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.18.06.png" border="0" width="433" height="250" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub Pull Request - Incorporating Changes from the Dev Branch into the Main Branch</EM></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-09.57.39.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Repository after Merge - Both Branches Now Contain the Updated Source Code</EM></P><P>As you can see the separate branch ensures that only finalized and tested features find their way into the main branch.</P><H3 id="toc-hId-699024892"><STRONG>3. abaplint - Syntax Check and Code Compatibility</STRONG></H3><P>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="noopener nofollow noreferrer"><STRONG>abaplint</STRONG></A> addresses these concerns:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.26.15.png" border="0" width="354" height="237" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Static Code Analysis</EM></P><P>The tool <A href="https://abaplint.org/" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abaplint</STRONG></A> can be setup in various ways; in the case of abap2UI5, it is used as a GitHub Addon:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.28.06.png" border="0" width="408" height="107" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Installation as a GitHub Add-on</EM></P><P>For the project-specific setup, simply add an&nbsp;<STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/abaplint.jsonc" target="_blank" rel="noopener nofollow noreferrer">abaplint.json</A></STRONG> file to the repository. This file contains all settings and is structured as follows:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.29.32.png" border="0" width="324" height="178" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/main/abaplint.jsonc" target="_blank" rel="noopener nofollow noreferrer">Configuration</A></STRONG> via abaplint.json</EM></P><P>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:</P><PRE><CODE> "syntax": { "version": "v750",</CODE></PRE><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.40.19.png" border="0" width="455" height="208" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Checking the ABAP code</EM></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.40.53.png" border="0" width="456" height="166" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Identifying Incompatible Syntax</EM></P><P>In this case we used the "cmis_string" type, which is unavailable in NetWeaver 7.50 and causing findings:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.41.03.png" border="0" width="447" height="245" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Detailed Overview of Identified Issues</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.44.03.png" border="0" width="480" height="172" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Checks Passed Succesfully</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.02.19.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Setup - Repository with abaplint Syntax Check for Different ABAP Systems</EM></P><P>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.</P><H3 id="toc-hId-502511387"><STRONG>4. abaplint - Static Code Analysis</STRONG></H3><P>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="noopener nofollow noreferrer"><STRONG>here</STRONG>:</A></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-19.59.58.png" border="0" width="379" height="417" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Rules for Static Code Analysis</EM></P><P>The <STRONG><A href="https://github.com/abap2UI5/abap2UI5/blob/36c4c10101df018e1e374ba6ff7d91156573c571/abaplint.jsonc#L16" target="_blank" rel="noopener nofollow noreferrer">configuration</A></STRONG> file shows which ones are activated for the project:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-07-um-20.01.36.png" border="0" width="355" height="202" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Rule Configuration via Package.json</EM></P><P>For example, classic checks like "no database access in loops" <A href="https://rules.abaplint.org/db_operation_in_loop/" target="_blank" rel="noopener nofollow noreferrer"><STRONG>(here)</STRONG></A>:</P><PRE><CODE> "db_operation_in_loop": true,</CODE></PRE><P>Or <A href="https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md" target="_blank" rel="noopener nofollow 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="noopener nofollow noreferrer">(here):</A></STRONG></P><PRE><CODE> "prefer_xsdbool": true,</CODE></PRE><P>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="noopener nofollow noreferrer"><STRONG>(here)</STRONG></A>:</P><PRE><CODE> "unused_types": true, "unused_variables": { "severity": "Error", "exclude": ["z2ui5_cl_fw_utility.clas.testclasses.abap"], "skipNames": ["lv_dummy", "i_mv_editor"] },</CODE></PRE><P>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="noopener nofollow noreferrer">cyclomatic complexity</A> <A href="https://rules.abaplint.org/cyclomatic_complexity/" target="_blank" rel="noopener nofollow noreferrer">(here)</A>:</STRONG></P><PRE><CODE>"cyclomatic_complexity": { "exclude": [], "severity": "Error", "max": 20 }</CODE></PRE><P>Or checks enhancing readibilty, like avoiding 'exporting' in method calls <A href="https://rules.abaplint.org/exporting/" target="_blank" rel="noopener nofollow noreferrer"><STRONG>(here)</STRONG></A>:</P><PRE><CODE>"exporting" : true</CODE></PRE><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.08.21.png" border="0" width="433" height="208" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Pull Request successfully checked with abaplint</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.05.00.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Setup - Repository Organization with Static Code Checks using abaplint</EM></P><P>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.</P><H3 id="toc-hId-305997882"><STRONG>5. abaplint - Quickfixes</STRONG></H3><P>abaplint also provides Quickfixes as we know them from ATC. They are accessible directly on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.25.32.png" border="0" width="363" height="268" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Quickfixes on GitHub</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/afix01-1.gif" border="0" width="512" height="296" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Installation and Automated Quickfixes (Part I)</EM></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/afix02.gif" border="0" width="516" height="298" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Installation and Automated Quickfixes (Part II)</EM></P><P>In this case, a fix is added to remove double spaces (more complex fixes are also available). You can observe abaplint's code adjustments:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-12-um-19.27.19.png" border="0" width="497" height="286" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Code Adjusted by abaplint</EM></P><P>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="noopener nofollow noreferrer">repository</A></STRONG> and explore for yourself! Begin by initiating a new GitHub Codespace and executing the following commands in the terminal:</P><OL><OL><LI>Install the abaplint CLI globally by running:<BR /><PRE><CODE>npm install @abaplint/cli -g</CODE></PRE></LI></OL></OL><OL><OL><LI>Perform automated code fixing by entering:<DIV><DIV><BR /><PRE><CODE>abaplint --fix</CODE></PRE></DIV></DIV></LI></OL></OL><P>But might we be encompassing functionalities that are also offered, for example, by <A href="https://github.com/SAP/abap-cleaner" target="_blank" rel="noopener nofollow 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.</P><H3 id="toc-hId-109484377"><STRONG>6. abaplint - Cross Checks</STRONG></H3><P>The <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples" target="_blank" rel="noopener nofollow 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="noopener nofollow noreferrer">here:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-13-um-17.35.01.png" border="0" width="461" height="201" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Define Dependencies</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-15-um-08.26.21.png" border="0" width="376" height="118" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Incompatible Code Change in the Main Repository</EM></P><P>Attempting to update the abap2UI5 main branch with a PR now encounters abaplint cross-check failures and triggers errors:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-15-um-08.24.40.png" border="0" width="462" height="221" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Cross Check Failures due to Missing Importing Parameter used by the Samples Repository</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-10.32.50.png" border="0" width="514" height="203" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Setup - Repository with abaplint Cross-Checks</EM></P><P>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></P><H3 id="toc-hId--87029128"><STRONG>7. abaplint - Dashboard</STRONG></H3><P>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="noopener nofollow noreferrer">dashboards</A></STRONG> of public ABAP projects using abaplint:</P><TABLE border="1"><TBODY><TR><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.30.51.png" border="0" /></TD><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.31.04.png" border="0" /></TD></TR><TR><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.31.48.png" border="0" /></TD><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.32.23.png" border="0" /></TD></TR></TBODY></TABLE><P>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.</P><H3 id="toc-hId--283542633"><STRONG>8. GitHub - Contribution with Forks &amp; Pull Requests</STRONG></H3><P>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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-11-um-14.38.16.png" border="0" /></P><P>&nbsp;</P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - Create a new Fork</EM></P><P>Upon completion, they open a Pull Request, notifying the abap2UI5 repository owner about the change:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Unbenanntes-Bild.png" border="0" width="507" height="219" /></P><P>&nbsp;</P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - Create a Pull Request from a new Fork</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Unbenanntes-Bild2.png" border="0" width="435" height="274" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - abaplint checks Pull Requests</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-15-um-08.00.29.png" border="0" width="414" height="229" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Setup - Contribution with Forks</EM></P><P>Check out all Forks of abap2UI5 <STRONG><A href="https://github.com/abap2UI5/abap2UI5/forks" target="_blank" rel="noopener nofollow 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="noopener nofollow noreferrer">here</A></STRONG>.</P><H3 id="toc-hId--480056138"><STRONG>9. GitHub - Branch Protection</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-08.55.36.png" border="0" width="341" height="180" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub - Setup Branch Protection Rules</EM></P><P>Now, merging is deactivated until all tests run successfully, and the repository setup appears as follows:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.05.38.png" border="0" width="477" height="258" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Setup - Repository with Branch Protection</EM></P><H3 id="toc-hId--676569643"><STRONG>10. open-abap - Unit Testing</STRONG></H3><P>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):</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-08-um-09.02.10.png" border="0" width="434" height="123" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Unit Tests running on an ABAP Server</EM></P><P>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="noopener nofollow noreferrer">open-abap</A>:</STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.12.16.png" border="0" width="502" height="106" /></P><P class="lia-align-center" style="text-align: center;"><EM>open-abap - Any platform ABAP, serverless ABAP, ABAP on Node.js</EM></P><P class="lia-align-left" style="text-align : left;">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="noopener nofollow noreferrer">this:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.19.46.png" border="0" width="442" height="264" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub Action - Unit Tests with open-abap</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.21.41.png" border="0" width="426" height="248" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub Action - Running Unit Tests with open-abap</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-08.24.33.png" border="0" width="457" height="258" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Setup - Running Unit Tests with open-abap</EM></P><H3 id="toc-hId--948314517"><STRONG>11. abaplint - Downport Functionality</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/gif_downport_01.gif" border="0" width="450" height="260" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Downporting 7.50 Syntax down to 7.02 Syntax (Part I)</EM></P><P>&nbsp;</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/gif_downport_2.gif" border="0" width="455" height="263" /></P><P class="lia-align-center" style="text-align: center;"><EM>abaplint - Downporting 7.50 Syntax down to 7.02 Syntax (Part II)</EM></P><P>Check the <STRONG><A href="https://github.com/abap2UI5/abap2UI5-downport" target="_blank" rel="noopener nofollow noreferrer">downport repository</A></STRONG> to see that all new language features are downported to compatible 702 syntax:</P><TABLE border="1"><TBODY><TR><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.38.59.png" border="0" /></TD><TD><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.38.06.png" border="0" /></TD></TR><TR><TD>Before: 7.50 Syntax</TD><TD>After: 7.02 Syntax</TD></TR></TBODY></TABLE><P>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="noopener nofollow 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="noopener nofollow noreferrer">here:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.43.17.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>GitHub Action - Automated Downporting with abaplint</EM></P><P class="lia-align-center" style="text-align: center;">And the downported code is stored <STRONG><A href="https://github.com/abap2UI5/abap2UI5-downport" target="_blank" rel="noopener nofollow noreferrer">here:</A><BR /><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.44.48.png" border="0" /></STRONG><EM>abap2UI5 - Downport Repository</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-14-um-10.46.26.png" border="0" width="566" height="320" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Setup - Final Configuration</EM></P><H3 id="toc-hId--1144828022"><STRONG>12. abap2UI5-web with </STRONG><STRONG>open-abap</STRONG></H3><P>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?</P><P>As a final showcase, let's turn our attention to the project <STRONG><A href="https://github.com/larshp/abap2ui5-web" target="_blank" rel="noopener nofollow 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.</P><P>Don't miss to try this out yourself! Simply navigate to the <STRONG><A href="https://github.com/larshp/abap2ui5-web" target="_blank" rel="noopener nofollow noreferrer">repository</A></STRONG> and initiate a new GitHub Codespace. Then, open a new terminal and execute the following commands:</P><PRE><CODE>npm install npm test</CODE></PRE><P>And that's it! You can now try abap2UI5 apps on a Node.js server. Explore this final demonstration:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/a2ui5-web_01.gif" border="0" width="478" height="276" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5-web - Running abap2UI5 on Node.js (Part I)</EM></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/a2ui5-web_02.gif" border="0" width="472" height="273" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5-web - Running abap2UI5 on Node.js (Part II)</EM></P><P>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="noopener nofollow 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="noopener nofollow noreferrer">here</A></STRONG> and <STRONG><A href="https://playground.abaplint.org/" target="_blank" rel="noopener nofollow noreferrer">here:</A><BR /></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-16-um-12.29.13.png" border="0" width="400" height="158" /></P><P class="lia-align-center" style="text-align: center;"><EM>ABAP Code transpiled to JavaScript <STRONG><A href="https://transpiler.abaplint.org/" target="_blank" rel="noopener nofollow noreferrer">(Demo)</A></STRONG></EM></P><H3 id="toc-hId--1341341527"><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirmfoto-2023-08-16-um-12.28.52.png" border="0" width="396" height="234" /></H3><P class="lia-align-center" style="text-align: center;"><EM>abaplint running on open-abap <STRONG><A href="https://playground.abaplint.org/" target="_blank" rel="noopener nofollow noreferrer">(Demo)</A></STRONG></EM></P><P>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></P><H3 id="toc-hId--1537855032"><STRONG>13. Conclusion</STRONG></H3><P>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).</P><P>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="">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></P><P>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).</P><P>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.</P><P>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.</P><P>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>.</P> 2023-08-21T08:07:06+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/abap2ui5-9-update-i-community-feedback-amp-new-features/ba-p/13561966 abap2UI5 - (9) Update I: Community Feedback & New Features 2023-09-11T07:47:21+02:00 oblomov https://community.sap.com/t5/user/viewprofilepage/user-id/44240 <TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Update 01.01.2025<BR /></STRONG><SPAN class="">Please note that some information in this blog article may be outdated. For the most current details, refer to our <STRONG><A href="https://abap2ui5.github.io/docs/" target="_blank" rel="noopener nofollow noreferrer">Documentation</A></STRONG> and s</SPAN><SPAN class="">tay informed by following us on <STRONG><A href="https://www.linkedin.com/company/abap2ui5/" target="_self" rel="nofollow noopener noreferrer">LinkedIn</A></STRONG>.</SPAN><STRONG><BR /></STRONG></TD></TR></TBODY></TABLE><P>Welcome to part 9 of this blog series introducing <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abap2UI5</STRONG></A> — an open-source project for developing UI5 apps purely in ABAP.</P><P><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.</P><TABLE border="1"><TBODY><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD>(9) Update I: Community Feedback &amp; New Features - Sep. 2023 (this blog post)</TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR></TBODY></TABLE><P><BR /><STRONG>Content</STRONG><BR /><BR />This post covers the following areas:</P><OL><LI>Tree Controls</LI><LI>Partly View Rendering with Model Updates</LI><LI>Partly View Rendering with Nested Views</LI><LI>Displaying Dynamic Data with S-RTTI</LI><LI>CSV Upload/Download</LI><LI>Excel Upload/Download</LI><LI>Navigation Container</LI><LI>Visualization with Planning Calender, Gantt Charts and Process Flows</LI><LI>Message Manager</LI><LI>Generic Search Help</LI><LI>Developer Code Challenge</LI><LI>Demo &amp; Samples Repository</LI><LI>Conclusion</LI></OL><P>Let’s begin with the first topic.</P><H3 id="toc-hId-1092030698"><STRONG>1. Tree Controls</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-19-um-14.06.05.png" border="0" width="628" height="174" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Displaying UI5 Tree Controls</EM></P><P>Among many other use cases, tree structures can also be used to create popups for selecting items:<BR /><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/gif_popup_tree.gif" border="0" width="573" height="427" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Popup with Tree Control to Select an Item</EM></P><P>To generate the output shown above, you need to define a nested structure in ABAP as follows:</P><PRE><CODE>TYPES: BEGIN OF ts_tree_row_base, object TYPE string, col2 TYPE string, col3 TYPE string, col4 TYPE string, END OF ts_tree_row_base. TYPES: BEGIN OF ts_tree_level2. INCLUDE TYPE ts_tree_row_base, END OF ts_tree_level2. TYPES tt_tree_level2 TYPE STANDARD TABLE OF ts_tree_level2 WITH KEY object. TYPES: BEGIN OF ts_tree_level1, INCLUDE TYPE ts_tree_row_base, categories TYPE tt_tree_level2. END OF ts_tree_level1. TYPES tt_tree_level1 TYPE STANDARD TABLE OF ts_tree_level1 WITH KEY object.</CODE></PRE><P>And the <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.m.Tree" target="_blank" rel="noopener nofollow noreferrer">UI5 Tree Control</A></STRONG> is used in the view definition:</P><PRE><CODE>DATA(tab) = page-&gt;tree_table( rows = `{path:'` &amp;&amp; client-&gt;_bind( val = mt_tree path = abap_true ) &amp;&amp; `', parameters: {arrayNames:['CATEGORIES']}}` ). tab-&gt;tree_columns( )-&gt;tree_column( label = 'Object' )-&gt;tree_template( )-&gt;text( text = '{OBJECT}')-&gt;get_parent( )-&gt;get_parent( )-&gt;tree_column( label = 'Column2' )-&gt;tree_template( )-&gt;text( text = '{COL2}')-&gt;get_parent( )-&gt;get_parent( )-&gt;tree_column( label = 'Column3' )-&gt;tree_template( )-&gt;text( text = '{COL3}')-&gt;get_parent( )-&gt;get_parent( )-&gt;tree_column( label = 'Column4' )-&gt;tree_template( )-&gt;text( text = '{COL4}').</CODE></PRE><P>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="noopener nofollow 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="noopener nofollow noreferrer">here.</A> </STRONG>Thank you to <STRONG><A href="https://github.com/axelmohnen" target="_blank" rel="noopener nofollow noreferrer">axelmohnen</A></STRONG> and <STRONG><A href="https://github.com/WegnerDan" target="_blank" rel="noopener nofollow noreferrer">WegnerDan</A></STRONG> for their contributions and examples in this direction.</P><H3 id="toc-hId-895517193"><STRONG>2. Partly View Rendering I (Model Update)</STRONG></H3><P>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:</P><OL><OL><LI>view_display - This method rerenders the entire view</LI><LI>view_model_update - This method updates only the view model, and the UI5 framework will rerender only the affected controls</LI></OL></OL><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_filter.gif" border="0" width="617" height="349" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Model Update after Input Change</EM></P><P class="">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="noopener nofollow 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="noopener nofollow noreferrer">this demo</A> </STRONG>where new entries are added to a table every few seconds, and the scroll position and focus remain unchanged:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_scroll.gif" border="0" width="615" height="348" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Stable Focus and Scroll Position after Backend Model Updates</EM></P><P>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:</P><PRE><CODE>if client-&gt;check_on_navigated( ). "rerender the whole View endif.</CODE></PRE><P>Next, let's explore another method for partial rerendering.</P><H3 id="toc-hId-699003688"><STRONG>3. Partly View Rendering II (Nested Views)</STRONG></H3><P>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="noopener nofollow noreferrer">this example:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_master_detail.gif" border="0" width="628" height="356" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Master-Detail Layout with Nested Views</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_two_tabs.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Nested Views with Interacting Tables</EM></P><P>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="noopener nofollow noreferrer">here.</A> </STRONG>The nested view is added to the main view with the following function:</P><PRE><CODE>client-&gt;nest_view_display( val = lo_view_nested-&gt;stringify( ) id = `ParentView` method_insert = 'addMidColumnPage' method_destroy = 'removeAllMidColumnPages' ).</CODE></PRE><P>And the methods to rerender the nested view are similar to the ones of the main view:</P><OL><OL><LI>nest_view_display - This method rerenders the entire nested view</LI><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></OL></OL><P>A big thank you to <STRONG><A href="https://github.com/choper725" target="_blank" rel="noopener nofollow noreferrer">choper725</A></STRONG> for the example and testing abap2UI5 with nested views.</P><H3 id="toc-hId-502490183"><STRONG>4. Displaying Generic Data References with S-RTTI</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-19-um-14.23.22.png" border="0" width="441" height="317" /></P><P class="lia-align-center" style="text-align: center;"><EM>XSLT Serialization Error - Locally Created Types not supported</EM></P><P>Fortunately the open source project <STRONG><A href="https://github.com/sandraros/S-RTTI" target="_blank" rel="noopener nofollow noreferrer">S-RTTI</A></STRONG> solves this problem:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Bildschirm­foto-2023-08-19-um-14.15.35.png" border="0" width="543" height="327" /></P><P class="lia-align-center" style="text-align: center;"><EM>Open Source Project S-RTTI</EM></P><P>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="">sandra.rossi</SPAN></STRONG> for this idea and excellent <STRONG><A href="https://github.com/sandraros/S-RTTI" target="_blank" rel="noopener nofollow noreferrer">project.</A></STRONG></P><H3 id="toc-hId-305976678"><STRONG>5. CSV Upload &amp; Download</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_csv.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Upload CSV and Create Internal Table with its Content</EM></P><P>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="noopener nofollow noreferrer">here.</A></STRONG></P><H3 id="toc-hId-109463173"><STRONG>6. Excel Upload &amp; Download</STRONG></H3><P>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="noopener nofollow 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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_excel.gif" border="0" width="501" height="280" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Excel Download via Custom Control</EM></P><P>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="noopener nofollow 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="noopener nofollow 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="noopener nofollow 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="noopener nofollow 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.</P><H3 id="toc-hId--87050332"><STRONG>7. Navigation Container</STRONG></H3><P>First we take a look at the <STRONG><A href="https://sapui5.hana.ondemand.com/sdk/#/api/sap.m.NavContainer" target="_blank" rel="noopener nofollow noreferrer">UI5 Navigation Container</A></STRONG>. Check out this demo:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_nav_cont.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Navigation Container</EM></P><P>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="noopener nofollow 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:</P><PRE><CODE>client-&gt;_event_client( val = 'NAV_TO' t_arg = VALUE #( ( `NavCon` ) ( mv_selected_key ) ) ).</CODE></PRE><P>Furthermore, a lot of new controls for visualization are available.</P><H3 id="toc-hId--283563837"><STRONG>8. Visualization with Planning Calender, Gantt Chart and Process Flow</STRONG></H3><P>Look for example at this demo with <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.gantt.simple.GanttChartWithTable" target="_blank" rel="noopener nofollow noreferrer">UI5 Gantt Charts:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/Bildschirmfoto-2023-09-06-um-14.08.53.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Gantt Chart</EM></P><P class="">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="noopener nofollow noreferrer">here.</A> </STRONG>Or the <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.m.PlanningCalendar" target="_blank" rel="noopener nofollow noreferrer">UI5 Planning Calender:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/Bildschirmfoto-2023-09-06-um-14.09.06.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Planning Calender</EM></P><P>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="noopener nofollow noreferrer">here.</A> </STRONG>And the <STRONG><A href="https://sapui5.hana.ondemand.com/#/entity/sap.suite.ui.commons.ProcessFlow" target="_blank" rel="noopener nofollow noreferrer">UI5 Process Flow:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/Bildschirmfoto-2023-09-06-um-14.09.20.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Process Flow</EM></P><P>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="noopener nofollow 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="noopener nofollow noreferrer">choper725</A></STRONG> for these extensions.</P><H3 id="toc-hId--480077342"><STRONG>9. Message Manager</STRONG></H3><P>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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_message_manager.gif" border="0" width="614" height="343" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Message Manager</EM></P><P>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="noopener nofollow 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="noopener nofollow noreferrer">here.</A></STRONG></P><H3 id="toc-hId--676590847"><STRONG>10. Generic Search Help</STRONG></H3><P>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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_search.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Generic Search Help (Activated DDIC Objects)</EM></P><P>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="noopener nofollow 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="noopener nofollow 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="noopener nofollow noreferrer">axelmohnen</A></STRONG> for your contribution and for sharing this idea.</P><H3 id="toc-hId--948335721"><STRONG>11. Developer Code Challenge</STRONG></H3><P><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="noopener nofollow noreferrer">Axage</A></STRONG> by <STRONG><SPAN class="">enno.wulff</SPAN></STRONG>. One particularly remarkable solution was developed by <SPAN class="">jacques.nomssi</SPAN>, which includes images, text areas, input controls and many more. Look at this solution:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/thequest_view.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Open-Source Axage with Magical World in ABAP</EM></P><P>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="">jacques.nomssi</SPAN></P><H3 id="toc-hId--1144849226"><STRONG>12. Demo &amp; Sample Repository</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gif_demo.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Complete Demo</EM></P><P>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="noopener nofollow 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="noopener nofollow 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="noopener nofollow noreferrer">abap2UI5 samples repository:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/gut.png" border="0" width="446" height="549" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Samples</EM></P><P>Feel free to explore it; the code snippets can be quickly copied &amp; pasted and are ready-to-use for your own development.</P><H3 id="toc-hId--1341362731"><STRONG>13. Conclusion</STRONG></H3><P>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="noopener nofollow 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.</P><DIV><BR /><DIV><DIV>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></DIV></DIV></DIV> 2023-09-11T07:47:21+02:00 https://community.sap.com/t5/human-capital-management-blog-posts-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-blog-posts-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-blog-posts-by-members/abap2ui5-10-extensions-i-exploring-external-libraries-amp-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 <TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Update 01.01.2025</STRONG><BR /><SPAN class="">Please note that some information in this blog article may be outdated. For the most current details, refer to our&nbsp;<STRONG><A href="https://abap2ui5.github.io/docs/" target="_blank" rel="noopener nofollow noreferrer">Documentation</A></STRONG> and s</SPAN><SPAN class="">tay informed by following us on <STRONG><A href="https://www.linkedin.com/company/abap2ui5/" target="_self" rel="nofollow noopener noreferrer">LinkedIn</A></STRONG>.</SPAN></TD></TR></TBODY></TABLE><P class="lia-align-left" style="text-align : left;">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.</P><P class="lia-align-left" style="text-align : left;"><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></P><P class="lia-align-left" style="text-align : left;">All demos showcased in this blog are ready for use and can be easily tried out by installing the <STRONG><A href="https://github.com/abap2UI5/abap2UI5-samples" target="_blank" rel="noopener nofollow noreferrer">abap2UI5-samples</A></STRONG> with <STRONG><A href="https://abapgit.org/" target="_blank" rel="noopener nofollow noreferrer">abapGit</A></STRONG>.<BR /><BR /><STRONG>Blog Series &amp; More</STRONG><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://www.linkedin.com/company/abap2ui5" target="_blank" rel="noopener nofollow noreferrer">LinkedIn</A> </STRONG>and explore the other articles in this blog series:</P><TABLE border="1"><TBODY><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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, Value-Help, Messages &amp; Controller Logic</A></STRONG></TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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">(7) Technical Background: Under the Hood of abap2UI5</A></STRONG></TD></TR><TR><TD><STRONG><A href="https://blogs.sap.com/2023/08/21/abap2ui5-a1-repository-setup-with-abapgit-abaplint-open-abap/" target="_blank" rel="noopener noreferrer">(8) Repository Setup: Working with abapGit, abaplint &amp; open-abap</A></STRONG></TD></TR><TR><TD><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></TR><TR><TD>(10) Extensions I: Exploring External Libraries &amp; Native Device Capabilities (this blog post)</TD></TR><TR><TD><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></TR><TR><TD><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></TR></TBODY></TABLE><H3 id="toc-hId-1093103013">Content</H3><P class="lia-align-left" style="text-align : left;">This article covers the following areas:</P><OL class="lia-align-left" style="text-align : left;"><LI>Displaying Barcodes with bwip-js</LI><LI>Scanning Barcodes with the UI5 Barcode Scanner</LI><LI>Reading Frontend Information (UI5 Version, Device Information etc.)</LI><LI>Reading Geolocation &amp; Visualizing with the UI5 Map Container</LI><LI>Capturing Pictures and Sending them to the Backend</LI><LI>Highlighting &amp; Providing Contextual Help with driver.js</LI><LI>More Libraries (FontAwesome, ImageMapster etc.)</LI></OL><P class="lia-align-left" style="text-align : left;">Let's begin with the first topic:</P><H3 id="toc-hId-896589508">(<STRONG>1) Display Barcodes with bwip-js</STRONG></H3><P class="lia-align-left" style="text-align : left;">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="noopener nofollow noreferrer"><STRONG>this</STRONG> <STRONG>link</STRONG>.</A></P><P class="lia-align-center" style="text-align: center;"><EM><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-11.39.55.png" border="0" width="529" height="193" /></EM></P><P class="lia-align-center" style="text-align: center;"><EM>JavaScript Framework bwip-js</EM></P><P class="lia-align-left" style="text-align : left;">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></P><P class="lia-align-center" style="text-align: center;"><EM><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-11.40.09.png" border="0" width="432" height="395" /></EM></P><P class="lia-align-center" style="text-align: center;"><EM>Supported Barcodes of bwip-js</EM></P><P class="lia-align-left" style="text-align : left;">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="noopener nofollow noreferrer">here</A></STRONG>. The output of the demo app looks like this:</P><P class="lia-align-center" style="text-align: center;"><EM><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-13.13.14.png" border="0" width="392" height="220" /></EM></P><P class="lia-align-center" style="text-align: center;"><EM>bwip-js integrated in abap2UI5</EM></P><P>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:</P><PRE><CODE>cont-&gt;simple_form( title = 'Barcode' editable = abap_true )-&gt;_z2ui5( )-&gt;bwip_js( bcid = ms_barcode-sym text = ms_barcode-text scale = mv_scale_x height = conv string( mv_scale_y + mv_scale_x ) ).</CODE></PRE><P>The bwip-js demo in action looks like this:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_barcode.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App in Action: Displaying Barcodes Using bwip-js</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.20.15.png" border="0" width="488" height="238" /></P><P class="">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="noopener nofollow noreferrer">(here)</A></STRONG></P><P>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="noopener nofollow noreferrer">follows:</A></STRONG></P><PRE><CODE>cont-&gt;_generic( ns = `html` name = `script` )-&gt;_cc_plain_xml( z2ui5_cl_cc_bwipjs=&gt;get_js( ) ).</CODE></PRE><P>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="noopener nofollow noreferrer">here.</A></STRONG></P><H3 id="toc-hId-700076003"><STRONG>(2) Scan Barcodes with the UI5 Barcode Scanner</STRONG></H3><P>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="noopener nofollow 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="noopener nofollow noreferrer">here:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.01.15.png" border="0" width="515" height="210" /></P><P class="lia-align-center" style="text-align: center;"><EM>UI5 Barcode Scanner Control</EM></P><P>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:</P><PRE><CODE>)-&gt;barcodescannerbutton( scansuccess = client-&gt;_event( val = 'ON_SCAN_SUCCESS' t_arg = VALUE #( ( `${$parameters&gt;/text}` ) ( `${$parameters&gt;/format}` ) ) ) dialogtitle = `Barcode Scanner` ).</CODE></PRE><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_scan2.gif" border="0" width="260" height="563" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App in Action: Scanning QR-Codes (Running on an iPhone)</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.20.15-1.png" border="0" width="486" height="237" /></P><P class="">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="noopener nofollow noreferrer">(here)</A></STRONG></P><H3 id="toc-hId-503562498"><STRONG>(3) Read Frontend &amp; Device Information</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-03-um-09.09.49.png" border="0" width="485" height="138" /></P><P class="">abap2UI5 - Return Values of the Method client-&gt;get( )</P><P>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="noopener nofollow noreferrer">here</A></STRONG>, to read more information from the frontend. Explore this demo:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-03-um-09.11.38.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 - Read Frontend Information via Custom Control</EM></P><P>It can be utilized in the same manner as all other UI5 Controls, as demonstrated here:</P><PRE><CODE> client-&gt;view_display( view-&gt;shell( )-&gt;page( title = 'abap2UI5' )-&gt;_z2ui5( )-&gt;info_frontend( finished = client-&gt;_event( `INFO_FINISHED` ) device_browser = client-&gt;_bind_edit( device_browser ) device_os = client-&gt;_bind_edit( device_os ) device_systemtype = client-&gt;_bind_edit( device_systemtype ) ui5_gav = client-&gt;_bind_edit( ui5_gav ) ui5_theme = client-&gt;_bind_edit( ui5_theme ) ui5_version = client-&gt;_bind_edit( ui5_version ) )-&gt;stringify( ) ).</CODE></PRE><P>Explore the full source code on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-04-um-08.20.58.png" border="0" width="460" height="243" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><P>Further enhancements can be added in the future.</P><H3 id="toc-hId-307048993"><STRONG>(4) Reading Geolocation &amp; Visualizing with the UI5 Map Control</STRONG></H3><P>The frontend's geolocation can be accessed using the <A href="https://www.w3schools.com/html/html5_geolocation.asp" target="_blank" rel="noopener nofollow noreferrer"><STRONG>Geolocation API</STRONG></A>. For example, the source code for the frontend might look as follows:</P><PRE><CODE>&lt;script&gt; const x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { x.innerHTML = "Latitude: " + position.coords.latitude + "&lt;br&gt;Longitude: " + position.coords.longitude; } &lt;/script&gt;</CODE></PRE><P>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="noopener nofollow noreferrer">custom control</A></STRONG> encapsulates this functionality and it can be utilized in a view definition like this:</P><PRE><CODE>)-&gt;_z2ui5( )-&gt;geolocation( finished = client-&gt;_event( ) longitude = client-&gt;_bind_edit( longitude ) latitude = client-&gt;_bind_edit( latitude ) altitude = client-&gt;_bind_edit( altitude ) altitudeaccuracy = client-&gt;_bind_edit( altitudeaccuracy ) accuracy = client-&gt;_bind_edit( accuracy ) speed = client-&gt;_bind_edit( speed )</CODE></PRE><P>It reads out the latitude, longitude, etc.:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_geo.gif" border="0" width="516" height="307" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App in Action: Calling the Geolocation API at the Frontend</EM></P><P>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></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.43.37.png" border="0" width="446" height="199" /></P><P class="lia-align-center" style="text-align: center;"><EM>UI5 Map Container Control</EM></P><P class="">The Map Container Control in an abap2UI5 view looks like this:</P><PRE><CODE> )-&gt;map_container( autoadjustheight = abap_true )-&gt;content( ns = `vk` )-&gt;container_content( title = `Analytic Map` icon = `sap-icon://geographic-bubble-chart` )-&gt;content( ns = `vk` )-&gt;analytic_map( initialposition = `9.933573;50;0` initialzoom = `6` )-&gt;vos( )-&gt;spots( client-&gt;_bind( mt_spot ) )-&gt;spot( position = `{POS}` contentoffset = `{CONTENTOFFSET}` type = `{TYPE}` scale = `{SCALE}` tooltip = `{TOOLTIP}`</CODE></PRE><P>And here is a demo combining the Geolocation and UI5 Map Container in a single, integrated example:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_geolocation.gif" border="0" width="534" height="339" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App in Action: Geolocation Information Visualized with the UI5 Map Container</EM></P><P>Explore the full source code of the demo on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.25.56.png" border="0" width="414" height="209" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><P>The map container also offers a lot more functionality - it's possible to display multiple spots or visualize complete routes:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.44.48.png" border="0" width="464" height="272" /></P><P class="lia-align-center" style="text-align: center;"><EM>UI5 Map Container Control - More Features</EM></P><H3 id="toc-hId-110535488"><STRONG>(5) Capturing Pictures</STRONG></H3><P>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="noopener nofollow 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="noopener nofollow noreferrer">here</A></STRONG>. It can be utilized in a view definition as follows:</P><PRE><CODE>page-&gt;_z2ui5( )-&gt;camera_picture( value = client-&gt;_bind_edit( mv_picture_base ) onphoto = client-&gt;_event( 'CAPTURE' ) ).</CODE></PRE><P>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:</P><PRE><CODE>CASE client-&gt;get( )-event. WHEN 'CAPTURE'. INSERT VALUE #( data = mv_picture_base time = sy-uzeit ) INTO TABLE mt_picture. CLEAR mv_picture_base. client-&gt;view_model_update( ). ".... ENDCASE.</CODE></PRE><P>A complete demo looks as follows:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/camera.gif" border="0" width="387" height="589" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App in Action: Capturing Pictures (Running on an iPad Mini)</EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.29.12.png" border="0" width="483" height="261" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><P>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.</P><H3 id="toc-hId--85978017"><STRONG>(6) Highlights &amp; Contextual Help with driver.js</STRONG></H3><P>A few weeks ago, I received an excellent pull request from <STRONG><A href="https://github.com/choper725" target="_blank" rel="noopener nofollow 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="noopener nofollow noreferrer">here:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.41.57.png" border="0" width="438" height="294" /></P><P class="lia-align-center" style="text-align: center;"><EM>JavaScript Framework driver.js</EM></P><P>This framework can be seamlessly integrated into abap2UI5. Here's what the demo looks like:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_driverjs.gif" border="0" width="472" height="281" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App in Action: Highlights &amp; Contextual Help with driver.js</EM></P><P>The full source code is available on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-03-um-15.40.20.png" border="0" width="502" height="264" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><P>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="noopener nofollow 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.</P><H3 id="toc-hId--282491522"><STRONG>(7) More Libraries...</STRONG></H3><P>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="noopener nofollow 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="noopener nofollow noreferrer">here:</A></STRONG></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.33.37.png" border="0" width="409" height="216" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App using Font Awesome</EM></P><P>And check out the full source code on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-02-um-23.34.48.png" border="0" width="492" height="240" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer"><STRONG>(here)</STRONG></A></EM></P><P>Or take a look to the ImageMapster Example:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-15.46.45-scaled.jpeg" border="0" width="530" height="375" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App using ImageMapster</EM></P><P>It can handle Events by clicking on certain Image areas, check out the full source code on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-15.52.19.png" border="0" width="490" height="280" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><P>And finally check out <STRONG><A href="https://animate.style/" target="_blank" rel="noopener nofollow noreferrer">Animate.css</A></STRONG>:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_anmiate_css.gif" border="0" width="507" height="285" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 App using animate.css</EM></P><P>And check out the source code on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-19-um-16.36.40.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><H3 id="toc-hId--479005027"><STRONG>Conclusion</STRONG></H3><P>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="noopener nofollow 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="noopener nofollow 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="noopener nofollow noreferrer">issue</A></STRONG> or leave a comment.</P> 2023-12-04T09:28:37+01:00 https://community.sap.com/t5/technology-blog-posts-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 <P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Update 01.01.2025<BR /></STRONG><SPAN class="">Please note that some information in this blog article may be outdated. For the most current details, refer to our <STRONG><A href="https://abap2ui5.github.io/docs/" target="_blank" rel="noopener nofollow noreferrer">Documentation</A></STRONG> and s</SPAN><SPAN class="">tay informed by following us on <STRONG><A href="https://www.linkedin.com/company/abap2ui5/" target="_self" rel="nofollow noopener noreferrer">LinkedIn.</A></STRONG></SPAN><STRONG><BR /></STRONG></TD></TR></TBODY></TABLE><P>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="noopener nofollow noreferrer"><STRONG>here.</STRONG></A><BR /><BR /><STRONG>Blog Series &amp; More</STRONG><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://www.linkedin.com/company/abap2ui5" target="_blank" rel="noopener nofollow noreferrer">LinkedIn</A> </STRONG>and explore the other articles in this blog series:</P><TABLE border="1"><TBODY><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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, Value-Help, Messages &amp; Controller Logic</A></STRONG></TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD>(11) Extensions II: Guideline for Developing New Features in JavaScript (this blog post)</TD></TR><TR><TD><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></TR></TBODY></TABLE><H3 id="toc-hId-1093101346"><STRONG>Content</STRONG></H3><P>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:</P><OL><LI>General Idea &amp;&nbsp; Creating a new UI5 project</LI><LI>Frontend Development (JS)<OL><LI>Creating a new Custom Control</LI><LI>Receiving data in the Frontend (JS) sent from the backend</LI><LI>Invoking backend functions (ABAP) from the frontend</LI><LI>Receiving data in the backend (ABAP) sent from the frontend</LI><LI>Calling frontend functions (JS) from the backend</LI><LI>Optional I: Implementing faceless controls (without UI)</LI><LI>Optional II: Loading external libraries</LI></OL></LI><LI>Backend Development (ABAP)<OL><LI>Migrating frontend logic to the ABAP Backend</LI><LI>Developing an abap2UI5 app using the new Custom Control</LI></OL></LI><LI>Additional Comments</LI><LI>Conclusion</LI></OL><P>Let’s begin with the first topic:</P><H3 id="toc-hId-896587841"><STRONG>1. General Idea &amp; Creating a New UI5 Project</STRONG></H3><P>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:</P><OL><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><LI><SPAN>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</SPAN></LI><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></OL><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-06-um-14.51.57.png" border="0" width="481" height="253" /></P><P class="lia-align-center" style="text-align: center;"><EM>Structure of a new UI5 Freestyle App</EM></P><H3 id="toc-hId-700074336"><STRONG>2.1. Creating a new Custom Control (CC)</STRONG></H3><P>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="noopener nofollow noreferrer">documentation</A></STRONG> to create a new Custom Control. This process begins with creating a new folder and file:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-09.12.20.png" border="0" width="370" height="168" /></P><P class="lia-align-center" style="text-align: center;">New Folder &amp; File for the Custom Control (CC)</P><P>Next, copy &amp; paste the following snippet as your starting point:</P><PRE><CODE>sap.ui.define("project1/control/MyCustomControl",[ "sap/ui/core/Control" ], (Control) =&gt; { "use strict"; return Control.extend("project1.control.MyCustomControl", { renderer(oRM, oControl) { oRM.openStart("div", oControl); oRM.openEnd(); oRM.write( 'test'); oRM.close("div"); } }); });</CODE></PRE><P>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:</P><PRE><CODE>&lt;mvc:View controllerName="project1.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:z2ui5="project1.control"&gt; &lt;Page id="page" title="{i18n&gt;title}"&gt; &lt;content&gt; &lt;z2ui5:MyCustomControl id="test" /&gt; &lt;/content&gt; &lt;/Page&gt; &lt;/mvc:View&gt;</CODE></PRE><P>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.</P><H3 id="toc-hId-503560831"><STRONG>2.2 Receiving Data in the Frontend (JS) Sent from to the Backend (ABAP)</STRONG></H3><P>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):</P><PRE><CODE>&lt;mvc:View controllerName="project1.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:z2ui5="project1.control"&gt; &lt;Page id="page" title="{i18n&gt;title}"&gt; &lt;content&gt; &lt;z2ui5:MyCustomControl id="test" value="MyBackendValue"/&gt; &lt;/content&gt; &lt;/Page&gt; &lt;/mvc:View&gt;</CODE></PRE><P>And we add the property "value" to the Custom Control (together with a setter and getter method) that it can receive its data:</P><PRE><CODE>sap.ui.define("project1/control/MyCustomControl",[ "sap/ui/core/Control" ], (Control) =&gt; { "use strict"; return Control.extend("project1.control.MyCustomControl", { metadata : { properties : { value: {type : "string" } }, setValue(value){ this.setProperty("value", value); }, getValue(){ return this.getProperty("value"); }, renderer(oRM, oControl) { oRM.openStart("div", oControl); oRM.openEnd(); oRM.write( oControl.getValue("value") ); oRM.close("div"); } }); });</CODE></PRE><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-09.27.23.png" border="0" width="430" height="179" /></P><P class="lia-align-center" style="text-align: center;"><EM>CC - Displaying values sent from the backend</EM></P><P>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:</P><PRE><CODE>oControl.getValue("value");</CODE></PRE><P>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.</P><H3 id="toc-hId-307047326"><STRONG>2.3 Invoking Backend Functions (ABAP) from the Frontend</STRONG></H3><P>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:</P><PRE><CODE>sap.ui.define("project1/control/MyCustomControl",[ "sap/ui/core/Control" ], (Control) =&gt; { "use strict"; return Control.extend("project1.control.MyCustomControl", { metadata: { properties: { value: { type: "string" } }, events: { change: {} } }, setValue(value) { this.setProperty("value", value); }, getValue() { return this.getProperty("value"); }, onAfterRendering() { setTimeout((oControl) =&gt; { oControl.fireChange(); }, 5000, this); }, renderer(oRM, oControl) { oRM.openStart("div", oControl); oRM.openEnd(); oRM.write(oControl.getValue("value")); oRM.close("div"); } }); });</CODE></PRE><P>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:</P><PRE><CODE>&lt;mvc:View controllerName="project1.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:z2ui5="project1.control"&gt; &lt;Page id="page" title="{i18n&gt;title}"&gt; &lt;content&gt; &lt;z2ui5:MyCustomControl id="test" value="MyBackendValue" change="onMyBackendChangeHandler" /&gt; &lt;/content&gt; &lt;/Page&gt; &lt;/mvc:View&gt;</CODE></PRE><P>And the following adjustments to the controller:</P><PRE><CODE>sap.ui.define("project1/control/MyCustomControl",[ "sap/ui/core/mvc/Controller" ], function (Controller) { "use strict"; return Controller.extend("project1.controller.View1", { onMyBackendChangeHandler: function (){ sap.m.MessageToast.show( 'Frontend Event raised, and processed in the backend'); } }); });</CODE></PRE><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-09.44.57.png" border="0" width="440" height="264" /></P><P class="lia-align-center" style="text-align: center;"><EM>CC - Invoking backend functions from the frontend</EM></P><P>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?</P><H3 id="toc-hId-110533821"><STRONG>2.4 Receiving Data in the Backend (ABAP) Sent from the Frontend</STRONG></H3><P>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:</P><PRE><CODE>&lt;mvc:View controllerName="project1.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:z2ui5="project1.control"&gt; &lt;Page id="page" title="{i18n&gt;title}"&gt; &lt;content&gt; &lt;z2ui5:MyCustomControl id="test" value="{MY_BINDED_VALUE}" change="onMyBackendChangeHandler" /&gt; &lt;/content&gt; &lt;/Page&gt; &lt;/mvc:View&gt;</CODE></PRE><P>And we adjust the controller (which again only simulates the ABAP backend and will be replaced later):</P><PRE><CODE>sap.ui.define("project1/control/MyCustomControl", [ "sap/ui/core/mvc/Controller" ], function (Controller) { "use strict"; return Controller.extend("project1.controller.View1", { onInit: function () { var data = { 'MY_BINDED_VALUE' : "backend value" }; var oModel = new sap.ui.model.json.JSONModel(data); this.oView.setModel( oModel ); }, onMyBackendChangeHandler: function (oEvent){ var data = this.oView.getModel().getData(); sap.m.MessageToast.show( 'Frontend Event raised, and processed in the backend, value: ' + data.MY_BINDED_VALUE ); } }); });</CODE></PRE><P>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:</P><PRE><CODE> setTimeout((oControl) =&gt; { oControl.setValue("frontend value"); oControl.fireChange(); }, 3000, this);</CODE></PRE><P>The outcome appears as follows: initially, the view is rendered using the value received from the backend:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-10.06.23.png" border="0" width="365" height="233" /></P><P class="lia-align-center" style="text-align: center;"><EM>CC - Initial Load (1/2)</EM></P><P>And after 5 seconds, it is replaced with the frontend value set by the JavaScript logic:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-10.06.27.png" border="0" width="336" height="211" /></P><P class="lia-align-center" style="text-align: center;"><EM>CC - Setting data in the frontend and sent to the backend (2/2)</EM></P><P>As you can see, we simply need to update the property using the command:</P><PRE><CODE>oControl.setValue("frontend value");</CODE></PRE><P>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.</P><H3 id="toc-hId--85979684"><STRONG>2.5 Calling Frontend Functions (JS) from the Backend</STRONG></H3><P>To prepare for this, we first include in our Custom Control a new frontend function and property:</P><PRE><CODE>sap.ui.define("project1/control/MyCustomControl",[ "sap/ui/core/Control" ], (Control) =&gt; { "use strict"; return Control.extend("project1.control.MyCustomControl", { metadata: { properties: { value: { type: "string" }, checkCallMyFunction: { type : "boolean" } }, events: { change: {} } }, setValue(value) { this.setProperty("value", value); }, getValue() { return this.getProperty("value"); }, setCheckCallMyFunction(checkCallMyFunction) { if (checkCallMyFunction) { this.myFrontendFunction(); } this.setProperty("checkCallMyFunction", false); }, init() { }, myFrontendFunction(){ sap.m.MessageToast.show( 'myFrontendFunction called' ); },<BR /> onAfterRendering() { setTimeout((oControl) =&gt; { oControl.setValue("frontend value"); oControl.fireChange(); }, 3000, this); },<BR /> renderer(oRM, oControl) { oRM.openStart("div", oControl); oRM.openEnd(); oRM.write(oControl.getValue("value")); oRM.close("div"); } }); });</CODE></PRE><P>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:</P><PRE><CODE>&lt;mvc:View controllerName="project1.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:z2ui5="project1.control"&gt; &lt;Page id="page" title="{i18n&gt;title}"&gt; &lt;content&gt; &lt;z2ui5:MyCustomControl id="test" value="{/MY_BINDED_VALUE}" change="onMyBackendChangeHandler" checkCallMyFunction="true"/&gt; &lt;/content&gt; &lt;/Page&gt; &lt;/mvc:View&gt;</CODE></PRE><P>And now, when we test the application, we can observe that the function is being called:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-10.30.39.png" border="0" width="355" height="231" /></P><P class="lia-align-center" style="text-align: center;"><EM>CC - Processing JS function, triggered from the backend</EM></P><TABLE border="1"><TBODY><TR><TD><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></TR></TBODY></TABLE><P><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="noopener nofollow 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="noopener nofollow 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="noopener nofollow noreferrer">here</A></STRONG>.</P><H3 id="toc-hId--282493189"><STRONG>3. Backend Development (ABAP)</STRONG></H3><P>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... 🦖🦖🦖</P><H3 id="toc-hId--479006694"><STRONG>3.1 Migrating Frontend Logic to the ABAP Backend</STRONG></H3><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-11.09.06.png" border="0" width="320" height="205" /></P><P class="lia-align-center" style="text-align: center;"><EM>Eclipse - Setting to copy &amp; paste large string from the clipboard</EM></P><P>Now, we copy &amp; paste the entire Source Code of the Custom Control into Eclipse:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-11.10.57.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Press strg+v now!</EM></P><P>The snippet of the ABAP class now looks as follows:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-07-um-11.11.34.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Javascript of the CC after copy &amp; paste to ABAP</EM></P><P>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':</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-24-um-14.37.28.png" border="0" width="469" height="307" /></P><P class="lia-align-center" style="text-align: center;"><EM>CC with replaced Namespaces and with added sap.declare function at the beginning</EM></P><P>Check out the full source code on Github:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-08-um-09.13.15.png" border="0" width="371" height="208" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><H3 id="toc-hId--675520199"><STRONG>3.2. Developing an abap2UI5 Application Using the New Custom Control</STRONG></H3><P>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:</P><PRE><CODE> DATA(view) = z2ui5_cl_xml_view=&gt;factory( ). client-&gt;view_display( view-&gt;shell( )-&gt;page( 'abap2UI5 - My CC App' )-&gt;_generic( name = `MyCustomControl` ns = `z2ui5` t_prop = VALUE #( ( n = `value` v = client-&gt;_bind_edit( mv_binded_value ) ) ( n = `change` v = client-&gt;_event( 'MY_FRONTEND_EVENT' ) ) ( n = `checkCallMyFunction` v = `true` ) ) )-&gt;stringify( ) ).</CODE></PRE><P>And the logic for the controller in JavaScript now looks in ABAP in the abap2UI5 app as follows:</P><PRE><CODE> CASE client-&gt;get( )-event. WHEN 'ON_CC_LOADED'. display_view( ). WHEN 'MY_FRONTEND_EVENT'. client-&gt;message_box_display( |Frontend Event raised, and processed in the backend, value: { mv_binded_value }| ). WHEN 'BACK'. client-&gt;nav_app_leave( ). ENDCASE.</CODE></PRE><P>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:</P><PRE><CODE> DATA(view) = z2ui5_cl_xml_view=&gt;factory( ). client-&gt;view_display( view-&gt;_generic( ns = `html` name = `script` )-&gt;_cc_plain_xml( zcl_a2ui5_my_custom_control=&gt;get_js( ) )-&gt;_z2ui5( )-&gt;timer( client-&gt;_event( `ON_CC_LOADED` ) )-&gt;stringify( ) ).</CODE></PRE><P>Check out the full source code on GitHub:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/Bildschirmfoto-2023-12-08-um-09.14.11.png" border="0" width="436" height="242" /></P><P class="lia-align-center" style="text-align: center;"><EM>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="noopener nofollow noreferrer">(here)</A></STRONG></EM></P><P>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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/gif_demo.gif" border="0" width="458" height="250" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 app - Demo using the new CC</EM></P><P>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.</P><H3 id="toc-hId--947265073"><STRONG>4. Additional Comments</STRONG></H3><P>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="noopener nofollow noreferrer">here</A></STRONG>. It's open for future extensions, and you're welcome to create issues and PRs.</P><H3 id="toc-hId--1143778578"><STRONG>5. Conclusion</STRONG></H3><P>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.</P> 2023-12-11T11:05:38+01:00 https://community.sap.com/t5/enterprise-resource-planning-blog-posts-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-blog-posts-by-members/abap2ui5-12-update-ii-community-feedback-new-features-amp-outlook-january/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 <P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Update 01.01.2025<BR /></STRONG><SPAN class="">Please note that some information in this blog article may be outdated. For the most current details, refer to our&nbsp;<STRONG><A href="https://abap2ui5.github.io/docs/" target="_blank" rel="noopener nofollow noreferrer">Documentation</A> </STRONG>and s</SPAN><SPAN class="">tay informed by following us on <STRONG><A href="https://www.linkedin.com/company/abap2ui5/" target="_self" rel="nofollow noopener noreferrer">LinkedIn</A></STRONG>.</SPAN><STRONG><BR /></STRONG></TD></TR></TBODY></TABLE><P>Welcome to part 12 of this blog series introducing <A href="https://github.com/abap2UI5/abap2UI5" target="_blank" rel="noopener nofollow noreferrer"><STRONG>abap2UI5</STRONG></A> — an open-source project for developing UI5 apps purely in ABAP.<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 />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://www.linkedin.com/company/abap2ui5" target="_blank" rel="noopener nofollow noreferrer">LinkedIn</A> </STRONG>and explore the other articles in this blog series:</P><TABLE border="1"><TBODY><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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, Value-Help, Messages &amp; Controller Logic</A></STRONG></TD></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD><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></TR><TR><TD>(12) Update II: Community Feedback &amp; New Features - Jan. 2024 (this blog post)</TD></TR></TBODY></TABLE><P><BR /><STRONG>Content</STRONG><BR /><BR />This post covers the following areas:</P><OL><LI>New Controls<OL><LI>Splitting Container</LI><LI>Timeline</LI><LI>Feed Input</LI><LI>Side Panel</LI></OL></LI><LI>New Custom Controls<OL><LI>cl_demo_output</LI><LI>Multi Input Ext.</LI><LI>Table Filtering Ext.</LI></OL></LI><LI><SPAN>New Functions</SPAN><OL><LI>Nested Views with 3 Levels</LI><LI>Data Binding on Cell Level</LI><LI>Debugging Tools</LI></OL></LI><LI><SPAN>Community Feedback</SPAN><OL><LI>TechEd</LI><LI>Advent of Code</LI><LI>Developer News</LI></OL></LI><LI>Actual Changes &amp; Outlook<OL><LI>Integration with Launchpad &amp; BTP</LI><LI>UI5 Version 2.x</LI><LI>SAP UI5 Roadmap 2024</LI></OL></LI></OL><P>Here we go:</P><H3 id="toc-hId-1093069534"><STRONG>1. New Controls</STRONG></H3><P>An increasing number of controls from the <STRONG><A href="https://sapui5.hana.ondemand.com/#/api" target="_blank" rel="noopener nofollow 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="noopener nofollow noreferrer">z2ui5_cl_xml_view</A></STRONG>. A special thanks to <STRONG><A href="https://github.com/choper725" target="_blank" rel="noopener nofollow 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 />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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_splitting.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Splitting Container in abap2UI5</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>.<BR /><BR /><STRONG>1.2. Timeline</STRONG><BR />Visualize your time-dependent data with the Timeline Control. Check out the following example:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_timeline.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Timeline in abap2UI5</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>.<BR /><BR /><STRONG>1.3. Feed Input</STRONG><BR />Display chat and message texts using the Feed Input. Check out this demo:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_feed.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Feed Input in abap2UI5</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>.<BR /><BR /><STRONG>1.4. Side Panel</STRONG><BR />Try out the Side Panel to display a menu alongside your main page:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_side_panel.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Side Panel in abap2UI5</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>.</P><H3 id="toc-hId-896556029"><STRONG>2. New Custom Controls</STRONG></H3><P>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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_demo_output.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>cl_demo_output Displayed in abap2UI5</EM></P><P>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="noopener nofollow 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="noopener nofollow noreferrer">here</A></STRONG>.<BR /><BR /><STRONG>2.2 Multi Input Extension</STRONG><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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/token_gif.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Multi Input &amp; Token Handling in abap2UI5</EM></P><P>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="noopener nofollow 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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_ui_filter.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Table with Filtered Values After Model Updates in abap2UI5</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>.</P><H3 id="toc-hId-700042524"><STRONG>3. New Functions</STRONG></H3><P>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 />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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_nest.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Nested Views with 3 Levels in abap2UI5</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>.<BR /><BR /><STRONG>3.2 Binding on Cell Level</STRONG><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:</P><PRE><CODE>LOOP AT t_tab REFERENCE INTO DATA(lr_row). DATA(lv_tabix) = sy-tabix. page-&gt;input( value = client-&gt;_bind_edit( val = lr_row-&gt;title tab = t_tab tab_index = lv_tabix ) ). page-&gt;input( value = client-&gt;_bind_edit( val = lr_row-&gt;value tab = t_tab tab_index = lv_tabix ) ). ENDLOOP.</CODE></PRE><P>This code snippet generates an input control for each cell within the internal table. Here's the code in action:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_cell_binding.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Data Binding on Cell Level in abap2UI5</EM></P><P>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="noopener nofollow noreferrer">here</A></STRONG>.<BR /><BR /><STRONG>3.3 Debugger Tools</STRONG><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.</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_debugging_tools.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Debugging Tools of abap2UI5</EM></P><P>This simplifies issue identification, and further functionalities can be integrated into this popup in the future.</P><H3 id="toc-hId-503529019"><STRONG>4. Community Feedback</STRONG></H3><P>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 />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="noopener nofollow 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="">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="noopener nofollow noreferrer">here</A></STRONG>, and his solution can be seen <STRONG><A href="https://github.com/joltdx/abap-advent-2023" target="_blank" rel="noopener nofollow 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="noopener nofollow 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></P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/aba2UI5_advent_01.png" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>Advent of Code with abap2UI5</EM></P><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></P><H3 id="toc-hId-307015514"><STRONG>5. Actual Changes &amp; 2024</STRONG></H3><P>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 />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="noopener nofollow 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:</P><P><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2024/01/gif_ui2.gif" border="0" /></P><P class="lia-align-center" style="text-align: center;"><EM>abap2UI5 Bootstrapped with UI5 Version 2.x</EM></P><P>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.</P><H3 id="toc-hId-110502009"><STRONG>6. Conclusion</STRONG></H3><P>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.<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> 2024-01-08T09:16:02+01:00 https://community.sap.com/t5/technology-blog-posts-by-sap/release-of-new-podcast-episode-sap-r-3-port-to-linux/ba-p/13918445 Release of new Podcast Episode “SAP R/3 Port to Linux” 2024-10-25T09:41:44.320000+02:00 Fempel https://community.sap.com/t5/user/viewprofilepage/user-id/10046 <P><STRONG>4th Anniversary of “The Open Source Way” Podcast </STRONG></P><P>With an interesting new episode taking you three decades back in time, we would like to celebrate the 4th anniversary of the <A href="https://podcast.opensap.info/open-source-way/" target="_blank" rel="noopener nofollow noreferrer">open source podcast</A> series hosted by the SAP Open Source Program Office. Reflecting on this milestone for 'The Open Source Way' podcast, the OSPO team would like to thank all the contributors and listeners, and extend a big kudos to <A href="https://de.linkedin.com/in/karsten-hohage-0180312?trk=public_post-text" target="_self" rel="nofollow noopener noreferrer">Karsten Hohage</A> for moderating the series since its inception! We would also like to express our gratitude to <A href="https://www.linkedin.com/in/sezgin-devran-a8b64717b/" target="_self" rel="nofollow noopener noreferrer">Sezgin Devran</A>, who had the initial idea and started this podcast in 2020.</P><P>The experts talking to Karsten have shared very personal stories, expertise, and insights into their activities in open source. The topics of the <STRONG>45 episodes</STRONG> are as diverse as the field of open source itself – from open-source projects to compliance and security, collaboration models, and global initiatives such as foundations. We look forward to many more engaging episodes and conversations in the future.</P><P><STRONG>SAP R/3 Port to Linux (October 2024 episode)</STRONG></P><P>In the latest <A href="https://podcast.opensap.info/open-source-way/2024/10/24/sap-r3-port-to-linux/" target="_blank" rel="noopener nofollow noreferrer">podcast episode</A>, we take a fascinating journey back to the 1990s – a pivotal time in the world of technology – when the SAP software stack was first ported to Linux. Two industry pioneers, <A href="https://de.linkedin.com/in/hcrohland?trk=public_post-text" target="_self" rel="nofollow noopener noreferrer">Christoph Rohland</A> (former SAP, now at Software AG) and <A href="https://www.linkedin.com/in/harald-kuck-2863b0153?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAACTmUIYBWkr3GyxK4rtluI0D8JNGdV4NtyA&amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_search_srp_all%3BHcl%2Bb7ZYS4ONbl0p72GEwA%3D%3D" target="_self" rel="nofollow noopener noreferrer">Harald Kuck</A> (SAP, ABAP Platform) discuss the challenges, triumphs, and transformative moments of this significant transition. They offer very personal insights into how they led the transition of R/3 and its stack to run on Linux.</P><P><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Picture1.png" style="width: 698px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/183271iB62560113519E837/image-dimensions/698x256?v=v2" width="698" height="256" role="button" title="Picture1.png" alt="Picture1.png" /></span></STRONG></P><P><STRONG>Why this episode matters</STRONG></P><P>Today, Linux serves as the backbone of many SAP solutions, providing a robust open-source operating system infrastructure. However, the path to this point was anything but straightforward. Christoph and Harald share their first-hand experiences from the early days of open source at SAP, shedding light on how their innovative efforts laid the groundwork for the collaborative software landscape we enjoy today. They take us to the early years of Linux, when 8 CPUs were still a really big thing for a developer, when you tested external software on CDs, and when using fax for sending personal documents was still the modus operandi.</P><P><STRONG>Key highlights from the episode:</STRONG></P><OL><LI><STRONG>Anecdotes from the frontlines:</STRONG> Listen to unique stories and insights from Christoph and Harald about the challenges they faced while porting the SAP software stack to Linux.</LI><LI><STRONG>SAP’s role for Linux:&nbsp;</STRONG>You might be surprised to hear how some essential parts of the Linux kernel were really contributed by SAP in the late 1990s.</LI><LI><STRONG>The evolution of Open Source:</STRONG> Hear about the times when open source began to play a role within SAP and the broader tech community and how these early efforts have influenced our approach to software development and collaboration.</LI><LI><STRONG>The future of Linux and SAP solutions:</STRONG> Christoph and Harald discuss the ongoing relevance of Linux in the SAP ecosystem, and what the future may hold for open-source initiatives at SAP.</LI><LI><STRONG>The key to driving innovation:</STRONG> Harald and Christoph emphasize the importance of developer initiative, a supportive management, and listening to your customers when pursuing innovative ideas.</LI></OL><P><STRONG>Tune In Now!</STRONG></P><P>Whether you're an SAP user, an open-source enthusiast, or simply curious about the technological advancements that shaped our current landscape, this <A href="https://podcast.opensap.info/open-source-way/2024/10/24/sap-r3-port-to-linux/" target="_blank" rel="noopener nofollow noreferrer">episode</A> is a must-watch. Join us as we celebrate the pioneers of open source at SAP and explore the impact of their work on the industry.</P><P>"Would you rather have Bill Gates know your name or an Email discussion with Linus Torvalds" (feel free to comment) was one question to Harald and Christoph. Hear the answer in the <A href="https://podcast.opensap.info/open-source-way/2024/10/24/sap-r3-port-to-linux/" target="_blank" rel="noopener nofollow noreferrer">podcast</A>. Let us know in the comments, if you have any particular topic of interest for future episodes or reach out to the <A href="mailto:ospo@sap.com" target="_blank" rel="noopener nofollow noreferrer">SAP OSPO team</A> directly.</P><P>_____________________________________________________________________________</P><P><STRONG>About the authors</STRONG></P><UL><LI>Ulrike Fempel, SAP Open Source Program Office</LI><LI>Ajinkya Patil, SAP Open Source Program Office, responsible for the podcast production</LI></UL><P><STRONG>More information / links</STRONG></P><UL><LI><A href="https://opensource.sap.com/" target="_blank" rel="noopener noreferrer">Open Source @ SAP</A></LI><LI><A href="https://github.com/sap" target="_blank" rel="noopener nofollow noreferrer">SAP GitHub</A></LI><LI><A href="https://github.com/SAP/open-source-manifesto" target="_blank" rel="noopener nofollow noreferrer">SAP Open Source Manifesto</A></LI><LI><A href="https://pages.community.sap.com/topics/open-source" target="_blank" rel="noopener noreferrer">Open Source Community @ SAP</A></LI><LI><A href="https://podcast.opensap.info/open-source-way/" target="_blank" rel="noopener nofollow noreferrer">Podcast series "The Open Source Way"</A></LI><LI><A href="https://webinars.sap.com/ospo-webinar-series/en/home" target="_blank" rel="noopener noreferrer">Webinar series "SAP Open Source"</A></LI></UL><P>&nbsp;</P><P>&nbsp;</P> 2024-10-25T09:41:44.320000+02:00 https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/how-to-release-pr-document-from-hold-or-park-status-using-bapi/ba-p/14007072 How to Release PR document from HOLD or PARK status using BAPI 2025-02-21T09:28:32.886000+01:00 rohithkumar15 https://community.sap.com/t5/user/viewprofilepage/user-id/837411 <H3 id="toc-hId-1831017622"><STRONG>Introduction:</STRONG></H3><P><SPAN>A purchase requisition is an internal document used in an organization to request the procurement of goods or services. In SAP, efficient management of purchase requisitions is crucial for smooth procurement operations. This blog will provide a clear guide on releasing PR documents from HOLD or PARK status using BAPIs and releasing the document for further processing.</SPAN></P><P>&nbsp;</P><H3 id="toc-hId-1634504117"><STRONG>Understanding Parked and Hold Documents in SAP:</STRONG></H3><P class="">First, let's understand the PARK and HOLD options in SAP. These functionalities are essential for managing purchasing documents, allowing users to save them temporarily for later processing.</P><P class=""><STRONG>Hold: </STRONG>If the document has incorrect or incomplete data and you want to save it temporarily to process later, use the Hold option.</P><P class=""><STRONG>Park: </STRONG>If the document has complete and correct data but needs further workflow approvals or budget checks, use the Park functionality.</P><P class="">&nbsp;</P><H3 id="toc-hId-1437990612"><STRONG>Activating Hold and Park options:</STRONG></H3><P><SPAN>To activate the PARK and HOLD options in transactions ME51N, ME52N, and ME53N, follow these two steps:</SPAN></P><OL><LI><SPAN><SPAN>Activate Business Functionality</SPAN></SPAN><UL><LI><SPAN>Go to T-Code SPRO.</SPAN></LI><LI><SPAN><SPAN>Click on Activate Business Functions<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Activate Business Functionality.jpg" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/228250i49A6F0A5595B665A/image-size/large?v=v2&amp;px=999" role="button" title="Activate Business Functionality.jpg" alt="Activate Business Functionality.jpg" /></span></SPAN></SPAN><P>&nbsp;</P></LI><LI><SPAN>Expand the folder Enterprise_Business_Functions and activate the functionality <STRONG>LOG_MM_CI_3<SPAN>.</SPAN></STRONG></SPAN><SPAN><SPAN><STRONG><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Park &amp; Hold - Business Functionality .jpg" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/228249i1913B2DF4DD7F4BF/image-size/large?v=v2&amp;px=999" role="button" title="Park &amp; Hold - Business Functionality .jpg" alt="Park &amp; Hold - Business Functionality .jpg" /></span></SPAN></STRONG></SPAN></SPAN><P>&nbsp;</P></LI></UL></LI></OL><P><SPAN><SPAN>&nbsp; &nbsp; &nbsp;2. Enable PARK and HOLD Features In T-Code SPRO, follow this path:<SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Materials Management --&gt; Purchasing --&gt; Environment Data --&gt; Activate 'Park and Hold' in Purchasing Documents.&nbsp;</SPAN></SPAN></SPAN></SPAN></P><P><SPAN><SPAN><SPAN><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Activate Park &amp; Hold option in Purchasing Documents.jpg" style="width: 829px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/228251iD3B68DBCA03353E8/image-size/large?v=v2&amp;px=999" role="button" title="Activate Park &amp; Hold option in Purchasing Documents.jpg" alt="Activate Park &amp; Hold option in Purchasing Documents.jpg" /></span></SPAN></SPAN></SPAN></SPAN></P><P>&nbsp;<SPAN>By completing these steps, you will enable the PARK and HOLD functionalities for purchasing documents in your SAP system.</SPAN></P><P>&nbsp;</P><H3 id="toc-hId-1241477107"><STRONG>Changing PR document status from HOLD or PARKED to SAVED using BAPI:</STRONG></H3><P><SPAN>To change the status of a purchase requisition document from HOLD or PARKED to SAVED, you can use the BAPI&nbsp;“<STRONG>BAPI_PR_CHANGE.”.&nbsp;</STRONG></SPAN></P><P><SPAN>Below is an example of how to implement this in ABAP:</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>DATA: ls_prheader TYPE bapimereqheader, ls_prheaderx TYPE bapimereqheaderx, lt_return TYPE TABLE OF bapiret2. IF ls_prheader-preq_no IS NOT INITIAL. ls_prheader = VALUE #( preq_no = |{ ls_prheader-preq_no ALPHA = IN }| park_complete = abap_false hold_complete = abap_false memorytype = abap_false ). ls_prheaderx = VALUE #( preq_no = abap_true park_complete = abap_true hold_complete = abap_true memorytype = abap_true ). CALL FUNCTION 'BAPI_PR_CHANGE' EXPORTING number = ls_prheader-preq_no “Your PR Number prheader = ls_prheader prheaderx = ls_prheaderx TABLES return = lt_return. IF VALUE #( lt_return[ type = 'S' ] OPTIONAL ) IS NOT INITIAL. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = abap_true. ELSE. ROLLBACK WORK. ENDIF. ENDIF.</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><H4 id="toc-hId-1174046321">&nbsp;</H4><H3 id="toc-hId-848450097"><STRONG>Release Strategy:</STRONG></H3><P><SPAN>The release strategy in SAP defines the approval process for purchase requisitions:</SPAN></P><UL class="lia-list-style-type-circle"><LI><STRONG>Purpose:</STRONG> Ensures PRs are reviewed and approved before conversion to purchase orders.</LI><LI><STRONG>Release Codes:</STRONG> Each strategy can have up to eight release codes, indicating who must approve the requisition.</LI><LI><STRONG>Approval Sequence:</STRONG> Specifies the order in which approvals must be obtained.</LI><LI><STRONG><STRONG>Assignment:</STRONG></STRONG><SPAN> Release strategies are assigned based on release conditions like document type and value.</SPAN></LI></UL><P>&nbsp;</P><H3 id="toc-hId-651936592"><STRONG>Release Code:</STRONG></H3><P><SPAN>A release code is a two-character ID that authorizes a person to approve or release a purchase requisition or external purchasing document.</SPAN></P><UL class="lia-list-style-type-circle"><LI><STRONG>Purpose:</STRONG> It serves as an electronic signature, replacing traditional handwritten approvals. This digitization streamlines the approval process and enhances efficiency.</LI><LI><STRONG><STRONG>Assignment:</STRONG></STRONG><SPAN> Release codes are assigned to employees based on their roles and authorization levels within the organization. For example, a clerk might have a release code for initial approvals, while a manager has a higher-level code.</SPAN></LI><LI><STRONG><STRONG>Configuration:</STRONG></STRONG><UL class="lia-list-style-type-circle"><UL class="lia-list-style-type-circle"><LI><SPAN>You can define up to eight release codes within a release strategy.</SPAN></LI><LI><SPAN>Each code is linked to specific approval levels, ensuring that the correct personnel review PRs based on their value or other criteria.</SPAN></LI></UL></UL></LI></UL><UL class="lia-list-style-type-circle"><LI><STRONG><STRONG>Approval Process:</STRONG></STRONG><SPAN> The release strategy specifies which release codes must be used and the sequence of approvals required.</SPAN></LI></UL><P>&nbsp;</P><H3 id="toc-hId-455423087"><STRONG>Releasing PR documents using BAPI:</STRONG></H3><P><SPAN>To release a PR that needs approval from respective employees/approvers in your organization, you can use the&nbsp;BAPI - “<STRONG>BAPI_REQUISITION_RELEASE_GEN”<SPAN>.</SPAN></STRONG></SPAN></P><P>Below is an example implementation:</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>DATA : lt_return TYPE TABLE OF bapireturn. CALL FUNCTION 'BAPI_REQUISITION_RELEASE_GEN' EXPORTING number = iv_pr_num “Your PR Number rel_code = iv_release_code “Release code TABLES return = lt_return. IF VALUE #( lt_return[ type = 'S' ] OPTIONAL ) IS NOT INITIAL OR lt_return IS INITIAL. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = abap_true. ELSE. ROLLBACK WORK. ENDIF.</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><H4 id="toc-hId-387992301">&nbsp;</H4><H3 id="toc-hId-62396077"><STRONG>Finding Release Codes:</STRONG></H3><P><SPAN>You can find release codes under the Release Strategy tab in transactions ME51N, ME52N, and ME53N.</SPAN></P><P><SPAN>The following tables are useful for retrieving relevant information:</SPAN></P><UL class=""><LI>EBAN: To get the release group and release strategy for the PR number.</LI><LI>T16FS: To get release codes for a particular release group &amp; strategy.</LI><LI>T16FW: To get approver names/IDs for a release code.</LI></UL><H4 id="toc-hId--502751804">&nbsp;</H4><H3 id="toc-hId--405862302"><STRONG>Conclusion:</STRONG></H3><P><SPAN>This blog emphasized the significance of parked and hold documents, the activation of essential functionalities, and the use of BAPIs to change PR statuses. We also explored the release procedure and strategy, illustrating how structured approvals can enhance efficiency in your procurement processes.</SPAN></P><P><SPAN>Thank you for reading!</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2025-02-21T09:28:32.886000+01:00 https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/streamlining-sap-background-job-execution-with-event-based-triggers/ba-p/14075250 Streamlining SAP Background Job Execution with Event-Based Triggers 2025-04-16T10:37:33.019000+02:00 Richa27 https://community.sap.com/t5/user/viewprofilepage/user-id/167247 <P>In some Business Scenarios, we need to collaborate with third-party solutions, such as bank integrations within the system. In such scenarios, scheduling pre-defined standard programs as part of the overall process is often necessary. We encountered a recurring issue with one such program (RFEBKA00), scheduled as a background job in our system to run hourly, checking an Application Server directory for the presence of specific files. Whenever a file was available, the job executed perfectly. However, if no file was present at the time of execution, the job would fail, resulting in unnecessary alerts and false alarms in our monitoring systems. Over time, this not only created confusion but also masked genuine job failures that required immediate attention.</P><P>To address this efficiently without deviating from SAP standards, I developed an innovative yet straightforward solution to prevent frequent false alerts and maintain accurate and clean monitoring while still using the original standard program.</P><P>There can be other business scenarios as well where this solution can help.</P><H2 id="toc-hId-1708341826">Solution Design:</H2><P><span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="1_new.jpg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/250389i8F37C3EAB4F9A8B0/image-size/medium?v=v2&amp;px=400" role="button" title="1_new.jpg" alt="1_new.jpg" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>a) To resolve this, we implemented a wrapper program serving as a pre-check mechanism. This wrapper performs the following actions:</P><UL><LI>Checks the necessary prerequisites (e.g., file presence in an Application Server directory).</LI><LI>If prerequisites are met, it triggers the standard SAP job - RFEBKA00 (program - RFEBKA00).</LI><LI>If prerequisites are not met, it gracefully exits with an informational message, thus keeping our monitoring precise and relevant.</LI></UL><P>b) Set up this wrapper program (ZXXX)&nbsp;as background job every hour and change current setup for ‘RFEBKA00’ job to trigger only for event - Z_EVENT’ raised by ZXXX program.</P><P>c)&nbsp;If team needs to check what time the file was found, they can still check the background job – ‘RFEBKA00’. Else, if this job was not run, that means, there was no file found at that time.</P><H2 id="toc-hId-1511828321">Technical Steps:</H2><P>1. Create a new Background Event (Z_EVENT) in Tcode - SM62 (don’t check system event checkbox):</P><P><span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2_new.jpg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/250416i4E542A6104F53BB0/image-size/medium?v=v2&amp;px=400" role="button" title="2_new.jpg" alt="2_new.jpg" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>2. Create an External Command 'Z_LS' in Tcode - SM49:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="3_new.jpg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/250432i3D564E29ED00E76A/image-size/medium?v=v2&amp;px=400" role="button" title="3_new.jpg" alt="3_new.jpg" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>3.&nbsp;Create wrapper program – ZXXX with below processing logic:</P><UL><LI>Fetch all the files present in the entered AL11 folder by using FM - 'SXPG_COMMAND_EXECUTE' for below parameters:<BR />COMMANDNAME = 'Z_LS'<BR />ADDITIONAL_PARAMETERS = '&lt;AL11 folder path&gt;'</LI><LI>If the required file is found in that folder, trigger job - 'RFEBKA00' by using FM – 'BP_EVENT_RAISE' for below parameters:<BR />EVENTID = 'Z_EVENT'</LI><LI>If the event is successfully triggered, display Success message. Else, display information message - 'No file was found for processing in path' and run successfully.</LI></UL><P>4. Schedule a new background job to run every hour (like it is happening for RFEBKA00 job currently).<BR />Schedule as: Periodic Job (every hour or as required), program Step: ZXXX (wrapper program).</P><P>5.&nbsp;Change ‘RFEBKA00’ job scheduling to – ‘only trigger after event – ‘Z_EVENT’, Job frequency: Periodic,&nbsp;keeping Program Steps same.</P><P>..And that's it!</P><P>Now, the job 'RFEBKA00' will only run if there is a file present in AL11 folder it looks for. This will filter out the case of failed/cancelled jobs because simply the file was not present at the time of execution.</P><P>Although there can be different ways to approach this challenge, I&nbsp;believe this solution could be beneficial in other similar business scenarios as well, enhancing operational efficiency and system reliability.</P><P>Please let me know your thoughts in the comments.</P><P>Cheers! <span class="lia-unicode-emoji" title=":party_popper:">🎉</span></P> 2025-04-16T10:37:33.019000+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/you-won-t-believe-where-zllm-s-documentation-lives-and-how-it-got-there/ba-p/14142558 You Won't Believe Where ZLLM's Documentation Lives (And How It Got There) 2025-07-02T12:45:53.530000+02:00 Alice_V https://community.sap.com/t5/user/viewprofilepage/user-id/609259 <P class=""><STRONG>How I Made AI Write Its Own Documentation... In SAP's Standard Format</STRONG></P><P class=""><EM>Spoiler: The AI is already documenting itself in production*.</EM></P><P class=""><EM><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChatGPT Image Jul 2, 2025, 12_07_15 PM.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/281751i486F7C73DE5E4FF9/image-size/large?v=v2&amp;px=999" role="button" title="ChatGPT Image Jul 2, 2025, 12_07_15 PM.png" alt="ChatGPT Image Jul 2, 2025, 12_07_15 PM.png" /></span></EM></P><HR /><P class="">Hello again! <span class="lia-unicode-emoji" title=":waving_hand:">👋</span> It's Alice, and I have a confession: I absolutely <STRONG>love</STRONG> writing documentation.</P><P class="">But I hate writing it <STRONG>BY HAND</STRONG>. Especially in SAP's bizarre ITF format - that cryptic markup language designed back when the closest thing to modern markup was SGML, and HTML didn't even exist yet!</P><P class=""><EM>(Fun fact: ITF format was actually designed for SAPscript in the early 1980s as part of SAP R/2 - when "markup language" meant something completely different! </EM><STRONG>^_^</STRONG><EM>)</EM></P><P class="">But here's the thing - ZLLM has <STRONG>incredible</STRONG> documentation. Comprehensive, detailed, and perfectly formatted. And it lives exactly where every SAP developer <STRONG>NOT</STRONG> expects it: behind the standard <STRONG>"Show Documentation"</STRONG> button <span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:">😃</span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_V_0-1751454104363.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/281748i6712CECE39FC9FA7/image-size/medium?v=v2&amp;px=400" role="button" title="Alice_V_0-1751454104363.png" alt="Alice_V_0-1751454104363.png" /></span></P><P>&nbsp;</P><H3 id="ember4460" id="toc-hId-1863196651">Plot Twist:</H3><P class="">I didn't write a single line of that documentation manually.</P><P class=""><STRONG>ZLLM documented itself.</STRONG></P><HR /><H3 id="ember4463" id="toc-hId-1666683146">The Documentation That Writes Itself</H3><P class="">Click on any ZLLM class in SE80 or ADT. Hit <STRONG>CTRL+SHIFT+F2</STRONG> (Show Documentation).</P><P class="">What you'll see isn't your typical sparse ABAP documentation. It's rich, detailed, with examples, architecture diagrams, and usage patterns. All perfectly formatted in SAP's native documentation system.</P><P class=""><STRONG>Here's what makes this magical:</STRONG></P><P class="">The documentation exists in <STRONG>standard SAP format</STRONG> (ITF), appears in <STRONG>standard SAP locations</STRONG>, but was generated by <STRONG>modern AI</STRONG> and written in <STRONG>human-readable Markdown</STRONG> first.</P><HR /><H2 id="ember4468" id="toc-hId-1341086922">How I Built The Documentation Factory</H2><H3 id="ember4469" id="toc-hId-1273656136">Step 1: The Analysis Phase</H3><PRE>" ZLLM analyzes the codebase DATA(lo_analyzer) = zcl_llm_00_step_lazy=&gt;new_from_string( iv_usr = 'Analyze this ABAP class and extract:' '- Purpose and responsibility' '- Public methods and parameters' '- Usage patterns and examples' '- Integration points: {T}' io_llm = lo_llm ).</PRE><H3 id="ember4470" id="toc-hId-1077142631">Step 2: The Generation Phase</H3><PRE>" Generate comprehensive Markdown documentation DATA(lo_generator) = zcl_llm_00_step_lazy=&gt;new_from_string( iv_usr = 'Create technical documentation in Markdown format:' '- Overview section with clear purpose' '- Method documentation with examples' '- Code samples showing real usage' '- Integration notes and best practices' 'Based on analysis: {T}' io_llm = lo_llm ).</PRE><H3 id="ember4471" id="toc-hId-880629126">Step 3: The Integration Magic</H3><PRE>" Chain it all together DATA(lo_doc_flow) = zcl_llm_00_flow_lazy=&gt;new( VALUE #( ( lo_analyzer ) ( lo_generator ) ) ). " Generate docs for entire framework DATA(lr_result) = lo_doc_flow-&gt;exec( REF #( class_metadata ) ).</PRE><P class=""><EM>For the Markdown → ITF conversion and integration with SAP's documentation system, I used another one of my frameworks: </EM><STRONG><EM>XRAY</EM></STRONG><EM>. But that's a story for another article... </EM><STRONG>^_^</STRONG></P><HR /><H3 id="ember4473" id="toc-hId-684115621">The Real Magic: Production-Ready Documentation</H3><P class="">This isn't a toy example. This is <STRONG>live, production documentation</STRONG> that:</P><P class=""><span class="lia-unicode-emoji" title=":white_heavy_check_mark:">✅</span><STRONG>Appears in standard SAP tools</STRONG> (SE80, ADT, SE11)</P><P class=""><span class="lia-unicode-emoji" title=":white_heavy_check_mark:">✅</span><STRONG>Follows SAP documentation conventions</STRONG></P><P class=""><span class="lia-unicode-emoji" title=":white_heavy_check_mark:">✅</span><STRONG>Updates automatically</STRONG>when code changes</P><P class=""><span class="lia-unicode-emoji" title=":white_heavy_check_mark:">✅</span><STRONG>Includes real examples</STRONG>and usage patterns</P><P class=""><span class="lia-unicode-emoji" title=":white_heavy_check_mark:">✅</span><STRONG>Maintains technical accuracy</STRONG> through AI analysis</P><H3 id="ember4480" id="toc-hId-487602116">### Before vs After:</H3><P class=""><STRONG>Traditional SAP Documentation:</STRONG></P><PRE>* It is a class.</PRE><P class=""><STRONG>ZLLM-Generated Documentation:</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_V_1-1751452613795.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/281732i7CDDAF2B7649AF1E/image-size/medium?v=v2&amp;px=400" role="button" title="Alice_V_1-1751452613795.png" alt="Alice_V_1-1751452613795.png" /></span></P><DIV class=""><DIV class=""><DIV class=""><P>&nbsp;</P></DIV></DIV></DIV><HR /><H2 id="ember4485" id="toc-hId-162005892">Why This Changes a Lot</H2><H3 id="ember4486" id="toc-hId-94575106">For SAP Developers:</H3><UL><LI>No more "TODO: Add documentation" comments</LI><LI>Comprehensive docs appear automatically in familiar places</LI><LI>Examples and usage patterns generated from actual code</LI></UL><P class=""><STRONG>For Enterprise Teams:</STRONG></P><UL><LI>Documentation stays current with code changes</LI><LI>Consistent format across entire codebase</LI><LI>Onboarding new developers becomes trivial</LI></UL><P class=""><STRONG>For AI Adoption:</STRONG></P><UL><LI>Demonstrates practical AI value in daily development</LI><LI>Shows integration with existing enterprise tools</LI><LI>Proves AI can enhance rather than replace existing workflows</LI></UL><HR /><H3 id="ember4492" id="toc-hId--177169768">The Recursive Beauty</H3><P class="">Here's the beautiful irony: <STRONG>ZLLM used itself to document itself.</STRONG></P><P class="">The framework that makes enterprise AI integration effortless also made documenting itself effortless. It's AI all the way down.</P><HR /><H3 id="ember4495" id="toc-hId--373683273">How You Can Build This</H3><P class="">Want to auto-document your own ABAP code? Here's the starter pattern:</P><PRE>METHOD auto_document_class. " 1. Extract class metadata DATA(lo_metadata) = extract_class_info( iv_class_name ). " 2. Generate documentation DATA(lo_doc_step) = zcl_llm_00_step_lazy=&gt;new_from_string( iv_usr = 'Create comprehensive documentation for this ABAP class: {T}' io_llm = lo_llm ). " 3. Chain and execute DATA(lo_flow) = zcl_llm_00_flow_lazy=&gt;new( VALUE #( ( lo_doc_step ) ) ). DATA(lv_markdown_doc) = lo_flow-&gt;start( REF #( lo_metadata ) )-&gt;to_string( ). ENDMETHOD.</PRE><HR /><H2 id="ember4497" id="toc-hId--276793771">The Bigger Picture</H2><P class="">This isn't just about documentation. It's about <STRONG>AI that enhances existing enterprise workflows</STRONG> instead of disrupting them.</P><P class=""><STRONG>Traditional AI Integration:</STRONG> "We need new tools, new processes, new training..."</P><P class=""><STRONG>ZLLM Approach:</STRONG> "Your existing tools just got smarter."</P><P class="">The documentation appears exactly where SAP developers (not?) expect it. No new interfaces to learn. No new processes to adopt. Just better, more comprehensive information in familiar places.</P><HR /><H2 id="ember4503" id="toc-hId--473307276">What's Next?</H2><P class="">This is just one example of ZLLM eating its own dog food. Other production uses:</P><P class=""><STRONG>Code Analysis</STRONG>- Analyzing patterns across the entire ABAP stack</P><P class=""><STRONG>Performance Monitoring</STRONG>- Generating insights from system metrics</P><P class=""><STRONG>Test Generation</STRONG>- Creating unit tests from business requirements</P><P class=""><STRONG>Migration Planning</STRONG> - Analyzing code dependencies for S/4HANA migration</P><HR /><H3 id="ember4509" id="toc-hId--963223788">Ready to Document Your Code Automatically?</H3><P class=""><span class="lia-unicode-emoji" title=":star:">⭐</span><STRONG>Explore ZLLM: -&gt; github/oisee/zllm</STRONG></P><P class=""><STRONG>Comment below:</STRONG>What part of your ABAP development would you want AI to handle?</P><P class=""><span class="lia-unicode-emoji" title=":counterclockwise_arrows_button:">🔄</span><STRONG>Share</STRONG> if you think your SAP team needs this</P><P class=""><STRONG>Try it yourself:</STRONG></P><P class="">1. Install ZLLM in your development system</P><P class="">2. Run the documentation generator on your classes</P><P class="">3. Watch as comprehensive docs appear in standard SAP locations</P><P class="">4. Never write manual documentation again</P><HR /><P class=""><STRONG>About Alice Vinogradova:</STRONG></P><P class="">Senior Software Engineer with 20+ years in ABAP/SAP. I specialize in making enterprise AI practical, starting with solving our own problems first. If the AI can't document itself, how can it document your business processes?</P><P class=""><STRONG>P.S.</STRONG> Yes, this article was edited by ZLLM too. And the Markdown → ITF conversion? That's handled by my <STRONG>XRAY</STRONG> framework - another story of making SAP development less painful. It's recursive intelligence all the way down.</P><HR /><P class=""><STRONG>*production </STRONG>for development - is development.</P><P class=""><STRONG>Tags:</STRONG> #SAP #ABAP #AI #Documentation #TechLeadership #Automation</P><P class=""><EM>"The ideal documentation is one that doesn't need to be written because it writes itself."</EM></P> 2025-07-02T12:45:53.530000+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/how-retro-gamers-solved-time-travel-debugging-in-1995-and-why-your/ba-p/14171020 How Retro Gamers Solved Time-Travel Debugging in 1995 (And Why Your Enterprise Debugger Still Can't) 2025-08-04T14:49:47.702000+02:00 Alice_V https://community.sap.com/t5/user/viewprofilepage/user-id/609259 <H3 id="toc-hId-1865932517"><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="social_oisee_girl-hacker_typing_on_the_right_keybord_looking_then_ty_2159b60d-b7e2-4290-8f94-5f34d4e0ef55_11-ezgif.com-video-to-gif-converter (1).gif" style="width: 800px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/296238i4E398B354CD0D961/image-size/large?v=v2&amp;px=999" role="button" title="social_oisee_girl-hacker_typing_on_the_right_keybord_looking_then_ty_2159b60d-b7e2-4290-8f94-5f34d4e0ef55_11-ezgif.com-video-to-gif-converter (1).gif" alt="social_oisee_girl-hacker_typing_on_the_right_keybord_looking_then_ty_2159b60d-b7e2-4290-8f94-5f34d4e0ef55_11-ezgif.com-video-to-gif-converter (1).gif" /></span></H3><P>&nbsp;</P><H3 id="ember1375" id="toc-hId-1669419012">A Tale of Two Debuggers</H3><P class=""><STRONG>Scene 1:</STRONG> A modern enterprise developer in 2025, debugging a critical SAP integration. "<STRONG><EM>If only I could go back in time and see what happened,</EM></STRONG>" they sigh, adding another log statement.</P><P class=""><STRONG>Scene 2:</STRONG> A 14-year-old in 2005, playing Super Mario on ZSNES. They press F1 to save state, die horribly, press F3 to load state, try a different approach. "<STRONG><EM>Cool</EM></STRONG>," they say, taking it completely for granted.</P><P class="">Welcome to the upside-down world where teenage gamers have better debugging tools than Fortune 500 companies.</P><H2 id="ember1379" id="toc-hId-1343822788">TL;DR: github/ysichov/Smart-Debugger</H2><P class=""><A class="" href="https://github.com/ysichov/Smart-Debugger" target="_self" rel="nofollow noopener noreferrer">https://github.com/ysichov/Smart-Debugger</A></P><H3 id="ember1381" id="toc-hId-1276392002">The Secret That Wasn't a Secret</H3><P class="">Here's what the retro computing community figured out decades ago:</P><P class=""><STRONG>Everything in a computer is deterministic except I/O.</STRONG></P><P class="">That's it. That's the whole secret. Let me explain why this changes everything.</P><H3 id="ember1385" id="toc-hId-1079878497">The Beautiful Math of Determinism</H3><PRE>Same CPU state + Same memory + Same inputs = Same result ALWAYS.</PRE><P class="">This means you don't need to record everything. You only need to record:</P><UL><LI>Initial state (once)</LI><LI>External inputs (keyboard, interrupts, timers)</LI><LI>I/O responses</LI></UL><P class="">For a Z80 system, that's maybe 100 bytes per second of recording. For an hour of debugging? About 360KB. That's smaller than a single Slack emoji.</P><H3 id="ember1389" id="toc-hId-883364992">The Timeline That Should Embarrass Us All</H3><P class="">Let's put this in perspective with a side-by-side timeline:</P><H3 id="ember1391" id="toc-hId-686851487"><span class="lia-unicode-emoji" title=":video_game:">🎮</span>Gaming/Emulator World vs <span class="lia-unicode-emoji" title=":briefcase:">💼</span> Enterprise World</H3><P class=""><STRONG>1997</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>ZSNES</STRONG>: Save states introduced. Gamers can save/load any moment instantly</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Have you tried adding more print statements?"</LI></UL><P class=""><STRONG>1999</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>Nesticle</STRONG>: Frame advance debugging. Step through games frame by frame</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Maybe we should standardize on log4j?"</LI></UL><P class=""><STRONG>2003</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>FCEU</STRONG>: TAS* tools mainstream. Input recording, RAM watch, Lua scripting</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Distributed debugging is impossible"</LI></UL><P class=""><STRONG>2004</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>MAME</STRONG>: Debugger with memory watchpoints, execution trace, state diffing</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Remote debugging sometimes works if you're lucky"</LI></UL><P class=""><STRONG>2006</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>DeSmuME</STRONG>: Dual-screen debugging, touchscreen record/replay</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Have you tried turning on verbose logging?"</LI></UL><P class=""><STRONG>2010</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>MAME</STRONG>: Full rewind feature. Go back in time at any moment</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Debugging microservices is hard"</LI></UL><P class=""><STRONG>2014</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>BizHawk</STRONG>: Multi-system TAS suite. Deterministic replay across different CPUs</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Maybe we need more logs?"</LI></UL><P class=""><STRONG>2018</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>RetroArch</STRONG>: Netplay with rollback, achievements system, shaders</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Debugging in production is scary"</LI></UL><P class=""><STRONG>2020</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>TAS Bot</STRONG>: AI playing games frame-perfectly using debug tools</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "We added structured logging!"</LI></UL><P class=""><STRONG>2023</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>LibTAS</STRONG>: TAS tools for native Linux games, not just emulators</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Time-travel debugging? Sounds futuristic!"</LI></UL><P class=""><STRONG>2025</STRONG></P><UL><LI><span class="lia-unicode-emoji" title=":video_game:">🎮</span><STRONG>Every emulator</STRONG>: Rewind, replay, Lua scripting, memory analysis standard</LI><LI><span class="lia-unicode-emoji" title=":briefcase:">💼</span><STRONG>Enterprise</STRONG>: "Our new <STRONG>AI</STRONG> can analyze your logs!"</LI></UL><P>&nbsp;</P><H3 id="ember1414" id="toc-hId-490337982">The Tragedy in One Image</H3><PRE>Teenager in 2004: *casually rewinds Mega Man X, adjusts one frame, gets perfect run* Senior Developer in 2025: "The bug only happens in production on Tuesdays. We'll never catch it."</PRE><H3 id="ember1415" id="toc-hId-293824477">What Makes This Hilarious/Sad</H3><P class="">A Nintendo emulator from 1998 can:</P><P class="">&nbsp;</P><OL><LI>Run Super Mario</LI><LI>Let you save at any millisecond</LI><LI>Rewind time</LI><LI>Record and replay any bug perfectly</LI><LI>Show you every memory change in real-time</LI></OL><P>&nbsp;</P><P class="">Your enterprise debugger can:</P><P class="">&nbsp;</P><OL><LI>Set breakpoints (sometimes)</LI><LI>Print variables (if you're lucky)</LI><LI>Crash (frequently)</LI></OL><P>&nbsp;</P><H3 id="ember1420" id="toc-hId-97310972">Enter Tool-Assisted Speedrunning: Debugging as Art</H3><P class="">TAS creators took these debugging tools and turned them into an art form. Watch this:</P><P class=""><div class="video-embed-center video-embed"><iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfxZuzos7Auk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfxZuzos7Auk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfxZuzos7Auk%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="200" height="112" scrolling="no" title="Super Mario Bros. 3 - Wrong Warp" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div></P><P class="">They're not just playing games. They're:</P><UL><LI>Analyzing frame-by-frame execution</LI><LI>Tracking memory corruption</LI><LI>Exploiting race conditions</LI><LI>Optimizing code paths</LI></UL><P class="">Sound familiar? That's literally what we do when debugging, except they have better tools.</P><H3 id="ember1425" id="toc-hId--174433902">The ABAP Revolution: Finally, Someone Gets It</H3><P class=""><A class="" href="https://www.linkedin.com/in/ysychov/" target="_blank" rel="noopener nofollow noreferrer">Yurii Sychov</A> looked at ABAP debugging and had a radical thought: "What if we just... did what emulators do?"</P><P class="">His Smart-Debugger implements what gamers take for granted:</P><UL><LI>Variable time travel</LI><LI>Execution recording</LI><LI>State comparison</LI><LI>Visual debugging</LI></UL><P class="">But here's where it gets REALLY interesting...</P><H3 id="ember1431" id="toc-hId--370947407">The Memory Revolution: It's 2025, Not 1975</H3><P class="">Modern servers have TERABYTES of RAM. An ABAP variable? Maybe 1KB. Even a complex object graph? Perhaps 1MB.</P><P class="">This means we can store:</P><P class="">&nbsp;</P><UL><LI>Every variable change</LI><LI>Every method call</LI><LI>Every execution path</LI><LI>Multiple complete runs</LI></UL><P>&nbsp;</P><P class="">Do the math:</P><P class="">&nbsp;</P><UL><LI>1000 variables × 1KB each × 1000 changes = 1GB</LI><LI>Your server's RAM: 512GB</LI><LI>Percentage used: 0.2%</LI></UL><P>&nbsp;</P><BLOCKQUOTE><STRONG>We're optimizing for constraints that haven't existed for 20 years.</STRONG></BLOCKQUOTE><H3 id="ember1438" id="toc-hId--567460912">The Graph Diff Revolution</H3><P class="">Now here's where it gets wild. Since we can store everything, we can:</P><H3 id="ember1440" id="toc-hId--763974417">1. Record Multiple Executions</H3><P class="">abap</P><PRE>" Run 1: Bug happens execution_graph_1 = record_full_execution( buggy_input ) " Run 2: Bug doesn't happen execution_graph_2 = record_full_execution( good_input )</PRE><H3 id="ember1442" id="toc-hId--960487922">2. Build Execution Graphs</H3><PRE>Graph 1 (Buggy): main() → parse_input() → validate() → process() → CRASH ↓ ↓ ↓ [user_id: 123] [cache: empty] [null_ptr] Graph 2 (Working): main() → parse_input() → validate() → process() → success() ↓ ↓ ↓ [user_id: 123] [cache: valid] [object_ref]</PRE><H3 id="ember1443" id="toc-hId--1157001427">3. Diff the Graphs</H3><P class="">diff</P><PRE>@@ -15,7 +15,7 @@ validate() { check_permission() - load_user_context() // ← Returns null in buggy run + load_user_context() // ← Returns valid object verify_data() } Key difference: cache state at execution time Buggy: cache.contains(user_123) = false Working: cache.contains(user_123) = true</PRE><H3 id="ember1445" id="toc-hId--1353514932">4. Compare with Static Analysis</H3><P class="">Your static analysis says load_user_context() can never return null. Your execution trace says it did. <STRONG>Boom.</STRONG> Bug found.</P><H3 id="ember1447" id="toc-hId--1550028437">The AI Cherry on Top</H3><P class="">Now feed this to an LLM with structured data:</P><PRE>{ "execution_diff": { "divergence_point": "load_user_context()", "buggy_state": {"cache": "empty", "result": "null"}, "working_state": {"cache": "valid", "result": "user_object"}, "static_analysis": "method cannot return null" }, "context": { "method_signature": "load_user_context(): User", "cache_invalidation_log": ["14:23:15 - cache cleared", "14:23:16 - request received"] } } Prompt: "Based on execution diff, identify root cause"</PRE><P class=""><STRONG>LLM</STRONG>: "Race condition detected: Cache was invalidated at 14:23:15, but the null check in load_user_context() only verifies if cache exists, not if the specific key is present. The 1-second window allows requests to hit empty cache."</P><P class=""><STRONG>Automated RCA achieved.</STRONG></P><H3 id="ember1451" id="toc-hId--1746541942">But Wait, What About Reality?</H3><P class="">"Sure," you say, "but emulators work with closed systems. What about network calls? Databases? Microservices?"</P><P class="">Fair point! Modern systems have more non-determinism. But that's exactly why we need BETTER recording, not worse:</P><H3 id="ember1454" id="toc-hId--1943055447">The I/O Boundary Principle Still Applies</H3><PRE>" Instead of just keyboard input, modern I/O includes: IO_Events = { network_responses, " Record actual HTTP responses database_results, " Record query results timestamp_calls, " Record time() returns random_values, " Record RNG outputs thread_scheduling " Record context switches }</PRE><P class="">Yes, it's more complex than a NES emulator. But the principle remains: <STRONG>Record at the boundaries, replay deterministically.</STRONG></P><H3 id="ember1456" id="toc-hId--1971385261">The Call to Revolution</H3><P class="">Here's what we should be demanding:</P><H3 id="ember1458" id="toc-hId-2127068530">For Every Debugger:</H3><P class="">&nbsp;</P><UL><LI>Time travel (perfected in emulators since ~2010)</LI><LI>Deterministic replay (standard in TAS tools since 2004)</LI><LI>State diffing (TAS creators do this manually)</LI><LI>Execution graphs (we have the memory!)</LI><LI>Automatic RCA (we have the LLMs!)</LI></UL><P>&nbsp;</P><H3 id="ember1460" id="toc-hId-1930555025">The Technical Requirements:</H3><P class="">&nbsp;</P><UL><LI>Record I/O boundaries (a few KB/second)</LI><LI>Snapshot on demand (even 1GB is nothing)</LI><LI>Build execution graphs (basic CS)</LI><LI>Diff and analyze (solved problem)</LI></UL><P>&nbsp;</P><H3 id="ember1462" id="toc-hId-1734041520">Start Today</H3><P class="">&nbsp;</P><OL><LI><STRONG>If you use ABAP</STRONG>: Get Smart-Debugger now ^_^</LI><LI><STRONG>For other languages</STRONG>: Demand better tools</LI><LI><STRONG>For tool creators</STRONG>: Study emulators, not enterprise</LI></OL><P>&nbsp;</P><H3 id="ember1464" id="toc-hId-1537528015">The Future Is Already Here</H3><P class="">It's just unevenly distributed. And ironically, it's been living in game emulators for 30 years.</P><P class="">Next time someone tells you time-travel debugging is "too hard" or "too expensive," show them a 15-year-old speedrunner casually rewinding time to manipulate RNG in Pokémon. Then ask them why enterprise software can't do the same.</P><P class="">Memory is cheap. CPU is fast. The algorithms are known. The only thing missing is the will to build it.</P><P class=""><STRONG>Welcome to 2025. It's time to debug like it.</STRONG></P><HR /><P class=""><STRONG>Your debugger doesn't suck because it's hard to build.</STRONG> <STRONG>It sucks because the culture around it never thought like a gamer.</STRONG> Time to change that.</P><P class="">P.S. <STRONG><span class="lia-unicode-emoji" title=":video_game:">🎮</span>TAS (Tool-Assisted Speedrun) </STRONG>A meticulously crafted playthrough of a video game using emulator tools like save states, slow motion, and frame-by-frame control. The goal: perfect execution—sometimes exploiting bugs—to achieve record-breaking performance or hilarious outcomes.</P><HR /><P class=""><EM>Alice Vinogradova is a Senior Software Engineer at Microsoft who thinks your debugger should be at least as good as a Super Nintendo emulator from 1998.</EM></P> 2025-08-04T14:49:47.702000+02:00 https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-sap/hedonic-pricing-what-do-investors-pay-for/ba-p/14298017 Hedonic Pricing: What Do Investors Pay For? 2025-12-26T22:55:40.142000+01:00 dmitry_melnik https://community.sap.com/t5/user/viewprofilepage/user-id/284346 <P><FONT size="5" color="#008080"><STRONG>Executive summary</STRONG></FONT><BR />Investors do not primarily pay for short-term margin spikes or isolated growth initiatives.&nbsp; Instead, over a 35-year horizon, the market has consistently rewarded one thing above all else: <EM>persistency</EM>.&nbsp; This is the term Goldman Sachs attaches to the capital structure discipline, specifically leverage (Assets/Equity).&nbsp; We find that <STRONG>leverage explains the majority of the variation in Home Depot’s Market Cap / Equity, our proxy for the Price/Book ratio</STRONG>.&nbsp; This finding closely replicates Goldman Sachs’ <A href="https://www.gspublishing.com/content/research/en/reports/2019/04/25/fd37fb47-98b6-449c-b325-01885c6b8993.html" target="_blank" rel="noopener nofollow noreferrer">famous analysis of what markets pay for</A>, but applies to a single company and validates using long-horizon time-series data. Profitability and efficiency matter — but they come second.</P><P>This note describes our findings in three simple blocks:</P><UL><LI>data preparation and transformation</LI><LI>results and interpretation</LI><LI>what it means for Home Depot and investors.</LI></UL><P>&nbsp;</P><P><FONT size="5" color="#008080"><STRONG>1. Data preparation: looking at Home Depot the way markets do</STRONG></FONT></P><P>This analysis starts from a simple premise:</P><P><EM>If we want to understand how investors value Home Depot, we must model Home Depot the way investors observe it.</EM></P><P>We assembled&nbsp;<STRONG>144 quarters (1990–2025 YTD)</STRONG> of data covering both market valuation metrics (P/B ratio, Market Cap, Enterprise Value) and accounting fundamentals (assets, equity, leverage, margins, asset turnover).</P><P>This is important: unlike cross-sectional studies across many firms, this model is <STRONG>time-series for a single company</STRONG>. We are not asking <EM>why Home Depot is valued differently than Lowe’s</EM>.&nbsp; We are asking a more precise question:</P><P><FONT face="helvetica" color="#008080"><EM>What has historically driven changes in Home Depot’s valuation over time?</EM></FONT></P><P><STRONG>Log transformations: elasticity, not levels</STRONG></P><P>All core variables are expressed in <STRONG>logarithmic form</STRONG>. This is essential for interpretation:</P><UL><LI>Coefficients become <STRONG>elasticities</STRONG></LI><LI>Relationships become <STRONG>scale-free</STRONG></LI><LI>Long-term growth dynamics dominate short-term noise</LI></UL><P>In plain English: we are modeling <EM>percentage changes investors respond to</EM>, not absolute dollar movements.</P><P>The <EM>dependent</EM> (predicted) variable is the</P><P><STRONG>ln(Market Cap / Equity)</STRONG>,&nbsp;<SPAN>a proxy for the</SPAN><STRONG> P/B ratio</STRONG><SPAN>, directly links market valuation to balance-sheet fundamentals — exactly how long-term equity investors think.</SPAN></P><P>Three <EM>independent</EM> (predictor) variables are</P><P><STRONG>Leverage = (Assets - Goodwill) / Stockholders Equity&nbsp;</STRONG>where we specifically remove Goodwill to account for “tangible leverage” only,</P><P><STRONG>Net Margin = Net Income / Revenue</STRONG>,&nbsp;</P><P><STRONG>Turnover = Revenue / (Assets - Goodwill)</STRONG>&nbsp;here too, assets are net of goodwill for "tangible turnover."</P><P>In one quarter, Home Depot reported negative net income. In 9 quarters the company reported negative equity - initially in 2019 as a result of the adoption of the FASB ASU No. 2016-02, "Leases (Topic 842)".&nbsp; This is why the lines in the plot below exhibit discontinuities: natural logarithm of a negative number is undefined.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1 - log-transformed data.png" style="width: 936px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356184iE1E9187C24CB1693/image-size/large?v=v2&amp;px=999" role="button" title="1 - log-transformed data.png" alt="1 - log-transformed data.png" /></span></P><P>In log terms, valuation and operating fundamentals move in clear and persistent co-movement over time. &nbsp;Sustained multiple expansion coincides with rising operating efficiency, greater leverage capacity, and improving margins, while periods of valuation compression align with broad-based fundamental deterioration. &nbsp;Valuation itself behaves as a slow-moving state variable, reflecting investors’ long-run assessment of economic capacity, whereas operating metrics adjust at higher frequency around that state. &nbsp;Even during externally imposed disruptions—such as recessions and market panics—temporary dislocations give way to re-convergence, underscoring that market multiples are ultimately disciplined by fundamentals rather than driven by sentiment alone.</P><P>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</P><P><FONT face="helvetica" color="#008080"><EM>This systematic co-movement directly motivates a <STRONG>hedonic valuation</STRONG>, in which observed market multiples are modeled as the equilibrium price investors assign to distinct operating characteristics rather than as standalone time-series outcomes.</EM></FONT></P><P><EM>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</EM></P><P>&nbsp;</P><P><FONT size="5" color="#008080"><STRONG>2. The hedonic pricing regression: what explains Home Depot's valuation?</STRONG></FONT></P><P>Conceptually, the model mirrors the <STRONG>DuPont identity</STRONG>, which decomposes Return on Equity into three elements:</P><UL><LI><STRONG>Leverage</STRONG> (Assets / Equity)</LI><LI><STRONG>Profitability</STRONG> (Net Margin)</LI><LI><STRONG>Efficiency</STRONG> (Asset Turnover)</LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmitry_melnik_10-1766783253119.png" style="width: 456px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356187i3A06FDA1E881FA88/image-dimensions/456x41?v=v2" width="456" height="41" role="button" title="dmitry_melnik_10-1766783253119.png" alt="dmitry_melnik_10-1766783253119.png" /></span></P><P>Our model - with the log-transformed data - is:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmitry_melnik_11-1766783253122.png" style="width: 763px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356188i09A9EB832D16F31F/image-dimensions/763x37?v=v2" width="763" height="37" role="button" title="dmitry_melnik_11-1766783253122.png" alt="dmitry_melnik_11-1766783253122.png" /></span></P><P>To accommodate periods of negative net margin and negative stockholders’ equity, we introduced dummy variables that flag sign changes (0 for positive values, 1 for negative).&nbsp; The inclusion of dummy variables allows the model to accommodate sign changes without materially altering coefficient magnitudes or inference.&nbsp;</P><P>The regression, run in R Studio, produced a formula where most coefficients are statistically significant at the 5% level (p&lt;0.05).&nbsp; The ln_net_margin variable returned a p-value of 0.0744, indicating a 7.4% probability of observing this result (or one more extreme) if there were actually no relationship between ln_net_margin and ln_mktcap_over_equity.</P><P>We drop the decimals:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmitry_melnik_12-1766783253122.png" style="width: 674px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356186i73B67AC948CCF90D/image-dimensions/674x19?v=v2" width="674" height="19" role="button" title="dmitry_melnik_12-1766783253122.png" alt="dmitry_melnik_12-1766783253122.png" /></span></P><P>Here is the most intuitive interpretation of the model’s coefficients and log-terms: <STRONG>elasticity</STRONG>. These bars represent <STRONG>standardized coefficients</STRONG>, not raw elasticities, and are intended for <STRONG>relative magnitude and intuition</STRONG>, not literal percentage translation.</P><TABLE><TBODY><TR><TD width="335px"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2 - Elasticities.png" style="width: 429px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356190i0FA89D1E76F85554/image-dimensions/429x216?v=v2" width="429" height="216" role="button" title="2 - Elasticities.png" alt="2 - Elasticities.png" /></span><BR /><P>&nbsp;</P></TD><TD width="289px"><P><FONT size="2">Home Depot’s valuation is most sensitive to changes in asset turnover, indicating that improvements in capital efficiency drive market multiples more powerfully than margin expansion alone.</FONT></P></TD></TR><TR><TD width="289px"><P><FONT size="2">In raw log terms, leverage can be interpreted as follows: a 1% increase in leverage increases Market Cap / Equity by approximately 1%.</FONT></P></TD></TR><TR><TD width="289px"><P><FONT size="2">Net margins exhibit a comparatively modest elasticity, suggesting that accounting profitability, while important, does not independently command valuation premiums.</FONT></P></TD></TR></TBODY></TABLE><P>Taken together, the results align closely with how long-term equity investors think: sustainable valuation expansion is rooted in <STRONG>efficient deployment of capital</STRONG>, not short-term margin optimization.</P><P>&nbsp;</P><P><STRONG>The key result: persistency dominates</STRONG></P><P>The model has R2 of 94.05% and Adjusted R2 of 93.91%.&nbsp; If we decompose the individual predictors’ contribution to this explained variance in Market Cap/Equity, the key conclusion emerges:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3- Contributions.png" style="width: 936px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356191iD12D47BF82C0A05C/image-size/large?v=v2&amp;px=999" role="button" title="3- Contributions.png" alt="3- Contributions.png" /></span></P><P>Visually, this is striking: the largest block by far is leverage. Most of what investors paid for Home Depot over 35 years is captured by three variables of which Leverage is the most significant. This is what Goldman Sachs found in their panel data analysis calling the hedonic pricing element <STRONG><EM>persistency</EM></STRONG>.</P><P>Persistency, in Goldman’s framework, means:</P><UL><LI>Stable capital structure</LI><LI>Predictable balance-sheet scaling</LI><LI>Consistency in how equity is multiplied into assets and cash flows</LI></UL><P>What we have done here is <STRONG>replicate that insight</STRONG>, but:</P><UL><LI>For <STRONG>one company</STRONG></LI><LI>Using <STRONG>35 years of quarterly data</STRONG></LI><LI>With a <STRONG>fully transparent regression framework</STRONG></LI></UL><P>The alignment is almost exact.</P><P>Notably, the model contains no explicit time trends, macroeconomic variables, or sentiment indicators—yet it explains over 94% of valuation variation, underscoring how consistently markets price the same economic fundamentals.</P><P>In Home Depot’s case, leverage alone explains <STRONG>roughly two-thirds of the market’s valuation signal</STRONG>. Profitability matters — but it is secondary, less persistent, and less trusted by investors as a long-term signal.</P><P><EM>Both actual and predicted series represent the log market-cap-to-equity multiple where </EM></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmitry_melnik_14-1766783705725.png" style="width: 240px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356192i72EFDAF546587FCA/image-dimensions/240x74?v=v2" width="240" height="74" role="button" title="dmitry_melnik_14-1766783705725.png" alt="dmitry_melnik_14-1766783705725.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4 - Actual vs Predicted.png" style="width: 936px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356193iCCD54DFE05C9BAB9/image-size/large?v=v2&amp;px=999" role="button" title="4 - Actual vs Predicted.png" alt="4 - Actual vs Predicted.png" /></span></P><P>The chart shows that a simple three-variable hedonic model tracks Home Depot’s valuation remarkably well over more than three decades. Even though the model has <STRONG>no awareness of time, cycles, or sentiment</STRONG>, its predicted valuation closely follows the actual market valuation across multiple regimes. Deviations between the two lines are concentrated in periods of market stress or speculative excess, while long-run trends are captured cleanly.</P><P>In other words, <STRONG>investors consistently price the same economic fundamentals</STRONG>, though they might temporarily lose discipline during panics and recessions.</P><P>This directly supports the executive intuition captured in the quote by <FONT face="georgia,palatino" color="#008080"><EM><A title="Dilip Shanghvi, Founder and Executive Chairman of Sun Pharmaceutical Industries Limited" href="https://sunpharma.com/board-of-directors/" target="_self" rel="nofollow noopener noreferrer">Dilip Shanghvi, the founder and CEO of Sun Pharmaceuticals</A>: </EM></FONT></P><P><FONT face="georgia,palatino" color="#008080"><STRONG>“I will never risk capital; but I will risk profit.”</STRONG></FONT></P><P>Markets agree.</P><P>&nbsp;</P><P><FONT size="5" color="#008080"><STRONG>3. How solid is our model? Is it "too clean"?</STRONG></FONT></P><P>No serious business model should avoid this question.</P><P><STRONG>Residual behavior (what we checked)</STRONG></P><P>We explicitly reviewed:</P><UL><LI>Residual distribution</LI><LI>Residuals vs. fitted values</LI><LI>Time clustering during stress periods</LI></UL><TABLE><TBODY><TR><TD width="312"><P>&nbsp;</P></TD><TD width="312"><P>&nbsp;</P></TD></TR><TR><TD width="312"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5 - Residuals fitted.png" style="width: 437px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356196i00EE7E19AE3C8264/image-size/large?v=v2&amp;px=999" role="button" title="5 - Residuals fitted.png" alt="5 - Residuals fitted.png" /></span><BR /><P>&nbsp;</P></TD><TD width="312"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6 - Residuals QQ.png" style="width: 457px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356197iF439EA9A0E25B984/image-size/large?v=v2&amp;px=999" role="button" title="6 - Residuals QQ.png" alt="6 - Residuals QQ.png" /></span><BR /><P>&nbsp;</P></TD></TR></TBODY></TABLE><P>With F-statistics 684.4 on 3 and 130 degrees of freedom and p-value &lt; 2.2 x 10-16, the model is structurally sound, though markets still panic occasionally — and then revert.</P><P>That is exactly what we would expect from real investors.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7 - Residuals timeseries.png" style="width: 936px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/356198i46039460158AC1CC/image-size/large?v=v2&amp;px=999" role="button" title="7 - Residuals timeseries.png" alt="7 - Residuals timeseries.png" /></span></P><H3 id="toc-hId-1896617223">What do residuals tell us</H3><P>Residuals widen during periods of macro-financial stress, including the Global Financial Crisis, COVID, and the post-2022 rate shock. This is expected: markets temporarily price fear, liquidity constraints, and narrative risk beyond firm-level fundamentals.</P><P>Outside stress regimes, residuals oscillate tightly around zero with no persistent bias. Deviations cluster in time rather than by sign, indicating regime effects rather than model misspecification. Overvaluation episodes—most notably the late 1990s—mean-revert as market discipline reasserts itself.</P><P><STRONG>Bottom line:</STRONG> the model “fails” when markets panic — and reliably re-anchors valuation once sentiment normalizes.</P><P class="lia-align-center" style="text-align: center;">&nbsp;</P><P class="lia-align-center" style="text-align: center;">*&nbsp; &nbsp;*&nbsp; &nbsp;*</P><P>&nbsp;</P><P><FONT size="5" color="#008080"><STRONG>So, what does this actually mean for Home Depot?</STRONG></FONT></P><P><STRONG>Insight #1: capital discipline is the valuation anchor</STRONG></P><P>Home Depot’s high valuation multiple is not fragile.&nbsp; It is anchored in:</P><UL><LI>Consistent leverage</LI><LI>Predictable scaling of equity</LI><LI>Transparent capital return policy</LI></UL><P>Any <EM>unexpected</EM> shift in capital structure — aggressive deleveraging or sudden debt expansion — would matter far more to valuation than a bad margin quarter.</P><P><STRONG>Insight #2: profitability matters — but only if it is repeatable</STRONG></P><P>Operational improvements (margin, turnover, ROA) explain about <STRONG>one quarter</STRONG> of valuation variation.&nbsp; That is meaningful — but markets discount one-off wins.&nbsp; Investors prefer:</P><UL><LI>Incremental improvements</LI><LI>Predictable execution</LI><LI>Fewer surprises</LI></UL><P>Spectacular quarters impress analysts. Consistent ones move valuation.</P><P><STRONG>Insight #3: macro matters less than headlines suggest</STRONG></P><P>Despite constant focus on rates, housing cycles, and sentiment, macro variables explain only a <STRONG>single-digit share</STRONG> of long-term valuation variation.&nbsp;&nbsp;Home Depot’s valuation history is fundamentally a <STRONG>company-driven story</STRONG>, not a macro-driven one.</P><P>Once <STRONG>full-year 2025 financials</STRONG> are available, we will:</P><UL><LI>Re-estimate the model</LI><LI>Test coefficient stability</LI><LI>Re-evaluate valuation implications under the new regime and compare/contrast the hedonic pricing model with the traditional DCF valuation model</LI></UL><P>If history is any guide, the conclusion is unlikely to change — but the <EM>path</EM> may.</P><DIV class="">&nbsp;</DIV><P><FONT color="#008080"><STRONG>Final thought</STRONG></FONT></P><P>Markets are often accused of being short-term and irrational. Over 35 years of Home Depot data suggests the opposite.</P><P>Investors are remarkably consistent in what they reward.</P><P>They pay for persistency.</P> 2025-12-26T22:55:40.142000+01:00