https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/HTML5-blog-posts.xml SAP Community - HTML5 2026-02-13T00:10:47.644896+00:00 python-feedgen HTML5 blog posts in SAP Community https://community.sap.com/t5/technology-blog-posts-by-members/how-to-enable-submit-button-in-fiori-app-verify-currency-adjustments-f4670/ba-p/13562097 How to enable SUBMIT Button in Fiori app – Verify Currency Adjustments (F4670) 2023-03-28T11:44:54+02:00 kuldeep2813 https://community.sap.com/t5/user/viewprofilepage/user-id/736775 Hello,<BR /> <BR /> In this blog we will learn How to enable the SUBMIT button in Fiori app - Verify Currency Adjustments (F4670).<BR /> <BR /> <STRONG>Issue: When we click at Create Button, It navigates to the Fiori app - Post Currency Adjustments(F1606). Here SUBMIT Button is disable but end user wants to SUBMIT the Data.</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture2-46.png" height="265" width="575" /></P><BR /> &nbsp;<BR /> <H3 id="toc-hId-1092051934">Prerequisites: User must have access to all three apps</H3><BR /> <OL><BR /> <LI>Verify Currency Adjustments(F4670)</LI><BR /> <LI>Manage Workflows for Journal Entry Verification - In General Ledger (F2720)</LI><BR /> <LI>Manage Teams and Responsibilities for Journal Entry Verification - In General Ledger (F3932)</LI><BR /> </OL><BR /> &nbsp;<BR /> <H2 id="toc-hId-766455710">Steps to enable the SUBMIT Button</H2><BR /> <OL><BR /> <LI><BR /> <H4 id="toc-hId-828107643">Go to Fiori launchpad and launch the Fiori app – F4670 (Verify Currency Adjustments) and Click at Create Button.</H4><BR /> </LI><BR /> </OL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture3-35.png" height="252" width="575" /></P><BR /> <BR /> <H4 id="toc-hId-631594138">&nbsp; &nbsp; &nbsp; 2. It will navigate to the Fiori app F1606 (Post Currency Adjustments). <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture4-25.png" height="264" width="585" /></H4><BR /> <H4 id="toc-hId-435080633">&nbsp; &nbsp; 3. Fill all required details, but as we can see <STRONG>SUBMIT</STRONG> Button is not enabled.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture5-28.png" height="265" width="590" /></H4><BR /> <H4 id="toc-hId-238567128">&nbsp; &nbsp;4. To enable the SUBMIT Button go to the Fiori app – F2720 (Manage Workflows for Journal Entry Verification - In General Ledger)</H4><BR /> Select the workflow Type as <STRONG>Currency Adjustment Verification </STRONG>from Dropdown.<BR /> <BR /> If Currency Adjustment Verification is available so no need to perform any action.<BR /> <BR /> Else there is no data regarding this -&gt; Create the new entry for this.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture6-26.png" height="244" width="578" /><BR /> <BR /> Now we can see the entry of <STRONG>Currency Adjustment Verification.</STRONG><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture7-28.png" height="142" width="592" /><BR /> <H4 id="toc-hId-42053623">&nbsp; &nbsp;5. Go to Fiori launchpad (/n/ui2/FLP) --&gt; Fiori app (Manage Teams and Responsibilities for&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Journal Entry Verification - In General Ledger). <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture8-24.png" height="220" width="590" /></H4><BR /> Need to check Entry is maintained or not. If entry is not maintained, please create entry and fill&nbsp; &nbsp; &nbsp; &nbsp; required data and Save.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture9-17.png" height="229" width="599" /><BR /> <H4 id="toc-hId--154459882">&nbsp; &nbsp;6. Go to Fiori app --&gt;&nbsp; F4670 (Verify Currency Adjustments) and Click at Create Button. Perform the steps 2 &amp; 3. Now we can see that SUBMIT Button is enable in our application (F1606).<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Picture10-13.png" height="260" width="576" /></H4><BR /> More Information:<BR /> <BR /> <A href="https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/651d8af3ea974ad1a4d74449122c620e/13c9c4a304a4489fa3fd5440fa1cdac0.html?version=1809.001" target="_blank" rel="noopener noreferrer">Verify Currency Adjustments</A><BR /> <H3 id="toc-hId--480056106">Conclusion</H3><BR /> SUBMIT Button is enable in our Fiori application<STRONG> Post Currency Adjustments- (F1606).</STRONG><BR /> <BR /> With this we come to an end of this blog. Hope you find it useful.<BR /> <BR /> Keep learning &amp; Keep Sharing!!<BR /> <BR /> &nbsp; 2023-03-28T11:44:54+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/fancy-emails-from-sap-integration-suite-ci-and-btp-alert-notification/ba-p/13575496 Fancy Emails from SAP Integration Suite(CI) and BTP Alert Notification Service 2023-09-03T14:50:38+02:00 FarooqAhmed https://community.sap.com/t5/user/viewprofilepage/user-id/146868 <EM>A few years ago one of the client team asked me can PI/PO able to send other than plain/text&nbsp; EMAIL notifications for standard CBMA/MAIL receiver scenarios?. </EM><BR /> <BR /> The answer was YES, PI/PO can able to sent more organized and feel good mails which can present the required data in the tabular form or more colorful or more catchy. Have done it and showed how it was working.<BR /> <BR /> <EM>Recently again the same question was asked by another client does CPI/CI able to send more attractive emails instead of plain and text emails?. </EM><BR /> <BR /> The answer is YES. Its not only Integration Suite(CI) but also the BTP Alert Notification Service can able to sent more fascinating emails. Just embed few lines of HTML tags in the actual MAIL BODY thats it!!! But remember don't use the unnecessary tags in order to "keep the core clean". Also the same email body can be explicitly set using groovy script but i personally do no suggest always relying on scripts when things can be done in standard way why to make the maintenance difficult.<BR /> <BR /> It so happens if some ABAP or FIORI screens are been used by the client-user to get to know the capabilities of SAP. What if the end user is not really connected with the background processing of their enterprise data where SAP is leveraged at its BEST. Might be for one of the usual business case of notifying the User about the technical/functional error alerts or some important ORDERS receivable/processing by the middleware system or some other very critical bank interfaces processing updates. Whatso ever that notification email plays the extra cosmetic advantage of not only representing the calibrated tool efficacy but also the puzzling question what's running behind the screens for the new or non-sap users. In this AI-Gen world nothing goes waste even the word of mouth considered to be a unrealistic publicity.<BR /> <BR /> Let us checkout some of the CI cases where this can be a promising approach of fine tuning the USP of the BTP as a product.<BR /> <BR /> <STRONG>From Integration Suite(CI):</STRONG><BR /> <BR /> <STRONG>Case-1:</STRONG><BR /> <BR /> <EM>How can the emails be send in the tabular format with the required data passed dynamically from the specific interface to global exception interface?</EM><BR /> <BR /> If there is a global exception interface the below can be kept inside the MAIL receiver channel and for some scenarios where direct MAIL should be sent for some ORDER updates then that IFLOW actual MAIL receiver channel should be configured with the same as below<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/MAIL-RECEIVER.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">MAIL RECEIVER</P><BR /> The MAIL BODY should be as below.<BR /> <PRE class="language-markup"><CODE>&lt;!DOCTYPE html&gt;<BR /> &lt;html lang="en"&gt;<BR /> &lt;head&gt;<BR /> &lt;meta charset="UTF-8" /&gt;<BR /> &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;<BR /> &lt;title&gt;EMAIL&lt;/title&gt;<BR /> &lt;style&gt;<BR /> table, th, td {<BR /> border: 1px solid black;<BR /> }<BR /> &lt;/style&gt;<BR /> &lt;/head&gt;<BR /> &lt;body&gt;<BR /> &lt;p&gt;Hi,&lt;br&gt;&lt;br&gt;<BR /> Please find below details for Interface Message failure.&lt;br&gt;<BR /> &lt;table&gt;<BR /> &lt;tr&gt;<BR /> &lt;td&gt;&lt;span style="font-weight:bold"&gt;BTP-CI Environment&lt;/span&gt;&lt;/td&gt;<BR /> &lt;td&gt;${header.CPIEnvironment}&lt;/td&gt;<BR /> &lt;/tr&gt;<BR /> &lt;tr&gt;<BR /> &lt;td&gt;&lt;span style="font-weight:bold"&gt;Message ID&lt;/span&gt;&lt;/td&gt;<BR /> &lt;td&gt;${header.MessageId}&lt;/td&gt;<BR /> &lt;/tr&gt;<BR /> &lt;tr&gt;<BR /> &lt;td&gt;&lt;span style="font-weight:bold"&gt;SenderSystem&lt;/span&gt;&lt;/td&gt;<BR /> &lt;td&gt;${header.SenderSystem}&lt;/td&gt;<BR /> &lt;/tr&gt;<BR /> &lt;tr&gt;<BR /> &lt;td&gt;&lt;span style="font-weight:bold"&gt;ReceiverSystem&lt;/span&gt;&lt;/td&gt;<BR /> &lt;td&gt;${header.ReceiverSystem}&lt;/td&gt; <BR /> &lt;/tr&gt;<BR /> &lt;tr&gt;<BR /> &lt;td&gt;&lt;span style="font-weight:bold"&gt;Timestamp&lt;/span&gt;&lt;/td&gt;<BR /> &lt;td&gt;${header.Timestamp}&lt;/td&gt;<BR /> &lt;/tr&gt;<BR /> &lt;tr&gt;<BR /> &lt;td&gt;&lt;span style="font-weight:bold"&gt;Error Message&lt;/span&gt;&lt;/td&gt;<BR /> &lt;td&gt;${header.ErrorMessage}&lt;/td&gt; <BR /> &lt;/tr&gt;<BR /> &lt;/table&gt;&lt;br&gt;<BR /> Do Not Reply to this mail. Please contact SAP-Integration Team for further investigation.&lt;br&gt;&lt;br&gt;<BR /> Regards,&lt;br&gt;<BR /> SAP Integration Team.<BR /> &lt;/p&gt;<BR /> &lt;/body&gt;<BR /> &lt;/html&gt;</CODE></PRE><BR /> The BODY MIME Type should be "TEXT/HTML" instead of "TEXT/XML".<BR /> <BR /> After execution the OUTLOOK or GMAIL or any other exchange server will be received the mail as below<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/EMAIL-FORMAT.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">EMAIL FORMAT</P><BR /> <STRONG>Case-2:</STRONG><BR /> <BR /> <EM>How can the emails be send in the tabular format with some colors embedded and main text highlighted&nbsp;in required color?</EM><BR /> <BR /> Modify the table style declaration and required row with span<BR /> <BR /> &lt;table style="background-color:LightGray;"&gt;<BR /> <BR /> &lt;td&gt;&lt;span style="color: red;"&gt;Your Input Data&lt;/span&gt;&lt;/td&gt;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/EMAIL-FORMAT2.jpg" /></P><BR /> <STRONG>Case-3:</STRONG><BR /> <BR /> <EM>How can the emails be differentiated based on the environments?</EM><BR /> <BR /> Well there was the time while using the SAP systems through GUI , consultants used to keep different screen colors for each environment. For example DEV: GREEN, QA: ORANGE and PROD: RED.<BR /> <BR /> Similarly we can make a notifiable difference in the mails received from which environment its sent from. However there will be the subject or some row in the body indicating that environment specific information but if its added with some background color on top of normal text which will be very much helpful. As most of them will set the outlook=&gt;layout=&gt;folder pane=&gt;normal where the mail body will be noticed immediately this can be achieved by using the below.<BR /> <BR /> Modify the body tags as below<BR /> <BR /> &lt;body style="background-color:MediumSeaGreen;"&gt; in DEV CI Interface Mail Channel<BR /> &lt;body style="background-color:Orange;"&gt; in QA CI Interface Mail Channel<BR /> &lt;body style="background-color:Tomato;"&gt; in PROD CI Interface Mail Channel<BR /> <BR /> This can be useful when the mail recipient list is the same for all or any two CI environments.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/CI-ENVI.jpg" /></P><BR /> <STRONG>From SAP BTP Alert Notification Service:</STRONG><BR /> <BR /> While configuring for the Alert Notification Service any type of alerts can be configured. Among all the available action types " EMAIL " and " EMAIL with Custom SMTP Server " can used for different subscription sources and accordingly the conditions can be configured.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/EMAIL-TYPES.jpg" /></P><BR /> Once the Action Type "EMAIL" is selected then the below options to be used to configure the email with the HTML embedded body<BR /> <BR /> Use HTML checkbox to be selected.<BR /> <BR /> Payload Template should be inserted with the required custom payload template.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/09/Action-EMAIL-1.jpg" /></P><BR /> <STRONG>Conclusion:</STRONG><BR /> <BR /> There are different types of HTML tables, styles, formatting, colors, symbols, emojis etc., which can be used as per the requirement and embed those lines of tags in the EMAIL BODY with dynamic and static values.<BR /> <BR /> SAP always suggests to follow the standard so when this can be done using a simple html tags better to use the same tags using the dynamic properties directly in the EMAIL BODY and not relying on other groovy scripts as the maintenance will be difficult.<BR /> <BR /> Also for S4 HANA or AIF any SAP products where the standard or custom alerts are possible just check for HTML support. If its present then similar configurations can be done over there and make the emails more fancy!!!<BR /> <BR /> <EM>Disclaimer:</EM><BR /> <BR /> This article is only for informational purpose that usage of HTML tags inside the MAIL BODY gives more attractive EMAILS to the recipients.<BR /> <BR /> Few cases are shown as an example but no limitations in any perspective. 2023-09-03T14:50:38+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/sap-integration-suite-enhanced-monitoring/ba-p/13577830 SAP Integration Suite Enhanced Monitoring 2023-10-19T20:36:25+02:00 MarianVatafu https://community.sap.com/t5/user/viewprofilepage/user-id/864725 <H1 id="toc-hId-834966467">Scenario Overview</H1><BR /> Using the standard monitoring capabilities from <A href="https://help.sap.com/docs/integration-suite" target="_blank" rel="noopener noreferrer">SAP Integration Suite</A> sometimes has its downsides. Each one of us has faced at some point the need to persist or store trace logs or even save the logs of a job that's running outside of business hours.<BR /> <BR /> Together with my colleague and dear friend <SPAN class="mention-scrubbed">codrinz</SPAN>&nbsp;we started to think at way to persist the much needed trace logs that are only available for one hour on the SAP Integration Suite Tenant.<BR /> <BR /> This idea came from a need we had while doing tests on several artifacts, and because they were scheduled somewhere around 4 AM I was not there when they ran and in the morning we had to face plain/short error messages.<BR /> <BR /> Using the standard payload logging as attachments has its limitations, because in the end attachments would pile up in the backend and it will slow down the tenant, so we had to think at a different way of accessing the much-needed logs.<BR /> <BR /> By integrating&nbsp;<A href="https://www.sap.com/products/technology-platform.html" target="_blank" rel="noopener noreferrer">SAP Business Technology Platform</A> products we have managed to create an application that can schedule a trace log for a specific iFlow artifact, scan for any runs in the specified interval and save it into a <A href="https://help.sap.com/docs/hana-cloud" target="_blank" rel="noopener noreferrer">SAP HANA</A> Database. Also, with the help of openAI, we get suggestions on how to fix the captured errors.<BR /> <BR /> All the SAP products are being used on a trial environment, so if you do want to do anything similar to what we did make sure to read the <A href="https://developers.sap.com/tutorial-navigator.html" target="_blank" rel="noopener noreferrer">SAP Tutorials for Developers.</A><BR /> <H2 id="toc-hId-767535681">Architecture Overview</H2><BR /> The following picture gives an overview of the solution architecture :<BR /> <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-5.png" /></P><BR /> <P class="image_caption" style="text-align: center"><EM>Solution Overview</EM></P><BR /> &nbsp;<BR /> <BR /> The end user can use the html page exposed by the <A href="https://developers.sap.com/mission.cp-starter-extensions-cap.html" target="_blank" rel="noopener noreferrer">SAP CAP</A> application for configuring and inspecting the logs saved.<BR /> <BR /> &nbsp;<BR /> <BR /> <IFRAME width="560" height="315" src="https://www.youtube.com/embed/g5V6VPUDA-8&amp;ab_channel=MarianVatafu" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></IFRAME><BR /> <P style="text-align: center">Video short demo</P><BR /> <BR /> <H2 id="toc-hId-571022176">Technical setup</H2><BR /> <H3 id="toc-hId-503591390">SAP CAP Application Backend</H3><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/Dev-spaces.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Trial dev space</P><BR /> <P class="image_caption">The application was created in <A href="https://help.sap.com/docs/bas" target="_blank" rel="noopener noreferrer">SAP Business Application Studios</A> using NodeJS, express and HDB connections to the SAP HANA Database and it consists of creating multiple services and functions which are being called from the html page and SAP Integration Suite.</P><BR /> Below are the entities we exposed in the catalog service, which are being used to communicate with the database.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/catalog-service-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Catalog services</P><BR /> &nbsp;<BR /> <BR /> The services are binded to the data model created below.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/data-model.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Data model</P><BR /> By also creating some dummy CSVs for sample data, we were able to push the application to Cloud Foundry, generate the HDB container/tables and deploy it.<BR /> <H3 id="toc-hId-307077885">SAP CAP Application Frontend</H3><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/Index.png" /></P><BR /> <P class="image_caption" style="text-align: center">Application Home Screen</P><BR /> &nbsp;<BR /> <BR /> The frontend was designed in HTML combined with Javascript. It consists of 3 pages and each one has buttons that trigger several REST calls to the SAP HANA Database or to the SAP Integration Suite endpoint that controls the behavior of several functionalities.<BR /> <BR /> &nbsp;<BR /> <BR /> Below is a sample Javascript code used to populate, filter and update a table .<BR /> <PRE class="language-javascript"><CODE>&lt;input type="text" id="searchInput" placeholder="Search for iFlow name..." onkeyup="filterTable()"&gt;<BR /> &lt;br&gt;&lt;br&gt;<BR /> <BR /> &lt;table id="dataTable"&gt;<BR /> &lt;thead&gt;<BR /> &lt;tr&gt;<BR /> &lt;th onclick="sortTable(0)"&gt;iFlow name&lt;/th&gt;<BR /> &lt;th onclick="sortTable(1)"&gt;StartDate&lt;/th&gt;<BR /> &lt;th onclick="sortTable(2)"&gt;StartTime&lt;/th&gt;<BR /> &lt;th onclick="sortTable(3)"&gt;EndDate&lt;/th&gt;<BR /> &lt;th onclick="sortTable(4)"&gt;EndTime&lt;/th&gt;<BR /> &lt;th&gt;Action&lt;/th&gt; &lt;!-- Add a new column for delete buttons --&gt;<BR /> &lt;/tr&gt;<BR /> &lt;/thead&gt;<BR /> &lt;tbody id="dataBody"&gt;<BR /> &lt;!-- Table content will be added dynamically --&gt;<BR /> &lt;/tbody&gt;<BR /> &lt;/table&gt;<BR /> <BR /> &lt;!-- Sorting options dropdown --&gt;<BR /> &lt;div class="sorting-options" id="sortingOptions"&gt;<BR /> &lt;a href="#" onclick="sortTable(0, 'asc')"&gt;Sort Ascending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(0, 'desc')"&gt;Sort Descending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(1, 'asc')"&gt;Sort Ascending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(1, 'desc')"&gt;Sort Descending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(2, 'asc')"&gt;Sort Ascending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(2, 'desc')"&gt;Sort Descending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(3, 'asc')"&gt;Sort Ascending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(3, 'desc')"&gt;Sort Descending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(4, 'asc')"&gt;Sort Ascending&lt;/a&gt;<BR /> &lt;a href="#" onclick="sortTable(4, 'desc')"&gt;Sort Descending&lt;/a&gt;<BR /> &lt;/div&gt;<BR /> <BR /> &lt;script&gt;<BR /> // Function to delete a row when the delete button is clicked<BR /> function deleteRow(row) {<BR /> const iFlowName = row.cells[0].textContent.trim(); // Extract iFlow name from the first column<BR /> <BR /> // Make a GET request with query parameters to delete the corresponding iFlow<BR /> deleteIFlow(iFlowName);<BR /> <BR /> // Remove the row from the table<BR /> row.remove();<BR /> }<BR /> <BR /> // Function to make a GET request to delete an iFlow<BR /> function deleteIFlow(iFlowName) {<BR /> // Define the URL and headers for the GET request<BR /> const apiUrl = 'https://${DispatcherURL}';<BR /> const apiKey = '${apiKey}';<BR /> const step = 'DeleteScheduleTraces';<BR /> <BR /> // Construct the full URL with query parameters<BR /> const url = `${apiUrl}?Step=${step}&amp;Name=${iFlowName}`;<BR /> <BR /> // Fetch data using the GET request<BR /> fetch(url, {<BR /> method: 'GET',<BR /> headers: {<BR /> 'ApiKey': apiKey<BR /> }<BR /> })<BR /> .then(response =&gt; {<BR /> if (!response.ok) {<BR /> throw new Error('Network response was not ok');<BR /> }<BR /> return response.text();<BR /> // alert(response.text())<BR /> })<BR /> .then(data =&gt; {<BR /> // Handle the response as needed (e.g., display a confirmation message)<BR /> const resp2 = data;<BR /> alert(resp2);<BR /> console.log('iFlow deleted:', data);<BR /> <BR /> })<BR /> .catch(error =&gt; {<BR /> const resp3 = 'Error deleting iFlow: ${error}';<BR /> alert(resp3);<BR /> console.error('Error deleting iFlow:', error);<BR /> });<BR /> }<BR /> // Function to filter the table based on the search input<BR /> function filterTable() {<BR /> const searchInput = document.getElementById("searchInput");<BR /> const filterText = searchInput.value.trim().toUpperCase();<BR /> const table = document.getElementById("dataTable");<BR /> const rows = table.getElementsByTagName("tr");<BR /> <BR /> for (let i = 1; i &lt; rows.length; i++) { // Start from index 1 to skip header row<BR /> const cells = rows[i].getElementsByTagName("td");<BR /> let matchFound = false;<BR /> <BR /> // Only search in the first column (iFlow Name)<BR /> const textValue = cells[0].textContent || cells[0].innerText;<BR /> <BR /> // Perform a partial search (check if the text contains the filter text)<BR /> if (textValue.toUpperCase().includes(filterText)) {<BR /> matchFound = true;<BR /> }<BR /> <BR /> if (matchFound) {<BR /> rows[i].style.display = "";<BR /> } else {<BR /> rows[i].style.display = "none";<BR /> }<BR /> }<BR /> }<BR /> <BR /> // Function to make the GET request and populate the table<BR /> function loadTableData() {<BR /> // Define the URL and headers for the GET request<BR /> const apiUrl = '${apiUrl}?Step=ScheduledTraces';<BR /> const apiKey = '${apiKey}';<BR /> <BR /> // Fetch data using the GET request<BR /> fetch(apiUrl, {<BR /> method: 'GET',<BR /> headers: {<BR /> 'ApiKey': apiKey<BR /> }<BR /> })<BR /> .then(response =&gt; {<BR /> if (!response.ok) {<BR /> throw new Error('Network response was not ok');<BR /> }<BR /> return response.text();<BR /> })<BR /> .then(data =&gt; {<BR /> // Parse the XML response<BR /> const parser = new DOMParser();<BR /> const xmlDoc = parser.parseFromString(data, 'text/xml');<BR /> const iFlows = xmlDoc.querySelectorAll('iFlow');<BR /> <BR /> // Populate the table with data<BR /> const tableBody = document.getElementById('dataBody');<BR /> tableBody.innerHTML = ''; // Clear existing rows<BR /> <BR /> iFlows.forEach(iFlow =&gt; {<BR /> const iFlowName = iFlow.querySelector('iFlowName').textContent;<BR /> const startDate = iFlow.querySelector('StartDate').textContent;<BR /> const startTime = iFlow.querySelector('StartTime').textContent;<BR /> const endDate = iFlow.querySelector('EndDate').textContent;<BR /> const endTime = iFlow.querySelector('EndTime').textContent;<BR /> <BR /> // Create a new table row and cells<BR /> const row = document.createElement('tr');<BR /> const iFlowNameCell = document.createElement('td');<BR /> const startDateCell = document.createElement('td');<BR /> const startTimeCell = document.createElement('td');<BR /> const endDateCell = document.createElement('td');<BR /> const endTimeCell = document.createElement('td');<BR /> const deleteCell = document.createElement('td'); // Add a cell for the delete button<BR /> <BR /> // Set cell values<BR /> iFlowNameCell.textContent = iFlowName;<BR /> startDateCell.textContent = startDate;<BR /> startTimeCell.textContent = startTime;<BR /> endDateCell.textContent = endDate;<BR /> endTimeCell.textContent = endTime;<BR /> <BR /> // Create a delete button and set its attributes<BR /> const deleteButton = document.createElement('button');<BR /> deleteButton.textContent = 'Delete';<BR /> deleteButton.classList.add('delete-button'); // Add a class to identify the delete button<BR /> deleteButton.addEventListener('click', () =&gt; {<BR /> // Call the deleteRow function when the delete button is clicked<BR /> deleteRow(row);<BR /> });<BR /> <BR /> // Append cells to the row<BR /> row.appendChild(iFlowNameCell);<BR /> row.appendChild(startDateCell);<BR /> row.appendChild(startTimeCell);<BR /> row.appendChild(endDateCell);<BR /> row.appendChild(endTimeCell);<BR /> deleteCell.appendChild(deleteButton); // Append the delete button to the cell<BR /> row.appendChild(deleteCell); // Append the delete button cell to the row<BR /> <BR /> // Append the row to the table body<BR /> tableBody.appendChild(row);<BR /> });<BR /> <BR /> // After populating the table, call the filter function to show all data<BR /> filterTable();<BR /> })<BR /> .catch(error =&gt; {<BR /> console.error('Error loading table data:', error);<BR /> });<BR /> }<BR /> <BR /> // Call the function to load table data when the page loads<BR /> window.addEventListener('load', loadTableData);<BR /> &lt;/script&gt;<BR /> &lt;button onclick="exportTableToExcel()"&gt;Export to Excel&lt;/button&gt;<BR /> &lt;P&gt;&lt;/P&gt;<BR /> <BR /> &lt;script&gt;<BR /> // Function to export the table data to an Excel file<BR /> function exportTableToExcel() {<BR /> const table = document.getElementById("dataTable");<BR /> const ws = XLSX.utils.table_to_sheet(table);<BR /> <BR /> // Create a new workbook and add the worksheet<BR /> const wb = XLSX.utils.book_new();<BR /> XLSX.utils.book_append_sheet(wb, ws, "Table Data");<BR /> <BR /> // Save the workbook as an Excel file<BR /> XLSX.writeFile(wb, "table_data.xlsx");<BR /> }<BR /> &lt;/script&gt;</CODE></PRE><BR /> &nbsp;<BR /> <BR /> There are several javascript codes involved in coding the buttons and tables. All the REST calls are made using the Express application framework, and the CSS is pretty simple, using public bootstrap and custom made layouts.<BR /> <H3 id="toc-hId-110564380">SAP HANA Database</H3><BR /> We are using a trial <A href="https://help.sap.com/docs/SAP_HANA_PLATFORM/b3ee5778bc2e4a089d3299b82ec762a7/df0b4d0a3927472b85aed51efbb33c94.html" target="_blank" rel="noopener noreferrer">SAP HANA Database</A> instance on Cloud Foundry, and as a prerequisite for this we had to create SAP HANA Schemas &amp; HDI Container + SAP HANA Cloud services.<BR /> <BR /> The database is a simple one, without a <A href="https://www.sap.com/documents/2021/07/3241e6fa-f07d-0010-bca6-c68f7e60039b.html" target="_blank" rel="noopener noreferrer">Data Lake</A>, in which we created a table in order to store the logs.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/hana-tab.png" /></P><BR /> <P class="image_caption" style="text-align: center">SAP HANA Database</P><BR /> &nbsp;<BR /> <BR /> For testing locally, we used a sample csv in order to generate my hdbcalculationviews and tables.<BR /> <BR /> For deployment to Cloud Foundry we used the MTA Module Template to generate the mtar file, and then with mbt build and cf deploy commands we were able to deploy it to Cloud Foundry.<BR /> <H3 id="toc-hId--85949125">openAI Chat Completions API</H3><BR /> We have used the API to get suggestions on the errors captured by the scheduled trace. The suggestions are purely as a point of reference, since the generative AI uses public knowledge related common issues and errors.<BR /> <PRE class="language-javascript"><CODE>{<BR /> "model": "gpt-3.5-turbo",<BR /> "messages": [<BR /> {<BR /> "role": "user",<BR /> "content": "Write advice for a developer on how to fix this SAP CPI error, maximum ${property.lengthOfResponse} characters: ${in.body}"<BR /> }<BR /> ]<BR /> }</CODE></PRE><BR /> <P class="image_caption" style="text-align: center">Sample request body</P><BR /> <BR /> <H3 id="toc-hId--282462630">SAP API Management and SAP Integration Suite</H3><BR /> In order to access SAP Integration Suite endpoints, we had to run the call through an API created with SAP API Management, because we had to cope with the CORS policies.<BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/07/9_APIManagement.png" /><BR /> <P class="image_caption" style="text-align: center">API Created</P><BR /> &nbsp;<BR /> <BR /> All the steps required to do this are listed in&nbsp;<A href="https://developers.sap.com/mission.appgyver-integration-suite.html" target="_blank" rel="noopener noreferrer">this</A>&nbsp;tutorial, and it involves creating an API, a Product and generate an APIKey for it.<BR /> <BR /> All the REST calls coming from the frontend run through SAP API Management and end up in a Dispatcher that routes the message to the specific iFlow based on the query parameter that contain a step name.<BR /> <PRE class="language-javascript"><CODE>const apiUrl = "https://${apiURL}?Step=GetTenantIflowList";<BR /> const apiKey = "${APIKEY}";<BR /> <BR /> fetch(apiUrl, {<BR /> method: "GET",<BR /> headers: {<BR /> "ApiKey": apiKey<BR /> },<BR /> })</CODE></PRE><BR /> <P style="text-align: center"><EM>Sample code for a REST call</EM></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/dispatcher.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">SAP Integration Suite Calls Dispatcher</P><BR /> &nbsp;<BR /> <H3 id="toc-hId--478976135">Email integration</H3><BR /> Besides having the full table available with detailed errors, we have added the functionality of sending an email containing all the neccesary details for solving and identifying the issue to a list of recipients. We thought this application could be used by a functional consultant that has no technical knowledge to solve the SAP Integration Suite issue, and it would be helpful for him to send the details to a developer that has the proper knowledge to fix it, so we used the public Gmail SMTP to send mails. Below is a screenshot with one of the emails sent by the application.<BR /> <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/mail.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Email sent by the application</P><BR /> <BR /> <H2 id="toc-hId--804572359"></H2><BR /> <H2 id="toc-hId--653831507">Conclusions</H2><BR /> All these functionalities we have created would help not only the integration developers, but also functional consultants. The tool can be really helpful in UAT phases as well, since you can store indefinitely the step contents and be able to access all the data that is flowing through the integration artifacts.<BR /> <BR /> Of course, it might have some limitations regarding performace, since we used some dummy artifacts that are relatively small in size and do not deal with huge payloads, but in time it might be tweaked in a way that you could control what is being saved, what steps to watch and what headers/properties to log.<BR /> <BR /> I hope you liked the article and feel free to reply with any suggestions here or on in the <A href="https://answers.sap.com/tags/67837800100800006801" target="_blank" rel="noopener noreferrer">SAP Integration Suite</A>&nbsp;Question section.<BR /> <BR /> &nbsp;<BR /> <BR /> Thank you ! 2023-10-19T20:36:25+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/sap-btp-help-shorty-html5-configuration-issue-quot-failed-to-get-metadata/ba-p/13573770 SAP BTP Help Shorty - HTML5 Configuration issue "Failed to get Metadata - 400" 2023-11-30T14:06:35+01:00 NilsJanen https://community.sap.com/t5/user/viewprofilepage/user-id/157600 Hello fellow developers,<BR /> <BR /> this will be another quick help blog post. I did not find any information for this error and I hope this might help someone else waste less time than me.<BR /> <BR /> I recently redeployed a SAPUI5 MTA to the space it has been in before. The changes included the alteration of the xsappname in the xs-security.json. In any way, there was some change that altered the UAA properties of the MTA.<BR /> <BR /> After the redoyplement, nothing was working and this shown as a warning:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/11/app_repo_warning-2.png" /></P><BR /> I tried everything in my toolbox: Redeploying with --delete-service flag, manual deletion of the instances and so on and so forth.<BR /> <BR /> Some time later, I rechecked the error message and decided to take a look at the UAA properties in the mta.yaml.<BR /> <BR /> Lo and behold, there was one tiny setting which I think came from the template I used:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/11/existing_policy.png" height="40" width="1136" /></P><BR /> If the property existing_destination_policy is set to ignore, the deployment will not overwrite the old properties with new values. It has to be set to update in order to set new values.<BR /> <BR /> More Information can be found here: <A href="https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/create-destinations-using-mta-descriptor" target="test_blank" rel="noopener noreferrer">https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/create-destinations-using-mta-descriptor</A><BR /> <BR /> So in conclusion: If you ever want to change something, make sure the changes are applied to the target. 2023-11-30T14:06:35+01:00 https://community.sap.com/t5/technology-blog-posts-by-members/integrate-app-into-work-zone-from-a-different-subaccount/ba-p/13584425 Integrate app into Work Zone from a different subaccount 2024-01-29T10:26:44.538000+01:00 JulianKuipers https://community.sap.com/t5/user/viewprofilepage/user-id/16502 <P>I'm Julian Kuipers, a Full Stack SAP Developer in The Netherlands, currently working with a company called INNOV8iON. We focus on creating new and better ways to use SAP.</P><H2 id="toc-hId-964879464">Introduction</H2><P>Not long ago, I was given a task that looked easy at first but turned out to be quite a puzzle. My job was to integrate a custom Fiori application, which has its own standalone approuter, into SAP Build Work Zone, standard edition. The tricky part was that the Fiori app and the SAP Build Work Zone were in different subaccounts, which made things more complicated.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JulianKuipers_0-1706515611523.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/54473iD6889CC3BDC751BC/image-size/medium?v=v2&amp;px=400" role="button" title="JulianKuipers_0-1706515611523.png" alt="JulianKuipers_0-1706515611523.png" /></span></P><P>To figure out how to do this, I first looked at the official SAP instructions, which you can find here: <A href="https://help.sap.com/docs/build-work-zone-standard-edition/sap-build-work-zone-standard-edition/manual-integration-of-apps?locale=en-US" target="_blank" rel="noopener noreferrer">SAP Help Portal.</A> These instructions are pretty good, but I found they didn't cover everything I needed to know.</P><P>So, I came up with my own plan to make it work:</P><UL><LI>Turn on something called allowListService in the Fiori app: This is like saying, "It's okay for this app to be used in the SAP Build Work Zone."</LI><LI>Use whitelistService in the standalone approuter: This makes sure the router activates the whitelist-service.</LI><LI>Add specific user-provided variables to the app: This will add Work Zone as trusted URI to embed this app as an iFrame.</LI><LI>Make a trusted connection in the subaccount for the app: This is like making sure the app has a secure line to talk on.</LI></UL><P>I also learned a couple of important tips along the way:</P><UL><LI>SAP says it's best if the app and the Work Zone use the same custom domain. This makes a lot of the setup simpler because you don't have to do extra steps to make them work together.</LI><LI>The way I made it possible for users to log in isn't the fanciest solution, but it works well if you're only using one IDP (Identity Provider).</LI><LI>This project really made me think and helped me learn a lot about how SAP works and how to make different parts of it work together. I wanted to share what I learned so others who might be trying to do the same thing can find it a bit easier.</LI></UL><H2 id="toc-hId-768365959">Solution</H2><P>Following the steps outlined in the SAP Documentation, along with the additional instructions I’ll provide, will ensure a smooth integration process for your custom Fiori application into SAP Build Work Zone. Let's break down these steps for clarity and implementation ease:</P><H3 id="toc-hId-700935173">1. Activate the allowListService in the Custom Fiori App</H3><P>To activate the allowlist service in your application, you'll need to insert a specific script before the sap-ui-bootstrap code in your HTML file. This script configures the allowlist service, enabling the application to determine if it's allowed to run within a given frame. Here's the code snippet you should place:</P><P>&nbsp;</P><pre class="lia-code-sample language-markup"><code>&lt;script&gt; window["sap-ui-config"] = { allowlistService: '/allowlist/service', frameOptions: 'trusted', frameOptionsConfig: { callback: function (bSuccess) { if (bSuccess) { console.log("App is allowed to run!"); } else { console.error("App is not allowed to run!"); } } } }; &lt;/script&gt;</code></pre><P>&nbsp;</P><P class="lia-align-center" style="text-align: center;"><EM>index.html</EM></P><P>This snippet ensures your application checks if it's permitted to run, based on the allowlist service configuration. For further details, visit the <A href="https://sapui5.hana.ondemand.com/sdk/#/topic/62d9c4d8f5ad49aa914624af9551beb7" target="_blank" rel="noopener nofollow noreferrer">SAPUI5 SDK Documentation</A>.</P><H3 id="toc-hId-504421668">2. Activate the whitelistService in the Standalone Approuter</H3><P>In your standalone approuter configuration, add the following segment to activate the whitelistService, pointing to the allowlist service endpoint:</P><P>&nbsp;</P><pre class="lia-code-sample language-yaml"><code>"whitelistService": { "endpoint": "/allowlist/service" }</code></pre><P>&nbsp;</P><P class="lia-align-center" style="text-align: center;"><EM>xs-app.json</EM></P><P>This configuration enables your approuter to utilize the whitelist service, ensuring it recognizes and permits communications from your Fiori application. For comprehensive instructions, refer to the <A href="https://help.sap.com/docs/SAP_HANA_PLATFORM/4505d0bdaf4948449b7f7379d24d0f0d/5f77e58ec01b46f6b64ee1e2afe3ead7.html#whitelistservice" target="_blank" rel="noopener noreferrer">SAP Documentation</A>.</P><H3 id="toc-hId-307908163">3. Add User-Provided Variables to the Application</H3><P>To allow the SAP Work Zone to embed your application in an iFrame securely, you must specify certain variables and HTTP headers. This involves declaring a whitelist of origins that are permitted to frame your content without risking click-jacking attacks. Here's how you configure it:</P><P>&nbsp;</P><pre class="lia-code-sample language-yaml"><code>properties: CJ_PROTECT_WHITELIST: '[{"host":"&lt;WORKZONE_RUNTIME_HOST&gt;"},{"host":"&lt;WORKZONE_RUNTIME_HOST_CUSTOM_DOMAIN&gt;"}]' httpHeaders: - X-Frame-Options: ALLOW-FROM &lt;WORKZONE_RUNTIME_HOST_CUSTOM_DOMAIN&gt; &lt;WORKZONE_RUNTIME_HOST&gt; - Content-Security-Policy: frame-ancestors &lt;WORKZONE_RUNTIME_HOST_CUSTOM_DOMAIN&gt; &lt;WORKZONE_RUNTIME_HOST&gt;</code></pre><P>&nbsp;</P><P class="lia-align-center" style="text-align: center;"><EM>mta.yaml</EM></P><P>This configuration ensures that your application can only be framed by the SAP Work Zone, enhancing security and compliance with SAP's guidelines. More details on these settings can be found in the <A href="https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-developer-guide-for-cloud-foundry-multitarget-applications-sap-web-ide-full-stack/application-router-environment-variables#loio0aac697f0cf7444193ed5eb0fc6e5bd0__section_nrz_hgn_mv" target="_blank" rel="noopener noreferrer">SAP Developer Guide</A>.</P><H3 id="toc-hId-111394658">4. Adding Work Zone Host as a Trusted Domain</H3><P>The last piece of our integration puzzle is to ensure that the Work Zone runtime host is recognized as a trusted domain by the XSUAA service of the Fiori app. This step is vital for embedding the app securely within the SAP Build Work Zone environment, ensuring that authorization and authentication flows are handled correctly without compromising security.</P><P>To accomplish this, you'll need to follow the guidelines outlined by SAP for configuring trusted domains specifically for the SAP Authorization and Trust Management service. The detailed steps for this configuration can be found in the SAP documentation: <A href="https://help.sap.com/docs/btp/sap-business-technology-platform/configure-trusted-domains-for-sap-authorization-and-trust-management-service" target="_blank" rel="noopener noreferrer">Configure Trusted Domains for SAP Authorization and Trust Management Service</A>. This resource provides a comprehensive guide on how to add your Work Zone host as a trusted domain, ensuring that your custom Fiori app can be securely embedded and accessed within the SAP Build Work Zone.</P><P>Implementing these steps will facilitate the integration of your custom Fiori application with SAP Build Work Zone, ensuring both functionality and security are maintained.</P><H2 id="toc-hId--214201566">Conclusion</H2><P>As I've journeyed through the process of integrating a custom Fiori application into SAP Build Work Zone, it's clear that while the steps are straightforward once understood, there's a particular aspect of this integration that merits a closer look—the propagation of user login information, especially in contexts where multiple Identity Providers (IDPs) are involved.</P><P>This workaround is okay for now if you're just dealing with one IDP. It's not the slickest solution, but it does the job. However, if you're trying to make things work with several IDPs, that's where it gets trickier. If you're stuck in this spot, I found a blog that might just be your lifesaver. It's all about figuring out SAP Cloud Identity Services and making them work with SAP Build Work Zone when you've got multiple IDPs. Check it out right here: <A href="https://blogs.sap.com/2023/08/02/de-mystifying-sap-cloud-identity-services-integration-with-sap-build-work-zone/" target="_blank" rel="noopener noreferrer">De-mystifying SAP Cloud Identity Services Integration</A>.</P><P>Now for some good news—SAP's got our backs and is working on making this whole process a lot easier. They've hinted at some new improvements that are on the way, which you can sneak a peek at in their roadmap right <A href="https://roadmaps.sap.com/board?PRODUCT=73554900100800003081&amp;range=CURRENT-LAST#;INNO=3F83C264AF571EDE85B57541EEC34FB4" target="_blank" rel="noopener noreferrer">here</A>. I'm all in for seeing how they're going to make our lives simpler in the near future.</P><P>So, as we wrap this up, I just want to say it's been quite the ride figuring out all these SAP integration quirks. The thought of SAP making things smoother down the road is something I'm really looking forward to. In the meantime, we've got our workarounds and the helpful tips we've shared along the way.</P><P>Thanks for sticking with me through this journey. Here's to making things work and looking forward to easier days ahead!</P><P>Kind regards,</P><P>Julian Kuipers</P> 2024-01-29T10:26:44.538000+01:00 https://community.sap.com/t5/technology-blog-posts-by-members/automating-advanced-event-mesh-broker-creation/ba-p/13595187 Automating Advanced Event Mesh Broker Creation 2024-02-08T09:07:53.387000+01:00 MarianVatafu https://community.sap.com/t5/user/viewprofilepage/user-id/864725 <H1 id="toc-hId-836747362">Introduction</H1><P>&nbsp;</P><P><SPAN>The need to reduce costs associated with operating and maintaining an active message broker led to the creation of a tool that automates the generation and configuration any time the need for asynchronous event-based messages arises.</SPAN></P><P>This article will showcase a method of creating an event broker in <A href="https://help.sap.com/docs/SAP_ADVANCED_EVENT_MESH" target="_self" rel="noopener noreferrer">Advanced Event Mesh</A> by leveraging the REST endpoints provided by&nbsp;<A href="https://help.pubsub.em.services.cloud.sap/Cloud/ght_use_rest_api_services.htm" target="_self" rel="nofollow noopener noreferrer">Solace</A> and&nbsp;<A href="https://docs.solace.com/Admin/SEMP/Using-SEMP.htm" target="_self" rel="nofollow noopener noreferrer">SEMP configuration</A>. The solution will allow the system to request a broker creation, monitor the status, re-generate the queues and topics and extract the endpoints for sending or receiving data. Besides that, a UI has been set up that simplifies the broker configuration and allows users to persist or modify configurations.</P><H2 id="toc-hId-769316576">&nbsp;</H2><H1 id="toc-hId-443720352">Scenario Overview</H1><P>&nbsp;</P><P data-unlink="true">All the necessary steps for broker creation are done in SAP Integration Suite using multiple iFlow artifacts for each process step, <A href="https://help.sap.com/docs/cloud-integration/sap-cloud-integration/decoupling-via-jms-queue?q=JMS%20Queues" target="_self" rel="noopener noreferrer">JMS Queues</A> for handling connection errors, timeouts and message routing, Datastore for saving broker configurations and a main page that acts as a user interface for setting up everything.</P><P data-unlink="true">&nbsp;</P><H1 id="toc-hId-247206847">Architecture Overview</H1><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Architecture.png" style="width: 947px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60631i7F32250BAC014F9A/image-size/large?v=v2&amp;px=999" role="button" title="Architecture.png" alt="Architecture.png" /></span></P><P class="lia-align-center" style="text-align: center;">&nbsp;<EM>Picture 1 - Architecture Overview</EM></P><H1 id="toc-hId-50693342">UI Configuration Page</H1><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="UIPAGE.png" style="width: 958px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60634iE8C3CB8E7FCF595B/image-size/large?v=v2&amp;px=999" role="button" title="UIPAGE.png" alt="UIPAGE.png" /></span></P><P class="lia-align-center" style="text-align: center;">&nbsp;<EM>Picture 2 - UI Configuration Page</EM></P><P>The configuration page is a HTML page exposed as a REST endpoint, containing multiple sections that allow the user to generate new configurations, use existing ones and even check the status of the already-deployed broker creation jobs.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Deployment.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60638iEDF217918FCCE8E4/image-size/large?v=v2&amp;px=999" role="button" title="Deployment.png" alt="Deployment.png" /></span></P><P class="lia-align-center" style="text-align: center;">&nbsp;<EM>Picture 3 - Deployment Page</EM></P><P>On this page, we can see the status of the active or pending brokers on the cluster. I also added the ability to delete the broker on demand.</P><P>&nbsp;</P><P>&nbsp;</P><H1 id="toc-hId--145820163">Technical Setup</H1><P>The process of creating an event broker has been detailed in the&nbsp;<A href="https://help.pubsub.em.services.cloud.sap/Cloud/ght_use_rest_api_services.htm" target="_self" rel="nofollow noopener noreferrer">Managing Services with the<SPAN>&nbsp;</SPAN><SPAN class="">SAP Integration Suite, Advanced Event Mesh</SPAN><SPAN>&nbsp;</SPAN>REST API</A> section and it consists of several REST calls in order to create a broker, get the connection details and check the creation status.</P><P>The most important parameters that allow us to continue with the next steps are :</P><UL><LI>&nbsp;serviceId - the id of the service cluster generated</LI><LI>&nbsp;msgVpnName - the internal id of the broker</LI><LI><DIV><DIV><SPAN>defaultManagementHostname - the hostname that will be used for queue, topic and rest delivery point creation</SPAN></DIV><DIV>&nbsp;</DIV></DIV></LI></UL><P>In order to create an event broker :</P><P>HTTP POST&nbsp;<SPAN><A href="https://api.solace.cloud/api/v0/services" target="_blank" rel="noopener nofollow noreferrer">https://api.solace.cloud/api/v0/services</A></SPAN></P><P>&nbsp;</P><pre class="lia-code-sample language-javascript"><code>{ "name": "Broker Name", "datacenterId": "&lt;Data Center Id&gt;", "serviceClassId":"developer", "serviceTypeId": "developer", "adminState": "start" }</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>The authentication for this endpoint is made via an authorization token generated in the Cluster Manager.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="token.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60664i9B1907A16E2BD1D3/image-size/large?v=v2&amp;px=999" role="button" title="token.png" alt="token.png" /></span></P><P class="lia-align-center" style="text-align: center;">&nbsp;<EM>Picture 4 - API Token Management</EM></P><P>In order to create a queue object :</P><P><SPAN>HTTP POST https://&lt;defaultManagementHostname&gt;/SEMP/v2/config/msgVpns/&lt;msgVpnId&gt;/queues</SPAN></P><P>&nbsp;</P><pre class="lia-code-sample language-java"><code>{ "accessType": "exclusive", "egressEnabled": true, "ingressEnabled": true, "msgVpnName": "&lt;msgVpnId&gt;", "owner": "all", "permission": "consume", "queueName": "&lt;queue-name&gt;" }</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>In order to create a topic subscription object :</P><P><SPAN>HTTP POST https://&lt;defaultManagementHostname&gt;/SEMP/v2/config/msgVpns/&lt;msgVpnId&gt;/queues/&lt;queue-name&gt;/subscriptions</SPAN></P><P>&nbsp;</P><pre class="lia-code-sample language-java"><code>{ "msgVpnName": "&lt;msgVpnId&gt;", "queueName": "&lt;queue-name&gt;", "subscriptionTopic": "&lt;topic/name&gt;" }</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>In order to create a rest delivery point object :</P><P data-unlink="true">HTTP POST https://&lt;defaultManagementHostname&gt;/SEMP/v2/config/msgVpns/&lt;msgVpnId&gt;/restDeliveryPoints&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-java"><code>{ "clientProfileName": "default", "enabled": true, "msgVpnName": "&lt;msgVpnNameId&gt;", "restDeliveryPointName": "&lt;restDeliveryPointId&gt;" }</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>If everything is correctly triggered, we should be able to see in the Cluster Manager our newly created broker, and as well in the broker console the queues and topics.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="cluster.png" style="width: 350px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60658iA531855FE1B34772/image-dimensions/350x371?v=v2" width="350" height="371" role="button" title="cluster.png" alt="cluster.png" /></span></P><P class="lia-align-center" style="text-align: center;">&nbsp;<EM>Picture 5 - Cluster Manager</EM></P><P class="lia-align-center" style="text-align: center;"><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="msgvpn.png" style="width: 551px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60659i5524C62770D90BB6/image-dimensions/551x267?v=v2" width="551" height="267" role="button" title="msgvpn.png" alt="msgvpn.png" /></span></P><P class="lia-align-center" style="text-align: center;">&nbsp;<EM>Picture 6 - Queues</EM></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="topics.png" style="width: 637px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60660i6BE492B596763D32/image-dimensions/637x249?v=v2" width="637" height="249" role="button" title="topics.png" alt="topics.png" /></span></P><P class="lia-align-center" style="text-align: center;">&nbsp;&nbsp;<EM>Picture 7 - Topics subscribed to a queue</EM></P><H1 id="toc-hId--342333668">&nbsp;</H1><H1 id="toc-hId--538847173">Adapter for inserting/consuming events</H1><P>By using the recently published <A href="https://help.sap.com/docs/integration-suite/sap-integration-suite/advanced-event-mesh-adapter" target="_self" rel="noopener noreferrer">adapter</A> for Advanced Event Mesh integrations, we can insert and consume events from our brokers. Below is a sample iFlow artifact that connects to a specific topic and consumes messages from there.</P><P class="lia-align-center" style="text-align: center;"><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sender.png" style="width: 637px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/60666iE01E28DF9AF4A5DC/image-size/large?v=v2&amp;px=999" role="button" title="sender.png" alt="sender.png" /></span></P><P>&nbsp;</P><P class="lia-align-center" style="text-align: center;"><EM>Picture 8 - iFlow artifact for topic message consumption</EM></P><H1 id="toc-hId--735360678">Conclusions</H1><P>&nbsp;</P><P>Using the SAP Help documentation was the key behind the success, because the product is rather new on the market and we did not really heard of other use cases yet. By following the steps we were able to easily connect two Business Technology Platform products and we were able to leverage event-based integration far more powerful than the traditional <A href="https://help.sap.com/docs/event-mesh?locale=en-US&amp;state=PRODUCTION&amp;version=Cloud" target="_self" rel="noopener noreferrer">SAP Event Mesh</A>.</P><P>For any questions or suggestions, feel free to post here or in the special<SPAN>&nbsp;</SPAN><A href="https://community.sap.com/t5/c-khhcw49343/SAP+Internet+of+Things/pd-p/73554900100800002247" target="_self">Q&amp;A Section</A>.</P><P>Thank you!</P> 2024-02-08T09:07:53.387000+01:00 https://community.sap.com/t5/technology-blog-posts-by-members/csrf-token-validation-error/ba-p/13636621 CSRF Token Validation Error 2024-03-15T07:00:20.587000+01:00 NilsJanen https://community.sap.com/t5/user/viewprofilepage/user-id/157600 <P>Hello fellow developers,</P><P>recently we ran into an issue which we gave us a very hard time.</P><H3 id="toc-hId-1118035229">Scenario</H3><P>A UI5 application runs in the #SAP Workzone Standard Edition# and uses the SAP Managed Approuter to connect to the workflow runtime servie as well as a backend SAP Gateway destination with principal propagation.<BR />Everything worked fine in regards to the workflow requests as well as the GET requests to the Gateway system. What did not work were any requests that required a valid CSRF Token, like POST or UPDATE.&nbsp;<BR />The app did sent requests with a valid CSRF token to the backend, but the system refused to accept it.&nbsp;</P><P>The app worked like this: When it is opened with a certain URL, the app loads some information from the workflow runtime and needs a CSRF token for this. The xs-app.json looked like this:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fjaoos_1-1710322042391.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/79814i56737B5040265589/image-size/medium?v=v2&amp;px=400" role="button" title="Fjaoos_1-1710322042391.png" alt="Fjaoos_1-1710322042391.png" /></span></P><P>You can see the route for the workflow runtime as well as the SAP Gateway System and its destination. It was set up just like you would expect to find this on any tutorial.</P><H3 id="toc-hId-921521724">Solution</H3><P>We had to set the csrfProtection to false for the SAP Gateway destination.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fjaoos_2-1710322196769.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/79816i3445A42F6C7EE89A/image-size/medium?v=v2&amp;px=400" role="button" title="Fjaoos_2-1710322196769.png" alt="Fjaoos_2-1710322196769.png" /></span></P><P>With this settings the csrf token for the ODataModel was then issued by the SAP Gateway.</P> 2024-03-15T07:00:20.587000+01:00 https://community.sap.com/t5/technology-blog-posts-by-sap/consuming-sap-with-sap-build-apps-web-app-in-sap-build-work-zone-standard/ba-p/13685621 Consuming SAP with SAP Build Apps - Web App in SAP Build Work Zone, standard edition 2024-05-02T03:19:46.516000+02:00 LudoNoens https://community.sap.com/t5/user/viewprofilepage/user-id/15040 <P>This blog post is the fourth in a series of posts that cover the connectivity options available for SAP Build Apps to interface with SAP systems. The series will cover connecting SAP Build Apps with the following:</P><OL><LI>CAP-based services</LI><LI>S/4HANA systems</LI><LI>ABAP systems</LI></OL><P>The format of this post is similar to a tutorial. However, I'll provide more comprehensive details, tips and the opportunity for you to provide feedback. Based on the feedback we will be able to adjust and enhance this post and future parts of the series, and might even be able to improve the products involved as well.&nbsp;<BR /><BR /></P><H1 id="toc-hId-864457605">Introduction </H1><P>Before we get into the details of setting up connections between SAP Build Apps and SAP Systems, I intend to introduce a couple of SAP technology components in each post that are relevant for the use cases covered in the series.&nbsp;<BR /><BR /></P><H2 id="toc-hId-797026819">SAP Build Work Zone</H2><P>SAP Build Work Zone is a digital workplace experience that enables users to build and customise business sites that provide centralised access to business application information from any device.</P><P>Key capabilities are:</P><UL><LI>Quickly create corporate websites providing secure and central access for apps, tasks, notifications, information and communication.</LI><LI>Easily connect with SAP and third-party enterprise applications.</LI><LI>Provide a personalised and role-based user experience.</LI><LI>Provide an extensible framework for development, customisation and branding.</LI></UL><P>The service is currently available in 2 editions:</P><OL><LI>Standard edition - this is basically the same as what we previously called the SAP Launchpad service. This is the edition we will use in this blog post. It has a strong focus on integration of business applications.</LI><LI>Advanced edition - this is what we previously referred to as the SAP Work Zone service. It includes additional capabilities on top of what is available in the standard edition. The information in this blog post can be applied in this edition as well. You typically subscribe to only one edition. The advanced edition adds capabilities around workspaces, knowledge management and user engagement.</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_2-1714381872196.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103095i21AEB1EAB4759B98/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1714381872196.png" alt="LudoNoens_2-1714381872196.png" /></span></P><H2 id="toc-hId-600513314">MTAR</H2><P>A multitarget application (MTA) is comprised of multiple parts (also referred to as "modules"), created with different technologies and deployed to different targets, but with a single, common lifecycle.</P><P>A multitarget application archive (MTAR) is an archive that contains a deployment descriptor, configuration files, and module and resource binaries. The archive follows the JAR file specification. A JAR file is essentially a zip file that contains an optional META-INF directory.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_0-1714474595732.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103853i0DE6AB7E0317A327/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1714474595732.png" alt="LudoNoens_0-1714474595732.png" /></span></P><P>An example relevant for the use cases in this blog series is an MTAR created in SAP Build Code that contains the Destination, a node.js based CAP service, and a HANA database deployment application for setting up the persistency layer. All are deployed during a single deployment action, for a specific version of the archive.</P><P>&nbsp;</P><H1 id="toc-hId-274917090">Use case D : Consume the CAP service with a web app provided in SAP Build Work Zone</H1><P>For this use case, we will make use of the previously created basic CAP service in <FONT color="#FF00FF"><STRONG>SAP Build Code</STRONG></FONT>. In the previous blog post, we have created dedicated mobile apps for the iOS and Android platforms to consume this service with SAP Build Apps. We will now use the exact same UI application to build and deploy a web application to SAP Business Technology Platform. After that, we will configure SAP Build Work Zone&nbsp;to provide access to the application.<BR /><BR /></P><H2 id="toc-hId-207486304">Solution diagram</H2><P>Like in the <A title="Consuming SAP with SAP Build Apps - Mobile apps for iOS and Android" href="https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-with-sap-build-apps-mobile-apps-for-ios-and-android/ba-p/13667638" target="_blank">previous blog post</A>, we will start with a quick look into what needs to change in our solution overview to accommodate for web apps. Building upon the solution diagram created earlier, we now add <STRONG>SAP Build Work Zone, standard edition</STRONG>. The design time environment of SAP Build Apps will deploy the web application to the HTML5 Application Repository service. The application is made available to end users through <STRONG>SAP Build Work Zone</STRONG>, which is configured separately.&nbsp;End users can access the web app from any device. The web app authenticates with the Identity Authentication service (IAS) and accesses data via a <STRONG>Destination</STRONG>. Only users who have the correct Roles assigned will be able to access the data provided in the CAP-based data service.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_1-1714476179455.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103874iEF07E53A324296B8/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1714476179455.png" alt="LudoNoens_1-1714476179455.png" /></span></P><H2 id="toc-hId-10972799">Building the web app in SAP Build Apps</H2><P>As the application we have developed so far is actually a cross-platform app, we don't need to change anything in the app itself. We simply need to build it for a different runtime. And for this, we will again make use of the cloud build service we have utilised in the previous blog post.</P><P>Starting in SAP Build Apps, navigate to the Launch tab and select Open build service.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103580i19176D7F9385B107/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic.png" alt="Pasted Graphic.png" /></span></P><P>Next, select CONFIGURE for the Web App.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Web App.png" style="width: 200px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103584iE2F9C931B67C7FBA/image-size/small?v=v2&amp;px=200" role="button" title="Web App.png" alt="Web App.png" /></span></P><P>For the Bundle Settings, select MTAR and click NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 3.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103634i5FBF73F69CF1D2DA/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 3.png" alt="Pasted Graphic 3.png" /></span></P><P>In the Image Assets tab, upload a 32 x 32 pixel icon image (PNG file) for the Favicon and click NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 4.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103638i59CBC4BBC5F887C4/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 4.png" alt="Pasted Graphic 4.png" /></span></P><P>On the Plugins tab, you can add React Native plugins for your app. For our app you can see a few plugins have been selected by default, based on the functionality we have already added in the app. We can use the default selection in this case and click NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 5.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103641iD7E728FB352D167C/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 5.png" alt="Pasted Graphic 5.png" /></span></P><P>Now that we have completed configuring the web app build settings, select BUILD.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt=" BUILD.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103642iA535FA5A8D22815A/image-size/medium?v=v2&amp;px=400" role="button" title=" BUILD.png" alt=" BUILD.png" /></span></P><P>Select MTAR and the Client runtime version. Provide a version number for your application. Select BUILD.</P><P>Once the build is done, you will be able to download the MTAR file, or simply deploy the MTAR.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Web App.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103643i739B71256A25955C/image-size/medium?v=v2&amp;px=400" role="button" title="Web App.png" alt="Web App.png" /></span></P><P>Select DEPLOY MTA.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 1.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103644i22158E77B633DB6C/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 1.png" alt="Pasted Graphic 1.png" /></span></P><P>Select the Cloud Foundry API endpoint of your target subaccount. In our case, we will use the same subaccount as the one we have set up in the first blog post of this series. </P><P>Log in to Cloud Foundry and to get authorization to perform deployment to SAP Business Technology Platform.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 2.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103645i16C4AC1C9E878506/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 2.png" alt="Pasted Graphic 2.png" /></span></P><P>Once you've selected your target Cloud Foundry organisation and space, select DEPLOY MTA TO &lt;your space name&gt;&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_0-1714460808947.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103649i08132689A0B2A200/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1714460808947.png" alt="LudoNoens_0-1714460808947.png" /></span></P><P>The deployment process will start and your web application will be deployed to the HTML5 Application Repository Service. You can track the progress in the logs.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_1-1714461015698.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103651i0BF76CF8E94D05FC/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1714461015698.png" alt="LudoNoens_1-1714461015698.png" /></span></P><P>Once the deployment finishes, the URL to your application will be shown.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_2-1714461129985.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103654iB4BE9F8A77AF317C/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1714461129985.png" alt="LudoNoens_2-1714461129985.png" /></span></P><P>When you try to open the URL, you are quite likely greeted with the message "Internal Server Error". Looking into details in your browser's developer tools, you can find a response code 500. This indicates something has not been set up correctly (yet). Not to worry ... we'll fix this in the following steps.</P><P>If your subaccount was correctly configured, then you should actually see the web app.</P><P>&nbsp;</P><H2 id="toc-hId--185540706">Provide access to the web app in SAP Build Work Zone</H2><P>We are now going configure SAP Build Work Zone. There are multiple ways to access this. In the context of SAP Build, we can start from the SAP Build landing page. On the landing page, select the Create button.</P><P>What would you like to do ? Well, we'd like to Build a Business Site !</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_3-1714461673821.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103658i4E87518B850778E3/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_3-1714461673821.png" alt="LudoNoens_3-1714461673821.png" /></span></P><P>Select Configure Site in Admin Console.</P><P>Note that in the screenshot below the tile "Manage Workspages and Workspaces" is marked as 'Not Subscribed'. This is because I am using the standard edition of SAP Build Work Zone, which was subscribed through the "Get started with SAP Build Apps" booster. If you have a subscription to the Advanced Edition, then this tile can be selected as well.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Which site would you like to configure.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103659iAA9CFECDBBED8631/image-size/large?v=v2&amp;px=999" role="button" title="Which site would you like to configure.png" alt="Which site would you like to configure.png" /></span></P><P>Alternatively, if you are not using SAP Build, you can configure SAP Build Work Zone by opening the link in your subaccount's cockpit.</P><P>As prerequisite, please check whether your user has the Role <STRONG>Launchpad_Admin</STRONG> assigned.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Description.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103670i65BEDB5F9A45006A/image-size/large?v=v2&amp;px=999" role="button" title="Description.png" alt="Description.png" /></span></P><P>Once configured (and you might need to log out &amp; log in to activate that Role), navigate to the subscriptions and open the link to SAP Build Work Zone, standard edition.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Subscriptions (7).png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103671i05C5DBDB69CA3C88/image-size/medium?v=v2&amp;px=400" role="button" title="Subscriptions (7).png" alt="Subscriptions (7).png" /></span></P><H3 id="toc-hId--252971492">SAP Build Work Zone configuration</H3><P>Now, let's set up a business site that includes our app. Select Create Site.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 10.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103672i02B982B111FA52B4/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 10.png" alt="Pasted Graphic 10.png" /></span></P><P>Provide a name for the Site and click Create.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Create Site.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103673i5070E08D3640CBFE/image-size/medium?v=v2&amp;px=400" role="button" title="Create Site.png" alt="Create Site.png" /></span></P><P>Navigate to the Content Manager tab and select the Content Explorer button.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 12.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103675iF7564FBAF7401889/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 12.png" alt="Pasted Graphic 12.png" /></span></P><P>The Content Explorer will open.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 13.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103676iC005422078CB092D/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 13.png" alt="Pasted Graphic 13.png" /></span></P><P>Click on HTML5 Apps to see which apps have been deployed to the HTML5 Application Repository. You will see the app we've created in SAP Builds Apps. Besides that, you will also notice the Launchpad for the products service we've deployed from SAP Build Code.&nbsp;Select the app created and deployed with SAP Build Apps and click the Add button.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 15.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103679iCCEC71C2888AEEAA/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 15.png" alt="Pasted Graphic 15.png" /></span></P><P>Going back to the Content Manager, select the Create button and create a new group. Give the group a name and assign the previously added app to the group.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 16.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103680i78BBD36001D1AC2C/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 16.png" alt="Pasted Graphic 16.png" /></span></P><P>Go back to the Content Manager and select the Everyone Role. Enable the previously selected app to be accessible for everyone. Note that this will give users access to the web app itself. Access to the data service is still limited to those having the Role we have configured in the second blog post of this series.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 17.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103681i95C72FA87AD0FCBD/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 17.png" alt="Pasted Graphic 17.png" /></span></P><H3 id="toc-hId--449484997">&nbsp;</H3><H3 id="toc-hId--645998502">Resolving the "Internal Server Error"</H3><P>And now for the previously mentioned 500 response code, resulting in "Internal Server Error". This happens when the authentication mechanism for SAP Build Work Zone and SAP Cloud Portal service uses XSUAA, while your subaccount is actually configured to use a custom IdP (IAS). To switch to Identity Authentication, navigate to the Settings, select the Identity Authentication tab and click Enable (please read the notes before doing this, and confirm that you've completed the required trust configuration).&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pasted Graphic 18.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103682iE407128ADE91B264/image-size/large?v=v2&amp;px=999" role="button" title="Pasted Graphic 18.png" alt="Pasted Graphic 18.png" /></span></P><P> </P><H2 id="toc-hId--624340369">Accessing the web app in SAP Build Work Zone</H2><P>The link to the site can be found on the Site Directory.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_4-1714466297804.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103703iB33EBA4DF4A656A8/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_4-1714466297804.png" alt="LudoNoens_4-1714466297804.png" /></span></P><P>Depending on how you've configured your site in SAP Build Work Zone, it might look a bit different. But you should have the tile of your app visible on your site.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_5-1714466445212.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103705i4A01EE2CA9E47334/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_5-1714466445212.png" alt="LudoNoens_5-1714466445212.png" /></span></P><P>Clicking on the tile will open our web app. Notice the SAP BTP authentication happening before opening the app. Also note that you can open the URL on any device; on mobile as well as desktop devices.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2024-04-30_16-59-11 (4).gif" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103730iD744402C3B843F55/image-size/large?v=v2&amp;px=999" role="button" title="2024-04-30_16-59-11 (4).gif" alt="2024-04-30_16-59-11 (4).gif" /></span></P><P>In case you are wondering where the icon ended up: check your web browser's tab.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_3-1714476614589.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103878iA53B5CCEE81B1F5D/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_3-1714476614589.png" alt="LudoNoens_3-1714476614589.png" /></span><BR />Alternatively, you can also open the URL provided in SAP Build Apps, or find a link to your app in your subaccount, under the tab HTML5 Applications.&nbsp;<BR /><BR /></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_0-1714557961791.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/104351i4B9F402C0A4143CA/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1714557961791.png" alt="LudoNoens_0-1714557961791.png" /></span></P><H2 id="toc-hId--820853874">Summary – use case D</H2><P>In this use case we have built and deployed our cross-platform app as a web app to SAP BTP. Building and deploying the app in the cloud is easy, as you don't need to install any tools on your local development machine.</P><P>SAP Build Apps deploys the application to the HTML5 Application Repository service. Using the web app, end users authenticate with IAS. Only users who have the correct Role assigned will be able to access the data provided in the CAP-based data service, which we can access through the BTP Destination.</P><P>Access to the app requires configuration of the Identity Authentication in the subaccount.</P><P>We have set up a simple business site in SAP Build Work Zone, to provide end-users easy access to the app.</P><P>And again, all the above was done without writing a single line of code.<BR /><BR /></P><H1 id="toc-hId--723964372">What's next</H1><P>In the <A href="https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-with-sap-build-apps-adding-s-4hana-cloud/ba-p/13695938" target="_blank">next blog post</A>, we will continue on the connectivity topic and connect to an S/4HANA system.</P> 2024-05-02T03:19:46.516000+02:00 https://community.sap.com/t5/application-development-and-automation-blog-posts/displaying-customer-location-with-custom-html-builder-using-restful/ba-p/13741824 Displaying Customer Location with Custom HTML Builder Using RESTful Webservice and API 2024-06-26T18:14:28.616000+02:00 Anoop_L https://community.sap.com/t5/user/viewprofilepage/user-id/1463373 <P><SPAN>Hello All,&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>In this Blog I would like Exhibit&nbsp;a Scenario Where the RESTful webservice is used to Display SAP Data using MAPS API. In this Blog, Displaying the Location of SAP Entity like Plant, Distribution Center, Warehouse, Vendor Location on Google Maps.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>We need to Fetch Latitude and Longitude (Geo Coordinates) information for the given entities and then further we need to pass Geo Coordinates to the Google Map API in an HTML Block, Here I would pass Route as parameter in the URL then will retrieve customer location and display them on Google Map.</SPAN><SPAN>&nbsp;</SPAN></P><P><FONT face="courier new,courier"><STRONG><FONT size="5">API</FONT></STRONG></FONT></P><P><SPAN>While working with Google Maps API, I’ll be passing locations as Addresses or Co-Ordinates. I need to specify the start of address and end of address. If you have Stopover in between you can also define them as Waypoints. I will pass all the details to the API, and it will process all the rest.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>&nbsp;</SPAN></P><P><SPAN>To Use Google Product API, I need to get an API Key. This API key is free up to certain usage Limit. If we go Beyond, we need to pay for licensing. We can Object an API Key ourselves </SPAN><A href="https://developers.google.com/maps/documentation/javascript/overview#api_key" target="_blank" rel="noopener nofollow noreferrer"><SPAN>Obtaining Google Maps API Key</SPAN></A><SPAN>&nbsp;</SPAN></P><P><SPAN>To Learn More about Google Maps API and Geo Coordinates, we can look up </SPAN><A href="https://developers.google.com/maps/documentation/javascript/" target="_blank" rel="noopener nofollow noreferrer"><SPAN>Google Maps JS API</SPAN></A><SPAN>&nbsp;</SPAN></P><P><FONT face="courier new,courier" size="5"><STRONG>RESTful WS</STRONG></FONT><SPAN>&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>I Would use RESTful Web Service to Expose our data. I Will Build up the response message in HTML containing the JavaScript. The JavaScript code will call&nbsp;Google Maps API with Selected Geo Co-Ordinates.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>Within the Handler Method for the RESTful WS,</SPAN><SPAN>&nbsp;</SPAN></P><UL><LI><SPAN>Extract the parameter from URL </SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>Get the Data or Prepare the Data</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>Build Up JavaScript and HTML Code</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>Send the Response</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><SPAN>&nbsp;</SPAN></P><P><SPAN>For this Scenario I will create a Service ZAL_DEMO in Transaction code SICF and assigned a Handler Class ZCL_AL_DEMO_HANDLER within it and a Standard Interface IF_HTTP_EXTENSION to Handle the HTTP.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>&nbsp;</SPAN></P><P><SPAN>First Step I will Navigate to Transaction SICF</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2024-06-21 121658.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128330i98F6BC79D9805EF2/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-06-21 121658.png" alt="Screenshot 2024-06-21 121658.png" /></span></SPAN></P><P>&nbsp;</P><P><SPAN><SPAN class="">After Navigating to Transaction SICF we can see the screen Define Service as below, then we need to&nbsp;click on Execute Button</SPAN><SPAN class="">&nbsp;</SPAN></SPAN></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anoop_L_0-1719295237495.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128336i13BC7AAC709B997D/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_0-1719295237495.png" alt="Anoop_L_0-1719295237495.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anoop_L_1-1719295359829.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128339iE51AD2AAB0E4DC3B/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_1-1719295359829.png" alt="Anoop_L_1-1719295359829.png" /></span></P><P>&nbsp;</P><P><SPAN>We can Create a New Node whenever we are creating RESTful WS as we can create&nbsp;different services under that Node. We shouldn’t Use default_host/sap/bc/srt as it required to have SOAMANAGER Configuration, which I will be not using for our Service.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>So, I will place the cursor on desired node and Click on Drop Down</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>Default_host---&gt;sap---&gt;bc---&gt;ZAL_DEMO</SPAN><SPAN>&nbsp;</SPAN></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_2-1719295770152.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128356iDA7D74AE8A7B33CE/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_2-1719295770152.png" alt="Anoop_L_2-1719295770152.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_3-1719295837933.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128357i7FC1CDD0D6CAD63F/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_3-1719295837933.png" alt="Anoop_L_3-1719295837933.png" /></span></P><P>&nbsp;</P><P><SPAN class="">I will Right click on “bc” and create a Sub-Element, Further I will Enter the name of the Service in Next Popup. In the subsequent screen I’ll provide the Description.</SPAN><SPAN class="">&nbsp;</SPAN></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_4-1719295891204.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128360i76E822B98B571870/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_4-1719295891204.png" alt="Anoop_L_4-1719295891204.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_5-1719295918441.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128362iE97F772FDE973AD2/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_5-1719295918441.png" alt="Anoop_L_5-1719295918441.png" /></span></P><P>&nbsp;</P><P><SPAN class="">Next, I’ll Provide the Necessary Credentials in Logon Data Tab like Description, Client which I’ll be working on, User ID and Password.</SPAN><SPAN class="">&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_6-1719295954052.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128363i5FCAA5901D8AA85A/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_6-1719295954052.png" alt="Anoop_L_6-1719295954052.png" /></span></P><P>&nbsp;</P><P><SPAN class="">In the Handler Tab I’ll assign a custom class which would be used to handle the request coming from the web. This class should Implement the standard Interface IF_HTTP_EXTENSION and to gain access of the request and also required method.</SPAN></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_7-1719295994400.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128364i82A8389320E8B9D9/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_7-1719295994400.png" alt="Anoop_L_7-1719295994400.png" /></span></P><P>&nbsp;</P><P><SPAN class="">Now I’ll add the Interface IF_HTTP_EXTENSION in my Handler class and Implement the Method.</SPAN><SPAN class="">&nbsp;</SPAN></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_8-1719296032698.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128365i4D359FE412427264/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_8-1719296032698.png" alt="Anoop_L_8-1719296032698.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_9-1719296068205.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128366i87D6BC343EB611C5/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_9-1719296068205.png" alt="Anoop_L_9-1719296068205.png" /></span></P><P>&nbsp;</P><P><FONT face="courier new,courier" size="5"><STRONG>HTML Build</STRONG></FONT><SPAN>&nbsp;</SPAN></P><P><SPAN>For HTML Body we can load our template in Transaction SMW0 </SPAN><SPAN>&nbsp;</SPAN></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_10-1719296146496.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128367iD9246F304594C597/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_10-1719296146496.png" alt="Anoop_L_10-1719296146496.png" /></span></P><P>&nbsp;</P><P><SPAN>But I Have chose to Manually Build Utility&nbsp;HTML class within ABAP. This utility wraps the logic for building HTML Tags and string manipulation within itself for simple client access.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>---&gt; Template with </SPAN><STRONG><I><SPAN>Static Data</SPAN></I></STRONG><SPAN> = like Main CSS, Headers, Table Headers</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>---&gt; Place Holders for </SPAN><STRONG><I><SPAN>Dynamic Data </SPAN></I></STRONG><SPAN>= Table Details</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>&nbsp;</SPAN></P><UL><LI><STRONG><SPAN>CREATE ELEMNT</SPAN></STRONG><SPAN> – Create any HTML element, Here I need to pass HTML Tag as Parameter. This should be the very first to get called after object Instantiation.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>ADD_ATT</SPAN></STRONG><SPAN> – Add Attribute to a HTML Tag like CSS class, style, ID </SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>ADD_INNER_HTML</SPAN></STRONG><SPAN> – Add Inner HTML to the Tag, Here I’ll specify the HTML Content which is visible on the Document like text of link on Tag</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>APPEND_CHILD</SPAN></STRONG><SPAN> – Append HTML object to parent HTML object like creating a &lt;P&gt; Tag within &lt;DIV&gt; Tag</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>GET_HTML</SPAN></STRONG><SPAN> – This Method will return the HTML Text. Method Traverse through all child Nodes of any Given Node. Method is based on Composite Design Pattern, So I need to call this method for my Parent or Root Node If I need to get any specific HTML, I can call it for any Node.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><SPAN>I Will create 3 Private Attributes which can be accessed through above methods.</SPAN><SPAN>&nbsp;</SPAN></P><P>&nbsp;</P><UL><LI><STRONG><SPAN>TAG</SPAN></STRONG><SPAN> – This can contain type of the tag like &lt;DIV&gt; which is set by CREATE_ELEMNT.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>INNER_HTML</SPAN></STRONG><SPAN> – This contains the Visible text of the HTML Tag set by ADD_INNER_HTML</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>ATTR </SPAN></STRONG><SPAN>– Table containing pair of with name of attribute and a value</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>CHILDREN</SPAN></STRONG><SPAN> – Table Containing all Child Nodes for a given node.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><SPAN>Now I’ll Create a Global Class with the Above Methods and Attributes.</SPAN><SPAN>&nbsp;</SPAN></P><P>&nbsp;</P><P><STRONG><SPAN class="">METHODS</SPAN></STRONG><SPAN class="">&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_11-1719296309156.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128368i95C9939184811FD2/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_11-1719296309156.png" alt="Anoop_L_11-1719296309156.png" /></span></P><P>&nbsp;</P><P><STRONG><SPAN class="">ATTRIBUTES</SPAN></STRONG><SPAN class="">&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_12-1719296351535.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128369iA49A1E591954D2E3/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_12-1719296351535.png" alt="Anoop_L_12-1719296351535.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_13-1719296381273.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128370iF9B1AB3DAFD6BD1B/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_13-1719296381273.png" alt="Anoop_L_13-1719296381273.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_0-1719379026212.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128769i9C127622E3922A64/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_0-1719379026212.png" alt="Anoop_L_0-1719379026212.png" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P><STRONG>METHOD IMPLEMENTATION</STRONG></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_15-1719296457098.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128372iA37A6E47F0086A3D/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_15-1719296457098.png" alt="Anoop_L_15-1719296457098.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_16-1719296482903.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128373i12C39F9B075E0B1D/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_16-1719296482903.png" alt="Anoop_L_16-1719296482903.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_17-1719296508895.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128374i4688D30189D030A5/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_17-1719296508895.png" alt="Anoop_L_17-1719296508895.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_18-1719296535182.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128375i43482883DE55F98E/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_18-1719296535182.png" alt="Anoop_L_18-1719296535182.png" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_20-1719296580803.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128377i639703B7BF5192A0/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_20-1719296580803.png" alt="Anoop_L_20-1719296580803.png" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_21-1719296605557.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128378i7115C6B82B65AB4B/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_21-1719296605557.png" alt="Anoop_L_21-1719296605557.png" /></span></P><P>&nbsp;</P><P>Preference in Local Class</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>CLASS lcl_html DEFINITION. PUBLIC SECTION. METHODS : create_elemnt IMPORTING tag TYPE string, add_att IMPORTING attr TYPE string val TYPE string, add_inner_html IMPORTING val TYPE string, append_child IMPORTING io_tag TYPE REF TO lcl_html, get_html RETURNING VALUE(rv_string) TYPE string. PRIVATE SECTION. DATA : tag TYPE string. DATA : inner_html TYPE string. TYPES : BEGIN OF ty_attr, attr TYPE string, val TYPE string, END OF ty_attr. DATA : attrs TYPE STANDARD TABLE OF ty_attr. DATA : children TYPE STANDARD TABLE OF REF TO lcl_html. ENDCLASS. CLASS lcl_html IMPLEMENTATION. METHOD create_elemnt. me-&gt;tag = tag. ENDMETHOD. METHOD append_child. APPEND io_tag TO me-&gt;children. ENDMETHOD. METHOD add_att. DATA : ls_attr LIKE LINE OF me-&gt;attrs. ls_attr-attr = attr. ls_attr-val = val. APPEND ls_attr TO me-&gt;attrs. ENDMETHOD. METHOD add_inner_html. me-&gt;inner_html = val. ENDMETHOD. METHOD get_html. DATA : lv_string TYPE string. DATA : lv_attr_val TYPE string. DATA : ls_attr LIKE LINE OF me-&gt;attrs. DATA : lo_child TYPE REF TO lcl_html. DATA : lv_child_html TYPE string. *opening bracket lv_string = |&lt;{ me-&gt;tag }|. LOOP AT me-&gt;attrs INTO ls_attr. lv_attr_val = |{ ls_attr-attr }='{ ls_attr-val }'|. lv_string = |{ lv_string } { lv_attr_val }|. ENDLOOP. lv_string = |{ lv_string }&gt;|. *Inner HTML lv_string = |{ lv_string }{ me-&gt;inner_html }|. *Child LOOP AT me-&gt;children INTO lo_child. lv_child_html = lo_child-&gt;get_html( ). lv_string = |{ lv_string }{ lv_child_html }|. CLEAR lv_child_html. ENDLOOP. *Closing lv_string = |{ lv_string }&lt;/{ me-&gt;tag }&gt;|. *Back the HTML rv_string = lv_string. ENDMETHOD. ENDCLASS.</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P><FONT size="5"><STRONG><FONT face="courier new,courier"><SPAN class="">IMPLEMENTATION</SPAN></FONT><SPAN class="">&nbsp;</SPAN></STRONG></FONT></P><P><SPAN class="">In this Implementation part I'll Use the HTML Builder Class in IF_HTTP_EXTENSION~HANDLE_REQUEST Method of my Handler Class ZCL_AL_DEMO_HANDLER.</SPAN><SPAN class="">&nbsp;</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>DATA: lv_path TYPE STRING, lv_cdata TYPE STRING, lv_param TYPE STRING. DATA: lt_request TYPE STANDARD TABLE OF STRING. DATA: lv_route TYPE char10. * get the request attributes lv_path = server-&gt;request-&gt;get_header_field( NAME = '~path_info' ). SHIFT lv_path LEFT BY 1 PLACES. SPLIT lv_path AT '/' INTO TABLE lt_request. READ TABLE lt_request INTO lv_param INDEX 1. * Get Customer associated to ROute * Get Geo Codes for those customers TYPES: BEGIN OF lty_geo, kunnr TYPE kna1-kunnr, lon TYPE STRING, lat TYPE STRING, END OF lty_geo. DATA: li_geo TYPE STANDARD TABLE OF lty_geo. DATA: lwa_geo LIKE LINE OF li_geo. * DEFINE append_data. * lwa_geo-kunnr = &amp;1. * lwa_geo-lon = &amp;2. * lwa_geo-lat = &amp;3. * APPEND lwa_geo TO li_geo. * END-OF-DEFINITION. * * append_data: '1001' '33.042342' '-96.768866', * '1002' '33.057954' '-96.772127', * '1003' '33.060364' '-96.796782', * '1004' '33.030794' '-96.795516', * '1005' '33.027699' '-96.790152', * '1006' '33.027771' '-96.768866'. li_geo = value #( ( kunnr = '1001' lon = '33.042342' lat = '-96.768866' ) ( kunnr = '1002' lon = '33.057954' lat = '-96.772127' ) ( kunnr = '1003' lon = '33.060364' lat = '-96.796782' ) ( kunnr = '1004' lon = '33.030794' lat = '-96.795516' ) ( kunnr = '1005' lon = '33.027699' lat = '-96.790152' ) ( kunnr = '1006' lon = '33.027771' lat = '-96.768866' ) ). * Build up JavaScript DATA: lv_tot TYPE i. DATA: lv_from TYPE i. DATA: lv_to TYPE i. DATA: lv_start TYPE STRING. DATA: lv_end TYPE STRING. DATA: lv_wp TYPE STRING, lv_pair TYPE STRING, lv_iw TYPE STRING. lv_tot = LINES( li_geo ). IF lv_tot GT 2. lv_from = 2. lv_to = lv_tot - 1. ENDIF. * start / end point READ TABLE li_geo INTO lwa_geo INDEX 1. CONCATENATE 'var startpoint = new google.maps.LatLng(' lwa_geo-lon ',' lwa_geo-lat ');' INTO lv_start. * Info window lv_iw = 'var infoWindow;'. CONCATENATE ' infoWindow = new google.maps.InfoWindow();' ' infoWindow.setOptions({' ' content: "&lt;div&gt;First Customer to Visit :' lwa_geo-kunnr '&lt;/div&gt;",' ' position: startpoint,' ' });' ' infoWindow.open(map); ' INTO lv_iw. READ TABLE li_geo INTO lwa_geo INDEX lv_tot. CONCATENATE 'var endpoint = new google.maps.LatLng(' lwa_geo-lon ',' lwa_geo-lat ');' INTO lv_end. CONCATENATE lv_iw ' infoWindow = new google.maps.InfoWindow();' ' infoWindow.setOptions({' ' content: "&lt;div&gt;Last Customer : ' lwa_geo-kunnr '&lt;/div&gt;",' ' position: endpoint,' ' });' ' infoWindow.open(map); ' INTO lv_iw. * Way points LOOP AT li_geo INTO lwa_geo FROM lv_from TO lv_to. CONCATENATE `location:"` lwa_geo-lon `,` lwa_geo-lat `",` INTO lv_pair. CONCATENATE lv_wp ' waypts.push({' * ' location:"33.077842,-96.820428&amp;#8243;,' lv_pair ' stopover:true' ' });' INTO lv_wp SEPARATED BY cl_abap_char_utilities=&gt;cr_lf. ENDLOOP. DATA: lv_js TYPE STRING. CONCATENATE '&lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt;' '&lt;style type="text/css"&gt;' ' html { height: 100% }' ' body { height: 100%; margin: 0; padding: 0 }' ' #map_canvas { height: 100% }' '&lt;/style&gt;' '&lt;script src="https://polyfill.io/v3/polyfill.min.js?features=default"&gt;&lt;/script&gt;' '&lt;script' ' src="http://maps.googleapis.com/maps/api/js?key=API_KEY&amp;sensor=false"&gt;' '&lt;/script&gt;' '&lt;script type="text/javascript"&gt;' 'var directionsDisplay;' 'var directionsService = new google.maps.DirectionsService();' 'var map;' lv_start lv_end 'function initialize() {' ' directionsDisplay = new google.maps.DirectionsRenderer();' ' var myOptions = {' ' zoom: 16,' ' mapTypeId: google.maps.MapTypeId.ROADMAP,' ' center: startpoint' ' }' ' map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);' ' directionsDisplay.setMap(map); ' ' var waypts = [];' * ' waypts.push({' * ' location:"33.077842,-96.820428",' * ' stopover:true' * ' });' lv_wp ' console.log(waypts);' ' var request = {' ' origin:startpoint,' ' destination:endpoint,' ' waypoints: waypts,' ' optimizeWaypoints: true,' ' travelMode: google.maps.TravelMode.DRIVING' ' }; ' ' directionsService.route(request, function(result, status) {' ' if (status == google.maps.DirectionsStatus.OK) {' ' directionsDisplay.setDirections(result);' ' }' ' }); ' lv_iw * ' var infoWindow = new google.maps.InfoWindow();' * ' infoWindow.setOptions({' * ' content: "&lt;div&gt;&lt;/div&gt;",' * ' position: startpoint,' * ' });' * ' infoWindow.open(map); ' '}' '&lt;/script&gt;' INTO lv_js SEPARATED BY cl_abap_char_utilities=&gt;cr_lf. * Body HTML DATA: lv_body TYPE STRING. DATA: lv_html TYPE STRING. DATA: lo_body TYPE REF TO zcl_html. DATA: lo_table TYPE REF TO zcl_html. DATA: lo_thead TYPE REF TO zcl_html. DATA: lo_tbody TYPE REF TO zcl_html. DATA: lo_tr TYPE REF TO zcl_html. DATA: lo_td TYPE REF TO zcl_html. DATA: lo_tag TYPE REF TO zcl_html. data: lo_button TYPE REF TO zcl_html. DATA: lv_val TYPE STRING. CONCATENATE '&lt;html&gt;' '&lt;head&gt;&lt;title&gt;Route Map&lt;/title&gt;' '&lt;style&gt;body{ font: normal normal 14px Arial, Tahoma, Helvetica, FreeSans, sans-serif; }&lt;/style&gt;' INTO lv_html. CREATE OBJECT lo_body. lo_body-&gt;create_elemnt( 'body' ). lo_body-&gt;add_att( attr = 'onload' val = 'initialize()' ). CREATE OBJECT lo_tag. lo_tag-&gt;create_elemnt( 'h3' ). lo_tag-&gt;add_inner_html( 'Generated Route Map from SAP' ). lo_body-&gt;append_child( lo_tag ). CONCATENATE 'Route:' lv_route INTO lv_val SEPARATED BY SPACE. CREATE OBJECT lo_tag. lo_tag-&gt;create_elemnt( 'p' ). lo_tag-&gt;add_inner_html( lv_val ). lo_body-&gt;append_child( lo_tag ). CREATE OBJECT lo_table. lo_table-&gt;create_elemnt( 'table' ). lo_table-&gt;add_att( attr = 'style' val = 'float:left' ). lo_body-&gt;append_child( lo_table ). CREATE OBJECT lo_thead. lo_thead-&gt;create_elemnt( 'thead' ). lo_table-&gt;append_child( lo_thead ). CREATE OBJECT lo_tr. lo_tr-&gt;create_elemnt( 'tr' ). lo_thead-&gt;append_child( lo_tr ). CREATE OBJECT lo_td. lo_td-&gt;create_elemnt( 'td' ). lo_td-&gt;add_inner_html( 'Customer' ). lo_tr-&gt;append_child( lo_td ). CREATE OBJECT lo_td. lo_td-&gt;create_elemnt( 'td' ). lo_td-&gt;add_inner_html( 'Long' ). lo_tr-&gt;append_child( lo_td ). CREATE OBJECT lo_td. lo_td-&gt;create_elemnt( 'td' ). lo_td-&gt;add_inner_html( 'Lat' ). lo_tr-&gt;append_child( lo_td ). CREATE OBJECT lo_tbody. lo_tbody-&gt;create_elemnt( 'tbody' ). lo_table-&gt;append_child( lo_tbody ). LOOP AT li_geo INTO lwa_geo. CREATE OBJECT lo_tr. lo_tr-&gt;create_elemnt( 'tr' ). lo_tbody-&gt;append_child( lo_tr ). lv_val = lwa_geo-kunnr. CREATE OBJECT lo_td. lo_td-&gt;create_elemnt( 'td' ). lo_td-&gt;add_inner_html( lv_val ). lo_tr-&gt;append_child( lo_td ). lv_val = lwa_geo-lon. CREATE OBJECT lo_td. lo_td-&gt;create_elemnt( 'td' ). lo_td-&gt;add_inner_html( lv_val ). lo_tr-&gt;append_child( lo_td ). lv_val = lwa_geo-lat. CREATE OBJECT lo_td. lo_td-&gt;create_elemnt( 'td' ). lo_td-&gt;add_inner_html( lv_val ). lo_tr-&gt;append_child( lo_td ). ENDLOOP. CREATE OBJECT lo_tag. lo_tag-&gt;create_elemnt( 'div' ). lo_tag-&gt;add_att( attr = 'id' val = 'map_canvas' ). lo_tag-&gt;add_att( attr = 'style' val = 'width: 100%, height: 100%' ). lo_body-&gt;append_child( lo_tag ). lv_body = lo_body-&gt;get_html( ). CONCATENATE lv_html lv_js '&lt;/head&gt;' lv_body INTO lv_html. lv_cdata = lv_html. * Send the response back server-&gt;response-&gt;set_cdata( DATA = lv_cdata ).</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P><SPAN class="">Now I’ll Use this ZCL_AL_DEMO_HANDLER Class in my Service in the Tab Handler List which was&nbsp;created in Transaction SICF.</SPAN><SPAN class="">&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_22-1719297256792.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128379i132E6BAAFC5ACA72/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_22-1719297256792.png" alt="Anoop_L_22-1719297256792.png" /></span></P><P>&nbsp;</P><P><FONT face="courier new,courier" size="5"><STRONG><SPAN class="">OUTPUT</SPAN></STRONG></FONT></P><P><FONT face="arial,helvetica,sans-serif" size="3"><SPAN class="">For the Output Firstly, we should activate the service and then we can Execute URL or Test the Service which generates Nice Representation on Google Map.</SPAN></FONT></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_23-1719297398401.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128380iABB135F7938AD80E/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_23-1719297398401.png" alt="Anoop_L_23-1719297398401.png" /></span></P><P>&nbsp;</P><DIV class="">&nbsp;</DIV><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Anoop_L_25-1719297465649.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/128382iD3060EA58C35475B/image-size/large?v=v2&amp;px=999" role="button" title="Anoop_L_25-1719297465649.png" alt="Anoop_L_25-1719297465649.png" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2024-06-26T18:14:28.616000+02:00 https://community.sap.com/t5/application-development-and-automation-blog-posts/sap-gui-html-browser-control-use-f12-development-tools/ba-p/13801432 SAP GUI HTML / Browser control use F12 Development tools 2024-08-21T08:42:08.278000+02:00 tilo-sap https://community.sap.com/t5/user/viewprofilepage/user-id/175144 <P>How to get the F12 browser dev tools open for SAP GUI HTML Browser control?</P><P>Works for SAP GUI HTML / Browser control via Edge (based on Chromium) so WebView2.&nbsp;</P><P>Create these Win Registry Keys either manual</P><P><FONT face="verdana,geneva" size="2"><STRONG>Path:</STRONG>&nbsp; Computer\HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments</FONT></P><P><FONT face="verdana,geneva" size="2"><STRONG>Name:</STRONG> saplogon.exe<BR /></FONT><FONT face="verdana,geneva" size="2"><STRONG>Value</STRONG> "--auto-open-devtools-for-tabs"</FONT></P><P>or via admin powershell</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code>New-Item 'HKCU:\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments' -Force | ` New-ItemProperty -Name saplogon.exe -Value "--auto-open-devtools-for-tabs" -Force</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>I needed it to debug some cookie issue.</P><P>btw the user dir and cookies folder is here:</P><P><FONT face="verdana,geneva" size="2">"C:\Users\tsoadmin\AppData\Local\SAP\SAP GUI\EdgeUserData\EdgeUserDataSystemAware\EBWebView\Default\Network\Cookies"</FONT> (SQL lite DB) but chrome has exclusive lock on the file so can't be read while open.</P><P>Here the full cmd of a running WebView2 instance.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code>"C:\Program Files (x86)\Microsoft\EdgeWebView\Application\127.0.2651.105\msedgewebview2.exe" --embedded-browser-webview=1 --webview-exe-name=saplogon.exe --webview-exe-version="800 Final Release - 64bit" --user-data-dir="C:\Users\tsoadmin\AppData\Local\SAP\SAP GUI\EdgeUserData\EdgeUserDataSystemAware\EBWebView" --noerrdialogs --embedded-browser-webview-dpi-awareness=1 --edge-webview-custom-scheme=sap-cust,1,1,sapevent,1,1,saphtmlp,1,1,sapr3,1,1 --enable-features=MojoIpcz,msSingleSignOnOSForPrimaryAccountIsShared --mojo-named-platform-channel-pipe=9484.10484.18364521422129778599 "C:\Program Files (x86)\Microsoft\EdgeWebView\Application\127.0.2651.105\msedgewebview2.exe" --type=renderer --noerrdialogs --user-data-dir="C:\Users\tsoadmin\AppData\Local\SAP\SAP GUI\EdgeUserData\EdgeUserDataSystemAware\EBWebView" --webview-exe-name=saplogon.exe --webview-exe-version="800 Final Release - 64bit" --embedded-browser-webview=1 --embedded-browser-webview-dpi-awareness=1 --edge-webview-custom-scheme=sap-cust,1,1,sapevent,1,1,saphtmlp,1,1,sapr3,1,1 --video-capture-use-gpu-memory-buffer --lang=en-US --device-scale-factor=1 --num-raster-threads=2 --enable-main-frame-before-activation --renderer-client-id=5 --js-flags="--harmony-weak-refs-with-cleanup-some --expose-gc --ms-user-locale=" --time-ticks-at-unix-epoch=-1723655821980318 --launch-time-ticks=529510535327 --field-trial-handle=3568,i,14546398177687338828,8625289174098165138,262144 --enable-features=MojoIpcz,msSingleSignOnOSForPrimaryAccountIsShared --variations-seed-version --mojo-platform-channel-handle=3580 /prefetch:1</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>here another method [via utility called <EM>IEChooser.exe ]<BR /></EM></P><P><A href="https://community.sap.com/t5/application-development-blog-posts/obscure-productivity-tips-debug-javascript-running-within-sapgui-browser/ba-p/13390663" target="_blank">https://community.sap.com/t5/application-development-blog-posts/obscure-productivity-tips-debug-javascript-running-within-sapgui-browser/ba-p/13390663</A></P><P>Example how it looks (for content server document viewer with HTML Control)</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example of F12 debug" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/155013iAB1AF9C6C5900B82/image-size/large?v=v2&amp;px=999" role="button" title="example-f12-debug.png" alt="example of F12 debug" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">example of F12 debug</span></span></P> 2024-08-21T08:42:08.278000+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/sap-cap-lessons-learned-deploy-app-on-html5-repository/ba-p/13950921 SAP CAP Lessons Learned: Deploy app on HTML5 Repository 2024-12-30T22:16:54.957000+01:00 LucasMagriniRigo https://community.sap.com/t5/user/viewprofilepage/user-id/1484354 <P>Good day fellow CAPpers,</P><P>Today I'll share one of the lessons I've learned working with CAP, something that may not be clear in the current tutorials or documentation. It's about deploying the front-end, the UI, of your CAP application in the SAP BTP's HTML5 Repository instead of creating an AppRouter, a separate Cloud Foundry application, for it.</P><P><STRONG>Pre-requisite on BTP:</STRONG></P><P>To display or run HTML5 applications, your BTP SubAccount will need to have one of these services enabled/subscribed:</P><UL><LI><STRONG><EM>SAP Build Work Zone, standard edition</EM></STRONG></LI><LI>SAP Build Work Zone, advanced edition</LI><LI>SAP SuccessFactors Work Zone</LI><LI>SAP Cloud Portal service</LI></UL><P>I recommend <EM>SAP Build Work Zone, standard edition</EM>, because it's the simplest to setup. It will be used in this guide.</P><P><STRONG>Assumption about your CAP project:</STRONG></P><P>The guide will assume you have the standard project structure for an MTA application:</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code>/project /app /my-app ... package.json ui5-deploy.yaml ui5.yaml /db /srv package.json mta.yaml</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>Note: the database module is optional.</P><P>Considering this, your <STRONG>mta.yaml</STRONG> will require 3 modules:</P><OL><LI>A module for the app itself, with <EM>type: html5</EM> and <EM>path: app/my-app​<BR /></EM>- Each different app will require one of these modules<BR />- It effectively zips the application and stores in the /resources folder</LI><LI>A deployer module with <EM>type: com.sap.application.content<BR /></EM>- This module can be reused for different apps, but needs a parameter for​ each app<BR />- It takes the .zip files from /resources folder and sends to the HTML5 Repo</LI><LI>An app-content module with <EM>type: com.sap.application.content</EM>&nbsp;that will effectively do the setup of the HTML5 Repository​<BR />- This module is unique and don't need to be edited if new apps are added.<BR />- It sets up the connection between your app and the HTML5 Repository service and the service bindings</LI></OL><P>These modules will require 3 resources:</P><OL><LI>Repo Host: the service for HTML5 Repository Host</LI><LI>Destination: the service that allows your UI (/app) to communicate with the service (/srv)</LI><LI>XSUAA: User Authorization and Authentication. You can make it work without this service, but I wouldn't recommend.</LI></OL><P>The resulting <STRONG>mta.yaml</STRONG> would look like this:</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-yaml"><code>_schema-version: "3.1" ID: cap-app-id description: CAP app with UI on HTML5 Repo version: 1.0.0 # build parameters added by the generator parameters: deploy_mode: html5-repo enable-parallel-deployments: true build-parameters: before-all: - builder: custom commands: - npm install - npx cds build --production modules: # srv - name: my-srv type: nodejs path: gen/srv build-parameters: builder: npm parameters: buildpack: nodejs_buildpack readiness-health-check-http-endpoint: /health readiness-health-check-type: http routes: - route: ${space}-my-srv.${default-domain} provides: - name: srv-api properties: srv-url: ${routes/0/route} requires: - name: my-auth - name: my-destination-service # app content deployer - name: my-deployer type: com.sap.application.content path: . requires: - name: my-repo-host parameters: content-target: true build-parameters: build-result: resources requires: - artifacts: - my-app.zip name: myapp target-path: resources/ - artifacts: - my-other-app.zip name: myotherapp target-path: resources/ # my app itself - name: myapp type: html5 path: app/my-app build-parameters: build-result: dist builder: custom commands: - npm install - npm run build:cf supported-platforms: [] # my other app itself - name: myotherapp type: html5 path: app/my-other-app build-parameters: build-result: dist builder: custom commands: - npm install - npm run build:cf supported-platforms: [] # app html5 repo host - name: my-app-content type: com.sap.application.content build-parameters: no-source: true requires: - name: my-auth parameters: service-key: name: my-auth-key - name: my-repo-host parameters: service-key: name: my-repo-host-key - name: my-destination-service parameters: content-target: true parameters: content: instance: existing_destinations_policy: update destinations: - Name: my-repo-host ServiceInstanceName: my-html5-srv ServiceKeyName: my-repo-host-key sap.cloud.service: my.app - Name: my-auth Authentication: OAuth2UserTokenExchange ServiceInstanceName: my-auth ServiceKeyName: my-auth-key sap.cloud.service: my.app resources: - name: my-repo-host type: org.cloudfoundry.managed-service parameters: service: html5-apps-repo service-name: my-html5-srv service-plan: app-host - name: my-destination-service type: org.cloudfoundry.managed-service requires: - name: srv-api parameters: config: HTML5Runtime_enabled: true init_data: instance: destinations: - Authentication: NoAuthentication Name: ui5 ProxyType: Internet Type: HTTP URL: https://ui5.sap.com - Name: app-dest # defined in the apps xs-app.json Authentication: NoAuthentication ProxyType: Internet HTML5.ForwardAuthToken: true HTML5.DynamicDestination: true Type: HTTP URL: https://~{srv-api/srv-url} # reference to the service existing_destinations_policy: update version: 1.0.0 service: destination service-name: my-destination-service service-plan: lite - name: my-auth type: org.cloudfoundry.managed-service parameters: service: xsuaa service-plan: application path: ./xs-security.json config: xsappname: my-app # update as required tenant-mode: dedicated </code></pre><P>&nbsp;</P><P><STRONG>EDIT: Very important:</STRONG> Remember to set the resources repo-host parameter <STRONG>HTML5Runtime_enabled</STRONG> to&nbsp;<STRONG>true</STRONG>. It generates as false and may cause you a headache until you find it.</P><P>&nbsp;</P><P>May this post help you on your troubleshooting. Reply if you find any issues so I, and the community, can help.</P><P>&nbsp;</P><P>Lucas Magrini Rigo</P><P><a href="https://community.sap.com/t5/c-khhcw49343/SAP+Business+Technology+Platform/pd-p/73555000100700000172" class="lia-product-mention" data-product="1215-1">SAP Business Technology Platform</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Cloud+Application+Programming+Model/pd-p/9f13aee1-834c-4105-8e43-ee442775e5ce" class="lia-product-mention" data-product="100-1">SAP Cloud Application Programming Model</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/HTML5/pd-p/680828266263384213323560113427399" class="lia-product-mention" data-product="318-1">HTML5</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Fiori+Launchpad/pd-p/538710751289542466232554247536294" class="lia-product-mention" data-product="1060-1">SAP Fiori Launchpad</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Build+Work+Zone%25252C+standard+edition/pd-p/73554900100800003081" class="lia-product-mention" data-product="684-1">SAP Build Work Zone, standard edition</a>&nbsp;</P> 2024-12-30T22:16:54.957000+01:00 https://community.sap.com/t5/technology-blog-posts-by-members/sap-btp-cloud-application-programming-model/ba-p/14032929 SAP BTP: Cloud Application Programming Model 2025-03-04T07:09:41.141000+01:00 SekhuteTK https://community.sap.com/t5/user/viewprofilepage/user-id/15314 <P>SAP Cloud Application Programming (CAP) Model exposes the ability to extend standard Cloud, on-premises and hybrid application functionality with flexible custom business logic scripted using the developer’s choice of programing language (SQL, SQL Script, Python, Node.js and JavaScript) and exposing the functionality to various user interfaces (UIs) e.g. Microsoft Power Bi, SAP Fiori, Dataiku and Google Big Query using various integration frameworks e.g. OData v4,JDBC/ODBC depending on the case study.</P><P>The developer takes pride in delivering a scalable extended functionality, embedding robust real-time monitoring capabilities to ensure a health life cycle and protecting the functionality with secure authentication protocols e.g. OAuth 2.0, JWT Bearer, SAML version 2.0 and RFC Specification.</P><P>Furthermore, the developer ensures a reliable and robust solutions by implementing continuous integration and continuous delivery CI/CD pipelines that automates testing, building and deployment of code changes this strategy ensures a speedy development and delivery cycle.</P><P>Traditionally developers extended business logic directly on-premises on the ABAP application server. With the ever-changing world of technology, digital transformation has become essential for organization to say afloat of competitors and therefore the programming model paradigms and capabilities of extending SAP solutions have evolved drastically and provides a seamless experience into the cloud.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Programming model.png" style="width: 626px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/232631i560CE0B01EB4E6CB/image-size/large?v=v2&amp;px=999" role="button" title="Programming model.png" alt="Programming model.png" /></span></P><P class="lia-align-center" style="text-align: center;"><EM>Figure 1: </EM></P><P class="lia-align-center" style="text-align: center;"><EM>Architectural Paradigm Shift from Classic ABAP App server to CAP App server</EM></P><P class="lia-align-center" style="text-align: center;"><EM>Source: Thomas Jung, <A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-hana-extended-application-services/ba-p/12963426" target="_blank"><STRONG>SAP HANA Extended Application Services</STRONG></A> blog, URL: <A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-hana-extended-application-services/ba-p/12963426/page/4" target="_blank">https://community.sap.com/t5/technology-blogs-by-sap/sap-hana-extended-application-services/ba-p/12963426/page/4</A></EM></P><P data-unlink="true">The SAP Cloud Application model comes with a rich set of languages, libraries, and tools for building enterprise-grade services and applications. It guides developers along a 'golden path' of proven&nbsp;best practices&nbsp;&nbsp;and a great wealth of&nbsp;out-of-the-box solutions&nbsp;&nbsp;to recurring tasks:</P><P data-unlink="true"><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="cap.png" style="width: 626px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/232633i1EC9379A4BB0DAA1/image-size/large?v=v2&amp;px=999" role="button" title="cap.png" alt="cap.png" /></span></P><P class="lia-align-center" style="text-align: center;"><EM>Figure 2: </EM></P><P class="lia-align-center" style="text-align: center;"><EM>SAP Cloud Application Model Architecture</EM></P><P class="lia-align-center" style="text-align: center;"><EM>Source <A href="HTTPS://Cap.cloud.sap" target="_blank" rel="nofollow noopener noreferrer">HTTPS://Cap.cloud.sap</A> , U</EM><EM>RL:</EM> <EM><A href="https://cap.cloud.sap/docs/about/" target="_blank" rel="nofollow noopener noreferrer">https://cap.cloud.sap/docs/about/</A></EM></P><P>The below diagram categories the skill set of SAP Cloud Developer based on the scope of the development either being ABAP or Non-ABAP. Each with its unique set of tools and methodologies:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ABAP VS NON.png" style="width: 626px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/232635i61C63058B7D72485/image-size/large?v=v2&amp;px=999" role="button" title="ABAP VS NON.png" alt="ABAP VS NON.png" /></span></P><P class="lia-align-center" style="text-align: center;"><EM>Figure 3:</EM></P><P class="lia-align-center" style="text-align: center;"><EM>&nbsp;SAP Cloud Developer skill set</EM></P><P class="lia-align-center" style="text-align: center;"><EM>Source: Building side-by-side extensions on SAP BTP, URL: <A href="https://learning.sap.com/learning-journeys/build-side-by-side-extensions-on-sap-btp/identifying-the-need-for-side-by-side-extensibility_f1e838f0-f02a-43b4-8896-cedc25a7d5d0" target="_blank" rel="noopener noreferrer">https://learning.sap.com/learning-journeys/build-side-by-side-extensions-on-sap-btp/identifying-the-need-for-side-by-side-extensibility_f1e838f0-f02a-43b4-8896-cedc25a7d5d0</A></EM></P><P>The Cloud Application Programming model enables a collaboration of agile cross functional teams inclusive of but not limited, depending on the scope of the development: &nbsp;citizen developers (low-code/no-code), Professional developers (Scripting, OOP), business analysts, data engineers and application specialists to model robust data models:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Cross functional.png" style="width: 626px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/232636i237D8D5BBD7CB069/image-size/large?v=v2&amp;px=999" role="button" title="Cross functional.png" alt="Cross functional.png" /></span></P><P class="lia-align-center" style="text-align: center;"><EM>Figure 4:</EM></P><P class="lia-align-center" style="text-align: center;"><EM>Agile cross functional team</EM></P><P class="lia-align-center" style="text-align: center;"><EM>Source: <STRONG>Investigating the Impact of Cross-Functional Teams on Business Success</STRONG></EM></P><P class="lia-align-center" style="text-align: center;"><EM>URL:</EM> <EM><A href="https://www.iienstitu.com/en/blog/cross-functional-teams" target="_blank" rel="nofollow noopener noreferrer">https://www.iienstitu.com/en/blog/cross-functional-teams</A></EM></P><P>SAP Cloud Application Programming (CAP) Model enables a culture where people regardless of their title or background, work together to imagine, develop, deploy, and operate a solution. This strengthens the trust between employees and authentic healthy work relationships.</P><P>Thank you all for taking a glimpse into the above Content. Please don’t for get to like, comment and share.</P><P><STRONG>Abbreviations:</STRONG></P><P><STRONG>APP: </STRONG>Application</P><P><STRONG>CAP: </STRONG>Cloud Application Programing</P><P><STRONG>CDS</STRONG>: Core Data Services</P><P><STRONG>CI/CD:</STRONG> Continuous Integration and Continuous Delivery</P><P><STRONG>JWT</STRONG>: JSON Web token</P><P><STRONG>OData: </STRONG>Open Data Protocol</P><P><STRONG>RFC</STRONG>: Remote Function Call</P><P><STRONG>SAML</STRONG>: Security Assertion Markup Language</P><P><STRONG>SQL:</STRONG> Structured Query Language</P><P><STRONG>UIs:</STRONG> User Interfaces</P> 2025-03-04T07:09:41.141000+01:00 https://community.sap.com/t5/application-development-and-automation-blog-posts/deploying-a-cap-app-with-fiori-app-standalone-html5-repo-host/ba-p/14071579 Deploying a CAP app with Fiori app standalone (HTML5 Repo Host) 2025-04-22T10:49:56.264000+02:00 Christopher_Ketzler https://community.sap.com/t5/user/viewprofilepage/user-id/1482274 <P>Typically, a CAP app with a Fiori frontend is deployed using SAP Workzone or Launchpad. You just need to run "cds add portal" or "cds add workzone" to extend the configuration and deploy the app to Cloud Foundry (<A href="https://cap.cloud.sap/docs/guides/deployment/to-cf#add-ui" target="_blank" rel="noopener nofollow noreferrer">Deploy to Cloud Foundry | capire</A>). The application will then be listed in the HTML5 tab of your subaccount. However, this approach is only applicable if you are subscribed to SAP Workzone or Launchpad (see below). A few months ago I was asked how to deploy a standalone CAP application with UI. Here is a step-by-step guide to deploying a CAP app with frontend.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Christopher_Ketzler_0-1744230534122.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/248926i9C3B2E2E223A330D/image-size/medium?v=v2&amp;px=400" role="button" title="Christopher_Ketzler_0-1744230534122.png" alt="Christopher_Ketzler_0-1744230534122.png" /></span></P><P>There are at least two different approaches. The first exposes the frontend application through the approuter. The other exposes the frontend application to the HTML5 Repo Host (<A href="https://discovery-center.cloud.sap/serviceCatalog/html5-application-repository-service?region=all" target="_blank" rel="noopener nofollow noreferrer">SAP Discovery Center Service - HTML5 Application Repository Service</A>). This has several advantages over the approuter:</P><UL><LI>Zero Down-Time Enablement, the frontend application is decoupled from the application router, meaning that content updates do not require a restart of the application router.</LI><LI>The service supports versioning and permissions.</LI><LI>Improved availability and performance.</LI></UL><P>&nbsp;</P><P><STRONG>How to deploy a Fiori-CAP app to the html5-repo-host:</STRONG></P><P>For simplicity, we will set up a new tiny bookshop example. Based on this backend, we will generate a simple Fiori List Page app.</P><pre class="lia-code-sample language-bash"><code>cds init bookshop --add tiny-sample cd bookshop</code></pre><P>Run the commands below to add some features. We will extend the configuration of the components later.</P><pre class="lia-code-sample language-bash"><code>cds add hana,html5-repo,approuter,mta cds add xsuaa --for production</code></pre><P>Now we are ready to add a Fiori List Report application. Right click on the mta.yaml and select 'Create MTA Module from Template'. The App Wizard will open and you will be able to configure a new Fiori app.</P><P>To make the html5 application accessible through the app router, we need to make some changes to its configuration. Locate the router configuration in the “app/router” folder.&nbsp; Add the “welcomeFile” and “authenticationMethod” properties to the xs-app file. In general, you can add a path to a file or the name of a Fiori app as a welcome file. The app router will redirect the user if accessing the app router. We need to add the name of the Fiori app as "welcomeFile" property. If you have defined a namespace when building the frontend app, make sure you include the namespace without delimiter. After deployment, the app router configuration below will redirect you to the Fiori app.</P><pre class="lia-code-sample language-json"><code>{ "welcomeFile": "&lt;Fiori app name&gt;", "authenticationMethod": "route", "routes": [ { "source": "^/(.*)$", "target": "$1", "destination": "srv-api", "csrfProtection": true } ] }</code></pre><P>Next, we need to extend the xs-app.json of the Fiori app itself. Add a new route for the odata service to make your cap service accessible from the Fiori app. Add the following snippet to the routes array before the html5-repo route.</P><pre class="lia-code-sample language-json"><code>{ "source": "^/odata/(.*)$", "target": "/odata/$1", "destination": "srv-api", "csrfProtection": true }</code></pre><P>The app router applies the routes in the order given in the routes array, i.e. if the first route matches, the others are ignored. The target is the service name defined in mta.yaml. The xs-app.json should now look similar to this one.</P><pre class="lia-code-sample language-json"><code>{ "welcomeFile": "/index.html", "authenticationMethod": "route", "routes": [ { "source": "^/resources/(.*)$", "target": "/resources/$1", "authenticationType": "none", "destination": "ui5" }, { "source": "^/test-resources/(.*)$", "target": "/test-resources/$1", "authenticationType": "none", "destination": "ui5" }, { "source": "^/odata/(.*)$", "target": "/odata/$1", "destination": "srv-api", "csrfProtection": true }, { "source": "^(.*)$", "target": "$1", "service": "html5-apps-repo-rt", "authenticationType": "xsuaa" } ] }</code></pre><P>Now we need to add the requires section below to the Fiori app's mta.yaml configuration. This snippet defines the service binding of the frontend app to the CAP service.</P><pre class="lia-code-sample language-yaml"><code> - name: books type: html5 path: app/books build-parameters: build-result: dist builder: custom commands: - npm install - npm run build:cf supported-platforms: [] requires: - name: srv-api group: destinations properties: forwardAuthToken: true name: srv-api url: ~{srv-url}</code></pre><P>If you are deploying to a BTP trial account, add the following snippet to the xs-security in the cap root folder. Make sure the link matches the cf api url for your environment.</P><pre class="lia-code-sample language-json"><code>"oauth2-configuration": { "redirect-uris": ["https://*.cfapps.us10-001.hana.ondemand.com/**"] }</code></pre><P>Add the environment variable "COOKIE_BACKWARD_COMPATIBILITY" to the “app/router/default-env.json” file. The app asked me to add this configuration. For more information, see the app router documentation (<A href="https://www.npmjs.com/package/@sap/approuter" target="_blank" rel="noopener nofollow noreferrer">@sap/approuter - npm</A>).</P><pre class="lia-code-sample language-json"><code>{ "destinations": [ { "name": "srv-api", "url": "http://localhost:4004", "forwardAuthToken": true } ], "COOKIE_BACKWARD_COMPATIBILITY": true }</code></pre><P>We are all almost done! Install the dependencies, build the CAP app and deploy to Cloud Foundry.</P><pre class="lia-code-sample language-bash"><code>npm i mbt build cf deploy …. (or context menu of the mta_archive)</code></pre><P>After successfully deploying the application, retrieve the URL using the html5 cf plugin. Run the terminal command below. Add the app name (with namespace) and "index.html" to the URL to open the Fiori app.</P><pre class="lia-code-sample language-bash"><code>cf html5-list -a &lt;app name&gt;-srv -u</code></pre><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Christopher_Ketzler_1-1744230803860.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/248927iF10FC913FC22873A/image-size/medium?v=v2&amp;px=400" role="button" title="Christopher_Ketzler_1-1744230803860.png" alt="Christopher_Ketzler_1-1744230803860.png" /></span></P><P>Alternatively, navigate to the subaccount in the BTP Cockpit, access your app router and follow the application route. The router will redirect you to the Fiori app. &nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Christopher_Ketzler_2-1744230817747.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/248930i44AB2C7DF9DE0118/image-size/medium?v=v2&amp;px=400" role="button" title="Christopher_Ketzler_2-1744230817747.png" alt="Christopher_Ketzler_2-1744230817747.png" /></span></P><P>Find the app router on the application tab.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Christopher_Ketzler_0-1744319570654.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/249506i73AFC66B653267E3/image-size/medium?v=v2&amp;px=400" role="button" title="Christopher_Ketzler_0-1744319570654.png" alt="Christopher_Ketzler_0-1744319570654.png" /></span></P><P>Follow the application route and access the fiori app.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Christopher_Ketzler_4-1744230817752.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/248928i85CC910A870ACDFD/image-size/medium?v=v2&amp;px=400" role="button" title="Christopher_Ketzler_4-1744230817752.png" alt="Christopher_Ketzler_4-1744230817752.png" /></span></P><P>&nbsp;</P><P><STRONG>Further information</STRONG>:</P><P><A href="https://www.youtube.com/watch?v=Jbq6zaKEUyY" target="_blank" rel="noopener nofollow noreferrer">https://www.youtube.com/watch?v=Jbq6zaKEUyY</A></P><P>&nbsp;</P> 2025-04-22T10:49:56.264000+02:00 https://community.sap.com/t5/technology-blog-posts-by-sap/introducing-application-frontend-service/ba-p/14091408 Introducing Application Frontend Service 2025-05-01T18:49:02.245000+02:00 NachshonVagmayster https://community.sap.com/t5/user/viewprofilepage/user-id/172862 <P><SPAN>As part of our exciting &nbsp;<A href="https://news.sap.com/2025/04/sap-build-sap-s4hana-cloud-simplify-development/" target="_blank" rel="noopener noreferrer">SAP Build&nbsp;</A>release, we're happy to announce the release of Application Frontend service, a new SaaS application on SAP Business Technology Platform (BTP) for hosting, serving and operating frontend applications.</SPAN></P><P><STRONG><SPAN>Next Generation Solution for hosting frontend applications</SPAN></STRONG></P><P><SPAN>Application Frontend serves as a single point of entry for hosting, serving and operating frontend applications. By consolidating all aspects of UI application management under one managed service, Application Frontend simplifies the development experience and enhances custom application operations.</SPAN></P><P><STRONG><SPAN>Bridging the Gap Between Neo and Multi-Cloud</SPAN></STRONG></P><P><SPAN>If you have been around SAP BTP for more than 10 years then, most likely, you have used the Neo environment. If you developed an HTML5 application in Neo, then you probably used the HTML5 Runtime. Many customers we met in the past years have reported that the snappy experience they had in Neo, when developing and operating HTML5 applications, was lost when moving to the multi-cloud environment, where the HTML5 Application Repository and the managed application router (approuter) are used.<BR />This feedback was received, noted and motivated us to come up with a new solution for managing HTML5 applications. A solution that will bring back the simplicity and flexibility customers liked so much in the Neo environment. With Application Frontend, we aim to bring that experience into the multi-cloud environment.</SPAN></P><P><SPAN>The first capabilities Neo fans will find familiar are host-based routing, the versioning concept and a direct deployment option. Additional capabilities like extended control from the SAP BTP cockpit will be added in the future.</SPAN></P><P><SPAN>But don’t get me wrong, Application Frontend is not a replica of HTML5 Runtime in Neo. It is a multi-cloud service compatible with the multi-cloud development model. We use the same descriptors used in HTML5 Repository and application router, ensuring that developers don't need to learn yet another paradigm.</SPAN></P><P><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Very high level architecture diagram" style="width: 940px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/256895iF79427327BDA4E46/image-size/large?v=v2&amp;px=999" role="button" title="Nachshon_1-1746115862062.png" alt="Very high level architecture diagram" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Very high level architecture diagram</span></span></SPAN></P><P>&nbsp;</P><P><STRONG><SPAN>A New SaaS application</SPAN></STRONG></P><P><SPAN>Application Frontend is a SaaS application which is not coupled to any specific SAP BTP runtime environment or other SAP BTP applications. You can find and subscribe to the service from the SAP BTP cockpit. Application Frontend is also equipped with a service broker to support interaction flows using service instances, for example when using MTA deploy in the CF environment.&nbsp;</SPAN></P><P><SPAN>While there is native support in the good old MTA concept for lifecycle management, Application Frontend also provides a command line interface (CLI) as a first-class tool for managing your applications. With the CLI, you can directly interact with the service and execute all actions supported by Application Frontend to enjoy fast response times and new integration opportunities.</SPAN></P><P>&nbsp;</P><P><STRONG><SPAN>Supported Use cases</SPAN></STRONG></P><P><SPAN>At the moment, Application Frontend supports hosting of single tenant, stand-alone applications. (S<EM>tand-alone&nbsp;</EM>means applications that are not embedding other applications.)<BR />In the future we will extend the supported use cases to cover more scenarios like applications dependencies, multi-tenancy, native SAP Build Work Zone integration, etc.<BR /></SPAN>Application Frontend is perfect if you have a Build license and developing new HTML5 applications or migrating existing ones from Neo.<BR /><SPAN>If the HTML5 Repository and application router are more suitable for your needs, please continue using them.</SPAN></P><P><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Application Frontend management UI in SAP BTP Cockpit" style="width: 940px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/256896iBBE43EDC9408A568/image-size/large?v=v2&amp;px=999" role="button" title="Nachshon_2-1746116072220.png" alt="Application Frontend management UI in SAP BTP Cockpit" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Application Frontend management UI in SAP BTP Cockpit</span></span></SPAN></P><P><SPAN>&nbsp;</SPAN><STRONG>Next steps</STRONG></P><P><SPAN>Application Frontend service is starting its journey. We will continuously release additional features to support new scenarios and delight your experience.<BR />In few weeks’ time, we will also make Application Frontend available in the SAP trial environment, so you can try it out more easily.<BR />Note: Application Frontend will reside next to the HTML5 Repository, and the managed Application Router (approuter) hosted in SAP Build Work Zone. Both services will continue to be available, supported and developed as needed.&nbsp; &nbsp;</SPAN></P><P><SPAN>&nbsp;<STRONG>How to get started</STRONG></SPAN></P><P><SPAN>SAP Build is available for subscription, more details in&nbsp;<A href="https://discovery-center.cloud.sap/serviceCatalog/sap-build?service_plan=default&amp;region=all&amp;commercialModel=subscription" target="_blank" rel="noopener nofollow noreferrer">SAP Discovery Center</A><BR /></SPAN><SPAN>Once you purchased SAP Build, follow <A href="https://help.sap.com/docs/application-frontend-service/application-frontend-service/initial-setup" target="_blank" rel="noopener noreferrer">these steps</A> for Application Frontend on-boarding.<BR />Check out this intro tutorial for&nbsp;<A class="" href="https://community.sap.com/t5/technology-blog-posts-by-sap/simple-ui-applications-with-application-frontend-service/ba-p/14096009" target="_blank">Simple UI Applications with Application Frontend Service</A>&nbsp;</SPAN></P><P>&nbsp;</P><P>&nbsp;</P> 2025-05-01T18:49:02.245000+02:00 https://community.sap.com/t5/technology-blog-posts-by-sap/simple-ui-applications-with-application-frontend-service/ba-p/14096009 Simple UI Applications with Application Frontend Service 2025-05-08T10:43:31.479000+02:00 VadimTomnikov https://community.sap.com/t5/user/viewprofilepage/user-id/1405055 <P>In the ever-evolving world of web UI applications, managed SaaS solutions are the preferred choice for hosting and serving UI applications. They offer efficiency and cost-effectiveness. SAP BTP provides robust solutions for UI applications from the early days of its cloud. The latest offering, <A href="https://community.sap.com/t5/technology-blog-posts-by-sap/introducing-application-frontend-service/ba-p/14091408" target="_self">Application Frontend service</A>, combines the best legacy features with new advancements in technology and infrastructure. In this post I’ll share with you how to get started with Application Frontend service using the CLI, but MTA and API are supported as well.</P><H2 id="toc-hId-1710216591">Prerequisites</H2><P>To proceed with this tutorial and try everything on your own, you’ll need a few things</P><UL><LI>An SAP BTP subaccount, where you have administrator privileges, with<UL><LI>An entitlement to use the “build-default” of Application Frontend service</LI><LI>Trust with SAP Cloud Identity tenant</LI></UL></LI><LI>Node.js v22.6.0 or later installed on your development environment</LI><LI>Application Frontend service CLI tool—afctl</LI></UL><P>To install the afctl, run</P><PRE>npm install -g @sap/appfront-cli</PRE><H2 id="toc-hId-1513703086">Setup</H2><P>To start working with Application Frontend service, you need to subscribe to it and grant yourself the permissions to use it.</P><OL><LI>In the SAP BTP cockpit, in the subaccount, go to Services &gt; Instances and Subscriptions. Then create a subscription the “build-default” of Application Frontend service.</LI><LI>In the subaccount, go to Security &gt; Role Collections. Then create a role collection (for example, Application Frontend Developer). Open the newly created role collection and add yourself as a user. Make sure the user is from an “application users” identity provider. Add the “Application_Frontend_Developer” role to the role collection and save.</LI></OL><H2 id="toc-hId-1317189581">Development &amp; Deployment</H2><P>Let’s develop an application that prints “Hello, &lt;NAME&gt;!”, where the &lt;NAME&gt; is the first name of the logged-in user. We’ll use Application Frontend’s built-in current user REST API, which returns the attributes of the logged-in user as JSON.</P><P>Application Frontend service is agnostic to the tools, development model, and UI frameworks that are used to develop UI applications. However, some application configuration files are required:</P><P>The manifest.json file should, at a minimum, declare application name and version in the following format:</P><pre class="lia-code-sample language-json"><code>{ "sap.app": { "id": "hello", "applicationVersion": { "version": "1.0.0" } } }</code></pre><P>The xs-app.json file, where the desired web server features, such as, the routing, the welcome file and authentication are configured. Some features, for example the authentication are enabled by default, and you have an option to switch them off in this file:</P><pre class="lia-code-sample language-json"><code>{ "welcomeFile": "/index.html", "routes": [{ "source": "^/user-api/currentUser$", "service": "sap-approuter-userapi" }, { "source": ".*", "service": "app-front" }] }</code></pre><P>With this example we configure 3 things:</P><UL><LI>If no specific path to the resource is present in the URL, send a redirect to /index.html</LI><LI>When the URL path is exactly /user-api/currentUser, send the JSON response with logged-in user attributes</LI><LI>For any other URL path, use the URL path as path to the static resource within deployed application</LI></UL><P>The index.html file would be the following:</P><pre class="lia-code-sample language-markup"><code>&lt;html&gt; &lt;head&gt; &lt;style&gt; body { display: grid; place-content: center; position: absolute; inset: 0; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Loading...&lt;/h1&gt; &lt;script&gt; fetch( './user-api/currentUser', {credentials: 'include'} ) .then(res =&gt; res.json()) .then(user =&gt; { const h1 = document.querySelector('h1'); h1.textContent = `Hello, ${user.firstname}!`; }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;</code></pre><P>To deploy the application, use afctl. The first thing, you need to do is to log in:</P><PRE>afctl login --sso -a &lt;api_endpoint&gt;</PRE><P>You can grab the &lt;api_endpoint&gt; from the Application Frontend service landing page. To open it, in the subaccount in the SAP BTP Cockpit, go to Services &gt; Instances and Subscriptions, and click on the Application Frontend service link.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Application Frontend Service - Landing Page.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/258686iE60A96D7CC1835BD/image-size/large?v=v2&amp;px=999" role="button" title="Application Frontend Service - Landing Page.png" alt="Application Frontend Service - Landing Page.png" /></span></P><P>Now, let’s open the terminal in the root folder of our application containing these 3 files and deploy UI application, using afctl:</P><PRE>afctl push</PRE><P>After a few seconds, you should see the runtime URL of deployed application.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="afctl-push.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/258690iDAA5893E664BED95/image-size/medium?v=v2&amp;px=400" role="button" title="afctl-push.png" alt="afctl-push.png" /></span></P><P>Open the link in the browser, log in with your SAP Cloud Identity (if you are not already logged in) and you’ll see “Hello, &lt;NAME&gt;!”, where &lt;NAME&gt; is the first name of the logged in user, in the middle of the web page.</P><P>That’s it! Very simple. No mess with infrastructure, servers, certificates, etc. Developing and deploying subsequent applications will be even simpler, since you already have everything set up.</P><H2 id="toc-hId-1120676076">What’s Next</H2><P>In this post we covered only the very basics of Application Frontend service. In the upcoming posts from the series, we’ll take a look at more advanced Application Frontend capabilities, including:</P><UL><LI>Accessing back-end systems</LI><LI>Setting up authorization</LI><LI>Securing UI application (CSRF, click-jacking, verb tampering, CSP, CORS)</LI><LI>Developing and deploying full-stack applications (MTA)</LI><LI>Managing application versions</LI><LI>Local preview</LI><LI>Integration with SAP BTP services and tools (SAP BTP cockpit, Business Application Studio, SAP Build Work Zone, SAP Fiori tools)</LI></UL><P>Stay tuned to learn more about what Application Frontend service has to offer already now and the future features to come. Happy coding!</P> 2025-05-08T10:43:31.479000+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/fiori-app-deployment-in-sap-btp-why-your-app-isn-t-where-you-think-it-is/ba-p/14121564 Fiori App Deployment in SAP BTP: Why Your App isn't where You think it is 2025-06-10T20:02:42.937000+02:00 AkumaryafirAk https://community.sap.com/t5/user/viewprofilepage/user-id/1430983 <H1 id="toc-hId-1603154407"><SPAN class="">Fiori App Deployment in SAP BTP: Why Your App Isn't Where You Think It Is</SPAN></H1><P><SPAN class="">When you're delving into SAP Business Technology Platform (BTP), especially with a trial account, every successful deployment feels like a mini victory. You build a Fiori app in SAP Business Application Studio (BAS), connect it to a data source (like the SAP Gateway Demo System), deploy it to BTP, and then confidently embed it into SAP Build Work Zone. Success!</SPAN></P><P><SPAN class="">But then, you decide to level up your DevOps game by configuring </SPAN><STRONG><SPAN class="">Cloud Transport Management Service (CTMS)</SPAN></STRONG><SPAN class="">. The goal: to understand how your precious Fiori app will move from a "development" environment to "QA" and "production" spaces. Naturally, you'd want to </SPAN><EM><SPAN class="">see</SPAN></EM><SPAN class=""> your app residing in your initial "DEV" Cloud Foundry space to confirm its source.</SPAN></P><P><SPAN class="">This is where my recent learning journey took an interesting turn, and it's a confusion I want to clarify for others.</SPAN></P><H2 id="toc-hId-1535723621"><SPAN class="">My "Where's My App?" Moment</SPAN></H2><P><SPAN class="">After deploying my Fiori app, my logical next step was to go to the BTP Cockpit, navigate to my subaccount, select </SPAN><FONT color="#99CC00"><STRONG><SPAN class="">Cloud Foundry &gt; Spaces</SPAN></STRONG></FONT><SPAN class="">, click into my "dev" space, and then look under </SPAN><FONT color="#FF6600"><STRONG><SPAN class="">Applications</SPAN></STRONG><SPAN class="">.</SPAN></FONT></P><P><SPAN class="">To my surprise, my Fiori app wasn't listed there! Panic. Did the deployment fail? Is it invisible? Yet, I could still access it perfectly fine from the </SPAN><FONT color="#99CC00"><STRONG><SPAN class="">HTML5 Applications</SPAN></STRONG></FONT><SPAN class=""> section in the BTP Cockpit and, more importantly, it was fully functional within SAP Build Work Zone.</SPAN></P><P><SPAN class="">This discrepancy sparked a deep dive into <FONT color="#FF6600">how Fiori apps are truly deployed on BTP</FONT>.</SPAN></P><H2 id="toc-hId-1339210116"><SPAN class="">CHECK the BTP Deployment Model for Fiori Apps</SPAN></H2><P><SPAN class="">The key to understanding this lies in the specialized nature of HTML5/UI5 application deployment on the Cloud Foundry environment within BTP.</SPAN></P><P><SPAN class="">When you deploy a Fiori/UI5 application from SAP BAS:</SPAN></P><OL><LI><P><STRONG><SPAN class=""><FONT color="#FF6600">It's Not a Standalone Cloud Foundry Application (Usually)</FONT>:</SPAN></STRONG><SPAN class=""> Unlike a typical backend service (e.g., a Node.js or Java application) that directly consumes Cloud Foundry resources and appears under "Applications" in a space, your Fiori app's static UI content (HTML, JavaScript, CSS, images) is usually </SPAN><EM><SPAN class="">not</SPAN></EM><SPAN class=""> deployed as an independent Cloud Foundry application instance.</SPAN></P></LI><LI><P><STRONG><SPAN class=""><FONT color="#FF6600">Enter the HTML5 Application Repository</FONT>:</SPAN></STRONG><SPAN class=""> Instead, your Fiori app's static content is deployed to the </SPAN><FONT color="#99CC00"><STRONG><SPAN class="">HTML5 Application Repository service</SPAN></STRONG></FONT><SPAN class="">. Think of this as a highly optimized, dedicated storage and serving mechanism specifically for front-end web applications. It's designed for efficient content delivery.</SPAN></P></LI><LI><P><STRONG><SPAN class=""><FONT color="#FF6600">The Approuter's Role</FONT>:</SPAN></STRONG><SPAN class=""> Your Fiori project likely incl<FONT color="#000000">udes an approuter</FONT></SPAN><FONT color="#000000"><SPAN class=""> module (or leverages a managed approuter service). The approuter&nbsp;</SPAN><SPAN class="">is</SPAN><SPAN class=""> a Cloud Foundry application instance that you will see listed in your space under </SPAN><SPAN class=""><FONT face="arial,helvetica,sans-serif" color="#000000">Cloud Foundry</FONT> -<FONT color="#000000">-<FONT face="arial,helvetica,sans-serif">&gt; Spaces --&gt; space &gt; Applications</FONT></FONT></SPAN><SPAN class="">. This approuter</SPAN><SPAN class="">&nbsp;acts as the single-entry point for your Fiori application. It handles:</SPAN></FONT></P><UL><LI><P><SPAN class="">Authentication (often via XSUAA).</SPAN></P></LI><LI><P><SPAN class="">Routing requests to your Fiori UI content (which is in the HTML5 Application Repository).</SPAN></P></LI><LI><P><SPAN class="">Routing requests to any backend services your Fiori app consumes.</SPAN></P></LI></UL></LI></OL><P><SPAN class="">So, while the </SPAN><FONT color="#000000"><FONT color="#008000"><SPAN class="">approuter</SPAN></FONT><SPAN class=""> is a visible Cloud Foundry application, your actual Fiori UI content lives in the </SPAN><SPAN class=""><FONT color="#000000"><FONT color="#008080">HTML5 Application Repository</FONT></FONT></SPAN><SPAN class="">, which is a service backing the </SPAN><FONT color="#339966"><SPAN class="">HTML5 Applications</SPAN></FONT><SPAN class=""> view in the BTP Cockpit.</SPAN></FONT></P><H2 id="toc-hId-1142696611"><SPAN class="">Checking Fiori App's True "Home"</SPAN></H2><P><SPAN class="">To truly visualize where your deployed Fiori app content resides, you need to check the </SPAN><STRONG><SPAN class="">HTML5 Applications</SPAN></STRONG><SPAN class=""> section:</SPAN></P><OL><LI><P><SPAN class="">Log in to your </SPAN><STRONG><SPAN class="">SAP BTP Cockpit</SPAN></STRONG><SPAN class="">.</SPAN></P></LI><LI><P><SPAN class="">Navigate to your </SPAN><STRONG><SPAN class="">Subaccount</SPAN></STRONG><SPAN class="">.</SPAN></P></LI><LI><P><SPAN class="">In the left-hand navigation, click on </SPAN><STRONG><SPAN class="">HTML5 Applications</SPAN></STRONG><SPAN class="">.</SPAN></P></LI><LI><P><SPAN class="">Here, you'll see a list of all your deployed HTML5 applications. Look for your Fiori app by its name.</SPAN></P></LI><LI><P><SPAN class="">Crucially, observe the </SPAN><STRONG><SPAN class="">"Space" column</SPAN></STRONG><SPAN class=""> for your Fiori app. You should see your initial "dev" space listed there.</SPAN></P></LI></OL><P><SPAN class="">if you are unable to see, click on settings icon and add the space column there, by default it's not there</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AkumaryafirAk_0-1749223207475.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/270945i20AD96217F600791/image-size/medium?v=v2&amp;px=400" role="button" title="AkumaryafirAk_0-1749223207475.png" alt="AkumaryafirAk_0-1749223207475.png" /></span></P><P>&nbsp;</P><P><SPAN class="">This confirms that your Fiori app's deployed content is indeed correctly placed within the HTML5 Application Repository associated with your </SPAN><SPAN class="">dev</SPAN><SPAN class=""> space.</SPAN></P><H2 id="toc-hId-946183106"><SPAN class="">Points to Remember:</SPAN></H2><UL><LI><P><FONT color="#008000"><SPAN class="">Fiori/UI5 apps are primarily deployed to the HTML5 Application Repository, not as direct Cloud Foundry application instances.</SPAN><SPAN class=""> The&nbsp; <STRONG>approuter</STRONG>&nbsp;</SPAN><SPAN class="">is the Cloud Foundry application that serves them.</SPAN></FONT></P></LI><LI><P><FONT color="#008000"><SPAN class="">The <STRONG>HTML Applications</STRONG>&nbsp;</SPAN><SPAN class="">section in the BTP Cockpit is your go-to place to monitor and confirm the deployment space of your Fiori apps.</SPAN></FONT></P></LI></UL><P>&nbsp;</P><P><FONT color="#008000"><SPAN class="">#sap #sapcommunity #sapbtp #sapcloud #sapbas #BAS #BusinessApplicationStudio</SPAN></FONT></P> 2025-06-10T20:02:42.937000+02:00 https://community.sap.com/t5/technology-blog-posts-by-sap/application-frontend-service-now-generally-available-in-sap-btp-trail/ba-p/14134649 Application Frontend Service now generally available in SAP BTP Trail Account [cf us10-XXX] 2025-06-23T17:44:52.329000+02:00 Yogananda https://community.sap.com/t5/user/viewprofilepage/user-id/75 <P>As part of our exciting &nbsp;<A href="https://news.sap.com/2025/04/sap-build-sap-s4hana-cloud-simplify-development/" target="_blank" rel="noopener noreferrer">SAP Build&nbsp;</A>release, we're happy to announce the release of Application Frontend service, a new SaaS application on SAP Business Technology Platform (BTP) Trail account for US region for hosting, serving and operating frontend applications.</P><P><FONT color="#800080"><STRONG>SAP BTP Trial accounts can be deployed with limited to five(5) applications per subaccount.</STRONG></FONT></P><P><SPAN>Now, you can enjoy the following benefits of Application Frontend Service</SPAN><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-23_17-38-48.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/277755iE9E06693A5AA57C9/image-size/large?v=v2&amp;px=999" role="button" title="2025-06-23_17-38-48.png" alt="2025-06-23_17-38-48.png" /></span></P><H4 id="toc-hId-1991416362">What is Application Frontend Service?</H4><P>Host, serve, and manage frontend applications to extend SAP business solutions.</P><P>Application Frontend service lets you host and serve frontend applications. It serves as a single entry point for hosting web-based UI applications to extend SAP's business solutions. The service provides tools for deploying and managing applications, serving static resources, routing backend calls to defined targets, and observability tools.</P><P>Application Frontend service is included in the <STRONG>SAP Build.</STRONG></P><P><STRONG>Application Frontend service</STRONG> supports various channels for managing applications, such as the commonly used Generic Application Content Deployer (GACD) for multitarget applications (MTA), a dedicated UI in the cockpit, and a CLI. These options allow you to choose the channel that best suits your needs.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="loio6bb9594f083943cba1be41d78529d63e_LowRes.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/277945iB09031D7D128BE84/image-size/large?v=v2&amp;px=999" role="button" title="loio6bb9594f083943cba1be41d78529d63e_LowRes.png" alt="loio6bb9594f083943cba1be41d78529d63e_LowRes.png" /></span></P><P><SPAN>Application Frontend is a SaaS application which is not coupled to any specific SAP BTP runtime environment or other SAP BTP applications. You can find and subscribe to the service from the SAP BTP cockpit. Application Frontend is also equipped with a service broker to support interaction flows using service instances, for example when using MTA deploy in the CF environment.&nbsp;</SPAN></P><P><SPAN>While there is native support in the good old MTA concept for lifecycle management, Application Frontend also provides a command line interface (CLI) as a first-class tool for managing your applications. With the CLI, you can directly interact with the service and execute all actions supported by Application Frontend to enjoy fast response times and new integration opportunities.</SPAN></P><H3 id="toc-hId-1665820138"><FONT color="#000080"><STRONG>High Level Overview of Application Frontend Service - Deployment</STRONG></FONT></H3><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yogananda_0-1750692504909.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/277750i367CF3645161F50B/image-size/large?v=v2&amp;px=999" role="button" title="Yogananda_0-1750692504909.png" alt="Yogananda_0-1750692504909.png" /></span></P><H4 id="toc-hId-1598389352"><FONT color="#0000FF">Prerequisites to enable Application Frontend Serivce</FONT></H4><UL><LI>Go to your SAP BTP Trail Account - Subaccount</LI><LI>Go to your Instance and Subscription - Subscribe for SAP Cloud Identity Services</LI><LI>Enable SAP IAS and Trust &amp; Auth with enabled SAP IAS</LI><LI>Go to Entitlements - Select Application Frontend Service</LI><LI>Select 2 checkbox for enabling the Plan (Developer and Application)&nbsp;</LI><LI>Create a Role Collections and Assign to your User (SAP IAS enabled)</LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-23_16-52-00.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/277717i65B8B0D72C2AE8A0/image-size/large?v=v2&amp;px=999" role="button" title="2025-06-23_16-52-00.png" alt="2025-06-23_16-52-00.png" /></span></P><P>Go to Instances and Subscription - Select&nbsp;<STRONG>Application Frontend Service </STRONG>from dropdown with<STRONG> Plan - Trial</STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-23_17-15-43.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/277739i6DBE24643606A45F/image-size/large?v=v2&amp;px=999" role="button" title="2025-06-23_17-15-43.png" alt="2025-06-23_17-15-43.png" /></span></P><P>Go to Instances and Subscription - Select&nbsp;<STRONG>Application Frontend Service </STRONG>with<STRONG> Plan - Developer</STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-23_17-17-55.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/277725i18BA3186F9BB8ED7/image-size/large?v=v2&amp;px=999" role="button" title="2025-06-23_17-17-55.png" alt="2025-06-23_17-17-55.png" /></span></P><H4 id="toc-hId-1401875847"><FONT color="#000080">Create a New Role Collection</FONT></H4><P><FONT color="#000080"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-26_09-06-10.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/279037iCE7D01FBD3CA2ED8/image-size/large?v=v2&amp;px=999" role="button" title="2025-06-26_09-06-10.png" alt="2025-06-26_09-06-10.png" /></span></FONT></P><H4 id="toc-hId-1205362342"><FONT color="#000080">Assign Role to newly created Role Collection</FONT><FONT color="#000080"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-26_09-07-30.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/279038i0FA174F0ABE7EC0B/image-size/large?v=v2&amp;px=999" role="button" title="2025-06-26_09-07-30.png" alt="2025-06-26_09-07-30.png" /></span></FONT></H4><H4 id="toc-hId-1008848837"><FONT color="#000080"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-26_09-08-05.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/279039iF7D252D50CC7E421/image-size/large?v=v2&amp;px=999" role="button" title="2025-06-26_09-08-05.png" alt="2025-06-26_09-08-05.png" /></span></FONT></H4><H4 id="toc-hId-812335332"><FONT color="#000080">Application Frontend Service Library &amp; CLI (Command Line)</FONT></H4><pre class="lia-code-sample language-json"><code>npm install -g /appfront-cli afctl login --sso -a &lt;api_endpoint&gt; afctl push</code></pre><H4 id="toc-hId-615821827">&nbsp;</H4><H4 id="toc-hId-419308322">Conclusion</H4><P><STRONG>Application Frontend Service</STRONG> is a game-changer for Cloud Foundry users. By simplifying UI development, enhancing scalability, and promoting consistency, AFS empowers developers to create high-quality applications more efficiently. As cloud-native development continues to evolve, integrating tools like AFS will be crucial in staying ahead of the curve and delivering exceptional user experiences.</P><P>For more detailed insights, you can check out the original blog posts :&nbsp;</P><UL><LI>Introducing Application Frontend Service&nbsp;:&nbsp;<A href="https://community.sap.com/t5/technology-blog-posts-by-sap/introducing-application-frontend-service/ba-p/14091408" target="_blank">Application Frontend Service</A>&nbsp;</LI><LI>Simple UI Applications with Application Frontend Service&nbsp;:&nbsp;<A href="https://community.sap.com/t5/technology-blog-posts-by-sap/simple-ui-applications-with-application-frontend-service/ba-p/14096009" target="_blank">DEV Community</A></LI><LI>Application Frontend Service Help Documentation : <A href="https://help.sap.com/docs/application-frontend-service" target="_blank" rel="noopener noreferrer">Guide and Development</A></LI><LI>Application Frontend Service Onboarding Service -&nbsp;&nbsp;<A title="https://help.sap.com/docs/application-frontend-service/application-frontend-service/setup-in-sap-btp-trial" href="https://help.sap.com/docs/application-frontend-service/application-frontend-service/setup-in-sap-btp-trial" target="_blank" rel="noopener noreferrer">AppFront trial on-boarding help page</A></LI></UL><P>&nbsp;</P> 2025-06-23T17:44:52.329000+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/running-a-sapui5-app-from-a-previous-commit-without-affecting-remote/ba-p/14139276 Running a SAPUI5 App from a Previous Commit Without Affecting Remote Repository 2025-07-02T11:18:21.259000+02:00 Myvizhipriya_Thangaraj_2810 https://community.sap.com/t5/user/viewprofilepage/user-id/1477011 <P><STRONG>Introduction</STRONG></P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ever needed to test or run your SAPUI5 application from an earlier commit without disturbing your current branch or affecting the remote repository? Whether it's for debugging, rollback testing, or feature validation, Git provides a safe and clean way to do this — using detached HEAD state and local branches. Here's a step-by-step guide to achieve just that.</P><P>&nbsp;</P><P><STRONG>Step-by-Step: Run an Older Version of Your SAPUI5 App Safely</STRONG></P><P><STRONG>Step 1: View Commit History</STRONG></P><P>To identify which commit you want to revisit:</P><P><EM><STRONG>git log --oneline</STRONG></EM></P><P>This will display recent commits with their short hash and message. Identify the one that's 4 commits back or use:</P><P><EM><STRONG>git checkout HEAD~4</STRONG></EM></P><P>&nbsp;</P><P><STRONG>Step 2: Checkout the Older Commit</STRONG></P><P><EM><STRONG>git checkout &lt;commit-hash&gt;</STRONG></EM></P><P>Or for 4 commits ago:</P><P><EM><STRONG>git checkout HEAD~4</STRONG></EM></P><P>This moves you into a detached HEAD state, a safe mode where changes don’t impact your current branch.</P><P>&nbsp;</P><P><STRONG>Step 3: Run Your SAPUI5 Application</STRONG></P><P>Use your usual development server to run the app:</P><P><STRONG><EM>ui5 serve</EM></STRONG></P><P>or</P><P><EM><STRONG>npm start</STRONG></EM></P><P>Your app now runs exactly as it existed 4 commits ago.</P><P>&nbsp;</P><P><STRONG>Step 4: (Optional) Create a Local Test Branch</STRONG></P><P>If you want to make edits or test features in that older state:</P><P><EM><STRONG>git checkout -b temp-test-branch</STRONG></EM></P><P>This lets you commit and experiment locally — no impact on the remote repo.</P><P>&nbsp;</P><P><STRONG>Step 5: Return to Your Latest Code</STRONG></P><P>Once done, simply switch back to your latest working branch:</P><P><EM><STRONG>git checkout main</STRONG></EM></P><P>&nbsp;</P><P><STRONG>Why This Approach is Safe?</STRONG></P><P><STRONG>-</STRONG> No changes are pushed to the remote.</P><P><STRONG>-</STRONG> The main branch and its history remain intact.</P><P><STRONG>-</STRONG> You can safely test, debug, or demo older versions of your app.</P><P><STRONG>-</STRONG> Great for testing fixes without branching off prematurely.</P><P>&nbsp;</P><P><STRONG>Conclusion</STRONG></P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Testing previous versions of your SAPUI5 app doesn't need to be risky. By using Git's detached HEAD mode and optional local branches, you gain full control without affecting your project's main history or remote repo. It’s a clean, safe, and professional way to revisit and test the past.</P><P>&nbsp;</P><P>Thank you for taking the time to read this blog!</P><P>If you found this helpful, feel free to share your thoughts, feedback, or questions in the comments! Let's keep learning and growing together. Happy coding!&nbsp;</P><P>Hello experts, please feel free to correct me if any information is inaccurate.</P> 2025-07-02T11:18:21.259000+02:00 https://community.sap.com/t5/technology-blog-posts-by-sap/version-control-made-simple-with-application-frontend-service/ba-p/14152775 Version Control Made Simple with Application Frontend Service 2025-07-29T19:44:46.412000+02:00 TaliaGurevich https://community.sap.com/t5/user/viewprofilepage/user-id/480172 <P>As developers, we all know that deploying a new version of an application can be both exciting and risky. Whether you’re rolling out a minor UI fix or launching a major redesign, the ability to manage multiple versions with confidence is key to a smooth delivery process.</P><P>With <A href="https://community.sap.com/t5/technology-blog-posts-by-sap/introducing-application-frontend-service/ba-p/14091408" target="_self">Application Frontend Service</A>, version management is built in from the start, letting you deploy, view, roll back, and promote frontend versions directly from the CLI or SAP BTP Cockpit. In this post, we’ll show you how it works and how to make the most of it.</P><H3 id="toc-hId-1864122153"><STRONG>Why Version Management Matters</STRONG></H3><P>Application Frontend Service allows you to host and serve UI applications in SAP BTP. But what happens when a bug slips through? Or when you need to test a new version without affecting your end users?</P><P>That’s where the versioning concept in Application Frontend Service comes in.</P><P>Application Frontend Service supports multiple coexisting versions of the same application, each one deployed independently and maintained separately.<BR />In the manifest.json file of your application, you define the version name using the applicationVersion property. This allows you to deploy multiple versions of the same application, all sharing the same application ID but with different version identifiers.</P><P>Every version:</P><UL><LI>Has its dedicated version-specific URL</LI><LI>Can reference different services and codebases</LI><LI>Can be tested or validated in parallel with the current live version</LI></UL><P>Each application has exactly one active version at any given time. The active version is served from the application’s main URL. All other versions are accessible only via their version-specific URLs.<BR />The active version is the version that is available to the end users.</P><P>When you deploy an application, it becomes the active version by default, served at the application’s main URL. But you can also deploy a version without activating it, test it safely, and switch to it later with a single command.<BR /><BR /></P><H3 id="toc-hId-1667608648">Real-Life Example: Test and Promote with Zero Downtime<BR /><BR /></H3><P>Let’s say you’ve deployed version 0.0.1 of your application, myApp, and it’s running smoothly in production. You’re now working on version 0.0.2 with a few improvements or new features. With Application Frontend Service, you can deploy version 0.0.2 without making it active right away.</P><P>Each application in Application Frontend Service is assigned a unique <STRONG>main URL</STRONG> when it is first deployed. For example:</P><P>https:<SPAN>//myapp-wscfr.eu10.appfront.cloud.sap<BR /><BR /></SPAN><SPAN>This main URL always returns the </SPAN>currently active version<SPAN> of the application.</SPAN></P><P>In addition, each deployed version receives its&nbsp;<STRONG>version-specific URL</STRONG>, such as:</P><P>https:<SPAN>//myapp-wscfr-v0_0_1.eu10.appfront.cloud.sap<BR /></SPAN>https:<SPAN>//myapp-wscfr-v0_0_2.eu10.appfront.cloud.sap</SPAN></P><P>With Application Frontend Service, you can:</P><UL><LI>Deploy version 0.0.2 without activating it</LI><LI>Access it directly through its version-specific URL:<BR /><A href="https://myapp-wscfr-v0_0_2.eu10.appfront.cloud.sap" target="_blank" rel="noopener nofollow noreferrer">https://myapp-wscfr-v0_0_2.eu10.appfront.cloud.sap</A></LI><LI>Let your testers or internal users try it out</LI><LI>Keep version 0.0.1 active and served via the main URL</LI><LI>Once validated, promote version 0.0.2 to active,&nbsp;and your main URL:&nbsp;<A href="https://myapp-wscfr.eu10.appfront.cloud.sap" target="_blank" rel="noopener nofollow noreferrer">https://myapp-wscfr.eu10.appfront.cloud.sap</A> will now serve the new version to all users</LI></UL><P>All of this happens without downtime, without breaking the existing deployment, and without overwriting any previously deployed version.</P><H3 id="toc-hId-1471095143">Controlling Activation During Deployment<BR /><BR /></H3><P>In the previous example, we saw how useful it is to deploy a new version without activating it right away.<BR />By default, any new deployment to the Application Frontend Service becomes the active version. But if you want to delay activation, for example, to perform internal validation, you can control this behavior in two ways, depending on how you deploy.</P><H4 id="toc-hId-1403664357">When deploying an application using the GACD (Generic Application Content Deployer) module<BR /><BR /></H4><P>If you are deploying a multi-target application (MTA), you can prevent automatic activation by setting <STRONG>activateVersion: false</STRONG> under the parameters of the GACD module in your <STRONG>mta.yaml</STRONG> file:</P><pre class="lia-code-sample language-yaml"><code>... parameters: config: activateVersion: false destinations: - name: ui5 url: https://ui5.sap.com</code></pre><H4 id="toc-hId-1207150852">When deploying with afctl push<BR /><BR /></H4><P>If you're using the <A href="https://www.npmjs.com/package/@sap/appfront-cli" target="_blank" rel="noopener nofollow noreferrer">Application Frontend service CLI</A> to deploy applications, you can achieve the same behavior using one of the following options:</P><UL><LI>Pass the&nbsp;<EM>--no-activate</EM>&nbsp;(or<EM>-n</EM>) flag to the <STRONG>afctl push</STRONG> command:</LI></UL><pre class="lia-code-sample language-bash"><code>afctl push &lt;path-to-app&gt; -n</code></pre><UL><LI>Or set <STRONG>"activateVersion": false</STRONG> in the configuration file (e.g., conf.json):</LI></UL><pre class="lia-code-sample language-json"><code>{ "activateVersion": false }</code></pre><P><STRONG>Note:</STRONG> If both the CLI flag and the configuration file contain activation settings, the CLI flag takes precedence.</P><P>For example, the following command uses a configuration file that may contain "activateVersion": true, but the&nbsp;<EM>-n</EM>&nbsp;flag overrides it and prevents activation:<BR /><BR /></P><pre class="lia-code-sample language-bash"><code>afctl push &lt;path-to-app&gt; -c conf.json -n</code></pre><P>With either method, the new version will be deployed and accessible via its version-specific URL. Still, the application’s main URL will continue to serve the currently active version until you explicitly promote the new one.<BR /><BR /></P><H3 id="toc-hId-881554628">Managing Application Versions in SAP BTP Cockpit<BR /><BR /></H3><P>To access the Application Frontend UI in SAP BTP Cockpit, your user must be assigned the <STRONG>Application Frontend Viewer</STRONG> role. To activate or delete versions, you need the <STRONG>Application Frontend Developer</STRONG> role.<BR /><BR /></P><H4 id="toc-hId-814123842">Viewing Your Applications<BR /><BR /></H4><OL><LI>In the left-hand navigation bar of the SAP BTP Cockpit, choose <STRONG>HTML5 / Application Frontend</STRONG>.</LI><LI>You'll see a list of applications that have been deployed to the Application Frontend Service in your subaccount.</LI><LI>For each application, you can see its active version.</LI><LI>To open and run an application, you can click either the application name or the active version.</LI><LI>If you choose to delete an application, all of its versions (including the active one) will be permanently deleted.</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_0-1752574215819.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286821iB765808E3BEDD4DF/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_0-1752574215819.png" alt="talia_gurevich_0-1752574215819.png" /></span></P><H4 id="toc-hId-617610337">Viewing and Managing Versions</H4><P>To see all deployed versions of an application:</P><OL><LI>Click anywhere on the row of the application.</LI><LI>A detail pane will open on the right, showing all the deployed versions of that application.</LI></OL><P>Here you can activate versions, delete them, or view logs for a specific version.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_0-1752574583371.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286823i47BDD3711ADA2159/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_0-1752574583371.png" alt="talia_gurevich_0-1752574583371.png" /></span></P><P>To change the active version of an application:</P><UL><LI>Click the <STRONG>Activate version</STRONG> icon on the version you want to promote.</LI><LI>The active version indicator will move to that version.</LI></UL><P>Only one version of an application can be active at a time.</P><P>To delete a specific version of an application:</P><UL><LI>Click the <STRONG>Delete</STRONG> icon on the version you want to remove</LI></UL><P><STRONG>Note:</STRONG> This action is permanent. Deleted versions cannot be recovered.</P><P><STRONG>Additional Notes</STRONG></P><UL><LI>You cannot delete an active version. To delete an active version, you must first activate another one.</LI><LI>An application can have a maximum of 10 versions. Once this limit is reached, you must delete older versions before deploying new ones.</LI></UL><P>Let’s see how all of this looks in a real example.</P><P>I have deployed an application called “employees.” It currently has a single version, 1.0.0, which was activated by default on deployment.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_2-1752574801668.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286833i0777E7B2C4222B47/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_2-1752574801668.png" alt="talia_gurevich_2-1752574801668.png" /></span></P><P>This is how the application looks:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_1-1752574776815.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286830iC8203176475E45A0/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_1-1752574776815.png" alt="talia_gurevich_1-1752574776815.png" /></span></P><P>Note the URL. This is the main URL of the application.</P><P>I can also run the same version using its version-specific URL:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_3-1752574881947.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286836i038BCC78F7B6392B/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_3-1752574881947.png" alt="talia_gurevich_3-1752574881947.png" /></span></P><P>Now I want to enhance the application by adding search and sort controls, and I also want to remove the “Employees Overview” title.</P><P>After making these changes, I deploy version 2.0.0 of the application using the <EM>--no-activate</EM> flag, meaning this version will not become active immediately.</P><P>At this point, two versions of the application exist:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_4-1752575034543.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286844i104F93FBD559FE5D/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_4-1752575034543.png" alt="talia_gurevich_4-1752575034543.png" /></span></P><P>Since the new version was not activated, the main application URL still serves version 1.0.0 - without the new features:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_5-1752575090457.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286845iEC272255AAC6E48B/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_5-1752575090457.png" alt="talia_gurevich_5-1752575090457.png" /></span></P><P>However, I can access and test version 2.0.0 using its version-specific URL:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_6-1752575121321.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286846i1092433104C01773/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_6-1752575121321.png" alt="talia_gurevich_6-1752575121321.png" /></span></P><P>The search and sort controls are visible, and everything is working as expected.</P><P>Next, I activate version 2.0.0.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_7-1752575154204.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286847i700C9109E4F22874/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_7-1752575154204.png" alt="talia_gurevich_7-1752575154204.png" /></span></P><P>Now version 2.0.0 is active.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_8-1752575197088.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286848i6A8B3DCFF6CB104F/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_8-1752575197088.png" alt="talia_gurevich_8-1752575197088.png" /></span></P><P>The main application URL serves the updated version with the new features:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_9-1752575228405.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286849iE2CDCB585133339F/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_9-1752575228405.png" alt="talia_gurevich_9-1752575228405.png" /></span></P><P>The previous version, 1.0.0, remains available through its version-specific URL, and I can roll back to it if needed:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_10-1752575265942.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286850i0FC6ADD8D02D6CCA/image-size/large?v=v2&amp;px=999" role="button" title="talia_gurevich_10-1752575265942.png" alt="talia_gurevich_10-1752575265942.png" /></span></P><H3 id="toc-hId-292014113">Managing Application Versions with the Application Frontend Service CLI</H3><P>You can perform the same version management actions using the&nbsp;<A href="https://www.npmjs.com/package/@sap/appfront-cli" target="_blank" rel="noopener nofollow noreferrer">Application Frontend service CLI</A>.<BR />To activate or delete versions, you need the <STRONG>Application Frontend Developer</STRONG> role.</P><P><STRONG>Activate a version</STRONG></P><P>To activate a specific version of an application, use:</P><pre class="lia-code-sample language-bash"><code>afctl activate APPLICATION VERSION</code></pre><P><STRONG>Arguments:</STRONG></P><UL><LI>APPLICATION – Name of the deployed application</LI><LI>VERSION – Name of the application version you want to activate</LI></UL><P><STRONG>Delete a version</STRONG></P><P>To delete a specific version:</P><pre class="lia-code-sample language-bash"><code>afctl delete APPLICATION VERSION</code></pre><P><FONT color="#FF0000"><STRONG>Caution: </STRONG></FONT>If you don't specify an application version, all versions of the application will be deleted. This action cannot be undone.</P><P><STRONG>View all versions<BR /></STRONG>To view versions, your user must be assigned the <STRONG>Application Frontend Viewer</STRONG> role.<STRONG><BR /></STRONG></P><P>To list all deployed versions of an application:</P><pre class="lia-code-sample language-bash"><code>afctl list APPLICATION</code></pre><P>For example, if you run afctl list employees after activating version 2.0.0 in the example above, the output would show all available versions, including the active one.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talia_gurevich_12-1752575684949.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/286854i6E3210515F1D3057/image-size/medium?v=v2&amp;px=400" role="button" title="talia_gurevich_12-1752575684949.png" alt="talia_gurevich_12-1752575684949.png" /></span></P><P>As you can see, with built-in versioning and flexible deployment options, Application Frontend Service makes it easy to deliver updates with confidence.<BR />Whether you work in the SAP BTP Cockpit or prefer the CLI, you can roll out changes safely without impacting the live version during development or testing.</P> 2025-07-29T19:44:46.412000+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/sap-cap-lessons-learned-reject-error-message-missing-on-html5-repository/ba-p/14280009 SAP CAP Lessons Learned: Reject error message missing on HTML5 Repository app? 2025-11-28T15:41:23.691000+01:00 LucasMagriniRigo https://community.sap.com/t5/user/viewprofilepage/user-id/1484354 <P>Good day fellow CAPpers,</P><P>Today I'll share one of the lessons I've learned working with CAP, something that may not be clear in the current tutorials or documentation. When running locally, or even in BTP on a Cloud Foundry-based front end, whenever you <A href="https://cap.cloud.sap/docs/node.js/events#req-reject" target="_self" rel="nofollow noopener noreferrer">reject a request</A>, you would expect that the message appears to the user:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="error message - error description.png" style="width: 415px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/346444i542E715A44EAD485/image-size/large?v=v2&amp;px=999" role="button" title="error message - error description.png" alt="error message - error description.png" /></span></P><P>The top bold message is in the front end SAPUI5 app, and the bottom, the description, comes from CAP, in the <EM>req.reject</EM> call:</P><pre class="lia-code-sample language-javascript"><code>try { const con = await cds.connect.to('SERVICE_SRV'); let entry; // ... const result = await con.run( INSERT.into(EntitySet).entries(entry) ); } catch (err) { req.reject(500, err.message); }</code></pre><P>This executes as expected on CAP, both locally and on BTP. However, in the front end, the message is only displayed locally, not on BTP if the app is <U>deployed on the <STRONG>HTML5 Application Repository</STRONG></U>:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="error message - internal server error.png" style="width: 416px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/346447i9B13A6C64A5171EF/image-size/large?v=v2&amp;px=999" role="button" title="error message - internal server error.png" alt="error message - internal server error.png" /></span></P><P>&nbsp;This gave me a big headache, especially because a few weeks earlier it was displaying fine, whereas now the message is lost and replaced for "Internal Server Error".</P><P>I even <A href="https://cap.cloud.sap/docs/tools/cds-cli#remote-applications" target="_self" rel="nofollow noopener noreferrer">debugged remotely the CAP app</A> running on BTP to double check, and the error message was correctly set there, on the <EM>req.reject</EM> statement.</P><P>Finally, I resorted and opened a case (ticket, incident) for SAP. After providing the <A href="https://github.com/lucasrigo-numen/case-cap-html5" target="_self" rel="nofollow noopener noreferrer">required test code</A>, they gave me a solution:&nbsp;<STRONG>replace the 500 code for</STRONG> <STRONG>400</STRONG>.</P><P>I chose 500 because out of the <A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status" target="_self" rel="nofollow noopener noreferrer">HTTP response status codes</A>, 500 is for server errors. Since the error message I wanted to display was on the server side, I opted for 500. But apparently, you should always stick to 400 (client error) to make it work.</P><P>SAP failed to provide me an explanation to this behavior of the HTML5 Application Repository, and its behavior is like of a black box, where we can't see what's happening inside.</P><P>&nbsp;</P><P><STRONG>TLDR</STRONG></P><P>Therefore, whenever you want to <U>reject a request in CAP</U> AND <U>send the error message</U> to the user with the details of the error AND you have <U>deployed your app in the HTML5 Repo</U>, <STRONG>use HTTP code 400</STRONG>.</P><P>&nbsp;</P><P>May this post help you on your troubleshooting. Reply if you find any issues so I, and the community, can help.</P><P>Lucas Magrini Rigo</P> 2025-11-28T15:41:23.691000+01:00