https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/SAP-Business-Application-Studio-blog-posts.xml SAP Community - SAP Business Application Studio 2024-05-20T17:00:50.343612+00:00 python-feedgen SAP Business Application Studio blog posts in SAP Community https://community.sap.com/t5/technology-blogs-by-sap/harnessing-generative-ai-capabilities-with-sap-hana-cloud-vector-engine/ba-p/13649019 Harnessing Generative AI Capabilities with SAP HANA Cloud Vector Engine - Part 1 [Architecture] 2024-03-27T07:27:12.706000+01:00 Vivek-RR https://community.sap.com/t5/user/viewprofilepage/user-id/143545 <P>As we approach the close of the first quarter, we're excited to announce the availability of the "Vector Engine" feature in SAP HANA Cloud as part of the QRC1 Release. This new feature is set to enhance the multi-model capabilities of SAP HANA Cloud by incorporating vector database capabilities for storing embeddings. Embeddings are instrumental in transforming high-dimensional data into a more manageable, lower-dimensional format, thereby simplifying the understanding of complex and unstructured data such as text, images, or user behavior.</P><P>Moreover, the integration of the SAP HANA Cloud Vector Engine with the Generative AI Hub for accessing Large Language Models (LLMs) will empower our customers to develop robust AI-based applications and reporting solutions, all while complying with our governance and <A href="https://www.sap.com/products/artificial-intelligence/ai-ethics.html?pdf-asset=a8431b91-117e-0010-bca6-c68f7e60039b&amp;page=1" target="_blank" rel="noopener noreferrer">ethical</A> framework.</P><P>Numerous blogs on our SAP Community/Medium delve into the concepts of the SAP HANA Cloud Vector Engine. For a comprehensive understanding of the basics and features of SAP HANA Cloud, Shabana's <A href="https://community.sap.com/t5/technology-blogs-by-sap/vectorize-your-data-sap-hana-cloud-s-vector-engine-for-unified-data/ba-p/13579558" target="_blank">blog</A> is a great resource. In this discussion, we will concentrate on the use case we published for the Discovery Mission and the scenarios it encompasses.</P><P>We have launched an SAP Discovery Mission that covers the basics of SAP HANA Cloud Vector Engine, embedding texts by accessing the foundation models from SAP Generative AI Hub or Azure Open AI. And deploying the RAG application using SAP CAP.&nbsp; We have provided all the repositories as part of the mission and here is the link to our Discovery Mission: <A href="https://discovery-center.cloud.sap/missiondetail/4405/4691/?tab=overview" target="_blank" rel="noopener nofollow noreferrer"><STRONG>Harnessing Generative AI Capabilities with SAP HANA Cloud Vector Engine</STRONG></A></P><P>In this blog series, I will discuss the architecture and detail one of those scenarios in the follow-up blogs. For the remaining scenarios, I encourage you to subscribe to the Discovery Mission to gain access to Git repositories and Python scripts.</P><H3 id="toc-hId-1119042334"><STRONG>What is the ideal use case for this Discovery Mission?</STRONG></H3><P>Consider a hypothetical healthcare client, referred to as Client X, who has data stored across multiple systems, including SAP, Salesforce, and external platforms. This data could consist of customer interactions such as calls or emails to their call centers, which could be inquiries, service requests, or feedback about the services offered by the healthcare company.</P><P>Client X is interested in leveraging SAP HANA Cloud to process this unstructured data, enabling their business to run direct queries on feedback or transcribed phone calls. This enriched information can then be used for reporting purposes. For instance, if the business asks, "Display all service requests from the past two weeks," the system should be capable of scanning all transcribed texts, analyzing the content to distinguish between service requests and feedback, and delivering the relevant customer texts for the business to act upon. This scenario provides a clear illustration of how:</P><OL><LI>SAP HANA Cloud can access multiple Large Language Models (LLMs) from the SAP Generative AI Hub (GenAI Hub) and embed the transcribed texts.</LI><LI>The SAP GenAI Hub SDKs enable seamless access to LLMs.</LI><LI>SAP HANA Cloud can access JSON documents either from a Data Lake or from JSON Document Collections within SAP HANA Cloud itself.</LI><LI>The SAP Langchain plugin aids in the ingestion of embedded data into SAP HANA Cloud.</LI><LI>The Vector Engine can be leveraged to query the embedded texts in SAP HANA Cloud based on user prompts.</LI></OL><P>While we cannot provide actual customer data due to privacy concerns, we will substitute it with JSON reviews about various products or restaurants that will demonstrate all the points mentioned above. We have included a schema as part of the Discovery Mission, and we will also share some scenarios and code snippets in our upcoming blogs.</P><H3 id="toc-hId-922528829"><STRONG>What about the architecture for the use case leveraging SAP HANA Cloud Vector Engine and Large Language Models(LLMs) from Generative AI Hub?</STRONG></H3><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VivekRR_0-1711416712699.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86233iEA94E643E59D0F06/image-size/large?v=v2&amp;px=999" role="button" title="VivekRR_0-1711416712699.png" alt="VivekRR_0-1711416712699.png" /></span></P><P>The architecture we're discussing consists of two main phases: data ingestion and user interaction. Let's dive into the details:</P><P>Phase 1: Data Ingestion (Steps 1-3) &amp;&nbsp;Phase 2: User Interaction (Steps 4-8)</P><OL><LI>We kick things off by reading customer reviews from an Azure data lake and ingesting the data as JSON documents into our system. We'll provide the schema for these JSON documents as part of this Discovery Mission but will access the Data Lake as part of the blog series and walk you through the code.</LI><LI>Next, we leverage the power of the GenAI Hub SDKs and the langchain plugin to read the JSON documents from SAP HANA Cloud and embed them using <STRONG>text-embedding-ada-002</STRONG> (LLMs) from Generative AI Hub.</LI><LI>With the embeddings obtained, we ingest the data back into SAP HANA Cloud using the langchain plugin, setting the stage for the next phase.</LI><LI>Users can now interact with the deployed CAP app by prompting it with queries related to restaurant reviews.</LI><LI>The app utilizes the destination service to connect to LLMs from the GenAI Hub and embeds the user's prompt.</LI><LI>This embedded prompt is then queried against the vectors ingested in Step 3, allowing us to retrieve relevant information.</LI><LI><P>Before presenting the results to the user, we access the <STRONG>tiiuae--falcon-40b-instruct</STRONG>(LLMs)from the GenAI Hub to analyze the sentiment of the retrieved text, adding an extra layer of context.</P></LI><LI>Finally, the app responds to the user's prompt with the actual text, along with its relevance score and sentiment analysis, providing a comprehensive and insightful answer.</LI></OL><H3 id="toc-hId-726015324"><STRONG>What about the architecture for the use case leveraging SAP HANA Cloud Vector Engine and Large Language Models(LLMs) from Azure Open AI?</STRONG></H3><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VivekRR_0-1711504915304.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86985iFFC02B8553407299/image-size/large?v=v2&amp;px=999" role="button" title="VivekRR_0-1711504915304.png" alt="VivekRR_0-1711504915304.png" /></span></P><P>We adopt a similar approach as discussed before.&nbsp;</P><P>Phase 1: <STRONG>Data Ingestion (Steps 1-3)</STRONG> &amp;&nbsp;Phase 2: <STRONG>User Interaction (Steps 4-8)</STRONG></P><OL><LI>Our journey begins by connecting to an Azure data lake to read customer reviews. These reviews are then ingested as JSON documents into our system. We'll provide the schema for these JSON documents as part of our mission, but we'll also delve into the code in this blog series for a more detailed understanding.</LI><LI>Next, we harness the capabilities of Azure Open AI SDKs and the langchain plugin. These tools allow us to read the JSON documents from SAP HANA Cloud and embed them using <STRONG>text-embedding-ada-002</STRONG> (LLMs) from Azure OpenAI.</LI><LI>After extracting valuable embeddings from the JSON documents, we'll ingest this enriched data back into SAP HANA Cloud. The langchain plugin streamlines this process, ensuring a seamless integration between Azure OpenAI and SAP HANA Cloud.</LI><LI>At this stage, users can interact with the deployed Cloud Application Programming (CAP) app, prompting it with queries about product reviews.</LI><LI>When a user submits a prompt through the CAP app, the app leverages the destination service to connect with Azure OpenAI's LLMs. These LLMs then embed the user's prompt, transforming it into a format suitable for efficient querying.</LI><LI>The embedded user prompt is then queried against the vectors ingested in Step 3. This process enables us to identify relevant customer reviews that closely match the user's query.</LI><LI>Based on the query results, we retrieve the corresponding text, along with its scoring and sentiment analysis. To ensure accurate sentiment analysis, we access the <STRONG>text-davinci-003</STRONG> (LLM) from Azure OpenAI's deployment.</LI><LI>Finally, we synthesize the retrieved text, scoring, and sentiment analysis into a coherent response tailored to the user's prompt.</LI></OL><P>Throughout the following blog series, we'll dive deeper into the code implementation, guiding you through each step of this exciting journey. Stay tuned for more insights and practical examples!</P><H3 id="toc-hId-529501819"><STRONG>What configurations &amp; pre-requisites you need to navigate through this Discovery </STRONG></H3><H3 id="toc-hId-332988314"><STRONG>Mission?</STRONG></H3><P>To ensure you're ready to execute these steps, please refer to the "Preparation" and "Setup" sections of the Project board, included in the Discovery Mission.</P><P>If you don't have a subscription for GenAI Hub, don't worry.</P><P>We've provided alternative options using Azure OpenAI to keep you moving forward.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="VivekRR_0-1711505733465.png" style="width: 788px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86986i5E9BEEBF8683373F/image-size/large?v=v2&amp;px=999" role="button" title="VivekRR_0-1711505733465.png" alt="VivekRR_0-1711505733465.png" /></span></P><H3 id="toc-hId-136474809"><STRONG>What about the essential Repositories and Scripts?</STRONG></H3><P>In our mission, we explored diverse scenarios to showcase the capabilities of SAP HANA Cloud Vector Engine and Generative AI Hub. For those experts eager to delve deeper into these technologies, we've provided Python scripts that serve as a practical resource. The other scenarios are catering to experts focused on&nbsp; SAP HANA Cloud Vector Engine and Azure OpenAI/OpenAI integration.</P><P>Here's a breakdown of the scenarios:</P><P>Scenarios 1 through 4 introduced various Python scripts that demonstrated the core functionalities of embedding using different SDKs &amp; plugins. Building upon the previous scenarios, Scenarios 5 and 6 focused on validating the embeddings generated from Scenarios 1 to 4. These validation steps ensured the accuracy and reliability of the embeddings, which are crucial for downstream tasks like similarity analysis and clustering.</P><P>Finally, Scenario 7 showcased an SAP CAP application that validated embeddings based on either SAP Generative AI Hub or Azure OpenAI/OpenAI integration. This real-world application demonstrated how these technologies can be seamlessly integrated into existing workflows and applications.</P><P>Throughout these scenarios, we aimed to provide a comprehensive overview of SAP HANA Cloud Vector Engine and Generative AI Hub, equipping experts with the tools and knowledge necessary to leverage these powerful technologies effectively.</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VivekRR_0-1711505906335.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86987i53832DC4687D2EC3/image-size/large?v=v2&amp;px=999" role="button" title="VivekRR_0-1711505906335.png" alt="VivekRR_0-1711505906335.png" /></span></P><P>If you have BTP subscriptions to both SAP HANA Cloud and SAP Generative AI Hub, you have the capability to utilize the "Python Scripts-GenAI Hub" tile. This feature enables you to import data from provided JSON document samples and cross-check the data using the Python scripts that are part of these tiles.</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VivekRR_1-1711505976791.png" style="width: 294px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86988i113A0957F0D8E614/image-dimensions/294x530?v=v2" width="294" height="530" role="button" title="VivekRR_1-1711505976791.png" alt="VivekRR_1-1711505976791.png" /></span></P><P>For those with subscriptions to SAP HANA Cloud and Azure Open AI, you have the ability to run the "Python Scripts-Azure Open AI" tile. This feature lets you import data from sample JSON documents and subsequently verify its accuracy.</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VivekRR_2-1711506027907.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86989i2EF8EF129A8A8E90/image-size/medium?v=v2&amp;px=400" role="button" title="VivekRR_2-1711506027907.png" alt="VivekRR_2-1711506027907.png" /></span></P><H3 id="toc-hId--60038696"><STRONG>How do you deploy the SAP CAP Application?</STRONG></H3><P>You can easily set it up by adhering to the step-by-step instructions provided within this tile. It's worth noting that the CAP application is compatible with LLMs based on both SAP Generative AI Hub and Azure Open AI.</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VivekRR_0-1711506541732.png" style="width: 226px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86993i577C48D176E6B762/image-dimensions/226x453?v=v2" width="226" height="453" role="button" title="VivekRR_0-1711506541732.png" alt="VivekRR_0-1711506541732.png" /></span></P><P>In the upcoming blog, we'll dive into a practical, hands-on exploration and code review for one of the scenarios we've discussed.</P><P>We encourage you to delve into the mission and follow the step-by-step content to gain a deeper understanding of the SAP HANA Cloud Vector Engine and its impressive features that you can experiment with. Your feedback is highly anticipated and greatly valued. If you encounter any difficulties while navigating through the mission, don't hesitate to contact our <A href="https://discovery-center.cloud.sap/missiondetail/4405/4691/?tab=support" target="_blank" rel="noopener nofollow noreferrer">support team</A> through the Discover Center Mission. Here's to an enjoyable and enlightening learning journey!&nbsp;</P><P>&nbsp;</P><P>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2024-03-27T07:27:12.706000+01:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-fiori-tools-2403-introduces-gen-ai-capability-and-more/ba-p/13650594 SAP Fiori tools 2403 introduces Gen AI capability and more 2024-03-27T18:43:58.112000+01:00 tashley https://community.sap.com/t5/user/viewprofilepage/user-id/316392 <P>In the ever-evolving landscape of app development, agility and efficiency are critical. SAP Fiori tools continues to be at the forefront of empowering developers with tools that streamline the creation of SAP Fiori applications. The latest enhancements in SAP Fiori tools introduce many exciting features aimed at revolutionizing the development process and fostering greater collaboration across teams. I am most excited <SPAN>that we have added new</SPAN> generative<SPAN> AI capabilit</SPAN>ies<SPAN> to create SAP Fiori element apps </SPAN>directly <SPAN>from a business requirement </SPAN>. This release also includes:</P><UL><LI>Semantic buttons in the page editor</LI><LI>Improvements to the annotation LSP code completion</LI><LI>More open source</LI><LI>More AI on the horizon</LI></UL><P><STRONG>Redefining development with Gen AI</STRONG></P><P>A groundbreaking addition to SAP Fiori tools is the introduction of Gen AI, marking a significant leap forward in intelligent development of SAP Fiori apps. For the first time, developers can leverage AI to generate CAP projects and SAP Fiori element apps directly from business requirement documents. This innovative feature stems from our collaboration with an SAP partner who highlighted the challenges faced in translating client needs into functional applications swiftly. With Gen AI, the gap between designers, business analysts, and developers is bridged, leading to accelerated development cycles and enhanced collaboration.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Launch Joule for SAP Fiori tools with command &quot;Fiori tools AI: Show Fiori tools Joule&quot;" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87045i3EF8E42122663764/image-size/large?v=v2&amp;px=999" role="button" title="fiori-tools-ai-blog.gif" alt="Launch Joule for SAP Fiori tools with command &quot;Fiori tools AI: Show Fiori tools Joule&quot;" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Launch Joule for SAP Fiori tools with command "Fiori tools AI: Show Fiori tools Joule"</span></span></P><P>I am also excited to announce that in addition to using Gen AI to create SAP Fiori elements, you will also find <A href="https://community.sap.com/t5/technology-blogs-by-sap/joule-for-freestyle-sapui5-development-in-sap-build-code/ba-p/13650005" target="_self">Joule for freestyle SAPUI5</A> in this release to help you <A href="https://community.sap.com/t5/technology-blogs-by-sap/now-ai-helps-you-developing-sapui5-applications/ba-p/13649767" target="_self">write freestyle SAPUI5 code</A>. These capabilities are delivered as part of the Guided Development extension in SAP Fiori tools. The initial release is available in SAP Business Application Studio as part of <A href="https://community.sap.com/t5/technology-blogs-by-sap/announcing-general-availability-of-sap-build-code-speed-up-development-with/ba-p/13646073" target="_self">SAP Build Code</A>. You can expect the capability to be introduced to other dev spaces such as SAP Fiori dev space in and Visual Studio Code in coming months. In order to use the AI functionality, you will need an SAP Build Code license. Refer to our <A href="https://help.sap.com/docs/SAP_FIORI_tools/17d50220bcd848aa854c9c182d65b699/f09752ebcf63473e9194ea29ca232e56.html" target="_self" rel="noopener noreferrer">help portal documentation</A> for more information on how to get started.&nbsp;</P><P>While this is surely exciting,&nbsp;<SPAN>note that Joule, like any other Gen AI tool, may not always return the result you are expecting. It may takes some tries and experimentation to fine tune your prompts.&nbsp;</SPAN></P><P><STRONG>Elevating user experience with simplification</STRONG></P><P>In our commitment to simplifying development processes, SAP Fiori tools introduces several enhancements to make the development experience better. Developers can now define semantic buttons in the Page Editor, making the task easier. Furthermore, we added improvements to the annotation LSP code completion for both XML and CDS to present only relevant terms and reduce clutter. Additionally, direct links to documentation from the property panel within the Page Editor streamline access to relevant information, empowering developers with comprehensive insights.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Finding the term made easier in annotation code completion" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87417iFBE0E033915BE47A/image-size/large?v=v2&amp;px=999" role="button" title="Blog_LSP.png" alt="Finding the term made easier in annotation code completion" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Finding the term made easier in annotation code completion</span></span></P><P><STRONG>Accelerate development with integrated development experience and better tooling</STRONG></P><P>Continuing our tradition of innovation, SAP Fiori tools now supports SAPUI5 libraries without a manifest file, offering greater flexibility to developers. This enhancement underscores our dedication to providing a seamless development experience, regardless of project configurations.</P><P>Integrating the development experience, SAP Fiori tools is working closely with ABAP Development Tools (ADT) team to enable seamless navigation from the ABAP Development Tools (ADT) to SAP Fiori tools in both SAP Business Application Studio and Visual Studio Code. Our first step is enabling developers to go from ADT to SAP Fiori tools Application Generator when service development is ready to create the UI. Stay tuned for more on this in the coming months.&nbsp;</P><P><STRONG>Open-source journey continues: embracing collaboration</STRONG></P><P>Embracing the premise of collaboration, SAP Fiori tools further solidifies its commitment to open-source initiatives. All middleware modules are now open source, fostering a vibrant ecosystem of community contributions. Additionally, the internationalization (i18n) support module has been open-sourced, promoting transparency and inclusivity. As we progress, our objective for the coming months remains clear: to open source all dependent modules, with the goal of creating an open-source SAP Fiori generator that will be used to standardize UX experience and project structure for all SAP Fiori relevant projects.</P><P><STRONG>Coming soon: a glimpse into future innovations</STRONG></P><P>Looking ahead, SAP Fiori tools is planning to introduce even more AI capabilities designed to streamline development further. Expect AI-guided development to provide tailored assistance through a combination of documentation and guides. Additionally, a manifest editor is on the horizon, simplifying project configuration and minimizing errors.</P><P>In conclusion, the latest enhancements in SAP Fiori tools signify a significant advancement in empowering developers to realize their SAP Fiori app development goals. With Gen AI, Simplification, Continuous Enhancements, Integrated Development Experience, and our ongoing Open-Source Journey, SAP Fiori tools remains at the forefront of innovation, poised to redefine Fiori app development. Stay tuned as we continue to unlock new possibilities and pave the way for a future of unparalleled efficiency in app development.</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2024-03-27T18:43:58.112000+01:00 https://community.sap.com/t5/technology-blogs-by-sap/now-ai-helps-you-developing-sapui5-applications/ba-p/13649767 Now AI Helps You Developing SAPUI5 Applications 2024-03-27T18:52:57.706000+01:00 AndreasKunz https://community.sap.com/t5/user/viewprofilepage/user-id/189706 <P>As announced in <A href="https://community.sap.com/t5/technology-blogs-by-sap/joule-for-freestyle-sapui5-development-in-sap-build-code/ba-p/13650005" target="_blank">this blog post</A> by Oliver Graeff, the UI5 team is delighted to release its first foray into the world of Generative AI, a contribution to Joule in SAP Business Application Studio which helps with freestyle SAPUI5 development.</P><P>In this blog post, we explore how this SAP Build Code feature works and how you can benefit most from it. At the end, let’s not forget getting a glimpse of related AI features and prototypes.</P><H2 id="toc-hId-989966495">Get Help from Joule</H2><P>As a user of SAP Build Code, you get Joule as assistant in SAP Business Application Studio, accessible via this “Joule jewel” as I like to call it:&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joule-jewel.png" style="width: 200px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86574i60B7C70E25FBF2FD/image-size/small?v=v2&amp;px=200" role="button" title="joule-jewel.png" alt="joule-jewel.png" /></span></P><P>One important thing to note is that in the initial release, Joule is only available in dev spaces of type “<EM>Full-Stack Application Using Productivity Tools</EM>”. If you e.g. create a dev space of type “SAP Fiori”, you will not see it. The availability in more dev space types</P><P>The panel content is context sensitive. This means that for a random file in a random project, it may just tell you that it is not available, but when you open e.g. a UI5 view or controller or most other file types inside a UI5 application project, then it will greet you with all its violet-purple AI glory and ask for your requests:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The Joule Panel" style="width: 352px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86577iC6DE0FD457163996/image-size/large?v=v2&amp;px=999" role="button" title="joule.jpg" alt="The Joule Panel" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">The Joule Panel</span></span></P><P>Simply enter your request in the chat window – adding, editing, replacing code… anything goes! – &nbsp;and Joule will respond with code and explanations.</P><P>Each code block in the response has a header with a “” and an “Accept” button. “Accept” transfers the code to the respective file, replacing its content. An answer can provide content for different files. If the file to which a code block belongs is currently not open or active, it will automatically be opened when you click “Accept”.</P><P>In case this “Accept” button is missing or you want to edit the suggested code first, you can use the ”Copy” button to get the code into the clipboard and paste it manually. This is also useful in the (rare) cases when only a code snippet is provided instead of the entire file, or parts of the previously existing code are omitted.</P><H2 id="toc-hId-793452990">Think BIG for Biggest Benefit</H2><P>Actually, those suggested samples in the Joule panel are just simple ones. We really recommend trying bigger steps! Don’t waste time (and AI tokens) by requesting a simple button.&nbsp;Try increments like:</P><UL><LI>Adding a new View with some content and setting up routing</LI><LI>Creating a new model with sample data and adding a table displaying certain properties as columns</LI><LI>Making all (hardcoded) texts within a view translatable and providing translations</LI></UL><P>Things like these seem like the sweet spot where Joule speeds up application development most. Taking bigger steps is also a good approach when the AI response times appear a little long. Performance varies, and Joule has no influence on this – most of the time is spent waiting for the response.</P><P>You know Generative AI has limits. Requests like the above typically work well, but of course the response can contain issues or be not exactly what you had in mind. Tweaking the result will usually still get you to your goal much faster than typing everything by hand. You can also use the pencil button to edit a request and try again.</P><P>In particular, sometimes the namespaces of newly added controls are not correct, despite our efforts to prevent this. Mentioning the library when requesting concrete controls may help.</P><P>Joule is a conversational chat assistant that keeps context. This means it “knows” what you have requested before and you can refer to this knowledge in further requests. Still, we recommend pressing the “Reset Conversation” button at the top once you request something different:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clear.png" style="width: 200px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86579i60B2C790107325A4/image-size/small?v=v2&amp;px=200" role="button" title="clear.png" alt="clear.png" /></span></P><P>This frees the conversation from previous ballast, keeps the AI focused and not least makes responses faster.</P><H2 id="toc-hId-596939485">Keep in Mind How to Get Joule</H2><P>As mentioned, the Joule assistant for freestyle UI5 development is active when it seems like you are working on UI5 resources. The actual logic behind that is longer than would fit this blog post, but when Joule’s suddenly not there and you need it, simply open a UI5 view or controller, or work below a directory with ui5.yaml file in it and you should see it again. This behavior, by the way, could change soon, as Joule is still growing up into its role of an always-available assistant with multiple capabilities.</P><H2 id="toc-hId-400425980">How Does it Work?</H2><P>There’s a lot of stuff going on behind the scenes.</P><P>For example, there is logic to select the files which are likely needed to be modified – or maybe just known – to fulfill your request. Of course, it would be too much to send <EM>all</EM> the code of your entire project along with every AI request.</P><P>Above you read that Joule keeps context and remembers the previous conversation. Yes, it has to, in order to reasonably converse with you. Otherwise, it would not be able to make sense of a request that is logically connected to what you did before. Still, it does not need to remember every single bit and byte for that! Hence, we condense the history to reduce the context size consumed by that.</P><P>Possibly there is some similarity to other AI tools you have seen recently, and this market is definitely a very agile and vivid one, but what differentiates this tool is its knowledge of UI5 and increasingly the knowledge how to support typical steps best which you are likely to do in any freestyle UI5 project.</P><P>Much of it is still evolving and being enhanced as you read this.</P><H2 id="toc-hId-203912475">More Joule Goodness: Create an Application from Business Requirements</H2><P>A related Joule feature provided by the Fiori tools team allows you to create an entire SAP Fiori elements list report application, including the respective CAP project, directly from your business requirements. <A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-fiori-tools-2403-introduces-gen-ai-capability-and-more/ba-p/13650594" target="_self">Look here</A>&nbsp;for more details.</P><P>This gets you started with a pretty complete app – and with our Joule feature for freestyle UI5 development, you can continue from there, e.g. when using custom pages. So both of these Joule features nicely complement each other.</P><H2 id="toc-hId-7398970">Even More AI</H2><P>It’s only the beginning. We have been experimenting for quite some time with how Generative AI could benefit not only UI5 application developers, but also end-users.</P><P>One such prototype, internally dubbed “ChatUI5”, aims to help end-users to interact with UI5 applications in natural language. It will be presented in the upcoming “UI5ers live” webcast on April 11th. Others look at how setting complex filters in applications could be simplified or how the UI5 documentation could be made more helpful.</P><P>To make it very clear: that’s all prototypes and we can’t tell whether any of them will ever see the light of being productized. But we’re looking further into the topic for sure.</P> 2024-03-27T18:52:57.706000+01:00 https://community.sap.com/t5/technology-blogs-by-sap/joule-for-freestyle-sapui5-development-in-sap-build-code/ba-p/13650005 Joule for freestyle SAPUI5 development in SAP Build Code 2024-03-27T18:53:12.396000+01:00 OliverGraeff https://community.sap.com/t5/user/viewprofilepage/user-id/4124 <P><A href="https://www.sap.com/products/artificial-intelligence/ai-assistant.html" target="_self" rel="noopener noreferrer">Joule</A> is SAP's AI co-pilot that truly understands your business. Joule also helps you writing freestyle SAPUI5 code in SAP Build Code. Ask Joule by typing code-related requests, in natural language, into Joule's chat window. For example, you could ask Joule to insert a control to a view, add an event handler to a controller, introduce a full new view with routing and much more. You don't need to have the respective file open in the editor, you just need to make sure that your request is sufficiently clear. Requested changes may span across several files. For example, you could ask Joule to define a new model in the manifest.json and use the model in a control in the view.</P><P>Each file for which Joule suggests changes, will appear in a code block within Joule's chat window. On top of each code block you'll see options to</P><UL><LI>'Copy', to copy the code to your clipboard for further usage, and</LI><LI>'Accept', to open the respective file and add the code directly at the correct place.</LI></UL><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2024-03-26 at 15.51.58.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86798iC85613C4F29335E3/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-03-26 at 15.51.58.png" alt="Screenshot 2024-03-26 at 15.51.58.png" /></span><SPAN>Joule in SAP Business Application Studio</SPAN></P><P>Joule, your SAPUI5 assistant can handle both, any freestyle SAPUI5 application as well as custom pages following the SAP Fiori flexible programming model.</P><P>Joule is not only useful for writing code, it also helps you to understand the existing code or to find issues with it. You may ask questions about entire files, or you can select a block of code and then ask a question specifically about the selected code snippet.&nbsp;Beyond this, the implementation is not restricted to specific scenarios. Go ahead, explore, and try to find the limits…</P><P>Just note that Joule, like any other GenAI tool, may not always deliver 100% correct results. It is always a good practice to closely review the generated code. Still, Joule, your SAPUI5 assistant, will make you a more efficient SAPUI5 developer.<BR /><BR /></P><H1 id="toc-hId-861532263">How to use Joule for freestyle SAPUI5</H1><OL><LI>Launch SAP Business Application Studio in SAP Build Code.</LI><LI>Open a project containing freestyle SAPUI5 code and open a *.view.xml or *.controller.js / *.controller.ts file.</LI><LI>Launch Joule from the activity bar on the left and start asking Joule.</LI></OL><P>A first guide is available via the 'Guide Center' in the activity bar on the left: Open the guide 'Generative AI-Powered Development' -&gt; SAP Fiori UI -&gt; SAP Fiori Elements Custom Page and Freestyle SAPUI5. Read more details:</P><UL><LI><A href="https://community.sap.com/t5/technology-blogs-by-sap/now-ai-helps-you-developing-sapui5-applications/ba-p/13649767" target="_self">Now AI Helps You Developing SAPUI5 Applications</A>&nbsp;by&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/189706">@AndreasKunz</a></LI><LI><A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-fiori-tools-2403-introduces-gen-ai-capability-and-more/ba-p/13650594" target="_self">SAP Fiori tools 2403 Introduces Gen AI Capability and more</A>&nbsp;by&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/316392">@tashley</a>&nbsp;</LI></UL> 2024-03-27T18:53:12.396000+01:00 https://community.sap.com/t5/technology-blogs-by-sap/first-hand-experience-at-sap-build-code-learn-try-it-out-get-a-badge-sap/ba-p/13653170 First hand experience at SAP Build Code - Learn, Try it out, Get a badge, SAP Discovery Centre 2024-03-29T08:36:58.864000+01:00 Chandra_Bhushan https://community.sap.com/t5/user/viewprofilepage/user-id/123700 <P>With new advancements in <STRONG>SAP Business AI</STRONG>, I am glad to reiterate the messaging from SAP on the General Availability(GA) of <STRONG>SAP Build Code</STRONG>.</P><P>I will cover about:</P><UL><LI>SAP Build Code</LI><LI>SAP Help Portal - covering initial setup for productive use, administration, security aspects etc</LI><LI>TD tutorial on SAP Developer Tutorial</LI><LI>SAP Learning Journey to get a badge</LI><LI>Pricing in SAP Discovery Centre and different service plans(Standard Plan, Free Plan and Trial)</LI><LI>Setup SAP Build Code on Trial</LI></UL><P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>What is GA?</STRONG></TD></TR></TBODY></TABLE><P>For those who are new to such acronyms like GA, TD etc. for now keep a note, GA stands for General Availability, which refers to the availability of the product for general use - this product will be loved by developers though!</P><P>And Test Drive(TD) refers to the availability of this service for developers to try and evaluate the service for a stipulated period of time to get a feel/before turning to a paid plan. What is this stipulate period of time - you should refer to the <A href="https://help.sap.com/docs/build_code/d0d8f5bfc3d640478854e6f4e7c7584a/c34837eb0d08454a9b4cb6f60dad080d.html" target="_self" rel="noopener noreferrer">different plans of SAP Build Code</A> on SAP Help portal.</P><P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>What is SAP Build Code?</STRONG></TD></TR></TBODY></TABLE><P>Since the discussions on SAP Business AI emerged and announcements were made during SAP TechEd 2023 about a new AI-based code generation offering in SAP BTP to facilitate code development, developers were waiting for the GA of SAP Build Code in Q1 2024. And there comes the announcement from&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/730384">@bhagat_nainani</a> <A href="https://community.sap.com/t5/technology-blogs-by-sap/announcing-general-availability-of-sap-build-code-speed-up-development-with/ba-p/13646073" target="_self">here</A>.</P><P>Now customers can use SAP Build Code for productive developments. But what is it and what does it offer?</P><P><STRONG>SAP Build Code is a service on SAP Business Technology Platform (BTP)</STRONG> similar to other services like SAP Build Apps, SAP Build Process Automation etc.&nbsp;</P><P>It offers an AI-powered cloud development environment through Joule copilot and leverages ready-to-use SAP services to foster the development of SAP UI5, SAP Fiori and Cloud Application Programming applications running on SAP BTP using the Cloud Foundry runtime.</P><P>The below pictures depicts its need:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="developer_productivity.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/88332i9C823C5F99D0723D/image-size/large?v=v2&amp;px=999" role="button" title="developer_productivity.png" alt="developer_productivity.png" /></span></P><P style=" text-align: center; "><EM>Source: IDC, Market Analysis Perspective: Worldwide Modern and Edge Application Development and Developer Trends 2023, Doc #US50135723, September 2023</EM></P><P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Who should use it?</STRONG></TD></TR></TBODY></TABLE><P>It is designed to provide cloud based development environment suitable for both citizen and professional developers within the SAP ecosystem following best practises.</P><P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Let's review some of its key features</STRONG></TD></TR></TBODY></TABLE><UL><LI><STRONG>End to End Application Lifecycle management</STRONG><UL><LI>This development environment is designed to facilitate coding, testing, integration, deployment and also to maintain entire application lifecycle management.&nbsp;<EM>Once you enter this service, you can come out with a full fledged application deployed <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></EM></LI></UL></LI><LI><STRONG>Harnessing power of AI - Joule</STRONG><UL><LI>SAP Build Code harnesses the power of AI to offer developers efficient and accelerated assistance in building their applications. With advanced features like code completion, debugging, and code generation, this AI-based tool facilitates faster and more streamlined application development.</LI></UL></LI><LI><STRONG>Keep core clean</STRONG><UL><LI>Another very important feature of SAP Build Code is that it helps to keep your core ERP systems viz. S/4HANA free from customizations following a clean core strategy. This implies, SAP BTP offers a platform for creating applications and building extensions.</LI></UL></LI></UL><UL><LI><STRONG>Flexibility and BYOL</STRONG><UL><LI>Being a cloud service, you have a flexibility to work from anywhere, anytime and also, gives flexibility for developers to use any programming language of their choice.</LI></UL></LI></UL><UL><LI><STRONG>Pre-built components and Templates</STRONG><UL><LI>Similar to the No-Code development service like SAP Build Apps, SAP Build Code comes with a variety of pre-built components like UI Elements, Business Logic and Integration connectors. It also offers templates, which acts as&nbsp;a starting point for their application development thereby boosting developer efficiency.</LI></UL></LI></UL><UL><LI><STRONG>Access to data and integration</STRONG><UL><LI>As SAP Build Code is based on SAP BTP, hence giving its developers an easy access to SAP data and services. It also includes pre-built integrations, APIs, and connectors to SAP and non-SAP systems with built-in SAP developer best practices to accelerate development.&nbsp;</LI></UL></LI></UL><P>Most importantly all of this via a visual programming tools and guided wizards of SAP Build Code.&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Source: SAP Learning Journey on SAP Build Code" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/88330i4318A78969764498/image-size/large?v=v2&amp;px=999" role="button" title="BTP120_C1_L1_1.png" alt="Source: SAP Learning Journey on SAP Build Code" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Source: SAP Learning Journey on SAP Build Code</span></span></P><P style=" text-align: center; "><EM>Source: SAP Learning Journey on SAP Build Code</EM></P><P>As you can see from the above diagram SAP Build Code offers a bundle of:</P><OL><LI><STRONG>Application Services </STRONG>(viz CAP Model, UI Development, Mobile Services and Document Management)&nbsp;and</LI><LI><STRONG>Runtime Service </STRONG>(viz. CI/CD, Authorization and trust management, Destination, Connectivity, Cloud logging, Alert Notification and many more .</LI></OL><P>In a nutshell, this service allows developers to seamlessly integrate multiple programming languages and low-code approaches in their projects and have effective collaboration between business users and developers.</P><P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Where do I find more about SAP Build Code? SAP Discovery Center and SAP Help Portal</STRONG></TD></TR></TBODY></TABLE><OL><LI>To know about SAP Build Code service availability, region, pricing - kindly refer <A href="https://discovery-center.cloud.sap/serviceCatalog/sap-build-code?service_plan=standard&amp;region=all&amp;commercialModel=cpea&amp;tab=service_plan" target="_self" rel="nofollow noopener noreferrer">SAP Discovery Center</A>.</LI><LI>Different Service plans of SAP Build Code can be referred <A href="https://help.sap.com/docs/build_code/d0d8f5bfc3d640478854e6f4e7c7584a/c34837eb0d08454a9b4cb6f60dad080d.html?version=SHIP" target="_self" rel="noopener noreferrer">here</A>.</LI><LI>You should refer to the <A href="https://help.sap.com/docs/build_code?version=SHIP" target="_self" rel="noopener noreferrer">SAP Help Portal</A> to explore more about SAP Build Code, Initial Setup, Development, Administration and Security.</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Build Code Discovery Centre.gif" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/88354iC9A3465003E66032/image-size/large?v=v2&amp;px=999" role="button" title="Build Code Discovery Centre.gif" alt="Build Code Discovery Centre.gif" /></span></P><P style=" text-align: center; "><EM>&nbsp;Source: SAP Discovery Center - SAP Build Code</EM></P><P><FONT color="#FF0000">Kindly note, as of now, SAP Build Code is GA for 2 regions&nbsp;<SPAN>Europe&nbsp;(Frankfurt), US&nbsp;East&nbsp;(VA) and on AWS. Kindly look at your SAP BTP sub account region and AWS data centre. This information will keep changing and will be updated.</SPAN></FONT></P><P>Setup SAP Build Code in your SAP BTP subaccount - refer <A href="https://help.sap.com/docs/build_code/d0d8f5bfc3d640478854e6f4e7c7584a/aed54c41385b4d67ab6cdeb195ae6ab4.html?version=SHIP" target="_self" rel="noopener noreferrer">here</A></P><P>If you are looking to get started on creating your first project - refer <A href="https://help.sap.com/docs/build_code/d0d8f5bfc3d640478854e6f4e7c7584a/e880aae349104f569c7fbc7c30b0f0bb.html?version=SHIP" target="_self" rel="noopener noreferrer">here</A></P><P>having questions related to SAP Build Code Security - refer <A href="https://help.sap.com/docs/build_code/d0d8f5bfc3d640478854e6f4e7c7584a/f3cd9b691ae048708da2a30a57752d78.html?version=SHIP" target="_self" rel="noopener noreferrer">here</A></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Setup SAP Build Code on SAP BTP Trial Account</STRONG></TD></TR></TBODY></TABLE><P>Well the purpose at this point in time to share a demonstration of how did I start with the Test Drive(TD) tutorial from SAP and subscribed to SAP Build Code on a trial account.</P><P>Access the Test Drive(TD) tutorial here&nbsp;<A href="https://developers.sap.com/mission.sap-build-code-test-drive.html" target="_self" rel="noopener noreferrer">SAP Build Code Test Drive</A></P><P>Followed by completing a learning journey from SAP Learning Journey platform till getting a badge:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Chandra_Bhushan_0-1711631252395.png" style="width: 200px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/88059iD096BBBFD1FCBC98/image-size/small?v=v2&amp;px=200" role="button" title="Chandra_Bhushan_0-1711631252395.png" alt="Chandra_Bhushan_0-1711631252395.png" /></span></P><P>Access the SAP Learning Journey on creating applications and extensions using SAP Build Code <A href="https://learning.sap.com/learning-journeys/creating-applications-and-extensions-using-sap-build-code" target="_self" rel="noopener noreferrer">here</A></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Developer turotial gif.gif" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/88064iE2A9D7C48482397A/image-size/medium?v=v2&amp;px=400" role="button" title="Developer turotial gif.gif" alt="Developer turotial gif.gif" /></span></P><P>&nbsp;</P><P>I don't have to rewrite the entire developer tutorial on SAP Build Code, the author of the TD tutorial have done a wonderful job already, but the feel of developing a full stack application within an hour was something that excited me.</P><P>I spent some time in recording, editing it to remove noise and wait time to give you a feel of how you can have your first hand experience too. Now it is time for me to try more use cases having the understanding of the service.</P><P>In the meantime, I recommend you having a look at the video&nbsp;<span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span> Kindly do not feel obligated to to subscribe to like or comment - I just uploaded it on the platform for you to view this video.&nbsp;</P><P><div class="video-embed-center video-embed"><iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_0UC-LoSN6A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_0UC-LoSN6A&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_0UC-LoSN6A%2Fhqdefault.jpg&amp;key=b0d40caa4f094c68be7c29880b16f56e&amp;type=text%2Fhtml&amp;schema=youtube" width="400" height="225" scrolling="no" title="SAP Build Code - First Hand Experience on tool, Test Drive, Learning Journey and much more" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div></P><P>&nbsp;</P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%"><STRONG>Keeping up-to-date</STRONG></TD></TR></TBODY></TABLE><P>I strongly suggest you to go through some of the first announcements from SAP and also through a lot of blogs from SAP Community. Do look out for more information on SAP Help Portal, about <A href="https://help.sap.com/whats-new/cf0cb2cb149647329b5d02aa96303f56?locale=en-US&amp;version=Cloud&amp;Component=Cloud%20Transport%20Management%3BContinuous%20Integration%20%26%20Delivery%3BDocument%20Management%20Service%3BMobile%20Services%3BSAP%20Alert%20Notification%20Service%3BSAP%20Audit%20Log%3BSAP%20BTP,%20Cloud%20Foundry%20Runtime%3BSAP%20Business%20Application%20Studio" target="_self" rel="noopener noreferrer">what's new in SAP Build Code</A>, SAP Community and feel free to connect with me on social media channels like <A href="https://www.linkedin.com/in/chandra-bhushan-singh/" target="_self" rel="nofollow noopener noreferrer">LinkedIn</A> - you will see a flood of updates on SAP Build Code along with tsunami of tutorials, live streaming sessions and much more&nbsp;<span class="lia-unicode-emoji" title=":upside_down_face:">🙃</span></P><UL><LI><A href="https://www.sap.com/india/products/technology-platform/developer-tools.html" target="_self" rel="noopener noreferrer">SAP website</A> on SAP Build Code</LI><LI><A href="https://learning.sap.com/learning-journeys/creating-applications-and-extensions-using-sap-build-code" target="_self" rel="noopener noreferrer">SAP Learning Journey on SAP Build CodeSA</A></LI><LI><A href="https://developers.sap.com/mission.sap-build-code-test-drive.html" target="_self" rel="noopener noreferrer">SAP Developer tutorial</A> on how to setup SAP Build Code on SAP BTP Trial</LI><LI><A href="https://discovery-center.cloud.sap/serviceCatalog/sap-build-code?service_plan=standard&amp;region=all&amp;commercialModel=cpea&amp;tab=feature" target="_self" rel="nofollow noopener noreferrer">SAP Discovery Centre</A> for pricing of SAP Build Code</LI><LI>Announcement&nbsp;by&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/730384">@bhagat_nainani</a>&nbsp;on&nbsp;<A href="https://community.sap.com/t5/technology-blogs-by-sap/announcing-general-availability-of-sap-build-code-speed-up-development-with/ba-p/13646073" target="_self">General Availability of SAP Build Code to speed up development</A></LI><LI>Blog from&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/53">@qmacro</a>&nbsp;on&nbsp;<A href="https://community.sap.com/t5/application-development-blog-posts/test-drive-joule-s-generative-ai-features-in-sap-build-code-now/ba-p/13649882" target="_self">Test Drive of SAP Build Code</A></LI><LI>Update on how SAP Build Code can be tried in BTP Trial account in the blog&nbsp;<A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-build-code-is-now-on-sap-btp-trial/ba-p/13642626" target="_self">SAP Build Code on SAP BTP Trial</A></LI></UL><P>Feel free to post your questions on SAP Community and <A href="https://www.youtube.com/watch?v=EpuVqWDT2hw" target="_self" rel="nofollow noopener noreferrer">do join a special live streaming episode by SAP</A></P><P>&nbsp;</P> 2024-03-29T08:36:58.864000+01:00 https://community.sap.com/t5/technology-blogs-by-sap/generative-ai-based-sap-fiori-app-development-with-joule-directly-from-the/ba-p/13654153 Generative AI-based SAP Fiori App development with Joule directly from the business requirement 2024-04-01T15:43:06.089000+02:00 AnuradhaDhingan https://community.sap.com/t5/user/viewprofilepage/user-id/141341 <H1 id="toc-hId-861652541"><FONT color="#3366FF"><STRONG><U>Introduction</U></STRONG></FONT></H1><P>SAP Build Code, operating within SAP Business Technology Platform, is an application development environment for Java and JavaScript, providing developers with a turnkey solution for coding, testing, integration and application life cycle management. It provides a simplified developer experience, AI-based code generation with Joule copilot that drives productivity, is tailored for SAP development and supports fusion development by teams of professional and citizen developers. &nbsp;&nbsp;</P><P>This blog focuses on leveraging <STRONG>Joule’s generative AI features for SAP Fiori application development</STRONG> directly from the business requirement description(user story) prompt.</P><P>&nbsp;</P><H1 id="toc-hId-665139036"><FONT color="#3366FF"><STRONG><U>Business Requirement</U></STRONG></FONT></H1><P><FONT face="arial,helvetica,sans-serif">Create an SAP Fiori application as per the requirements outlined in the user story below:</FONT></P><P><FONT size="4"><U><STRONG>User Story</STRONG></U></FONT></P><P><FONT size="2" color="#808080"><EM>As a contract administrator, I want to create and manage contracts and ‘parties involved’ information in the system, so that I can effectively track and handle legal agreements and ‘parties involved’ interactions.</EM></FONT></P><P><FONT size="2" color="#808080"><EM>Contracts can cover a vast range of agreements, such as sales contracts, service agreements and employment contracts.</EM></FONT></P><P><FONT size="2" color="#808080"><EM>Party involved: A ‘party involved’ is an individual, organization, or entity that purchases goods, products, or services from another party, typically a business or seller.</EM></FONT></P><P><FONT size="2" color="#808080"><EM>Common attributes of a contract might include:</EM></FONT></P><OL><LI><FONT size="2" color="#808080"><EM>Contract ID: A unique identifier for the contract.</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>Party involved Identification Number: A unique identification number for the party&nbsp;</EM><EM>involved.</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>Contract Type: The type of contract (e.g. sales, service, employment).</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>Start Date: The date on which the contract becomes valid.</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>End Date: The date on which the contract expires (if applicable).</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>Status: The current status of the contract (draft, active, expired, terminated, etc.)</EM></FONT></LI></OL><P><FONT size="2" color="#808080"><EM>A typical ‘party involved’ has the following attributes:</EM></FONT></P><OL><LI><FONT size="2" color="#808080"><EM>Party involved Identification Number</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>Party involved Name: It refers to the given name of a person or entity, or a label by which they are addressed or identified.</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>Party involved Address: It refers to a physical location where an individual, business, or entity is situated or can be reached.</EM></FONT></LI><LI><FONT size="2" color="#808080"><EM>Party involved Contact Information</EM></FONT></LI></OL><P><FONT size="2"><STRONG><FONT color="#808080"><EM>Acceptance Criteria</EM></FONT></STRONG></FONT></P><P><FONT size="2"><STRONG><FONT color="#808080"><EM>Scenario 1: List All Contracts</EM></FONT></STRONG></FONT></P><P><FONT size="2"><FONT color="#808080"><EM>Given I am logged into the contract management system, when I launch the SAP Fiori application to maintain contracts, then I should be able to view the list of all the contracts in a list without pressing the GO button. The list of all the contracts should have : Contract ID, Party involved Identification Number, Contract Type and Start Date.&nbsp;</EM></FONT><FONT color="#808080"><EM>The list of filters should include Contract Type, Contract Status and Start Date.</EM></FONT></FONT></P><P><FONT size="2"><STRONG><FONT color="#808080"><EM>Scenario 2: View Contract Details&nbsp;</EM></FONT></STRONG></FONT></P><P><FONT size="2" color="#808080"><EM>Given I am logged into the contract management system, when I select a specific contract from the list of SAP Fiori application, then I should be able to view the contract details and parties involved information.</EM></FONT></P><P>&nbsp;</P><H1 id="toc-hId-468625531"><FONT color="#3366FF"><STRONG><U>Joule's&nbsp;Generative AI-based SAP Fiori App Development</U></STRONG></FONT></H1><H2 id="toc-hId-401194745"><U><STRONG>Prerequisites</STRONG></U></H2><UL><LI><FONT face="arial,helvetica,sans-serif" size="4"><A href="https://developers.sap.com/tutorials/hcp-create-trial-account.html" target="_blank" rel="noopener noreferrer">Get a Free Account on SAP BTP Trial</A></FONT></LI><LI><FONT face="arial,helvetica,sans-serif" size="4"><A href="https://developers.sap.com/tutorials/build-code-setup.html" target="_blank" rel="noopener noreferrer">Setup SAP Build Code</A></FONT></LI></UL><H2 id="toc-hId-204681240"><STRONG>1. Create a New Project using SAP Build Code</STRONG></H2><H3 id="toc-hId-137250454"><EM>1.1.&nbsp; Navigate to the SAP Build lobby</EM></H3><H3 id="toc-hId--59263051"><EM>1.2.&nbsp; Click on Create</EM></H3><H4 id="toc-hId--126693837"><span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Create a Project" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89021i9975D6870D5C4018/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 1.07.36 PM.png" alt="Create a Project" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Create a Project</span></span></H4><P>&nbsp;</P><H4 id="toc-hId--323207342">&nbsp;</H4><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><H3 id="toc-hId--648803566"><EM>1.3 Click the&nbsp;Build an Application&nbsp;tile</EM></H3><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Build an Application" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89177i6BA23969AD5E286B/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 1.11.18 PM.png" alt="Build an Application" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Build an Application</span></span></P><H3 id="toc-hId--920548440"><EM>1.4&nbsp; Click the&nbsp;SAP Build Code&nbsp;tile</EM></H3><P><EM><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAP Build Code" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89204iFC167A130F679D1C/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 1.14.16 PM.png" alt="SAP Build Code" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">SAP Build Code</span></span></EM></P><H3 id="toc-hId--1117061945"><EM>1.5&nbsp; Click the&nbsp;Full-Stack Application&nbsp;tile</EM></H3><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Full-Stack Application" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89059i0C5DEE4A28D9E992/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 1.15.56 PM.png" alt="Full-Stack Application" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Full-Stack Application</span></span></P><H3 id="toc-hId--1313575450"><EM>1.6 Create a full stack project.</EM></H3><P><EM><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Contract Management Project" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89109iA38822C4A25105E2/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 1.37.32 PM.png" alt="Contract Management Project" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Contract Management Project</span></span></EM></P><P>&nbsp;</P><H2 id="toc-hId--1216685948"><STRONG>2. Create an SAP Fiori App via Prompt</STRONG></H2><H3 id="toc-hId--1706602460"><EM>2.1.&nbsp; Click the project to open it in&nbsp;SAP Business Application&nbsp;</EM><EM>Studio</EM></H3><H3 id="toc-hId--1903115965"><EM>2.2.&nbsp; Click the Open Guide</EM></H3><P><EM><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Open Guide" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89111iEED8467EAC1B544A/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 2.02.20 PM.png" alt="Open Guide" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Open Guide</span></span></EM></P><H3 id="toc-hId--2099629470"><EM>2.3. Expand the 'SAP Fiori UI Node'</EM></H3><P><FONT face="arial,helvetica,sans-serif" size="4">Expand the '<SPAN class="">Create an&nbsp;</SPAN><SPAN class="">SAP Fiori</SPAN><SPAN class="">&nbsp;Application Directly from Your Business Requirements'</SPAN>&nbsp;node. Click the<SPAN>&nbsp;</SPAN><SPAN class="">Open Joule</SPAN><SPAN>&nbsp;</SPAN>button to launch Joule's AI assistant for<SPAN>&nbsp;</SPAN><SPAN class="">SAP Fiori tools</SPAN>.</FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Joule's SAP Fiori Tools Generative AI" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89116iBD6C797518CFC0CF/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 2.19.08 PM.png" alt="Joule's SAP Fiori Tools Generative AI" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Joule's SAP Fiori Tools Generative AI</span></span></FONT></P><H3 id="toc-hId-1998824321"><EM>2.4. Send requirement prompt to Joule</EM></H3><P><FONT face="arial,helvetica,sans-serif" size="4">Prompt the user story description(refer to&nbsp;Business Requirement section above) to Joule and click send.</FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Send business requirement description to Joule" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89123i67214DAC20F49852/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 2.38.55 PM.png" alt="Send business requirement description to Joule" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Send business requirement description to Joule</span></span></FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4"><SPAN>Joule now checks the input against the list of features it supports and implements them.</SPAN></FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4"><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Joule's artifacts creation based on prompt" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89129i22FFFBB604248066/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 2.47.30 PM.png" alt="Joule's artifacts creation based on prompt" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Joule's artifacts creation based on prompt</span></span></SPAN></FONT></P><P><FONT size="4">Click<SPAN>&nbsp;</SPAN><SPAN class="">Show Result</SPAN><SPAN>&nbsp;</SPAN>to review the generated artifacts. If fine, accept the changes to generate the project in your file system.</FONT></P><P><FONT size="4"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Accept Project Files" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89148i81AAB5D35285786D/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 3.05.12 PM.png" alt="Accept Project Files" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Accept Project Files</span></span></FONT></P><H3 id="toc-hId-1802310816"><EM>2.5. Preview the generated application</EM></H3><P><FONT face="arial,helvetica,sans-serif" size="4">Click run and debug.</FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Run and Debug" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89156iDDE79B3188404B5E/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 3.20.50 PM.png" alt="Run and Debug" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Run and Debug</span></span></FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4">The application's preview is displayed.</FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Application Preview" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89157i3674809E27A388A7/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 3.31.56 PM.png" alt="Application Preview" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Application Preview</span></span></FONT></P><P>Launch the contract management app.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Contract Management" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89160iF1A9225DABFE5EDD/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 3.40.32 PM.png" alt="Contract Management" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Contract Management</span></span></P><P>Select a contract from the list to view its details.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Select Contract" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89166i60CBA8ABFC8006B8/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 4.19.45 PM.png" alt="Select Contract" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Select Contract</span></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Contract details" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/89174i13869678640CC231/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-04-01 at 4.25.10 PM.png" alt="Contract details" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Contract details</span></span></P><H1 id="toc-hId--2102363971"><FONT color="#3366FF"><STRONG><U>Conclusion</U></STRONG></FONT></H1><P><FONT face="arial,helvetica,sans-serif" size="4">Joule's&nbsp;<SPAN>SAP Fiori tools</SPAN>&nbsp;generative AI can really expedite the SAP Fiori&nbsp;development by directly translating the business requirements into an&nbsp;SAP Fiori elements&nbsp;application containing a list report and one or two object pages as part of a CAP project. The generated application can further be adapted to accommodate more complex functionalities.</FONT></P><P><FONT face="arial,helvetica,sans-serif" size="4">With SAP Build Code, application is developed automatically following the "golden path," utilising SAP best practices and integrated assistance to build quickly and integrate seamlessly.</FONT></P><H1 id="toc-hId--2130693785">&nbsp;</H1><H1 id="toc-hId-1967760006"><FONT color="#3366FF"><STRONG><U>Further Information</U></STRONG></FONT></H1><P><FONT face="arial,helvetica,sans-serif" size="4"><A title="SAP Build Code" href="https://pages.community.sap.com/topics/build-code" target="_blank" rel="noopener noreferrer">SAP Build Code</A></FONT></P><P>&nbsp;</P><P>&nbsp;</P><P><SPAN>Please feel free to add a comment, should you have any queries.</SPAN><BR /><BR /><SPAN>Best Regards,</SPAN><BR /><SPAN>Anuradha Dhingan</SPAN></P> 2024-04-01T15:43:06.089000+02:00 https://community.sap.com/t5/technology-blogs-by-members/exposing-as-a-v2-odata-service-in-sap-cap/ba-p/13651295 Exposing as a V2 Odata Service in SAP CAP 2024-04-03T10:51:34.796000+02:00 Omkar_Ghadashi https://community.sap.com/t5/user/viewprofilepage/user-id/678497 <P>Hi All,</P><P>This Blog is regarding the exposing the SAP CAP service as V2 or V4 OData Service as per the requirment.</P><P>As you know, Smart Controls are only compatible with OData V2 [<A href="https://launchpad.support.sap.com/#/notes/0003036992" target="_self" rel="noopener noreferrer">Reference</A>].In order to use Smart Controls, the OData metadata document needs to contain a few key elements such as the "sap:" annotations. So for such requirements we can use the OData V2 Adapter for cds.</P><P>1) Create the SAP CAP Project using template.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_0-1711543367400.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87419iE5F2F72155CBAB5A/image-size/medium?v=v2&amp;px=400" role="button" title="oghadashi_0-1711543367400.png" alt="oghadashi_0-1711543367400.png" /></span></P><P>2) Add the Service and Data definition in SRV and DB folder respectively</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_2-1711543469712.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87422i723B9B7387019E13/image-size/medium?v=v2&amp;px=400" role="button" title="oghadashi_2-1711543469712.png" alt="oghadashi_2-1711543469712.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_1-1711543446378.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87421i7E72B0E5441D1CF1/image-size/medium?v=v2&amp;px=400" role="button" title="oghadashi_1-1711543446378.png" alt="oghadashi_1-1711543446378.png" /></span></P><P>or you can select the Minimal sample to add the sample content for your project</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_3-1711543557356.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87423iC60E684E8EB80FF4/image-size/medium?v=v2&amp;px=400" role="button" title="oghadashi_3-1711543557356.png" alt="oghadashi_3-1711543557356.png" /></span></P><P>3) install the adapter package to your project "<STRONG>npm add</STRONG><SPAN><STRONG> <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/163398">@cap</a>-js-community/odata-v2-adapter</STRONG>"</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_0-1711543659928.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87430iAB1B56A9D417C2F6/image-size/medium?v=v2&amp;px=400" role="button" title="oghadashi_0-1711543659928.png" alt="oghadashi_0-1711543659928.png" /></span></P><P>4) Add the Plugin to package.json</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_1-1711544011674.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87432i87E3B2715E0B89D9/image-size/medium?v=v2&amp;px=400" role="button" title="oghadashi_1-1711544011674.png" alt="oghadashi_1-1711544011674.png" /></span></P><P>5) execute the project and you will find the service being exposed in V2 and V4.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_2-1711544212692.png" style="width: 630px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87433iAFE950EB994F3AB1/image-dimensions/630x469?v=v2" width="630" height="469" role="button" title="oghadashi_2-1711544212692.png" alt="oghadashi_2-1711544212692.png" /></span><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_3-1711544235204.png" style="width: 632px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87435i1E78AD7CA20D75D4/image-dimensions/632x221?v=v2" width="632" height="221" role="button" title="oghadashi_3-1711544235204.png" alt="oghadashi_3-1711544235204.png" /></span><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oghadashi_4-1711544253494.png" style="width: 632px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/87436i6222426156D91D98/image-dimensions/632x209?v=v2" width="632" height="209" role="button" title="oghadashi_4-1711544253494.png" alt="oghadashi_4-1711544253494.png" /></span></P><P>Hope this is helpful for you !!</P><P>Reference:</P><P>1) <A href="https://cap.cloud.sap/docs/advanced/odata#odata-v2-support" target="_blank" rel="noopener nofollow noreferrer">Serving OData APIs | CAPire (cloud.sap)</A></P><P>2) <A href="https://www.npmjs.com/package/@cap-js-community/odata-v2-adapter" target="_blank" rel="noopener nofollow noreferrer">@cap-js-community/odata-v2-adapter - npm (npmjs.com)</A></P><P>Thanks,</P><P>Omkar</P> 2024-04-03T10:51:34.796000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/upgrade-sap-business-application-studio-to-sap-build-code/ba-p/13661500 Upgrade SAP Business Application Studio to SAP Build Code 2024-04-08T13:42:39.212000+02:00 rupamaity https://community.sap.com/t5/user/viewprofilepage/user-id/9300 <P>Dear Community,</P><P>SAP Build Code was made generally available on March 27. Since then, we have been following your posts and comments on social media. We are excited to see so many of you trying out the&nbsp;<A href="https://community.sap.com/t5/application-development-blog-posts/test-drive-joule-s-generative-ai-features-in-sap-build-code-now/ba-p/13649882" target="_blank">Test Drive</A>&nbsp;and exploring SAP Build Code.</P><P>We are already hearing a lot of great feedback that we plan to work on in the coming months.</P><P>One such customer request was to be able to migrate an existing SAP Business Application Studio instance to SAP Build Code.</P><P>We have now made this possible!&nbsp;Read on to migrate your SAP Business Application Studio instance to SAP Build Code.</P><P>We start with a subaccount where you have SAP Business Application Studio on the “standard” plan. &nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_0-1712494036901.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92401iC986A9C19A39E473/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_0-1712494036901.png" alt="rupamaity_0-1712494036901.png" /></span></P><P><SPAN><STRONG>Note</STRONG> - This subaccount can contain various other SAP BTP services. For the purposes of this blog, we will keep those services untouched. </SPAN></P><P>Let's begin!</P><OL><LI>In your subaccount, go to <STRONG>Services &gt; Service Marketplace</STRONG> and look for the SAP Build Code service.</LI><LI>Select the “standard” plan, click the Actions button, and then click <STRONG>Create</STRONG>. <span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_4-1712494565598.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92405iE620F9FF7E504032/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_4-1712494565598.png" alt="rupamaity_4-1712494565598.png" /></span><DIV class="">&nbsp;</DIV><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_6-1712494671977.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92407iBC9F2D7D02D51541/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_6-1712494671977.png" alt="rupamaity_6-1712494671977.png" /></span><P>&nbsp;</P></LI><LI><SPAN><SPAN><SPAN>Navigate back to the Instances and Subscriptions page. You should now see a new SAP Build Code entry in the <STRONG>Application</STRONG> section</SPAN></SPAN></SPAN></LI><LI><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_7-1712494762663.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92408i0B585CBB2A77244A/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_7-1712494762663.png" alt="rupamaity_7-1712494762663.png" /></span>In your subaccount, go to <STRONG>Entitlements</STRONG> and search for SAP Business Application Studio. Add the build-code plan to your subaccount</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_3-1712494436229.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92404iADAE45FA5181EEA0/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_3-1712494436229.png" alt="rupamaity_3-1712494436229.png" /></span><SPAN>5. Go to <STRONG>Instances and Subscriptions</STRONG>, on the SAP Business Application Studio row, click on Actions [...]&nbsp;and select <STRONG>Update</STRONG>.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_8-1712494873572.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92409iA9A2E1446371C999/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_8-1712494873572.png" alt="rupamaity_8-1712494873572.png" /></span></P><P>&nbsp;</P><P>5. Select the “build-code” plan and click on <STRONG>Update Subscription</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_9-1712494916827.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92410iFC4FA08B3D1439C4/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_9-1712494916827.png" alt="rupamaity_9-1712494916827.png" /></span></P><P>6. And that’s it!&nbsp;<SPAN>Click on SAP Build Code to navigate to the SAP Build Lobby.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_0-1712501715880.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92431iB0A268CF312CB911/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_0-1712501715880.png" alt="rupamaity_0-1712501715880.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_10-1712494990985.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92411iABC8D35D4B39315D/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_10-1712494990985.png" alt="rupamaity_10-1712494990985.png" /></span></P><P>7. You can now start creating your projects with SAP Build Code.</P><P><STRONG>Note</STRONG>&nbsp; - If you want to access projects that you created in SAP Business Application Studio earlier, you can still do so via the Dev Space Manager.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_11-1712495051726.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/92412i0B9FEA7114CA7880/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_11-1712495051726.png" alt="rupamaity_11-1712495051726.png" /></span></P><P>&nbsp;</P><P>We hope that this helps you make the move to SAP Build Code with ease.</P><P>We have many more great features coming up in the next few months, so keep an eye out for new releases.</P><P>And till then, happy coding!</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2024-04-08T13:42:39.212000+02:00 https://community.sap.com/t5/technology-blogs-by-members/consuming-capm-application-s-odata-service-into-sap-fiori-application-in/ba-p/13667392 Consuming CAPM Application's OData service into SAP Fiori Application in Business Application Studio 2024-04-16T12:50:31.978000+02:00 Chetan_Bhatt https://community.sap.com/t5/user/viewprofilepage/user-id/1429690 <P style=" text-align : justify; "><STRONG>OBJECTIVE-:</STRONG></P><P style=" text-align : justify; ">Consuming OData Service of CAPM Application into SAP Fiori Application in Business Application Studio.</P><P style=" text-align : justify; "><STRONG>CAPM (Cloud Application Programming Model)-:</STRONG></P><P style=" text-align : justify; ">It is an open-source framework that uses tools, libraries, and languages to create applications that can be used across multiple SAP products. CAPM is a multi-target application that runs at different times, with the persistence layer running in the HANA DB run time, the server layer running in the Node.js run time, and the UI/UX layer running in the browser run time.</P><P style=" text-align : justify; ">CAPM is one of the approaches to developing cloud applications using the BTP platform. CAPM offers a more structured and seamless framework for data modelling and enhancing integration with services.</P><P style=" text-align : justify; "><STRONG>Advantage of CAPM over other approaches-:</STRONG></P><UL style=" text-align : justify; "><LI>It enables full-stack development in the same environment. (BAS), eliminating the need to switch between different environments for the backend and frontend development.</LI><LI>It offers flexibility in language selection, allowing developers to work with multiple languages according to their needs. BAS provides easy connectivity to required extensions for this purpose.</LI><LI>Seamless integration with git and other applications via APIs facilitating extension or development of the application.</LI><LI>Automatically handling dependencies to a certain extent, reducing frustration, and improving development speed. For example, handling the OData after exposing all entities and making it easier to consume in the UI.</LI></UL><P style=" text-align : justify; "><STRONG>Prerequisites-:</STRONG></P><UL style=" text-align : justify; "><LI>Create a CAPM project.</LI><LI>Log in to Cloud Foundry Credentials.</LI><LI>Ensure the HANA Database is created and running (I Used it for storage and data creation).</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_0-1712859475702.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95284iF96BE8EFB182149E/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_0-1712859475702.png" alt="Chetan_Bhatt_0-1712859475702.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_1-1712859475728.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95285iC96312CDDC8F56E6/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_1-1712859475728.png" alt="Chetan_Bhatt_1-1712859475728.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Set up a Dev Space.</LI><LI>Create a SAP Build Work Zone instance to act as a Fiori Launchpad for the CAPM Application</LI></UL><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; "><STRONG>You Have to create a new Destination in BTP (Connectivity -&gt; Destination)-:</STRONG></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_2-1712859475732.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95283i2F37A3A4212C375A/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_2-1712859475732.png" alt="Chetan_Bhatt_2-1712859475732.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; ">This destination will be used for passing system information when creating a Fiori Application.</P><P style=" text-align : justify; ">For the URL, DEPLOY YOUR APPLICATION IN CLOUD FOUNDRY (Cloud Foundry -&gt;Spaces -&gt;Dev (Space Name)-&gt;Your Service (here it is CAPMChetan-srv) and copy Application Routes).</P><P style=" text-align : justify; ">This URL will be shown only when you deploy your CAPM Application in Cloud Foundry-&gt; A new blog will be there to deploy the CAPM Application.</P><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_3-1712859475740.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95288i831E1DE5FA2B9750/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_3-1712859475740.png" alt="Chetan_Bhatt_3-1712859475740.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; ">For Authorization, use the same authorization as created in the package.json -&gt; a new blog will create a security configuration.</P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; ">Now that the destination for the service is configured, proceed to create a FIORI APP: -</P><UL style=" text-align : justify; "><LI>Open SAP BAS (Business Application Studio).</LI><LI>Open DEV Space where you want to create a Fiori Application.</LI><LI>Go to File -&gt; New Project From template.</LI><LI>Choose a project from the Template (SAP Fiori Application).</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_4-1712859475749.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95287i3F3554B2250D61A3/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_4-1712859475749.png" alt="Chetan_Bhatt_4-1712859475749.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Choose any Template of your choice.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_5-1712859475756.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95286iD67EBDD9E6AB118C/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_5-1712859475756.png" alt="Chetan_Bhatt_5-1712859475756.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>In Data Source choose to connect to a system.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_6-1712859475760.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95290iDCCA5D3A65D7000B/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_6-1712859475760.png" alt="Chetan_Bhatt_6-1712859475760.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_7-1712859475765.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95289i29335856F2EFABAA/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_7-1712859475765.png" alt="Chetan_Bhatt_7-1712859475765.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Specify the Destination created earlier.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_8-1712859475769.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95291i0B4CF5E35759FC40/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_8-1712859475769.png" alt="Chetan_Bhatt_8-1712859475769.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>In the service path, specify the service path of the OData service that can be obtained by running the command “cds watch –profile hybrid” in your CAPM Project.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_9-1712859475773.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95292i7F0BC76D1160938D/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_9-1712859475773.png" alt="Chetan_Bhatt_9-1712859475773.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Click on next.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_10-1712859475781.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95293i7930C75401EC6C12/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_10-1712859475781.jpeg" alt="Chetan_Bhatt_10-1712859475781.jpeg" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Select any entity from the given list of entities &nbsp;you created in your project.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_11-1712859475788.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95294i28FD073ED8BABEB0/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_11-1712859475788.png" alt="Chetan_Bhatt_11-1712859475788.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Customize the project attributes.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_12-1712859475796.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95295i56DC0BF8208D9582/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_12-1712859475796.png" alt="Chetan_Bhatt_12-1712859475796.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Choose the target as Cloud Foundry and select the Destination name among the list of destination names (You can go with either Local CAPM Project API and the name of your destination too).</LI></UL><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_13-1712859475804.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95297i448D5B4C126A031A/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_13-1712859475804.png" alt="Chetan_Bhatt_13-1712859475804.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Now, your FIORI project is created and is ready to use.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_14-1712859475814.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95296i4C2BAADDC20B1DDD/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_14-1712859475814.png" alt="Chetan_Bhatt_14-1712859475814.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>Go to run configuration and start the project as usual.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_15-1712859475821.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95298i8507FAEBE3A69EB2/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_15-1712859475821.png" alt="Chetan_Bhatt_15-1712859475821.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><UL style=" text-align : justify; "><LI>You can now run this Fiori Application which is the result of an Application created from CAPM.</LI></UL><P style=" text-align : justify; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chetan_Bhatt_16-1712859475830.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95299iEBFF2F273E03EB7A/image-size/medium?v=v2&amp;px=400" role="button" title="Chetan_Bhatt_16-1712859475830.png" alt="Chetan_Bhatt_16-1712859475830.png" /></span></P><P style=" text-align : justify; ">&nbsp;</P><P style=" text-align : justify; ">&nbsp;</P> 2024-04-16T12:50:31.978000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-with-sap-build-apps-connectivity-options-for-low-code/ba-p/13666667 Consuming SAP with SAP Build Apps - Connectivity options for low-code development - part 2 2024-04-16T13:51:25.397000+02:00 LudoNoens https://community.sap.com/t5/user/viewprofilepage/user-id/15040 <P>This blog post is the second in a series of posts that cover the connectivity options available for SAP Build Apps to interface with SAP systems. In case you've missed it, part 1 of the series can be found <A title="Consuming SAP with SAP Build Apps - Connectivity options for low-code development - part 1" href="https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-with-sap-build-apps-connectivity-options-for-low-code/ba-p/13604697" target="_blank">here</A>. 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;Just like in real-world scenarios, we will start with a very basic app and gradually enhance it.&nbsp;</P><P>&nbsp;</P><H1 id="toc-hId-862640484">Introduction</H1><P>Before we get into the details of setting up connections between SAP Build Apps and SAP Systems, I intend to introduce SAP technology components in each post that are relevant for the use cases covered in the series.&nbsp;</P><H2 id="toc-hId-795209698">IAS</H2><P>SAP Identity Authentication Service (IAS) is a cloud service for authentication, single sign-on, and user management in SAP cloud and on-premise applications.&nbsp;<SPAN>It can act as an identity provider or be used as a proxy to integrate with an existing single sign-on infrastructure.&nbsp;</SPAN><SPAN>IAS offers the following features:</SPAN></P><DIV class=""><DIV class=""><UL><LI><SPAN>Authentication:&nbsp;</SPAN><SPAN>Standardized methods, flexible options, and password policies</SPAN></LI><LI><SPAN>Integration:&nbsp;</SPAN><SPAN>Flexible scenarios with existing identity providers and corporate IdPs</SPAN></LI><LI><SPAN>User experience:&nbsp;</SPAN><SPAN>Customizable look-and-feel, self-service capabilities, and invitation workflows</SPAN></LI><LI><SPAN class="">Security:<SPAN>&nbsp;</SPAN></SPAN><SPAN class="">Risk-based authentication, two-factor authentication, and delegated authentication</SPAN></LI></UL></DIV></DIV><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="IAS.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/96895i73675218ACE71387/image-size/large?v=v2&amp;px=999" role="button" title="IAS.png" alt="IAS.png" /></span></P><H1 id="toc-hId-469613474">&nbsp;</H1><H1 id="toc-hId-273099969">Use case B : Control access to the CAP service through Roles</H1><P>For this use case, we will enhance the previously&nbsp;created basic CAP project in <FONT color="#FF00FF"><STRONG>SAP Build Code</STRONG></FONT>&nbsp;and introduce Roles to control access to the service.&nbsp;Depending on the user’s Role, the access and capabilities are controlled. As SAP Build Apps uses IAS for authentication, the configuration&nbsp;is a bit more complicated. Follow along the steps below to learn how to get this set up.</P><H2 id="toc-hId-205669183">Creating Roles</H2><P>We go back to the Storyboard in SAP Build Code (or SAP Business Application Studio, depending on your subscription) and select the menu Open Editor. Select User Roles. This will open the <STRONG>Authorization Editor</STRONG>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_0-1712826726186.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95004i57B0CE5E472C970C/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_0-1712826726186.png" alt="LudoNoens_0-1712826726186.png" /></span></P><P>First, let’s create a role called ProductsViewer, allowing the user to read the product list. Select the + button to add a new role, configure as shown below and save it.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_1-1712826842186.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95005iC724A36D572C3754/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1712826842186.png" alt="LudoNoens_1-1712826842186.png" /></span></P><P>Select the ProductsViewer role and select your service for the Service Assignments. Click Add Service Entities and toggle the Assigned button for Component "Products" to On. For the Privileges, keep the default "Read". Select Save. The ProductsViewer should now be configured as follows:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1712827358137.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95021i41A76E6C7BEC6C87/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1712827358137.png" alt="LudoNoens_2-1712827358137.png" /></span></P><P>We will add another role called ProductsManager, allowing full access to the data. We could go even further into details on which actions a user is allowed to perform (e.g. Read, Update, Delete). But to keep this example short, we’ll just give the manager full access.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_0-1712894031435.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95423i5C2905D4D620624F/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1712894031435.png" alt="LudoNoens_0-1712894031435.png" /></span></P><P>To apply this Role-based access control to the service, we will have to redeploy it. Follow the steps as mentioned previously to deploy the CAP-based service.</P><P>After successful redeployment, you will find 2 new Role Collections in your BTP subaccount's cockpit. The names of the Role Collections were automatically generated and contain the roles we had specified in the Authorization Editor.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_1-1712896023131.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95430i48A0B10FF5AA9B75/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1712896023131.png" alt="LudoNoens_1-1712896023131.png" /></span></P><H2 id="toc-hId-9155678">&nbsp;</H2><H2 id="toc-hId--187357827">Informing the user in case data access is denied</H2><P>Before we move on and run the UI application, let's add a small enhancement in SAP Build Apps to inform the user when data access is denied. Without this enhancement the user will be left in the dark in case the products list is not showing up.</P><P>Go to the SAP Build Apps designer and select the UI CANVAS tab. Switch from VIEW to VARIABLES. Go to DATA VARIABLES and select the ProductsList we have added in the previous blog post. At the bottom of the page, open the logic canvas by selecting the "Add logic to HOME PAGE". Now drag and drop "Dialog | Alert" onto the canvas. Connect the failure output node (bottom connector) of "Data | Get record collection" to the input node of "Dialog | Alert".</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_0-1713237525866.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/96879i48C044ED9A890ABA/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1713237525866.png" alt="LudoNoens_0-1713237525866.png" /></span></P><P>Select the alert dialog and change the title. For this example use case, I am going to make the assumption that in case of any failure, the reason is that the user doesn't have access to the service data. There could actually be other reasons, but we'll ignore this here. Change the Dialog title to "Access denied". For the Dismiss button label, you can use the default "Ok". In my case, I've changed it to "Understood". For the dialog message, bind a formula as shown below and save your changes. Besides the message "You do not have access to the products list.", the formula will output the technical error message.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1713168595806.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/96475i0FE6B0AC6D64B064/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1713168595806.png" alt="LudoNoens_2-1713168595806.png" /></span></P><H2 id="toc-hId--383871332">Quick preview of the UI app</H2><P>We are actually <STRONG>not</STRONG> <STRONG>done</STRONG> configuring the Role Collections for your user at this point. So let us try the enhancement. If we would run the app now, it should inform us that access is denied.&nbsp;</P><P>In SAP Build Apps, select the LAUNCH tab and select "Open preview portal".</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_4-1713172356910.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/96508iF4C5BD961B20A864/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_4-1713172356910.png" alt="LudoNoens_4-1713172356910.png" /></span></P><H2 id="toc-hId--580384837">&nbsp;</H2><H2 id="toc-hId--776898342">Assigning Roles to users</H2><P>To provide the user access to the data service, we now have to ensure the user has the required Roles assigned. For this, we have 2 options:</P><OL class="lia-list-style-type-lower-alpha"><LI>Assign Role Collections to the Custom IdP (IAS) user in the BTP Cockpit.</LI><LI>Create a Group in the custom IdP; assign users to this group; and map this Group to a Role Collection in the BTP Cockpit. This is a better option in case you are planning to expose the data to a larger group of users.<BR /><BR /></LI></OL><H2 id="toc-hId--626157490">Assign Role Collection to the Custom IdP user in the BTP Cockpit</H2><P>Assigning the role collection to the custom IdP user works best for the developer use case, where a limited set of users is to be provided access to the data offered through the service. You'll basically have to apply this for each user / developer in your team.</P><P>Go to the BTP subaccount cockpit and navigate to the Security &gt; User tab. As you are using two identity providers, you will see your user for the Identity Provider “Custom IAS tenant” and “Default identity provider”. SAP Build Apps makes use of the “Custom IAS tenant”. Therefore, we need to ensure this user is assigned to the necessary Role Collection. Depending on your use case, you can assign yourself the “manager” or “viewer” role, as defined for your service.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_0-1713184880937.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/96603i3EA4D6ECBEA7849E/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1713184880937.png" alt="LudoNoens_0-1713184880937.png" /></span></P><P>Note that without assigning a Role Collection to your user, you will not have access to the data. You will still be able to connect to the destination and check the entity types exposed; but you will not see any data and receive a 403 error, indicating you have no permission to access the data itself. In case you run into this, and you've updated the Role Collections assigned to your user, then please log out and log in again to ensure&nbsp; the new Roles take effect.&nbsp;</P><H2 id="toc-hId--822670995">Mapping a Group in Custom IAS tenant to a Role Collection in the BTP Cockpit</H2><P>As mentioned, this option is more suitable when managing access for larger group of users.</P><P>Go to the BTP subaccount cockpit and navigate to the Security &gt; Trust Configuration tab. Open the link to the Custom IAS tenant.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_3-1712897437843.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95439i7778BFE372EAEDE5/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_3-1712897437843.png" alt="LudoNoens_3-1712897437843.png" /></span></P><P>On the overview page, open the link to the Host Name of Identity Authentication Tenant. This brings you to the administration page of the SAP Cloud Identity Service.&nbsp;Assuming you have set up a user here, navigate to Users &amp; Authorizations &gt; Groups.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_5-1712897639878.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95443i47291B9270437E4B/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_5-1712897639878.png" alt="LudoNoens_5-1712897639878.png" /></span></P><P>Select the “+ Create” button to create a new Group. Provide a Name, Display Name and description.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_0-1712899584090.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95447i9AFFAC66B6E3D52B/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_0-1712899584090.png" alt="LudoNoens_0-1712899584090.png" /></span></P><P>Once the group is created, select it to manage the users of the group. Select the “+ Add” button. You can easily pick users known in the system.</P><P>Follow the same steps to create a new Group for Managers who have full access.</P><P>Now that you’ve set up Groups in SAP Cloud Identity Services, go back to the BTP subaccount cockpit and navigate to the tab Security &gt; Role Collections. Select the Role Collection you want to assign to the IAS Group. Select the “Edit” button, so you can make changes. In the section User Groups, you can select the Identity Provider “Custom IAS tenant” and enter the exact name of the Group, as defined in IAS.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_1-1712899941211.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95451iBFE27102B0BA3897/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1712899941211.png" alt="LudoNoens_1-1712899941211.png" /></span></P><P>Save your changes. The mapping will also be reflected in the Role Collections overview.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1712900163718.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95454iC8E19F3AE88D423B/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1712900163718.png" alt="LudoNoens_2-1712900163718.png" /></span></P><H2 id="toc-hId--1019184500">&nbsp;</H2><H2 id="toc-hId--1215698005">Testing the newly added access control</H2><P>To test the access control, please assign only the 'Viewer' Role Collection to your user. Take note that there are two ways to do this: in SAP Cloud Identity Services and in the BTP subaccount cockpit.&nbsp;</P><P>Log out and log in again to ensure your changes are used in the system. Please note that&nbsp;<SPAN class="">changes in Role Collections assigned to custom IdP users can take some time to propagate. If you notice your changes have not taken effect yet, please have some patience.</SPAN></P><P>The app we have created so far only allows users to view a product list. To make changes or add new entries, we can use the data functionality built into SAP Build Apps.&nbsp;Open SAP Build Apps, navigate to the Data tab and select the Products OData integration. Select BROWSE REAL DATA.</P><P>If you don't see data for the Products entity, then you've probably missed a step described above.</P><P>Select an entry and make changes to the name and the price. Then, select SAVE RECORD.&nbsp;</P><P>Having the Viewer role, you will not be able to change or add entries. Your request will fail with status code 403.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1713239859797.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/96889iF94914FAC081EE55/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1713239859797.png" alt="LudoNoens_2-1713239859797.png" /></span></P><P>When you add the Administrator role collection to your user, you will be able to change and add records. But again, please note that you'll have to log out and log in again, and have some patience before these changes take effect.</P><P>Note that we have not (yet) deployed any UI application at this point. We have been running our app in the context of SAP Build Apps.</P><H2 id="toc-hId--1412211510">Summary – use case B</H2><P>Without writing a single line of code, we have added Role-based access control to the CAP-based service. With this in place, authentication to the platform is not enough for users to access the data we have exposed through the service. We have added Roles to the user by assigning platform Role Collections to the Custom IdP user or mapping the Custom IdP group to a specific Role Collection. Depending on platform Roles assigned, a user will be able to perform specific actions on the data. The service is still made available to platform users through a BTP destination and it is discoverable for SAP Build Apps. In SAP Build Apps, we have added an integration to the CAP service through the destination. The destination forms the bridge between the CAP-based service and the applications consuming it.<BR /><BR /></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1713267280552.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/97059iCF3F85AE4670DB98/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1713267280552.png" alt="LudoNoens_2-1713267280552.png" /></span></P><P>&nbsp;</P><H1 id="toc-hId--1315322008">What's next</H1><P>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">next blog post</A>, we will create dedicated mobile apps that can consume the data service we have enhanced in this post. For authentication, we will be adding SAP Mobile Services into the solution diagram.</P> 2024-04-16T13:51:25.397000+02:00 https://community.sap.com/t5/technology-blogs-by-members/embracing-typescript-in-sapui5-development/ba-p/13675744 Embracing TypeScript in SAPUI5 Development 2024-04-22T11:05:53.164000+02:00 SimonMDM https://community.sap.com/t5/user/viewprofilepage/user-id/1441755 <P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SimonMDM_0-1713517469569.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/98682iF004C9A377DF935C/image-size/medium?v=v2&amp;px=400" role="button" title="SimonMDM_0-1713517469569.png" alt="SimonMDM_0-1713517469569.png" /></span></P><P>&nbsp;</P><P><SPAN>Throughout 11 years of SAP development, I've seen the evolution of SAP's vision for its ERP, particularly with the introduction of FIORI, marking a significant shift towards user-experience-centered innovation. Developers have also been considered with tools like UI5, BAS, and more recently SAP BUILD Code. Now, I will focus on the introduction of TypeScript (TS) into SAPUI5, sharing my experience and observations while developing Fiori applications in TS for a specific project.</SPAN></P><H2 id="toc-hId-992617829"><SPAN>Understanding TypeScript: A Brief Introduction</SPAN></H2><P><SPAN>TypeScript (TS), developed by Microsoft, extends JavaScript (JS) by incorporating features like static typing, interfaces, and classes: commonly found in object-oriented programming. The compilation of TypeScript into JavaScript before execution enables the detection of programming errors during development, fostering code quality and robustness.</SPAN></P><P><I><SPAN>If you'd like to delve deeper:<BR /></SPAN></I><A href="https://www.typescriptlang.org/" target="_blank" rel="noopener nofollow noreferrer"><SPAN>TypeScript: JavaScript With Syntax For Types. (typescriptlang.org)</SPAN></A></P><H2 id="toc-hId-796104324"><SPAN>SAP &amp; TypeScript: A Not-So-New Collaboration</SPAN></H2><P><SPAN>SAP's journey with TypeScript began in 2021 as part of a "beta experimental" phase, paving the way for developers to explore this new avenue in application development. In 2023, during UI5con, SAP officially announced TypeScript support for UI5 starting from version 1.116.0.</SPAN></P><P><I><SPAN>For further details:<BR /></SPAN></I><A href="https://community.sap.com/t5/technology-blogs-by-sap/typescript-for-ui5-yay-it-s-official-and-a-round-up-of-recent-changes/ba-p/13570051" target="_blank"><SPAN>TypeScript for UI5: “Yay, it’s official!” – and a ... - SAP Community</SPAN></A></P><H2 id="toc-hId-599590819"><SPAN>Feedback and Experience Sharing</SPAN></H2><P><SPAN>Today, rather than a tutorial on TypeScript development (perhaps in another blog <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span>), I aim to share my personal experience and insights, motivating those who are curious yet hesitant to take the plunge.</SPAN></P><H2 id="toc-hId-403077314"><SPAN>Advantages of TypeScript Integration</SPAN></H2><H3 id="toc-hId-335646528"><STRONG>Static Typing:</STRONG></H3><P><SPAN>The first error you'll encounter when starting with TypeScript is compilation errors due to missing typings! However, this very aspect underscores one of TypeScript's greatest strengths…</SPAN></P><P>&nbsp;</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SimonMDM_1-1713517469331.png" style="width: 292px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/98680i10E7B974211A3D9C/image-dimensions/292x127?v=v2" width="292" height="127" role="button" title="SimonMDM_1-1713517469331.png" alt="SimonMDM_1-1713517469331.png" /></span><BR /><I><SPAN>example of static typing for a structure</SPAN></I></P><P>&nbsp;</P><P><SPAN>By explicitly specifying data types, TypeScript detects typing errors during compilation, fostering code reliability and reducing the risk of runtime errors. At the beginning of your project, you might see a lot of errors flagged in red, but it will quickly become a natural part of the development process.</SPAN></P><P>&nbsp;</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SimonMDM_2-1713517469327.png" style="width: 543px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/98681iAC52D08884032AC0/image-dimensions/543x118?v=v2" width="543" height="118" role="button" title="SimonMDM_2-1713517469327.png" alt="SimonMDM_2-1713517469327.png" /></span><I><SPAN>example of TS error for missing types</SPAN></I></P><P>&nbsp;</P><P><SPAN>It prevents errors that might otherwise require tedious debugging later on. And a big plus, it makes understanding the code easier, especially when dealing with a developer who isn't generous with comments <span class="lia-unicode-emoji" title=":grinning_face_with_sweat:">😅</span>. This investment proves to be profitable in the long term for application maintenance, as it helps reduce errors introduced during future modifications.</SPAN></P><P>&nbsp;</P><P><SPAN>To find the correct type when using a method, I refer to the </SPAN><A href="https://ui5.sap.com/#/api/" target="_blank" rel="noopener noreferrer"><SPAN>API Reference - Demo Kit - SAPUI5 SDK</SPAN></A><SPAN> website. Alternatively, we can use </SPAN><STRONG>BAS</STRONG><SPAN>; if we hover the mouse over the method, a pop-up appears and provides the types that can be used.</SPAN></P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SimonMDM_3-1713517469422.png" style="width: 550px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/98684i21472E0461349866/image-dimensions/550x120?v=v2" width="550" height="120" role="button" title="SimonMDM_3-1713517469422.png" alt="SimonMDM_3-1713517469422.png" /></span><I><SPAN>example of documentation included in BAS</SPAN></I></P><H3 id="toc-hId-139133023"><STRONG>Interfaces and Inheritance:</STRONG></H3><P><SPAN>Drawing from object-oriented principles, TypeScript empowers developers with the creation of classes, interfaces, and inheritances. Interfaces offer great convenience as they allow us to precisely define the structure of objects, specifying the necessary properties along with their associated data types. They are truly a "must-have" as they ensure code consistency, making it easier to maintain and evolve. Moreover, the ability to reuse these interfaces throughout the application contributes to a modular and efficient design.</SPAN></P><P>&nbsp;</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SimonMDM_4-1713517469397.png" style="width: 485px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/98683i1602C4400F73954A/image-dimensions/485x50?v=v2" width="485" height="50" role="button" title="SimonMDM_4-1713517469397.png" alt="SimonMDM_4-1713517469397.png" /></span><I><SPAN>example of interface definition</SPAN></I></P><H3 id="toc-hId--57380482"><STRONG>ES6 Features:</STRONG></H3><P><SPAN>Another aspect I particularly appreciated was the ES6 features. Although not specific to TypeScript, it was my experience with this language that led me to these features. They allow for writing more elegant and clear code, while ensuring application logic with fewer lines, greatly simplifying maintenance.</SPAN></P><H2 id="toc-hId--382976706"><SPAN>Challenges Faced and Overcome</SPAN></H2><H3 id="toc-hId--450407492"><STRONG>Library Integration:</STRONG></H3><P><SPAN>Despite its advantages, integrating TypeScript with SAP libraries sometimes presented challenges. For example, I needed to use the "sap/ushell/Container" libraries into a project extension: my project refused to compile because TypeScript didn't know "sap/ushell/Container".</SPAN></P><P><I><SPAN>Issue raised on GitHub </SPAN></I><SPAN>:</SPAN><SPAN><BR /></SPAN><A href="https://github.com/SAP/ui5-typescript/issues/347" target="_blank" rel="noopener nofollow noreferrer"><SPAN>`sap.ushell.Container` removed in 1.100? · Issue #347 · SAP/ui5-typescript · GitHub</SPAN></A></P><P><SPAN>So developers may encounter issues such as missing typings or compatibility issues, requiring workarounds until resolved by SAP through updates.</SPAN></P><H3 id="toc-hId--646920997"><STRONG>Learning Curve:</STRONG></H3><P><SPAN>Transitioning from JavaScript to TypeScript may involve a learning curve for developers unfamiliar with static typing and TypeScript-specific syntax. While the initial investment in learning TypeScript pays off in the long run, it may temporarily impact development velocity.</SPAN></P><H2 id="toc-hId--625262864"><SPAN>Conclusion</SPAN></H2><P><SPAN>While at first I complained about having to give up my good old JavaScript for TypeScript (like a good Frenchman <span class="lia-unicode-emoji" title=":grinning_face_with_sweat:">😅</span>), I finally got the taste for TypeScript and wouldn't go back for anything in the world. From enhanced development comfort to improved code maintenance and readability, TypeScript has become an indispensable tool in my SAPUI5 arsenal.</SPAN><SPAN><BR /></SPAN><SPAN>With trust in SAP's commitment to resolving library-related issues, my journey with TypeScript continues to evolve, promising a future of enriched development experiences!</SPAN></P><P>&nbsp;</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SimonMDM_5-1713517469554.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/98685i209D257F6E86C232/image-size/medium?v=v2&amp;px=400" role="button" title="SimonMDM_5-1713517469554.png" alt="SimonMDM_5-1713517469554.png" /></span><EM>credit:&nbsp;<A href="https://twitter.com/ChickyThoughts" target="_blank" rel="nofollow noopener noreferrer">Chicken Thoughts (@ChickyThoughts) / X (twitter.com)</A></EM></P><P>&nbsp;</P><P>&nbsp;</P> 2024-04-22T11:05:53.164000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/what-s-new-in-mobile-development-kit-client-24-4/ba-p/13667946 What’s new in Mobile development kit client 24.4 2024-04-23T10:28:24.247000+02:00 Jitendra_Kansal https://community.sap.com/t5/user/viewprofilepage/user-id/3305 <P>I am happy to announce that a new release of the Mobile Development Kit(MDK) is now available for all Mobile Services customers. It can be downloaded from the <A href="https://launchpad.support.sap.com/?sap-support-employee=true#/softwarecenter/template/products/_APP=00200682500000001943&amp;_EVENT=NEXT&amp;HEADER=Y&amp;FUNCTIONBAR=Y&amp;EVENT=TREE&amp;NE=NAVIGATE&amp;ENR=73555000100800001081&amp;V=MAINT&amp;TA=ACTUAL/MOBILE%20DEVELOPMENT%20KIT%20CLIENT" target="_blank" rel="noopener noreferrer">SAP Software Center&nbsp;</A><SPAN>and the community</SPAN>&nbsp;<A href="https://developers.sap.com/trials-downloads.html?search=Mobile%20development%20kit" target="_blank" rel="noopener noreferrer">Download page</A>. Additionally, the SAP Mobile Services Clients available on the App Store and Google Play have been updated with this new release.<BR /><BR />SAP Mobile Development Kit enables developers and technical business users to build multi-channel applications. It allows you to build your application once, in an integrated development environment (SAP Business Application Studio/ VSCode extension) and run it natively on Mobile (Android &amp; iOS) and as a web application (online) in the browser. This release includes the following:</P><UL><LI><STRONG>New UI enhancements</STRONG><UL><LI><A href="#FioriToolbar" target="_self" rel="nofollow noopener noreferrer">Fiori Toolbar</A></LI><LI><A href="#ControlAboveTab" target="_self" rel="nofollow noopener noreferrer">Support additional Controls above Tabs</A></LI><LI><A href="#MultipleBackNav" target="_self" rel="nofollow noopener noreferrer">Multiple Back Navigation</A></LI></UL></LI><LI><STRONG>API &amp; Syntax enhancements</STRONG><UL><LI><A href="#LP" target="_self" rel="nofollow noopener noreferrer">Enhance List Picker Return Value</A>&nbsp;</LI><LI><A href="#AppName" target="_self" rel="nofollow noopener noreferrer">ClientAPI function to return MDK Application Name</A></LI><LI><A href="#WriteToPath" target="_self" rel="nofollow noopener noreferrer">WriteToFilePath property for OData DownloadMedia and Download-Stream actions</A>&nbsp;</LI></UL></LI><LI><A href="#SimplifiedQRCode" target="_self" rel="nofollow noopener noreferrer">Support Simplified QR Code for Onboarding in Android Client</A></LI><LI><A href="#MDKBAS" target="_self" rel="nofollow noopener noreferrer">MDK editor enhancements</A><UL><LI><A href="#Toggle" target="_self" rel="nofollow noopener noreferrer">Go to code Toggle</A>&nbsp;</LI><LI><A href="#destination" target="_self" rel="nofollow noopener noreferrer">Connect or sync an SSO based mobile destination</A></LI></UL></LI></UL><H2 id="toc-hId-991755814"><STRONG>Fiori Toolbar</STRONG></H2><P>We have introduced a new SAP Fiori style Toolbar in MDK that allows the developers to do things such as customize the buttons, helper texts, overflow button and enable or disable the toolbar based on their business requirement.&nbsp;For more information, refer to&nbsp;<A href="https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/features/fiori-ui/mdk/toolbars.html" target="_blank" rel="noopener noreferrer">Toolbars</A>.</P><P>The buttons in the toolbar are automatically positioned based on the number of buttons defined. For instance:</P><UL><LI>One toolbar item:</LI><UL><LI>On phone: stretches across the toolbar</LI><LI>On tablet: Item is aligned to the right</LI></UL><LI>Two toolbar items:</LI><UL><LI>On phone - Items are placed on either side of the layout, left and right.</LI><LI>On tablet - Items are aligned to the right. However, on Android tablets, if the&nbsp;HelperText&nbsp;is defined, the items are placed on either side of the layout.</LI></UL><LI>Three or more toolbar items:</LI><UL><LI>On phone - Only two items will be displayed, aligned to the right while the rest will be pushed into the overflow button.</LI><LI>On tablet - If there are three toolbar items, then all three items will be displayed and aligned to the right. In cases where there are more than three items, the excess items will be pushed into the overflow button.</LI></UL></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Fiori Toolbar with one, two and more than two buttons on iOS" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/97731iEFDBCADEA328C927/image-size/large?v=v2&amp;px=999" role="button" title="FioriToolbar_iOS.png" alt="Fiori Toolbar with one, two and more than two buttons on iOS" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Fiori Toolbar with one, two and more than two buttons on iOS</span></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Fiori Toolbar with one, two and more than two buttons on Android" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/97728i56FC7E15C0D2B315/image-size/large?v=v2&amp;px=999" role="button" title="FioriToolbar_Android.png" alt="Fiori Toolbar with one, two and more than two buttons on Android" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Fiori Toolbar with one, two and more than two buttons on Android</span></span></P><P>&nbsp;Additionally, we have introduced <A href="https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/apidoc/classes/pageproxy.html#getfioritoolbar" target="_blank" rel="noopener noreferrer">getFioriToolbar</A> API. This returns the FioriToolbarProxy instance of the associated Fiori toolbar of that page</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-javascript"><code>Context.getPageProxy().getFioriToolbar();</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>If you have used MDK toolbar in your application, you can migrate your app with new Fiori Toolbar in SAP Business Application Studio. (Right click <STRONG>Application.app</STRONG>&gt;<STRONG>MDK:Migrate</STRONG>).</P><H2 id="toc-hId-795242309"><STRONG>Support additional Controls above Tabs</STRONG></H2><P>MDK now supports additional controls above the Tab Bar in addition to the Header controls. You can now add any controls and extensions above the Tab Bar. The area of the tabs is a fixed size based on the number of the controls rendered on page load. Changing visibility of controls or using controls that expand in place should be avoided at this time.</P><P><STRONG>Note:</STRONG> While users have the flexibility to choose the type and number of controls to be placed above the tab bar, we highly recommend avoiding overcrowding, as it does reduce the tab page's body area on the screen.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Object Header, Button Table and Form Cell List Picker controls above Tab Bar in iOS and Android clients" style="width: 668px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/97772i61C9ADF20F50C98A/image-dimensions/668x690?v=v2" width="668" height="690" role="button" title="ControlsAboveTab.png" alt="Object Header, Button Table and Form Cell List Picker controls above Tab Bar in iOS and Android clients" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Object Header, Button Table and Form Cell List Picker controls above Tab Bar in iOS and Android clients</span></span></P><H2 id="toc-hId-598728804">&nbsp;<STRONG>Multiple Back Navigation</STRONG></H2><P>A new property&nbsp;<A href="https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/schemadoc/Action/ClosePage.schema.html#navigatebacktopage" target="_blank" rel="noopener noreferrer">NavigateBackToPage</A>&nbsp;is added in the&nbsp;<A href="https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/schemadoc/Action/ClosePage.schema.html" target="_blank" rel="noopener noreferrer">ClosePage</A> Action.This property will allow the users to navigate back to the defined page. This property accepts name of the target page as the input (target page name is assigned to the&nbsp;_Name&nbsp;property of the page). If you have multiple pages opened with the same name in the navigation stack, the NavigateBackToPage reference will return to the most recent occurrence of the specified page name.<BR /><BR /><STRONG>Note:</STRONG> OnReturning events bound to pages between the current page and the page specified by the NavigateBackToPage property are not triggered.</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-javascript"><code>{ "_Type": "Action.Type.ClosePage", "ActionResult": { "_Name": "MultiBack" }, "NavigateBackToPage": "StartingPage", "OnFailure": "/MDKApp/Actions/BackNavigation/MultiBack_Failure.action" }</code></pre><P>&nbsp;</P><P>&nbsp;</P><H2 id="toc-hId-402215299"><STRONG>Enhance List Picker Return Value</STRONG></H2><P>When selecting an item in the List Picker Form Cell control, &nbsp;there are times that the return value needed to be a unique value but that there were also other values needed from the selected record.&nbsp;To access the additional values in the entity set, a second read call was needed to be performed which caused extra efforts for developers.</P><P>List picker form cell control’s&nbsp;<STRONG>getValue()</STRONG>&nbsp;API and&nbsp;<STRONG>#Value</STRONG>&nbsp;has been enhanced to include the entire bound data object for the returned values. This bound data object is stored in the&nbsp;BindingObject&nbsp;property of the selected items.<BR /><BR />Accessing BindingObject property via</P><UL><LI><STRONG>JavaScript property accessor</STRONG>: context.getValue()[0].BindingObject;</LI><LI><STRONG>Evaluate Target path</STRONG>: context.evaluateTargetPath(“#Control:ListPicker/#Value#0/BindingObject”);</LI></UL><P>This will allow you to get additional information about the selected items including the&nbsp;DisplayValue&nbsp;and&nbsp;ReturnValue.</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>[ { "BindingObject": { "@odata.editLink": "ProductCategories('0cfeaf26-4cc0-4a26-b088-9a2b5b444db9')", "@odata.id": "ProductCategories('0cfeaf26-4cc0-4a26-b088-9a2b5b444db9')", "@odata.readLink": "ProductCategories('0cfeaf26-4cc0-4a26-b088-9a2b5b444db9')", "@odata.type": "#ESPM.ProductCategory", "Category": "0cfeaf26-4cc0-4a26-b088-9a2b5b444db9", "CategoryName": "Portable Players", "MainCategory": "TV, Video &amp; HiFi", "MainCategoryName": "TV, Video &amp; HiFi", "NumberOfProducts": 5 }, "DisplayValue": "Portable Players", "ReturnValue": "0cfeaf26-4cc0-4a26-b088-9a2b5b444db9" } ]</code></pre><P>&nbsp;</P><P>&nbsp;</P><P><STRONG>Note</STRONG>: BindingObject&nbsp;property will only be available for list pickers that are data bound via&nbsp;Target.</P><H2 id="toc-hId-205701794"><STRONG>ClientAPI function to return MDK Application Name</STRONG></H2><P>You can now be able to retrieve the <STRONG>_Name</STRONG> property for the MDK application via:</P><UL><LI><STRONG>Target Path</STRONG>: #Application/#AppData/AppName</LI><LI><STRONG>Client API</STRONG>: <A href="https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/apidoc/interfaces/iclientapi.html#getappname" target="_blank" rel="noopener noreferrer">getAppName()</A>;<BR />This <EM>_Name</EM> property is defined in the <EM>Application.app</EM> in MDK metadata project.</LI></UL><H2 id="toc-hId-9188289"><STRONG>WriteToFilePath property for OData DownloadMedia and DownloadStream actions</STRONG></H2><P>A new property&nbsp;<A href="https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/schemadoc/definitions/DownloadOptions.schema.html#writetofilepath" target="_blank" rel="noopener noreferrer"><STRONG>WriteToFilePath</STRONG></A>&nbsp;is introduced in the&nbsp;DownloadOptions&nbsp;property for the <A href="https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/schemadoc/Action/ODataService/DownloadMedia.schema.html" target="_blank" rel="noopener noreferrer"><STRONG>DownloadMedia</STRONG></A> and&nbsp; <A href="https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/schemadoc/Action/ODataService/DownloadStream.schema.html" target="_blank" rel="noopener noreferrer"><STRONG>DownloadStream</STRONG></A>&nbsp;actions. This property allows you to specify either the full or relative file path of the destination where the downloaded data should be stored. If a relative file path is specified, the file is stored in the path relative to the platform's internal documents folder. On iOS, this property must be defined to download larger files in the background. Please note that this property is supported only on iOS and Android platforms.</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>{ "_Type": "Action.Type.ODataService.DownloadStream", "ActionResult": { "_Name": "Products_DownloadStream" }, "OnFailure": "/MDKApp/Actions/Products/Products_StreamFailure.action", "OnSuccess": "/MDKApp/Rules/Products/Products_OpenDocument.js", "Target": { "Service": "/MDKApp/Services/SampleServiceV4.service", "EntitySet": "Products", "ReadLink": "{@odata.readLink}" }, "Properties": [ "Picture" ], "DownloadOptions": [ { "WriteToFilePath": "/MDKApp/Rules/Products/Products_relativePath.js" } ] }</code></pre><P>&nbsp;</P><P>&nbsp;</P><H2 id="toc-hId--187325216"><STRONG>Support Simplified QR Code for Onboarding in Android Client</STRONG></H2><P>The Onboarding process in MDK clients support QR codes, including <STRONG>In-App Scanning Code</STRONG> and <STRONG>Apple and Android Launch App Code with URI Scheme</STRONG>, which are available in the Mobile Services admin UI. These QR codes are relatively dense, as they contain extensive configuration details required for onboarding process. Devices with lower camera resolutions frequently encounter challenges when attempting to scan such dense QR codes. To address this issue, MDK client allows the users to scan simplified onboarding QR codes. <STRONG>This feature is currently available for Android only. </STRONG></P><P>A simplified QR code ideally contains a single URL that serves as the gateway to access detailed onboarding configuration information stored on the SAP Mobile Services. Thus, significantly reducing the underlying information in the QR codes.</P><P>Generating a simplified QR code feature is currently not available in the Mobile Services admin UI. You can use any QR Code generation tool to manually convert the following JSON object into a simplified QR code:</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-json"><code> { "schema": "2.0", "mobileServicesHost": "&lt;my-ms-mdk-app.hana.ondemand.com&gt;" } </code></pre><P>&nbsp;</P><P>&nbsp;</P><P>Replace &lt;my-ms-mdk-app.hana.ondeomand.com&gt; with your server domain name from the&nbsp;<STRONG>APIs</STRONG>&nbsp;tab in your Mobile Services app in the cockpit (Do not include the https:// prefix). When users scan the resulting onboarding QR code, MDK will retrieve the full onboarding configuration from the specified Mobile Services host and proceed with the user onboarding.</P><H2 id="toc-hId--383838721">Go to code Toggle</H2><P>In addition to existing features of switch from graphical editor to text editor and vice versa, we have introduced an additional option to easily toggle between text and graphical files. There is an icon located on the top right of the editor bar.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BASToggle.gif" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/97727iEBB1B86DBD296F32/image-size/large?v=v2&amp;px=999" role="button" title="BASToggle.gif" alt="BASToggle.gif" /></span></P><H2 id="toc-hId--580352226"><STRONG>Connect or sync an SSO based mobile destination</STRONG></H2><P>This improvement is applicable when the SAP Business Application Studio and Mobile Services are not in the same subaccount.You can now easily connect to such SSO enabled mobile services destination configured in a different BTP subaccount than your BAS subaccount.<BR /><BR /><U><STRONG>Note</STRONG></U>:<STRONG>&nbsp;Cross Context SSO setting under Security in your app configuration on mobile services admin UI must be enabled in order to use this feature.</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Security configuration in SAP Mobile Services Admin UI" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/97726i61B028123FBF653A/image-size/large?v=v2&amp;px=999" role="button" title="CrossContextSSO.png" alt="Security configuration in SAP Mobile Services Admin UI" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Security configuration in SAP Mobile Services Admin UI</span></span></P><P>When connecting to an SSO enabled destination while creating a project or syncing an existing destination, you would need to input passcode by clicking on the given link.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Passcode screen in SAP Business Application Studio" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/97730i8BDBC94F0F7FDC60/image-size/large?v=v2&amp;px=999" role="button" title="passcode.png" alt="Passcode screen in SAP Business Application Studio" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Passcode screen in SAP Business Application Studio</span></span><STRONG>New to MDK development?</STRONG><BR /><BR />Follow <A href="https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/getting-started/mdk/overview.html#tutorials" target="_blank" rel="noopener noreferrer">these tutorials</A> to get started and learn more about Mobile development kit!<BR /><BR />I am looking forward to your feedback/comments.</P> 2024-04-23T10:28:24.247000+02:00 https://community.sap.com/t5/application-development-blog-posts/exploring-sap-business-application-studio/ba-p/13677843 Exploring SAP Business Application Studio 2024-04-24T10:36:23.654000+02:00 harshadapatil https://community.sap.com/t5/user/viewprofilepage/user-id/1430727 <P>SAP Business Application Studio&nbsp;provides a tailor-made development environment for various development scenarios, such as SAP Fiori, SAP S/4HANA extension, and Workflow.</P><P>In&nbsp;SAP Business Application Studio, you are provided with one or more dev spaces. A dev space is a development environment with all the tools, capabilities, and resources needed for developing your application. Each type of application requires a different development environment. Based on the type of application that you choose to build you're provided with a different set of tools. You can add additional tools to supplement the application with additional extensions for the scenarios.</P><UL><LI>In today's fast-changing business world, companies need to be quick, innovative, and efficient.</LI><LI>That's why they're using advanced digital tools like SAP Business Application Studio (BAS) to make their operations smoother and speed up how they develop apps company-wide.</LI><LI>SAP Business Application Studio is a cloud-based development environment offered by SAP for creating business applications.</LI><LI>It provides a range of tools and services tailored for SAP developers to build Fiori apps, SAPUI5 applications, and business logic using ABAP, Node.js, and more.</LI><LI>It simplifies development by offering pre-configured environments and supports collaboration among developers.</LI><LI>The core feature of SAP Business Application Studio is its "dev spaces," which are like isolated virtual machines in the cloud.</LI><LI>These dev spaces come with specific tools and runtimes for different business scenarios, such as SAP Fiori, SAP S/4HANA extensions, and Workflow.</LI><LI>This setup saves time in setting up the development environment and allows developers to efficiently develop, test, build, and run their solutions.</LI><LI>In SAP Business Application Studio, developers work in dev spaces, each providing a development environment tailored to the type of application being built.</LI><LI>These environments can be customized with additional tools and extensions as needed.</LI><LI>Developers can test their applications within the dev space itself, simulating a local development experience.</LI><LI>SAP Business Application Studio also offers various tools specifically designed for developing business applications in the SAP ecosystem.</LI><LI>These tools cover the entire development cycle, from project creation to testing and deployment.</LI><LI>The platform supports popular browsers like Mozilla Firefox, Google Chrome, and Microsoft Edge for a seamless development experience.</LI><LI><SPAN class="">SAP Business Application Studio is built on Code-OSS, an open-source platform utilized for constructing Visual Studio Code.</SPAN></LI><LI>It requires a SAP license for productive use and offers different Flavors tailored for various development tasks.</LI><LI>For example, if you're developing a SAPUI5 or Fiori app, you would choose the SAP Fiori flavour, while for CAPM app development, you'd select the SAP CAPM flavour.</LI><LI>You can enhance BAS by enabling different packages like SAP Workflow Package, CDS Viewer, and HANA Development Packages, which allow you to work on different types of projects and handle various file types.</LI><LI>BAS operates within a virtual container running on an Ubuntu-based OS architecture.</LI><LI>While developers don't have root access to the operating system, they can still install additional packages and modules required for their projects using the Terminal.</LI></UL><P>&nbsp;</P><P><FONT size="5"><STRONG><U>Benefits of SAP Business Application Studio</U></STRONG></FONT></P><UL><LI><STRONG>Ready-to-use Environment:</STRONG> It offers a ready-to-go setup specifically designed for building SAP applications.</LI><LI><STRONG>Central Management:</STRONG> You can manage everything centrally, including tools, access to systems, and company policies.</LI><LI><STRONG>Tailored Productivity Tools:</STRONG> The tools provided are customized for developing SAP applications, making the process smoother.</LI><LI><STRONG>Guided Learning:</STRONG> It provides guidance to help developers learn SAP technologies quickly and efficiently.</LI><LI><STRONG>Opinionated Technologies:</STRONG> You can build applications using preferred SAP technologies and best practices.</LI><LI><STRONG>Consistent Experience:</STRONG> Regardless of the SAP development technology you're using, the experience remains consistent.</LI><LI><STRONG>Simplified Complexity:</STRONG> Instead of focusing on technical details, it simplifies development by describing logical components of applications.</LI><LI><STRONG>Integration:</STRONG> Easily integrates with existing SAP solutions, systems, and services.</LI><LI><STRONG>Access to Extensions:</STRONG> You can easily access additional tools and extensions compatible with Visual Studio Code.</LI><LI><STRONG>Full Support:</STRONG> It comes with comprehensive support from SAP for all enterprise needs.</LI></UL><P><FONT size="5"><STRONG><U>BAS Architecture</U></STRONG></FONT></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_17-1713772394483.png" style="width: 619px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99759i9029F0E4D2A8CC42/image-dimensions/619x300?v=v2" width="619" height="300" role="button" title="harshadapatil_17-1713772394483.png" alt="harshadapatil_17-1713772394483.png" /></span></P><P>&nbsp;</P><P><FONT size="5"><U><STRONG>Enabling SAP Business Application Studio for a New Trial Subaccount.</STRONG></U></FONT></P><P><STRONG><U>Step 1</U></STRONG><STRONG>:</STRONG> Log into SAP BTP Trial</P><OL><LI>Visit <A href="https://account.hanatrial.ondemand.com" target="_blank" rel="noopener nofollow noreferrer">https://account.hanatrial.ondemand.com</A> and sign in to your SAP BTP cockpit.</LI><LI>You may need to agree to the legal terms. Simply check the box and click Accept.</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_18-1713772465351.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99760i96410FD7AD5EF586/image-size/medium?v=v2&amp;px=400" role="button" title="harshadapatil_18-1713772465351.png" alt="harshadapatil_18-1713772465351.png" /></span></P><P><STRONG><U>Step 2:</U></STRONG> Check Cloud Foundry Enablement.</P><OL><LI>To verify Cloud Foundry enablement, click "Go to Your Trial Account" to access the list of available trial subaccount.</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_36-1713775303503.png" style="width: 595px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99818i54E938AD9500C68C/image-dimensions/595x244?v=v2" width="595" height="244" role="button" title="harshadapatil_36-1713775303503.png" alt="harshadapatil_36-1713775303503.png" /></span></P><P>&nbsp; 2. Choose the subaccount you wish to use for this tutorial.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture1.png" style="width: 268px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99763i2FF4F6A05FC44640/image-dimensions/268x188?v=v2" width="268" height="188" role="button" title="Picture1.png" alt="Picture1.png" /></span></P><P>&nbsp; &nbsp;3.&nbsp;On the overview page, ensure that Cloud Foundry is enabled.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_20-1713773149737.png" style="width: 607px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99768i7FAF86A673980776/image-dimensions/607x264?v=v2" width="607" height="264" role="button" title="harshadapatil_20-1713773149737.png" alt="harshadapatil_20-1713773149737.png" /></span></P><P>&nbsp; 4.&nbsp;If Cloud Foundry isn't enabled, click on the "Enable Cloud Foundry" button.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_21-1713773196598.png" style="width: 465px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99772i7FE9A744004EC04C/image-dimensions/465x171?v=v2" width="465" height="171" role="button" title="harshadapatil_21-1713773196598.png" alt="harshadapatil_21-1713773196598.png" /></span></P><P><STRONG><U>Step 3:</U></STRONG> Add the SAP Business Application Studio Subscription to the Subaccount.</P><P>1. To add the SAP Business Application Studio subscription to the subaccount, follow these steps: Click "Enter Your Trial Account" to access the Cloud Foundry environment.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_35-1713775274851.png" style="width: 588px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99817i0A19F1CD90EA6D45/image-dimensions/588x241?v=v2" width="588" height="241" role="button" title="harshadapatil_35-1713775274851.png" alt="harshadapatil_35-1713775274851.png" /></span></P><P>2. Choose the tile corresponding to the subaccount where you wish to enable the SAP Business Application Studio subscription.</P><P>When you create an SAP BTP Trial account, a trial subaccount is automatically created.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_23-1713773251638.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99775i2D5CF357648BDF6B/image-size/medium?v=v2&amp;px=400" role="button" title="harshadapatil_23-1713773251638.png" alt="harshadapatil_23-1713773251638.png" /></span></P><P>3. Navigate to the Service Marketplace by clicking on it in the navigation area.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_24-1713773277964.png" style="width: 600px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99776iBF909670BEBF43D5/image-dimensions/600x261?v=v2" width="600" height="261" role="button" title="harshadapatil_24-1713773277964.png" alt="harshadapatil_24-1713773277964.png" /></span></P><P>4.&nbsp;Click on "Create" to initiate the wizard for subscribing to SAP Business Application Studio.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_31-1713774756607.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99809i66FA44F1EDE84D6D/image-size/medium?v=v2&amp;px=400" role="button" title="harshadapatil_31-1713774756607.png" alt="harshadapatil_31-1713774756607.png" /></span></P><P>5.&nbsp;In the wizard, ensure that "SAP Business Application Studio" is chosen in the Service field and "trial" is selected in the Plan field.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_32-1713774869660.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99812iCFD6F4E512F1C0F5/image-size/medium?v=v2&amp;px=400" role="button" title="harshadapatil_32-1713774869660.png" alt="harshadapatil_32-1713774869660.png" /></span></P><P>6.&nbsp;Click on "Create" to subscribe to SAP Business Application Studio.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_33-1713774952867.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99814i065A14FE58565F53/image-size/medium?v=v2&amp;px=400" role="button" title="harshadapatil_33-1713774952867.png" alt="harshadapatil_33-1713774952867.png" /></span></P><P>7.&nbsp;A "Creation in Progress" popup will appear. Click on "View Subscription" to see the SAP Business Application Studio subscription in the Instances and Subscriptions page.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_34-1713775134380.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99816i3138A1E736737C4D/image-size/medium?v=v2&amp;px=400" role="button" title="harshadapatil_34-1713775134380.png" alt="harshadapatil_34-1713775134380.png" /></span></P><P>8.&nbsp;Launch SAP Business Application Studio.</P><P>Open SAP Business Application Studio and select "Go to Application."</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_29-1713773446817.png" style="width: 573px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99782i74C4AF8277E8A972/image-dimensions/573x252?v=v2" width="573" height="252" role="button" title="harshadapatil_29-1713773446817.png" alt="harshadapatil_29-1713773446817.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harshadapatil_30-1713773453156.png" style="width: 574px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99783i801D7CCBA5DC2643/image-dimensions/574x246?v=v2" width="574" height="246" role="button" title="harshadapatil_30-1713773453156.png" alt="harshadapatil_30-1713773453156.png" /></span></P><P><SPAN>Overall, BAS offers benefits such as a ready-to-use environment, central management, tailored productivity tools, guided learning, opinionated technologies, consistent experience, simplified complexity, integration with existing SAP solutions, access to extensions, and comprehensive support from SAP for all enterprise needs.</SPAN></P> 2024-04-24T10:36:23.654000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-with-sap-build-apps-mobile-apps-for-ios-and-android/ba-p/13667638 Consuming SAP with SAP Build Apps - Mobile Apps for iOS and Android 2024-04-24T11:00:11.784000+02:00 LudoNoens https://community.sap.com/t5/user/viewprofilepage/user-id/15040 <P>This blog post is the third 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-862670183">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-795239397">SAP Mobile Services</H2><P>The use case described in this blog post makes use of <A title="SAP Mobile Services Documentation - Introduction" href="https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/index.html" target="_blank" rel="noopener noreferrer">SAP Mobile Services</A> to authenticate the mobile apps we will be running on our devices.</P><P>SAP Mobile Services is a collection of services on SAP Business Technology Platform that enables mobile application development, configuration and management. It is a cloud-based offering complemented by various development tools such as the native SDKs for iOS and Android, the mobile development kit (MDK) or SAP Mobile Cards. <SPAN>The overall objective is to deliver reusable services, which can be leveraged in mobile app development projects. W</SPAN>e have recently added integration with SAP Mobile Services in SAP Build Apps.</P><P>In the context of SAP Build Apps in this blog post, we will be using the server features related to security: enterprise authentication and enterprise app management. SAP Mobile Services authenticates your mobile users with Cloud Identity Services and provides access to integrations and SAP BTP services within your mobile applications. For the mobile apps, SAP Build Apps will use some portions of the SAP SDKs that allow for easy authentication through SAP Mobile Services.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mobile-services-feature-overview-build-apps.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99771i60753103E3A7D35B/image-size/large?v=v2&amp;px=999" role="button" title="mobile-services-feature-overview-build-apps.png" alt="mobile-services-feature-overview-build-apps.png" /></span></P><H2 id="toc-hId-598725892">Build service</H2><P>SAP Build Apps offers a build service that allows you to build your web application and mobile applications for iOS and Android in the cloud, without the need to install the required tools on your local machine. After building your web application, you can deploy the app to SAP Business Technology Platform. For the mobile apps, you can download the IPA (iOS) and APK (Android) file and install the app on your mobile device(s).</P><P>As you might be aware, Apple has restricted the building of iOS apps to Apple hardware. With the SAP Buiild Apps build service, non-Apple hardware users can still build iOS apps, provided these users have access to specific files required for signing the apps.</P><P>Note: although SAP Mobile Services offers a reuse service for "Cloud Build Service for CI" as shown in the diagram above, SAP Build Apps does not make use of this and offers a separate Build service, dedicated for building SAP Build Apps client apps.<BR /><BR /></P><P>&nbsp;</P><H1 id="toc-hId-273129668">Use case C : Consume the CAP service in a mobile app on the iOS and Android platforms</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>. We will be creating dedicated mobile apps for the iOS and Android platforms to consume this service. In the first post in this series, I've already highlighted that you can <STRONG>preview</STRONG>&nbsp;your app on a mobile device using the SAP Build Apps client app that is available for download in the public app stores for <A title="SAP Build Apps Preview - iOS app" href="https://apps.apple.com/us/app/sap-build-apps-preview/id1585856868" target="_blank" rel="noopener nofollow noreferrer">iOS</A> and <A title="SAP Build Apps Preview - Android app" href="https://play.google.com/store/apps/details?id=com.sap.appgyver.preview.release&amp;hl=en&amp;gl=US&amp;pli=1" target="_blank" rel="noopener nofollow noreferrer">Android</A>. But you can't use this to publish your own apps. We offer you a way to build your own apps in the cloud. There is no need to install tooling on your own machines to accomplish this.</P><H2 id="toc-hId-205698882">Solution diagram</H2><P>Let's first take a quick look at what we need to change in our solution overview to accommodate for mobile apps. Building upon the solution diagram created in the <A title="Consuming SAP with SAP Build Apps - Connectivity options for low-code development - part 2" href="https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-with-sap-build-apps-connectivity-options-for-low-code/ba-p/13666667" target="_blank">previous blog post</A>, we now add <STRONG>SAP Mobile Services</STRONG>. The design time environment of SAP Build Apps will register the application with SAP Mobile Services. End users install our mobile app on their device. The mobile app authenticates with the Identity Authentication service (IAS). SAP Mobile Services handles the token exchange with Authorization and Trust Management (XSUAA) and acts as a proxy to provide access to the BTP destination. 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_3-1713944850590.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100970i7AB144AAFA2DBA66/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_3-1713944850590.png" alt="LudoNoens_3-1713944850590.png" /></span></P><H2 id="toc-hId-9185377">Developing the mobile apps</H2><P>Before we start, as a teaser, let me show you a few screenshots of the iOS app we will be creating. An animated recording is available at the end of this blog post.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="screencaptures_bloga.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100917i02FD1CB9828D5EE3/image-size/large?v=v2&amp;px=999" role="button" title="screencaptures_bloga.png" alt="screencaptures_bloga.png" /></span></P><P>Let's get started building this mobile app. </P><P>Open <STRONG>SAP Build Apps</STRONG>, and navigate to the Launch tab. Select the "Open build service" button on the Build your app tile.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_0-1713776904935.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99827i0276B426863475ED/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1713776904935.png" alt="LudoNoens_0-1713776904935.png" /></span></P><P>You will now see three options. In this blog we will focus on the mobile apps. We'll take a look at web app in one of the next posts.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_1-1713777192990.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99832i6D3126A1A28943A0/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1713777192990.png" alt="LudoNoens_1-1713777192990.png" /></span></P><H2 id="toc-hId--187328128">Building the Android app</H2><P>The easiest mobile build is for Android. Select Configure under Android Mobile/Tablet.</P><H3 id="toc-hId--254758914">Android keystore</H3><P>Your first task is to create and upload an Android keystore. The Android platform requires that all APKs (Android application package) are digitally signed with a certificate before they are installed on a device or updated.</P><P>To create a new keystore, you'll need a CLI tool called&nbsp;<STRONG>keytool</STRONG>, which is part of the Java Development Kit (JDK). Instead of downloading this JDK from our competitor and agreeing to all kinds of legal fine print, you could also download this from the <A title="SAP Development Tools" href="https://tools.eu1.hana.ondemand.com/#cloud" target="_blank" rel="noopener nofollow noreferrer">SAP Development Tools site</A>&nbsp;(look for the SAP JVM package for your machine). However, this package is rather large. If you don't want to install anything on your local machine, we have an even better option: your Dev Space in <STRONG>SAP Build Code</STRONG> ! This Dev Space contains various developer tools out-of-the-box, and a key feature is that you can actually run them directly in this cloud environment. Simply go back to SAP Build Code (or SAP Business Application Studio) and open the terminal.&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_0-1713840423953.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100241iDF8247ECA283114C/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_0-1713840423953.png" alt="LudoNoens_0-1713840423953.png" /></span></P><P>Generate the keystore from the Command Line, using the following (adapt file name and alias to your own preferences):<BR /><BR /></P><PRE>keytool -genkey -v -keystore blogdemoapp.keystore.jks -alias blogdemoapp -keyalg RSA -keysize 2048 -validity 10000</PRE><P>Answer the questions asked by the keytool and note the password, which we need to provide later on in the SAP Build Apps build configuration UI.</P><P>Once completed, you will have a keystore file stored in your Dev Space. Navigate to the (File) Explorer, find the keystore file and right-click on it. Select Download, to store the file on your local machine.</P><P>Going back to SAP Build Apps, upload the keystore file and provide the password. The alias is optional and you can leave it blank. Select NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1713777418871.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99834i5661DF222ABAAC35/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1713777418871.png" alt="LudoNoens_2-1713777418871.png" /></span></P><H3 id="toc-hId--451272419">Android application bundle</H3><P>In the Bundle Settings, select APK for the build scheme. Provide a package identifier in the form of a reverse domain name.&nbsp;Provide a display name for the app, which will be visible on your device's home screen. Select NEXT.&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_0-1713777523682.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99835iA98C1EFFAE26061C/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1713777523682.png" alt="LudoNoens_0-1713777523682.png" /></span></P><H3 id="toc-hId--647785924">Image Assets</H3><P>In the Image Assets tab, we can <U>optionally</U> upload images for the application icon, the splash screen and notification icon. This allows you to apply your personal or company's branding to the app. The application icon will be visible on your device's home page. When opening up the app, users will briefly see a splash screen, which can be used as introduction or welcome page. This is where we can show the splash screen image.</P><P>For the icon image, I've actually used a Generative AI service (in my case Microsoft Copilot). Feel free to get creative yourself, or use some other image generation service. The images have to be in PNG format and provided in various sizes to support all the various device form factors and display resolutions available in the market. There are various online tools available to help you create these images from a source image. Search for "icon splash android generator" to find one that suits your needs.</P><P>Recommendation: keep your images as small as possible. The splash screen is a nice to have, but will only be visible to the user for a very short period of time.</P><P>After uploading all required images, click NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_1-1713777578744.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99836i7B1BBC1B0BB03AF8/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1713777578744.png" alt="LudoNoens_1-1713777578744.png" /></span></P><H3 id="toc-hId--919530798">Application permissions</H3><P>On the Permissions tab, you can configure application permissions that your app might require. For our demo, we will skip this and click NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1713777651247.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99837iABBB3BD2E600060D/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1713777651247.png" alt="LudoNoens_2-1713777651247.png" /></span></P><H3 id="toc-hId--1116044303">Mobile Services connection</H3><P>Last but not least, we have to configure the Mobile Services connection. Your app will be interfacing with a specific instance of SAP Mobile Services, available in your subaccount. We need to provide the endpoint for this particular instance. Otherwise your app will not know where Mobile Services can be found. Click the Enable SAP Mobile Services button and log in.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_4-1713777735701.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99839iCEAF4AB08CBF1295/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_4-1713777735701.png" alt="LudoNoens_4-1713777735701.png" /></span></P><P>Select the API endpoint for your subaccount. In case you are not sure which one this is, you can check the Overview page on your subaccount's BTP cockpit. Once the endpoint is selected, you will need to log in.</P><P>After a successful log in, you will be able to pick the Organization in the dropdown list, followed by the Space.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_5-1713777763341.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99840i3BE9DE1E68DA67B3/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_5-1713777763341.png" alt="LudoNoens_5-1713777763341.png" /></span></P><P>Once this is configured, you again click on the&nbsp;Enable SAP Mobile Services button. During this process, SAP Build Apps will register your app with SAP Mobile Services.&nbsp;</P><P>Selecting NEXT will bring you back to the Build page.<BR /><BR /></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_7-1713777918652.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99846i813F0843736290D3/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_7-1713777918652.png" alt="LudoNoens_7-1713777918652.png" /></span></P><H3 id="toc-hId--1312557808">Build for Android</H3><P>Now that we are done configuring the Android build, let's request the build service to produce an APK for us. Click the BUILD button.&nbsp; On the next page, select the client runtime version and provide a version code and version name.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_1-1713845495731.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100255iBDFF21D744FED488/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_1-1713845495731.png" alt="LudoNoens_1-1713845495731.png" /></span></P><P>Once you click the BUILD button, a request to build an APK for your app will be sent and queued. Builds can take some time. We are in the process of significantly speeding this up.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_2-1713845658145.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100256iA6E79ED25AADD9F8/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_2-1713845658145.png" alt="LudoNoens_2-1713845658145.png" /></span></P><P>&nbsp;</P><P>Once the build is done, you can click the DOWNLOAD button to retrieve the APK file and store it on your local machine.</P><H3 id="toc-hId--1509071313">Installing the app on your device</H3><P>For installing the APK onto your device, there are various options (and challenges), depending on what device you have and the PC you are using. In general, you'll need to connect your device to your PC and transfer the file over for example a USB connection. To help transfer the file, you can for example use Android File Transfer. Once the APK file is transferred onto the device, open a file explorer app such as My Files. Select the APK file and open with Package Installer. Once this is done, find your app in the applications list.</P><P>Note: you might run into various challenges when your device is managed (by your company), security settings that are set tight, or Developer Options are turned off.</P><P>Tip: when accessing your device, make sure the screen is unlocked.</P><P>Below is a capture of the app running on a Samsung phone. Please refer to the iOS app for a recording in better quality.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_2-1713932740842.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100892iB9388210AE7FE30A/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_2-1713932740842.png" alt="LudoNoens_2-1713932740842.png" /></span></P><P>&nbsp;</P><H2 id="toc-hId--1412181811">Building the iOS app</H2><P>Compared to the Android build, this task is less easy. This is due to restrictions defined by Apple. The main challenge is in getting the correct certificate and profile to be able to install the app on your device.</P><P>Select the CONFIGURE button on the Build page to configure iOS Mobile/Tablet builds.</P><H3 id="toc-hId--1902098323">Certificates</H3><P>The most tricky part in this process is on the Certificates tab. You need to provide an iOS Distribution Certificate. Take note that an iOS Developer Certificate will NOT work.</P><P>More details on how to get a certificate can be found on the Apple Developer site:&nbsp;<A href="https://developer.apple.com/help/account/create-certificates/create-enterprise-distribution-certificates" target="_blank" rel="noopener nofollow noreferrer">https://developer.apple.com/help/account/create-certificates/create-enterprise-distribution-certificates</A></P><P>If you don't have an iOS Developer account or you are not part of an iOS Enterprise Developer program, then you could ask a colleague to add you to an existing program, or register your device's UDID and provide you with the certificate and provisioning profile (see next step).&nbsp;</P><P>Once done, click NEXT.</P><P>Note: certificates have an expiry date. Your app will no longer start once the certificate is expired.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_0-1713861374042.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100392iC635D6B935589727/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_0-1713861374042.png" alt="LudoNoens_0-1713861374042.png" /></span></P><H3 id="toc-hId--2098611828">Bundle Settings</H3><P>There are two build schemes you can choose from: App Store distribution or Ad Hoc distribution. For development and testing purposes as covered in this blog post, we will use the Ad Hoc distribution. The distribution is limited to a specified set of registered devices. The app will refuse to install on other devices.</P><P>Provide the Display Name of the app. The name will be visible on your device's Home Screen.</P><P>Provide a bundle identifier in the form of a reverse domain name. This is a unique identifier for your application. Take note that the provisioning profile has to include the app's bundle identifier as well.</P><P>Next is another challenge that requires you to navigate the Apple Developer site: getting the Ad Hoc provisioning profile. More details are on Apple's Developer site:&nbsp;<A href="https://developer.apple.com/help/account/manage-provisioning-profiles/create-an-ad-hoc-provisioning-profile" target="_blank" rel="noopener nofollow noreferrer">https://developer.apple.com/help/account/manage-provisioning-profiles/create-an-ad-hoc-provisioning-profile</A>.</P><P>You can skip the URL scheme and lock screen orientation. Select NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_1-1713863377851.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100426i279C160E2744E20B/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_1-1713863377851.png" alt="LudoNoens_1-1713863377851.png" /></span></P><H3 id="toc-hId-1999841963">Image Assets</H3><P>For the app's icon, I am going to use exactly the same image that I've created for Android. For the iOS splash screen I've also used Microsoft's Copilot and enhanced it further with an image editor. For iOS, you'll need different PNG image sizes compared to Android. For the icons you can easily find image converter tools online. For the splash screen I've actually manually resized the original image. When uploading the images, SAP Build Apps will check whether the image is in the correct format and pixel dimensions.</P><P>Once done, click NEXT.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_2-1713864016899.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100434iAE6651EA8584ACDC/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_2-1713864016899.png" alt="LudoNoens_2-1713864016899.png" /></span></P><H3 id="toc-hId-1803328458">Usage strings</H3><P>We will not change anything here. Click NEXT.</P><H3 id="toc-hId-1606814953">Mobile Services</H3><P>This will be a repeat of the Android configuration. We now need to configure the connection between the mobile app and SAP Mobile Services. Your app will be interfacing with a specific instance of SAP Mobile Services, available in your subaccount. We need to provide the endpoint for this particular instance. Otherwise your app will not know where Mobile Services can be found. Click the Enable SAP Mobile Services button and log in.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LudoNoens_4-1713864835754.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100443iFBDF3458BA1811F2/image-size/large?v=v2&amp;px=999" role="button" title="LudoNoens_4-1713864835754.png" alt="LudoNoens_4-1713864835754.png" /></span></P><P>Select the API endpoint for your subaccount. In case you are not sure which API endpoint this is, you can check the Overview page on your subaccount's BTP cockpit (see also the tip provided on screen). Once the endpoint is selected, you will need to log in (if you have not done so already).</P><P>After a successful log in, you will be able to pick the Cloud Foundry Organization in the dropdown list, followed by the Space.</P><P>Once this is configured, you again click on the&nbsp;Enable SAP Mobile Services button. During this process, SAP Build Apps will register your app with SAP Mobile Services.&nbsp;On the login screen of the app (see screenshot shared at the beginning of this blog post), you will see the identification of the app as it was registered in SAP Mobile Services. In my case: buildApps94767.</P><P>Selecting NEXT will bring you back to the Build page.<BR /><BR /></P><H3 id="toc-hId-1578485139">Build for iOS</H3><P>Now that we are done configuring the iOS build, let's request the build service to produce an IPA for us. Click the BUILD button.&nbsp; On the next page, select Ad Hoc, the client runtime version and provide a version and short version.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_5-1713865194071.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100444i2BFF0B964EF7CF58/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_5-1713865194071.png" alt="LudoNoens_5-1713865194071.png" /></span></P><P>Once you click the BUILD button, a request to build an IPA for your app will be sent and queued. Builds can take some time. We are in the process of significantly speeding this up.<BR /><BR /></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LudoNoens_0-1713871373165.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100511i2AA21EAEC33A66C7/image-size/medium?v=v2&amp;px=400" role="button" title="LudoNoens_0-1713871373165.png" alt="LudoNoens_0-1713871373165.png" /></span></P><P>Once the build is done, you can click the DOWNLOAD button to retrieve the IPA&nbsp;file and store it on your local machine.<BR /><BR /></P><H3 id="toc-hId-1381971634">Installing the app on your device</H3><P>For installing the IPA onto your device, there are various options, depending on what device you have and the PC you are using. In general, you'll need to connect your device to your PC and transfer the file over a USB connection. On Mac OS, you can use Finder and select your device. You can then drag and drop the IPA file onto the Finder view and the app will automatically be installed. Once this is done, find your app on your device's home screen. </P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="RPReplay_Final1713873118a.gif" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/100517i1DC2C4194FB833E2/image-size/large?v=v2&amp;px=999" role="button" title="RPReplay_Final1713873118a.gif" alt="RPReplay_Final1713873118a.gif" /></span></P><P>&nbsp;</P><H2 id="toc-hId-1478861136">Summary – use case C</H2><P>In this use case we have created dedicated mobile apps for the iOS and Android platforms. Building the app in the cloud is relatively easy, as you don't need to install any tools on your local development machine. For iOS apps, getting the correct certificate and provisioning profile can be a challenge though.</P><P>By customising the app's icons and splash screens, you are able to apply your own branding.</P><P>SAP Build Apps registers the application with SAP Mobile Services. Using the mobile app, end users authenticate with IAS. SAP Mobile Services handles the token exchange with XSUAA and acts as a proxy to provide access to the BTP destination. Only users who have the correct Roles assigned will be able to access the data provided in the CAP-based data service.</P><P>&nbsp;</P><H1 id="toc-hId-1575750638">What's next</H1><P>In the next blog post, we will deploy the web application to SAP Build Work Zone.</P> 2024-04-24T11:00:11.784000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/product-updates-for-sap-business-application-studio-april-2024-edition/ba-p/13681593 Product Updates for SAP Business Application Studio - April 2024 Edition 2024-04-29T11:27:43.909000+02:00 rupamaity https://community.sap.com/t5/user/viewprofilepage/user-id/9300 <P><SPAN>Dear Community,</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>We are excited to roll out another set of product updates for SAP Business Application Studio.&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><H3 id="toc-hId-1122503137"><SPAN>Revamped Service Center&nbsp;</SPAN><SPAN>&nbsp;</SPAN></H3><P><SPAN>The </SPAN><A href="https://help.sap.com/docs/bas/sap-business-application-studio/explore-services-using-service-center" target="_blank" rel="noopener noreferrer"><SPAN>Service Center</SPAN></A><SPAN> is an easy way to connect to different SAP and non-SAP systems and extend your applications. With time, the Service Center has grown&nbsp;and needed a revamp.&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>With the new refreshed UI, Service Center opens in the context of the project.</SPAN><SPAN>&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Service Center.gif" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101431i88AA15E91C19318A/image-size/large?v=v2&amp;px=999" role="button" title="Service Center.gif" alt="Service Center.gif" /></span></P><P><SPAN><SPAN class=""><SPAN class="">You now have the </SPAN><SPAN class="">option</SPAN><SPAN class=""> of choosing “Services” or “Events</SPAN><SPAN class="">”</SPAN><SPAN class="">,</SPAN><SPAN class=""> t</SPAN><SPAN class="">o</SPAN><SPAN class=""> reduc</SPAN><SPAN class="">e</SPAN><SPAN class=""> clutter. </SPAN><SPAN class="">You can choose </SPAN><SPAN class="">p</SPAN><SPAN class="">roviders</SPAN> <SPAN class="">from </SPAN><SPAN class="">a dropdown </SPAN><SPAN class="">list </SPAN><SPAN class="">and services and catalogs are </SPAN><SPAN class="">shown separately for easy access</SPAN><SPAN class="">.</SPAN></SPAN><SPAN class="">&nbsp;</SPAN> A new search area also lets you find the service/event easily.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ServiceCenter2.gif" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101436iB58979505C94D45D/image-size/large?v=v2&amp;px=999" role="button" title="ServiceCenter2.gif" alt="ServiceCenter2.gif" /></span></P><P>&nbsp;</P><P><SPAN>We hope that you enjoy the new, clean UI of the Service Center</SPAN><SPAN>.</SPAN><SPAN>&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><H3 id="toc-hId-925989632"><SPAN>SAP HANA Calculation View Modeling</SPAN><SPAN>&nbsp;</SPAN></H3><P><SPAN>When modeling SAP HANA calculation views, each window function had to be defined in a separate window function node. With the latest release, it is now possible to define multiple window functions in one calculation view window function node if the window functions use the same partitioning and ordering. This reduces the effort when modeling several window functions and leads to improved performance compared to sequential stacking of window function nodes.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>&nbsp;</SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rupamaity_3-1714015012501.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101424i42C8761760B41E2C/image-size/large?v=v2&amp;px=999" role="button" title="rupamaity_3-1714015012501.png" alt="rupamaity_3-1714015012501.png" /></span></P><P><SPAN>More information about the latest SAP HANA calculation view modeling features can be found in the blog post </SPAN><A href="https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-modeling-guide-for-sap-business-application-studio/create-window-function-nodes" target="_blank" rel="noopener noreferrer"><SPAN>Calculation View Features of 2024 QRC1</SPAN></A><SPAN> by </SPAN><A href="https://community.sap.com/t5/user/viewprofilepage/user-id/239612" target="_blank"><SPAN>Jan Zwickel</SPAN></A><SPAN>.</SPAN><SPAN>&nbsp;</SPAN></P><H3 id="toc-hId-729476127"><SPAN>Auto-clean deployment logs when deploying to SAP HANA</SPAN><SPAN>&nbsp;</SPAN></H3><P><SPAN>If you use SAP HANA tooling in SAP Business Application Studio and regularly deploy to the database, you know that each deployment to SAP HANA can generate a lot of deployment logs. It can become very time-consuming to parse these logs when debugging issues. A small, but rather effective setting is to clean the deployment log before each new deployment. Read </SPAN><A href="https://community.sap.com/t5/technology-blogs-by-sap/automated-cleaning-deployment-output/ba-p/13662418" target="_blank"><SPAN>this blog</SPAN></A><SPAN> by </SPAN><A href="https://community.sap.com/t5/user/viewprofilepage/user-id/44889" target="_blank"><SPAN>Volker Saggau</SPAN></A><SPAN> to find out how.</SPAN><SPAN>&nbsp;</SPAN></P><H3 id="toc-hId-532962622"><SPAN>Connect or sync an SSO-based mobile destination</SPAN><SPAN>&nbsp;</SPAN></H3><P><SPAN>This improvement is applicable when SAP Business Application Studio and SAP Mobile Services are not in the same subaccount of SAP Business Technology Platform (SAP BTP). You can now easily connect to such SSO-enabled mobile services destinations configured in a different SAP BTP subaccount than your SAP Business Application Studio subaccount. Find out about this feature and more in </SPAN><A href="https://community.sap.com/t5/technology-blogs-by-sap/what-s-new-in-mobile-development-kit-client-24-4/ba-p/13667946#destination" target="_blank"><SPAN>this blog</SPAN></A><SPAN> by </SPAN><A href="https://community.sap.com/t5/user/viewprofilepage/user-id/3305" target="_blank"><SPAN>Jitendra Kansal</SPAN></A><SPAN>&nbsp;</SPAN></P><P>&nbsp;</P><P><SPAN>We hope that you enjoy these latest updates. Until next time, happy coding!</SPAN><SPAN>&nbsp;</SPAN></P> 2024-04-29T11:27:43.909000+02:00 https://community.sap.com/t5/technology-blogs-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 next blog post, 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/technology-blogs-by-sap/devops-with-sap-btp/ba-p/13686887 DevOps with SAP BTP 2024-05-06T14:26:48.640000+02:00 BorisZarske https://community.sap.com/t5/user/viewprofilepage/user-id/87 <P>As <A title="Efficient DevOps with SAP BTP" href="https://community.sap.com/t5/technology-blogs-by-sap/efficient-devops-with-sap-btp/ba-p/13455958" target="_blank">my initial blog post series</A> around DevOps with SAP BTP is already some years old, I thought it would be about time to come up with a new article - to reflect latest changes about how you can enable your teams to benefit from it for developing and running their apps on the platform.</P><P><SPAN>DevOps is a key enabler for achieving high-level agility and quality in development projects – also in SAP enterprise environments. If you should be new to DevOps, the&nbsp;</SPAN><SPAN><A href="https://community.sap.com/topics/devops" target="_blank">DevOps | SAP Community</A></SPAN><SPAN>&nbsp;topic page does offer a lot of information.</SPAN></P><P><SPAN>Although DevOps is mainly a cultural approach, tools can help to foster agile development principles along the lifecycle of applications. In this article, I will sketch the setup recommended by SAP for agile development projects on SAP BTP, using corresponding SAP BTP cloud services and offerings. The platform does offer several different development approaches and runtime environments, so details of this setup might slightly differ per use case, but the goal is to offer a similar concept fitting for the most important ones.</SPAN></P><P><SPAN>The following figure outlines the recommended approach on the example of SAP BTP, Cloud Foundry environment:</SPAN></P><H2 id="toc-hId-993572229"><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Recommended approach to apply DevOps on SAP BTP" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/104012i5AFD8F463590CC0B/image-size/large?v=v2&amp;px=999" role="button" title="RecommendedApproachDevOpsSAPBTP.png" alt="Recommended approach to apply DevOps on SAP BTP" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Recommended approach to apply DevOps on SAP BTP</span></span></SPAN></H2><P>&nbsp;</P><P>As most of the depicted SAP BTP cloud services are also part of <A title="SAP Build Code" href="https://www.sap.com/products/technology-platform/developer-tools.html" target="_blank" rel="noopener noreferrer">SAP Build Code</A>, this does also reflect the recommended approach around this offering.</P><P>Let's go through those four phases in the remainder of this article.<BR /><BR /></P><H2 id="toc-hId-797058724"><SPAN>1. Set Up Continuous Integration</SPAN></H2><P><SPAN>One driver of the agility and built-in quality that DevOps brings is the automation of large parts of the deployment pipeline. For this, a Continuous Integration / Continuous Delivery (CI/CD) pipeline is involved that automatically gets executed whenever your development teams do submit changes to their source code management system, to qualify them. The pipeline automatically performs certain actions along different stages, such as to build your changes and to test them on different levels. With this, it provides feedback to the developer on the quality of his/her changes:</SPAN></P><P><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Using Continuous Integration and Delivery to automate large parts of the deployment process" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103685iD124D2B73D47A28F/image-size/large?v=v2&amp;px=999" role="button" title="CICDpipeline.png" alt="Using Continuous Integration and Delivery to automate large parts of the deployment process" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Using Continuous Integration and Delivery to automate large parts of the deployment process</span></span></SPAN></P><P><SPAN>So, the first challenge is to set up CI/CD for your SAP BTP development use cases. Here, SAP BTP does offer a two-fold approach:</SPAN></P><UL><LI>Option 1:<STRONG><SPAN>&nbsp;</SPAN>Pipeline as a Service</STRONG><SPAN>&nbsp;</SPAN>with<SPAN>&nbsp;</SPAN><A href="https://help.sap.com/docs/CONTINUOUS_DELIVERY" target="_blank" rel="noopener noreferrer">SAP Continuous Integration and Delivery</A><UL><LI>Opinionated, highly integrated setup that allows to benefit from agile methods without having to bring expertise</LI><LI>Brings pipeline templates for typical SAP BTP development use cases, such as to develop a side-by-side extension using Cloud Application Programming model (CAP) or a compelling UI using SAP Fiori on Neo/Cloud Foundry/ABAP Front-End Servers; with this, it allows to come up with a running build, test and deploy pipeline for those SAP BTP specific use cases in minutes – where the pipeline can be configured completely via UI (configuration as code is optionally also possible)</LI><LI>No need to build up and especially operate an own CI/CD infrastructure – only prerequisite: bring your own Git as source code management system</LI><LI>SAP product, with direct support from SAP</LI><LI>With this, addressing also those partners and customers that do not bring experience or that are looking for a CI/CD setup recommended and provided by SAP, reducing the overhead and cognitive load of their developers</LI></UL></LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Easy process to set up pipeline in SAP Continuous Integration and Delivery service" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103686i689D717ACDF3C6AA/image-size/large?v=v2&amp;px=999" role="button" title="CI+Dflow.png" alt="Easy process to set up pipeline in SAP Continuous Integration and Delivery service" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Easy process to set up pipeline in SAP Continuous Integration and Delivery service</span></span></P><UL><LI>Option 2:<STRONG>&nbsp;Toolbox</STRONG>&nbsp;with open source offering&nbsp;<A href="https://www.project-piper.io/" target="_blank" rel="noopener nofollow noreferrer">project ‘Piper’</A><UL><LI>Building blocks that allow you to build an own pipeline for SAP-specific use cases easier: pipeline templates (for Jenkins only), a library of pipeline steps (in Golang, which allows you to use them also for non-Jenkins CI/CD infrastructures), scenarios (end-to-end descriptions with sample code snippets), and Docker images you can easily add to your pipeline (<A href="https://blogs.sap.com/2019/10/24/how-to-use-project-piper-docker-images-for-cicd-with-azure-devops/" target="_blank" rel="noopener noreferrer">example for usage with Azure DevOps</A>)</LI><LI>As it is an open source offering, there is no direct support provided by SAP – only community support, you have to create and then own your pipeline</LI><LI>With this, the offering is addressing those partners and customers that need full flexibility and already bring expertise or infrastructure (or are willing to build it up and operate it) and now want to know how to best expand it also for SAP-specific use cases<BR /><BR /></LI></UL></LI></UL><H2 id="toc-hId-600545219">2. Develop</H2><P>This CI pipeline is then used by your development teams to qualify their changes – here, changes get pushed to a central source code repository based on Git, which then can automatically triggers a run of the corresponding pipeline via webhook. This pipeline run performs a build and executes automated test cases. The developer then gets informed about issues with the performed changes and can react on those directly. Also, compliance checks, such as for security flaws with used third-party libraries, can be tested as part of the pipeline run.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Example of agile development process" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103696i3B0E8EA376BEEC44/image-size/large?v=v2&amp;px=999" role="button" title="DevProcess.png" alt="Example of agile development process" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Example of agile development process</span></span></P><P><SPAN>Of course, there are many frameworks available for automated testing – SAP Continuous Integration and Delivery service does provide an opinionated proposal for corresponding frameworks, which then have to be set up accordingly. If you want to use alternative frameworks, SAP Continuous Integration and Delivery allows to extend the predefined pipelines with scripting (for more information, see </SPAN><A title="Extensible Pipelines for SAP Continuous Integration and Delivery" href="https://community.sap.com/t5/technology-blogs-by-sap/extensible-pipelines-for-sap-continuous-integration-and-delivery/ba-p/13564893" target="_blank">this blog post</A><SPAN>).</SPAN></P><P>For the creation of the actual test cases, a step-wise approach is recommended, where you start with first test cases and then evolve by time, by adding additional cases, also based on the issues that come up later and on the latest compliance requirements you might face.</P><P>As implied above, the actual development process will slightly differ per development environment. For example, on Cloud Foundry, you might use SAP Business Application Studio (where you would benefit from a direct integration of SAP Continuous Integration and Delivery, allowing to set up and monitor corresponding pipelines directly from the IDE), on Neo SAP Web IDE Full-Stack and on SAP BTP ABAP development tools in Eclipse. Still, the general approach for these environments could be similar, as depicted above.<BR /><BR /></P><H2 id="toc-hId-404031714">3. Deliver</H2><P>When your teams come up with a qualified release candidate, they can either perform a direct deployment out of the pipeline (when all tests are “green”, a direct deployment can be triggered) – or you benefit from a standardized central transport and change management approach, using<SPAN>&nbsp;</SPAN><A href="https://help.sap.com/docs/cloud-transport-management" target="_blank" rel="noopener noreferrer">SAP Cloud Transport Management</A>. The later is our recommended approach for most enterprise environments, where you normally want to have additional control of your production subaccounts.</P><P>The actual transport concept is quite similar to what you might be used to from development in on-premise and private cloud environments, with a centrally defined delivery landscape:</P><UL><LI>With the option to control who is allowed to handle changes where (that is, on which SAP BTP subaccount),</LI><LI>With a central log file for auditing,</LI><LI>With the option to synchronize the propagation of changes from different environments (such as from private cloud/on-premise together with related cloud changes), where change and deployment management capabilities of SAP Cloud ALM or Change Request Management (ChaRM) of SAP Solution Manager could orchestrate SAP Cloud Transport Management service, in addition to orchestrating then also private cloud/on-premise transport mechanisms.</LI></UL><P>Still, here with the option to combine it on SAP BTP with CI principles, so that your development teams can benefit from tight feedback loops enabled by an automated pipeline, to verify single developer changes - while you still have full control for the propagation of those changes towards your production environment, with the automated hand-over from the pipeline into a controlled, centrally managed and pre-defined delivery landscape. Then to verify the release candidate, potentially consisting of changes from different environments and typically done with a manual confirmation.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hybrid change management" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103702iACE722EED4B2B795/image-size/large?v=v2&amp;px=999" role="button" title="HybridDelivery.png" alt="Hybrid change management" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Hybrid change management</span></span></P><P><SPAN>SAP Cloud Transport Management service can cover more and more content types, such as:</SPAN></P><UL><LI>SAP Fiori content (in Neo and Cloud Foundry)</LI><LI>CAP applications (in the form of MTA archives),</LI><LI>Objects from SAP BTP ABAP environment,</LI><LI>Content from SAP Build (SAP Build Process Automation, SAP Build Work Zone, …),</LI><LI>App-specific content types, such as iFlows from SAP Integration Suite and Network Package content from SAP Analytics Cloud</LI><LI>See the full list <A title="Overview: Supported Content" href="https://help.sap.com/docs/cloud-transport-management/sap-cloud-transport-management/supported-content-types#loio0dccbb6ee1714240b9b9bedc1a240a7e" target="_blank" rel="noopener noreferrer">here</A></LI></UL><P>With this, you can establish a standardized transport management process for more and more development use cases around SAP BTP - with the option to integrate all those content types into your central change and delivery management process, such as provided by SAP Cloud ALM.</P><P>SAP Cloud Transport Management service is out-of-the-box integrated with SAP Continuous Integration and Delivery - just switch on the corresponding option of the<SPAN>&nbsp;</SPAN><EM>Release</EM><SPAN>&nbsp;</SPAN>stage:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot from 'Release' stage of SAP Continuous Integration and Delivery" style="width: 538px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103704iF4EF8F6E13A46D04/image-size/large?v=v2&amp;px=999" role="button" title="CIDintegrationcTMS.png" alt="Screenshot from 'Release' stage of SAP Continuous Integration and Delivery" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Screenshot from 'Release' stage of SAP Continuous Integration and Delivery</span></span></P><P><SPAN>It can also be integrated into other CI stacks via a step of the library from project Piper into third-party pipelines or </SPAN><A title="SAP Business Accelerator Hub" href="https://api.sap.com/package/TmsForCloudPub/rest" target="_blank" rel="noopener noreferrer">open APIs</A><SPAN> (for example, see&nbsp;</SPAN><A title="Integrate a CI/CD Pipeline on Azure DevOps with DevOps-Related Services from SAP BTP, Cloud Foundry" href="https://community.sap.com/t5/technology-blogs-by-sap/integrate-a-ci-cd-pipeline-on-azure-devops-with-devops-related-services/ba-p/13528858" target="_blank">this blog post on using Azure DevOps with transports</A><SPAN>).</SPAN></P><P><SPAN>&nbsp;</SPAN></P><H2 id="toc-hId-207518209"><SPAN>4. Operate</SPAN></H2><P>With SAP Cloud ALM, SAP is providing a central observability platform for all SAP products, including SAP BTP (in interplay with several local SAP-BTP-specific observability capabilities). To operate your apps on SAP BTP, you can therefore use its unified monitoring, alerting and analytics offering based on telemetry data exposed by SAP BTP (and other SAP solutions), to reduce the meantime to detect any issues. SAP is using OpenTelemetry as unified and open instrumentation approach for SAP BTP use cases, allowing you for example to instrument your custom apps for central observability.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Functional overview of SAP Cloud ALM for Operations" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103725iEF0B7688D8600D2E/image-size/large?v=v2&amp;px=999" role="button" title="SAP Cloud ALM for Operations.png" alt="Functional overview of SAP Cloud ALM for Operations" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Functional overview of SAP Cloud ALM for Operations</span></span></P><P><SPAN>For more information, see </SPAN><A title="SAP Cloud ALM for Operations" href="https://support.sap.com/en/alm/sap-cloud-alm/operations.html" target="_blank" rel="noopener noreferrer">SAP Cloud ALM for Operations</A><SPAN>.</SPAN></P><P><SPAN>To resolve issues, you can then navigate from SAP Cloud ALM to the local expert tools on SAP BTP, to perform a use-case-specific root cause analysis.&nbsp;</SPAN><SPAN>For example, f</SPAN><SPAN>rom an error message in <EM>Exception Monitoring</EM> of SAP Cloud ALM, you could directly jump to <A title="SAP Cloud Logging service" href="https://help.sap.com/docs/cloud-logging" target="_blank" rel="noopener noreferrer">SAP Cloud Logging service</A> to perform a detailed analysis, for which the service stores and visualizes log files, metrics, and traces from your apps running in different SAP BTP environments.</SPAN></P><P><SPAN>For the execution of corrective actions on SAP BTP, events in SAP Cloud ALM could automatically trigger the execution of corresponding commands on SAP Automation Pilot. This service offers a low-code and no-code automation engine and brings catalogs of automated actions that you can use to compile the best-fitting command for automating your recurring DevOps-related tasks and for remediation of alerts from your individual SAP BTP applications.</SPAN></P><P><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Automate recurring ops tasks with SAP Automation Pilot" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103875i90ADE7D1425C86D5/image-size/large?v=v2&amp;px=999" role="button" title="AutoPi.png" alt="Automate recurring ops tasks with SAP Automation Pilot" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Automate recurring ops tasks with SAP Automation Pilot</span></span></SPAN></P><P><SPAN>This way, you can optimize your operation efforts and increase the resilience of your business scenarios.<BR /></SPAN></P><P>&nbsp;</P><H2 id="toc-hId-11004704">Summary</H2><P>SAP BTP offers a low-entry approach to verify the value a more agile development process can bring - also for your SAP applications. It does comprise highly-integrated DevOps services along the complete lifecycle - from CI/CD to development, delivery and operations, with a smooth integration option into SAP Cloud ALM, as SAP's strategic operations and central observability platform. SAP Cloud ALM allows the central operation of your holistic business scenarios spanning several environments. If<SPAN>&nbsp;you should have special needs or third-party frameworks already in use around DevOps, benefit from open APIs of the DevOps services of SAP BTP and of SAP Cloud ALM.</SPAN></P><P>If you want to learn more, check out the information from <SPAN>the&nbsp;</SPAN><SPAN><A href="https://community.sap.com/topics/devops" target="_blank">DevOps | SAP Community</A></SPAN><SPAN>&nbsp;topic page and</SPAN> consider to take the learning journey&nbsp;<A title="Discovering DevOps with SAP BTP learning journey" href="https://learning.sap.com/learning-journey/discovering-devops-with-sap-btp" target="_blank" rel="noopener noreferrer">Discovering DevOps with SAP BTP</A><SPAN>.&nbsp;If you want to try it out, all DevOps services are part of SAP BTP free tier, so the above setup can be experienced without charge. Otherwise, SAP Build Code is a good starting point as well, as it does comprise most of the DevOps-related SAP BTP services.</SPAN></P> 2024-05-06T14:26:48.640000+02:00 https://community.sap.com/t5/sap-codejam-blog-posts/sap-codejam-hana-ml-in-pozna%C5%84-2024-04-recap/ba-p/13696447 SAP CodeJam HANA ML In Poznań 2024-04 Recap 2024-05-09T16:09:45.370000+02:00 Vitaliy-R https://community.sap.com/t5/user/viewprofilepage/user-id/183 <P>This week, we had the Getting Started with Machine Learning using SAP HANA and <a href="https://community.sap.com/t5/c-khhcw49343/Python/pd-p/f220d74d-56e2-487e-8e6c-a8cb3def2378" class="lia-product-mention" data-product="126-1">Python</a>&nbsp;in Poznań, Poland, kindly hosted by All-for-One Poland and organized by&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/122064">@JulianG</a>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1715250588532.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/108053i68825F50D863896E/image-size/medium?v=v2&amp;px=400" role="button" title="1715250588532.jpeg" alt="1715250588532.jpeg" /></span></P><P>We got participants not only from Poznań, but as well from Polkowice and Warsaw.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1715250588980.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/108059i36D5A1C90F714463/image-size/medium?v=v2&amp;px=400" role="button" title="1715250588980.jpeg" alt="1715250588980.jpeg" /></span></P><P>&nbsp;I would like to thank Gabriela, Danka, and Julian for the organization!</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1715250588605.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/108062iFEF6B4426803561C/image-size/medium?v=v2&amp;px=400" role="button" title="1715250588605.jpeg" alt="1715250588605.jpeg" /></span></P><P>And, as always, it was great to catch up with local SAP community veterans&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/141029">@DominikTylczyn</a>&nbsp;and&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/739">@GregMalewski</a>&nbsp;during a spontaneous SAP Stammtisch the night before <span class="lia-unicode-emoji" title=":clinking_beer_mugs:">🍻</span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="IMG_0226.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/108063i81879B0D99F6BBF1/image-size/medium?v=v2&amp;px=400" role="button" title="IMG_0226.jpeg" alt="IMG_0226.jpeg" /></span></P><P>&nbsp;</P><DIV class=""><DIV class=""><DIV class=""><P>If you want to host the SAP CodeJam on this topic, then please check:&nbsp;<A href="https://community.sap.com/t5/technology-blogs-by-sap/quot-getting-started-with-machine-learning-using-sap-hana-quot-as-a-new-sap/ba-p/13574098" target="_blank">https://community.sap.com/t5/technology-blogs-by-sap/quot-getting-started-with-machine-learning-using-sap-hana-quot-as-a-new-sap/ba-p/13574098</A></P><P>&nbsp;</P></DIV></DIV></DIV> 2024-05-09T16:09:45.370000+02:00 https://community.sap.com/t5/technology-blogs-by-members/iot-rfid-integration-with-sap-hana-cloud-via-sap-btp/ba-p/13698597 IoT: RFID integration with SAP HANA Cloud via SAP BTP 2024-05-14T13:46:58.943000+02:00 Ihor_Haranichev https://community.sap.com/t5/user/viewprofilepage/user-id/643343 <P>Hello SAP Community!</P><P>Let me share with you an abstract prototype with using RFID reader with power of SAP HANA Cloud platform. Probably this project will bring you a new ideas for using modern SAP landscape.</P><P>For instance we have a business case: to register employee’s attendance in the office for further processing such as control reporting, payroll etc.</P><H3 id="toc-hId-1123635199">1. Hardware specification</H3><P>For this purposes we use a popular computer Raspberry PI with open platform and data bus. It is British computer for learning and various DIY projects. For example, you can create your own smart house using such computers.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_3-1715529385089.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109164iDA3C39D0D4E66D63/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_3-1715529385089.png" alt="nevigon_3-1715529385089.png" /></span></P><P><SPAN>Details are by the link&nbsp;</SPAN><SPAN><A href="https://www.raspberrypi.org" target="_blank" rel="noopener nofollow noreferrer">https://www.raspberrypi.org</A></SPAN></P><P>I have <STRONG>Raspberry Pi 3 Model B+</STRONG>. A little bit outdated, but still functional. The computer bus GPIO allows connect a various sensors and devices.</P><P>For RFID reader we use <STRONG>SB components RFID HAT</STRONG>:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_0-1715529046505.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109161i2A086BCAE933B2D2/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_0-1715529046505.png" alt="nevigon_0-1715529046505.png" /></span></P><P>This device is Raspberry PI compatible; it has GPIO 40 pin header such as Raspberry PI has. Apart of RFID module, there are beeper and little monochrome display on-board.</P><P>More details in the link&nbsp;<SPAN><A href="https://github.com/sbcshop/SB-RFID-HAT" target="_blank" rel="noopener nofollow noreferrer">https://github.com/sbcshop/SB-RFID-HAT</A></SPAN></P><P>Additionally, we have two test RFID tags for test scenarios. These tags have own unique ID.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_1-1715529070409.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109162i676C6951A73BAC6D/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_1-1715529070409.png" alt="nevigon_1-1715529070409.png" /></span></P><H3 id="toc-hId-927121694">2. Software specification</H3><P>We use SAP BTP Trial as development platform and SAP HANA Cloud as database. We use Python for REST API. And for RFID device’s scripts, we will use Python as well. SAP Business Application Studio will be used to develop Fiori application.</P><P>&nbsp;Let's split the task for several parts:</P><UL><LI>Creating database artifacts;</LI><LI>Creating a Rest API in SAP BTP;</LI><LI>Creating scripts for RFID device;</LI><LI>Creating a Fiori report.</LI></UL><H3 id="toc-hId-730608189">3. Creating database artifacts</H3><P>We create an SAP BTP account + space + SAP HANA Cloud database.</P><P>I provide a link for creating an account by SAP Learning Hub (developers.sap.com):</P><P><SPAN><A href="https://developers.sap.com/tutorials/hcp-create-trial-account.html" target="_blank" rel="noopener noreferrer">https://developers.sap.com/tutorials/hcp-create-trial-account.html</A></SPAN></P><P>For creating SAP HANA database use next link:</P><P><SPAN><A href="https://developers.sap.com/group.hana-cloud-get-started-1-trial.html" target="_blank" rel="noopener noreferrer">https://developers.sap.com/group.hana-cloud-get-started-1-trial.html</A></SPAN></P><P>Once development environment is ready, we create database artifacts: a table for users and a attendance log table and view which join two tables.</P><P>Here are SQL scripts:</P><P>Table RFID_USER, for user maintenance.</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-sql"><code>CREATE COLUMN TABLE RFID_USER ( RFID NVARCHAR(12) PRIMARY KEY, NAME NVARCHAR(50) );</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>Table RFID_USER description</P><TABLE width="645px"><TBODY><TR><TD width="214.659px"><P><STRONG>Fieldname</STRONG></P></TD><TD width="214.744px"><P><STRONG>Field type</STRONG></P></TD><TD width="214.688px"><P><STRONG>Description</STRONG></P></TD></TR><TR><TD width="214.659px"><P>RFID</P></TD><TD width="214.744px"><P>NVARCHAR(12)</P></TD><TD width="214.688px"><P>RFID unique ID</P></TD></TR><TR><TD width="214.659px"><P>NAME</P></TD><TD width="214.744px"><P>NVARCHAR(50)</P></TD><TD width="214.688px"><P>User which assigned to ID</P></TD></TR></TBODY></TABLE><P>Table RFID_LOG, for attendance registration.</P><pre class="lia-code-sample language-sql"><code>CREATE COLUMN TABLE RFID_LOG ( ID INT PRIMARY KEY, RFID NVARCHAR(12), CHECKIN DATETIME, CHECKOUT DATETIME );</code></pre><P>Table RFID_LOG description</P><TABLE width="645px"><TBODY><TR><TD width="214.659px"><P><STRONG>Fieldname</STRONG></P></TD><TD width="214.744px"><P><STRONG>Field type</STRONG></P></TD><TD width="214.688px"><P><STRONG>Description</STRONG></P></TD></TR><TR><TD width="214.659px"><P>ID</P></TD><TD width="214.744px"><P>INT</P></TD><TD width="214.688px"><P>Unique key field, counter</P></TD></TR><TR><TD width="214.659px"><P>RFID</P></TD><TD width="214.744px"><P>NVARCHAR(50)</P></TD><TD width="214.688px"><P>User which assigned to ID</P></TD></TR><TR><TD width="214.659px"><P>CHECKIN</P></TD><TD width="214.744px"><P>DATETIME</P></TD><TD width="214.688px"><P>Timestamp for check in</P></TD></TR><TR><TD width="214.659px"><P>CHECKOUT</P></TD><TD width="214.744px"><P>DATETIME</P></TD><TD width="214.688px"><P>Timestamp for check out</P></TD></TR></TBODY></TABLE><P>View RFID_VIEW, for reporting&nbsp;</P><pre class="lia-code-sample language-sql"><code>CREATE VIEW RFID_VIEW AS SELECT RU.NAME, RL.RFID, RL.CHECKIN, RL.CHECKOUT FROM RFID_LOG RL JOIN RFID_USER RU ON RL.RFID = RU.RFID;</code></pre><H3 id="toc-hId-534094684">4. Creating a REST API in SAP HANA Cloud</H3><P>For REST API development, we use Visual Studio Code. We use a Python as a language for development.</P><P>Link for Visual studio code:&nbsp;<SPAN><A href="https://code.visualstudio.com" target="_blank" rel="noopener nofollow noreferrer">https://code.visualstudio.com</A></SPAN></P><P>Link for Python:&nbsp;<SPAN><A href="https://www.python.org" target="_blank" rel="noopener nofollow noreferrer">https://www.python.org</A></SPAN></P><P>The last but not least is Cloud Foundry CLI:&nbsp;<SPAN><A href="https://docs.cloudfoundry.org/cf-cli/install-go-cli.html" target="_blank" rel="noopener nofollow noreferrer">https://docs.cloudfoundry.org/cf-cli/install-go-cli.html</A></SPAN></P><P>Using Cloud Foundry command line we will deploy our application to SAP BTP.</P><P>I recommend to use a comprehensive tutorial, provided by SAP: <SPAN><A href="https://developers.sap.com/tutorials/btp-cf-buildpacks-python-create.html" target="_blank" rel="noopener noreferrer">https://developers.sap.com/tutorials/btp-cf-buildpacks-python-create.html</A></SPAN></P><P>First thing first we create a folder for the project -&nbsp; Python_Rfid_Project.</P><P>Inside this folder put a file with a name <STRONG>manifest.yml</STRONG>. This file describes the application and how it will be deployed to Cloud Foundry:</P><pre class="lia-code-sample language-markup"><code>--- applications: - name: rfid_app random-route: true path: ./ memory: 128M buildpacks: - python_buildpack command: python server.py services: - pyhana_rfid - pyuaa_rfid - name: rfid_web random-route: true path: web memory: 128M env: destinations: &gt; [ { "name":"rfid_app", "url":"https://rfidapp-chipper-echidna.cfapps.us10-001.hana.ondemand.com", "forwardAuthToken": true } ] services: - pyuaa_rfid</code></pre><P>Name of application is<STRONG> rfid_app</STRONG>. Command file with the API logic is server.py.</P><P>Next, lets create a Python runtime version file, <STRONG>runtime.txt:</STRONG></P><pre class="lia-code-sample language-markup"><code>python-3.11.*</code></pre><P>Another file is <STRONG>requirements.txt</STRONG>, which contains the necessary versions of packages:</P><pre class="lia-code-sample language-markup"><code>Flask==2.3.* cfenv==0.5.3 hdbcli==2.17.* flask-cors==3.0.10</code></pre><P><STRONG>Flask</STRONG> is a framework for building easy and lightweight web applications</P><P><STRONG>Cfenv</STRONG> is node.js library for simplify process of accessing environment variables and services provided by cloud platform.</P><P><STRONG>Hdbcli </STRONG>– is python library for connecting and interacting with SAP HANA Databases</P><P><STRONG>Flask-CORS</STRONG> is a Flask extension that simplifies the process of dealing with Cross-Origin Resource Sharing (CORS) in Flask applications. In this project we will simplify this connection to avoid CORS errors. The SAP recommendation is to register and consume Destinations. You may see it in SAP BTP:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_0-1715530932115.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109165i6BDD8A24A50C4D62/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_0-1715530932115.png" alt="nevigon_0-1715530932115.png" /></span></P><P>However in scope of my project I will simplify this process to use <STRONG>Flask-CORS</STRONG> extension. Here I'm opened for discussion, possibly someone will propose an another approach.</P><P>It is important to install all this packages on local machine:</P><P>Commands are:</P><P><EM>pip install Flask</EM></P><P><EM>pip install cfenv</EM></P><P><EM>pip install hdbcli</EM></P><P><EM>pip install flask-cors</EM></P><P>Next, main file, as I mentioned before is <STRONG>server.py</STRONG></P><pre class="lia-code-sample language-python"><code>import os from flask import Flask, request, jsonify from flask_cors import CORS from hdbcli import dbapi from cfenv import AppEnv import json app = Flask(__name__) CORS(app) # Enable CORS for all routes #CORS(app, resources={r"/*": {"origins": "*"}}) env = AppEnv() import json sap_hana_config_file = "hana_cloud_config.json" with open(sap_hana_config_file) as f: sap_hana_config = json.load(f) db_url = sap_hana_config['url'] db_port = sap_hana_config['port'] db_user = sap_hana_config['user'] db_pwd = sap_hana_config['pwd'] db_database = sap_hana_config['database'] # Get the service bindings hana_service = 'hana' hana = env.get_service(label=hana_service) port = int(os.environ.get('PORT', 3000)) # SAP HANA database connection configuration conn = dbapi.connect(address=db_url, port=db_port, user=db_user, password=db_pwd, database=db_database) # routine for database execution def execute_query(query, params=None): cursor = conn.cursor() if params: cursor.execute(query, params) else: cursor.execute(query) try: data = cursor.fetchall() except: data = [] cursor.close() data_list = [] for row in data: data_dict = {} for idx, col in enumerate(cursor.description): data_dict[col[0]] = row[idx] data_list.append(data_dict) return data_list # endpoints @app.route('/data', methods=['GET']) def get_data(): top_count = int(request.args.get('TOP')) if request.args.get('TOP') else 0 if top_count &gt; 0: query = "SELECT * FROM RFID_VIEW ORDER BY CHECKIN DESC LIMIT ?" params = (top_count) else: query = "SELECT * FROM RFID_VIEW ORDER BY CHECKIN DESC" params = None data = execute_query(query, params) return jsonify(data) @app.route('/user/&lt;rfid&gt;', methods=['GET']) def get_user_by_rfid(rfid): query = "SELECT * FROM RFID_USER WHERE RFID = ?" data = execute_query(query, (rfid,)) return jsonify(data) @app.route('/rfid/&lt;rfid&gt;', methods=['GET']) def get_data_by_rfid(rfid): query = "SELECT RL.ID, RL.RFID, RL.CHECKIN, RL.CHECKOUT,RU.NAME FROM RFID_LOG RL JOIN RFID_USER RU ON RL.RFID = RU.RFID WHERE RL.RFID = ?" data = execute_query(query, (rfid,)) return jsonify(data) @app.route('/lastrfid/&lt;rfid&gt;', methods=['GET']) def get_last_data_by_rfid(rfid): query = "SELECT TOP 1 RL.ID, RL.RFID, RL.CHECKIN, RL.CHECKOUT,RU.NAME FROM RFID_LOG RL JOIN RFID_USER RU ON RL.RFID = RU.RFID WHERE RL.RFID = ? AND RL.CHECKIN IS NOT NULL AND RL.CHECKOUT IS NULL ORDER BY RL.CHECKIN DESC" data = execute_query(query, (rfid,)) return jsonify(data) @app.route('/rfid/&lt;rfid&gt;', methods=['POST']) def add_data(rfid): # new_data = request.json query = "INSERT INTO RFID_LOG (RFID, CHECKIN, CHECKOUT) VALUES (?,CURRENT_TIMESTAMP, NULL)" # for new_data_line in new_data: # params = (new_data_line['RFID']) execute_query(query, (rfid,)) return jsonify({"message": "Data added successfully"}) @app.route('/id/&lt;int:id&gt;', methods=['PUT']) def update_data(id): # updated_data = request.json query = "UPDATE RFID_LOG SET CHECKOUT = CURRENT_TIMESTAMP WHERE ID = ?" updated_data_line['READING1'], updated_data_line['READING2'], updated_data_line['READING3'], updated_data_line['UNIQUEDEVICEID'], id) execute_query(query,(id,)) return jsonify({"message": "Data updated successfully"}) # for local testing if __name__ == '__main__': app.run(host='0.0.0.0', port=port)</code></pre><P>In this script we implement GET, PUT, POST methods with respective endpoints.</P><P><STRONG>GET</STRONG></P><UL class="lia-list-style-type-circle"><LI>Endpoint <STRONG>/data</STRONG></LI></UL><P style=" padding-left : 30px; ">Get all data.</P><P style=" padding-left : 30px; ">Example:</P><P style=" padding-left : 30px; "><SPAN><A href="http://127.0.0.1:3000/" target="_blank" rel="noopener nofollow noreferrer">http://127.0.0.1:3000/</A></SPAN>/data?TOP=5</P><P style=" padding-left : 30px; ">&nbsp;</P><UL class="lia-list-style-type-circle"><LI>Endpoint <STRONG>/user/&lt;RFID&gt;</STRONG></LI></UL><P style=" padding-left : 30px; ">Check user/RFID registration.</P><P style=" padding-left : 30px; ">Example:</P><P style=" padding-left : 30px; "><SPAN><A href="http://127.0.0.1:3000" target="_blank" rel="noopener nofollow noreferrer">http://127.0.0.1:3000</A></SPAN>/rfid/123456789101</P><P style=" padding-left : 30px; ">&nbsp;</P><UL class="lia-list-style-type-circle"><LI>Endpoint <STRONG>/lastrfid/&lt;RFID&gt;</STRONG></LI></UL><P style=" padding-left : 30px; ">Getting last attendance.</P><P style=" padding-left : 30px; ">Example:</P><P style=" padding-left : 30px; "><SPAN><A href="http://127.0.0.1:3000" target="_blank" rel="noopener nofollow noreferrer">http://127.0.0.1:3000</A></SPAN>/lastrfid/123456789101</P><P>&nbsp;</P><P><STRONG>POST</STRONG></P><UL class="lia-list-style-type-circle"><LI>Endpoint /rfid/&lt;RFID&gt;</LI></UL><P style=" padding-left : 30px; ">A new attendance registration for check in.</P><P style=" padding-left : 30px; ">Example:</P><P style=" padding-left : 30px; "><SPAN><A href="http://127.0.0.1:3000" target="_blank" rel="noopener nofollow noreferrer">http://127.0.0.1:3000</A></SPAN>/rfid/123456789101</P><P>&nbsp;</P><P><STRONG>PUT</STRONG></P><UL class="lia-list-style-type-circle"><LI>Endpoint /id/&lt;int:id&gt;</LI></UL><P style=" padding-left : 30px; ">Check out registration.</P><P style=" padding-left : 30px; ">Example:</P><P style=" padding-left : 30px; "><SPAN><A href="http://127.0.0.1:3000/" target="_blank" rel="noopener nofollow noreferrer">http://127.0.0.1:3000/</A></SPAN>id/1</P><P>For database connection I put the credentials into a json file, <STRONG>hana_cloud_config.json</STRONG></P><pre class="lia-code-sample language-markup"><code>{ "user": "DBADMIN", "pwd": "*********", "url": "????????-????-????-????-???????????.hana.trial-us10.hanacloud.ondemand.com", "port": 443, "database": "HANA_Cloud_Trial" }</code></pre><P>We take your database administrator login+password, which you initiated during SAP HANA Database initialization.</P><P>The URL we take here in SAP BTP:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_0-1715533079777.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109166iEFA88BDD5E64E6B4/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_0-1715533079777.png" alt="nevigon_0-1715533079777.png" /></span></P><P>This connection is performed by command:</P><pre class="lia-code-sample language-python"><code>conn = dbapi.connect(address=db_url, port=db_port, user=db_user, password=db_pwd, database=db_database) </code></pre><P>We open terminal window Visual Studio code and connect to Cloud Foundry.</P><P>Initially it requests API endpoint which you may take from SAP BTP Cockpit:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_1-1715533243902.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109167iDC117A002E1D680F/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_1-1715533243902.png" alt="nevigon_1-1715533243902.png" /></span></P><P>And provide your name and password:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_3-1715533318430.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109169i2856906338697A95/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_3-1715533318430.png" alt="nevigon_3-1715533318430.png" /></span></P><P>To deploy the application use command cf push.</P><P>After successful deployment and start of your application you may see in the Terminal:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_4-1715533376173.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109170i743A8919DC2DA71A/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_4-1715533376173.png" alt="nevigon_4-1715533376173.png" /></span></P><P>In SAP BTP Cockpit you may see the following:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_5-1715533418675.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109171i80651AD420DA24BF/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_5-1715533418675.png" alt="nevigon_5-1715533418675.png" /></span></P><P>Now we can trigger our REST API with command, like was provided above. For testing the API I used POSTMAN utility - <SPAN><A href="https://www.postman.com" target="_blank" rel="noopener nofollow noreferrer">https://www.postman.com</A></SPAN></P><P><SPAN>For instance, if entries exist in database, you receive next response for the request <A href="http://127.0.0.1:3000/data" target="_blank" rel="noopener nofollow noreferrer">http://127.0.0.1:3000/data</A></SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_0-1715535254597.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109174iFDE23641DFA1E8A2/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_0-1715535254597.png" alt="nevigon_0-1715535254597.png" /></span></P><H3 id="toc-hId-337581179">5. Creating IoT - RFID reader</H3><P>After RFID HAT installation the Raspberry PI will look like this:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_0-1715535633466.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109176iBACDCDA12D310B1A/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_0-1715535633466.png" alt="nevigon_0-1715535633466.png" /></span></P><P>In Raspberry PI terminal, in command line we install required libraries:</P><P><EM>sudo apt-get install python-smbus</EM></P><P><EM>sudo apt-get install i2c-tools</EM></P><P>A test script is provided for the RFID device out of the box. I modified and implemented communications with the developed REST API.</P><P>Rfid_with_oled_project.py</P><pre class="lia-code-sample language-python"><code>from oled_091 import SSD1306 from subprocess import check_output from time import sleep from datetime import datetime from os import path import serial import RPi.GPIO as GPIO import requests import json GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(17,GPIO.OUT) DIR_PATH = path.abspath(path.dirname(__file__)) DefaultFont = path.join(DIR_PATH, "Fonts/GothamLight.ttf") url = 'https://rfidapp-chipper-echidna.cfapps.us10-001.hana.ondemand.com' Checkin = "" Checkout = "" Id = "" class read_rfid: def read_rfid (self): ser = serial.Serial ("/dev/ttyS0") #Open named port ser.baudrate = 9600 #Set baud rate to 9600 data = ser.read(12) #Read 12 characters from serial port to data if(data != " "): GPIO.output(17,GPIO.HIGH) sleep(.2) GPIO.output(17,GPIO.LOW) ser.close () #Close port data=data.decode("utf-8") return data def info_print(): print("Waiting for TAG...") # display.WhiteDisplay() display.DirImage(path.join(DIR_PATH, "Images/SB.png")) display.DrawRect() display.ShowImage() sleep(1) display.PrintText("Place your TAG", FontSize=14) display.ShowImage() display = SSD1306() SB = read_rfid() if __name__ == "__main__": info_print() while True: id=SB.read_rfid() print (id) #CPU = info.CPU_Info() # display.DirImage("Images/CPU.png", size=(24, 24), cords=(0, 0)) #display.PrintText("ID : " +(id), cords=(4, 8), FontSize=11) endpoint_get = '/user/' + id try: r = requests.get(url + endpoint_get) r.raise_for_status() js = r.json() for js_line in js: Name = js_line['NAME'] Rfid = js_line['RFID'] if js == []: print ("No user found") display.DrawRect() display.PrintText("No user found", cords=(4, 8), FontSize=14) display.ShowImage() sleep(2) else: #print(Name) #display.DrawRect() #display.ShowImage() #display.PrintText("Hello," +(Name), cords=(4, 8), FontSize=14) #display.ShowImage() #sleep(2) #display.ShowImage() endpoint_get = '/lastrfid/' + Rfid try: r = requests.get(url + endpoint_get) r.raise_for_status() js = r.json() for js_line in js: Checkin = js_line['CHECKIN'] Checkout = js_line['CHECKOUT'] Id = js_line['ID'] if js == []: endpoint_post = '/rfid/' + Rfid response_post = requests.post(url + endpoint_post) print("Check In-&gt;",Name) display.DrawRect() #display.ShowImage() display.PrintText("Hello, " +(Name) +"!", cords=(4, 8), FontSize=12) display.ShowImage() sleep(2) elif Checkin != None and Checkout == None: endpoint_put = '/id/' + str(Id) response_put = requests.put(url + endpoint_put) print("Check Out-&gt;",Name) display.DrawRect() #display.ShowImage() display.PrintText("Bye, " +(Name) +"!", cords=(4, 8), FontSize=12) display.ShowImage() sleep(2) elif Checkin != None and Checkout != None: endpoint_post = '/rfid/' + Rfid response_post = requests.post(url + endpoint_post) print("Check In-&gt;",Name) display.DrawRect() #display.ShowImage() display.PrintText("Hello, " +(Name) +"!", cords=(4, 8), FontSize=12) display.ShowImage() sleep(2) except requests.exceptions.HTTPError as err: print("Error - 404") except requests.exceptions.HTTPError as err: print("Error - 404") #sleep(2) display.DrawRect() display.ShowImage() #sleep(2) display.PrintText("Place your TAG", FontSize=14) display.ShowImage()</code></pre><P>The logic is next: initially we are checking if RFID ID exists. If exists, fetching last registered data for the ID. If exists, checking if check in date and time is not initial, if exists – setting check out date and time. If no records in the database – we insert a check in date and time for the particular ID.</P><P>Our device and script are ready.</P><H3 id="toc-hId-141067674">6. Creating a SAP Fiori application</H3><P>Last stage – we will create a simple Fiori report for data reflection.</P><P>Here we create a Dev Space FIORI_RFID in SAP Business application studio and specify it for SAP Fiori:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_0-1715536283838.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109177i167DE3B86B5167BD/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_0-1715536283838.png" alt="nevigon_0-1715536283838.png" /></span></P><P>Once Dev Space will be created, &nbsp;we create a Fiori project from template:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_1-1715536338809.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109178iCCE9AB1513253369/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_1-1715536338809.png" alt="nevigon_1-1715536338809.png" /></span></P><P>A project will be generated with all necessary files and folders.</P><P>In our Fiori application we create one screen for a list report.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_2-1715536338818.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109179iBBDAC6A919445004/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_2-1715536338818.png" alt="nevigon_2-1715536338818.png" /></span></P><P>All necessary files are generated. We need put changes to view file and controller file.</P><P>View.controller.js</P><pre class="lia-code-sample language-javascript"><code>sap.ui.define([ "sap/ui/core/mvc/Controller" ], /** * {typeof sap.ui.core.mvc.Controller} Controller */ function (Controller) { "use strict"; return Controller.extend("rfidproject.controller.View", { onInit: function () { sap.ui.getCore().HANA = new Object(); sap.ui.getCore().HANA.URL = "https://??????-?????? -???????.???????.????-??.hana.ondemand.com/data"; this.router = sap.ui.core.UIComponent.getRouterFor(this); this.router.attachRoutePatternMatched(this._handleRouteMatched, this); this.url = sap.ui.getCore().HANA.URL; var oModelData = this.loadModel(this.url); this.getView().setModel(oModelData, "viewModel"); // Set up automatic refresh every 5 minutes (300,000 milliseconds) setInterval(this.refreshData.bind(this), 1000); }, _handleRouteMatched: function(evt) { // this.empIndex = evt.getParameter("arguments").data; // // var context = sap.ui.getCore().byId("App").getModel().getContext('/entityname/' + this.empIndex); // // this.getView().setBindingContext(context); }, backToHome: function(){ this.router.navTo("default"); }, handleLiveChange: function(evt) { // create model filter var filters = []; var sQuery = evt.getParameters().newValue; if (sQuery &amp;&amp; sQuery.length &gt; 0) { var filter = new sap.ui.model.Filter("NAME", sap.ui.model.FilterOperator.Contains, sQuery); filters.push(filter); } // update list binding var list = this.getView().byId("Table"); var binding = list.getBinding("items"); binding.filter(filters); }, // Event handler for live change in search field loadModel: function(url) { var url = url; var oModel = new sap.ui.model.json.JSONModel(); oModel.loadData(url, null, false); return oModel; }, refreshData: function() { var oModelData = this.loadModel(this.url); this.getView().setModel(oModelData, "viewModel"); } }); });</code></pre><P>For&nbsp;<STRONG>OnInit</STRONG> event we maintain connection to REST API and viewModel.</P><P>We consume&nbsp;viewModel in View.view.xml</P><pre class="lia-code-sample language-markup"><code>&lt;mvc:View controllerName="rfidproject.controller.View" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m"&gt; &lt;Page id="page" title="{i18n&gt;title}"&gt; &lt;content&gt; &lt;Table id="Table" growing = "true" busyIndicatorDelay="400" growingThreshold="20" mode="{device&gt;/listMode}" inset="false" selectionChange="onItemSelection" updateFinished="onItemsUpdateFinished" updateStarted="onItemsUpdateStarted" width="auto" items="{viewModel&gt;/}"&gt; &lt;headerToolbar&gt; &lt;Toolbar id="TB"&gt; &lt;Label id="LB" text="All entries"/&gt; &lt;ToolbarSpacer id="TS"/&gt; &lt;SearchField id="SF" search="handleSearch" liveChange="handleLiveChange" width="10rem" /&gt; &lt;!-- &lt;CheckBox id="automaticRefreshCheckBox" text="Automatic Refresh" select="toggleRefreshMode"/&gt; &lt;Button id="BTN" text="Refresh" press="refreshData" enabled="{= !viewModel&gt;/autoRefresh}"/&gt; --&gt; &lt;Button id="BTN" text="Refresh" press="refreshData"/&gt; &lt;/Toolbar&gt; &lt;/headerToolbar&gt; &lt;columns&gt; &lt;Column demandPopin="true" id="NAME" minScreenWidth="Small" visible="true"&gt; &lt;Text id="NM" text="NAME"/&gt; &lt;/Column&gt; &lt;Column demandPopin="true" hAlign="Center" id="CHECKIN" minScreenWidth="Medium" visible="true"&gt; &lt;Text id="CI" text="CHECK IN"/&gt; &lt;/Column&gt; &lt;Column demandPopin="true" id="CHECKOUT" minScreenWidth="Small" visible="true"&gt; &lt;Text id="CO" text="CHECK OUT"/&gt; &lt;/Column&gt; &lt;/columns&gt; &lt;items&gt; &lt;ColumnListItem id="CLI"&gt; &lt;cells&gt; &lt;Text id="VNM" text="{viewModel&gt;NAME}"/&gt; &lt;Text id="VCI" text="{viewModel&gt;CHECKIN}"/&gt; &lt;Text id="VCO" text="{viewModel&gt;CHECKOUT}"/&gt; &lt;/cells&gt; &lt;/ColumnListItem&gt; &lt;/items&gt; &lt;/Table&gt; &lt;/content&gt; &lt;/Page&gt; &lt;/mvc:View&gt;</code></pre><P>In the view we will use control Table. For the Table we maintain necessary fields: Name, Check in, Check out.</P><P>The result will look like this:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_0-1715536898094.png" style="width: 688px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109181i2C4E60CB12C7D0A7/image-dimensions/688x160?v=v2" width="688" height="160" role="button" title="nevigon_0-1715536898094.png" alt="nevigon_0-1715536898094.png" /></span></P><H3 id="toc-hId--55445831">7. Testing</H3><P>Now we can test our project!</P><P>Initially, let’s maintain users and RFID IDs:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_1-1715536926807.png" style="width: 574px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109182iA3536E6756ED3CB1/image-dimensions/574x114?v=v2" width="574" height="114" role="button" title="nevigon_1-1715536926807.png" alt="nevigon_1-1715536926807.png" /></span></P><P>On Raspberry PI – execute the script – rfid_with_oled_project.py</P><P>Now we can test our project!</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_2-1715536969472.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109184iEC21D3024FCCCAE3/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_2-1715536969472.png" alt="nevigon_2-1715536969472.png" /></span>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_3-1715536969632.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109185i46015A558BC65B02/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_3-1715536969632.png" alt="nevigon_3-1715536969632.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_4-1715536969754.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109183i0A6D1178D58FF601/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_4-1715536969754.png" alt="nevigon_4-1715536969754.png" /></span></P><P>On PC – execute the Fiori application:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_5-1715537005177.png" style="width: 701px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109186i2FD1300B11A5D7C7/image-dimensions/701x163?v=v2" width="701" height="163" role="button" title="nevigon_5-1715537005177.png" alt="nevigon_5-1715537005177.png" /></span></P><P>Let’s place one tag on RFID reader:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_6-1715537033256.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109188i6712CBEA3AAA5E0E/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_6-1715537033256.png" alt="nevigon_6-1715537033256.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_7-1715537033355.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109187i1123FFE93AE89909/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_7-1715537033355.png" alt="nevigon_7-1715537033355.png" /></span></P><P>RFID reader registers an user, who came to the office (for instance).</P><P>In the Fiori report we may see the entry:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_8-1715537085170.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109189i3A5A25C62E9591ED/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_8-1715537085170.png" alt="nevigon_8-1715537085170.png" /></span></P><P>Let’s place the tag again:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_9-1715537105699.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109192iDD5BBD029CE0EBCA/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_9-1715537105699.png" alt="nevigon_9-1715537105699.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_10-1715537105833.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109191i30A22399EA0451EF/image-size/medium?v=v2&amp;px=400" role="button" title="nevigon_10-1715537105833.png" alt="nevigon_10-1715537105833.png" /></span></P><P>The user was unregistered, he has left the office.</P><P>Respective entry appeared in the Fiori application:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevigon_11-1715537105838.png" style="width: 515px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109190iA5470C52E7A6C936/image-dimensions/515x128?v=v2" width="515" height="128" role="button" title="nevigon_11-1715537105838.png" alt="nevigon_11-1715537105838.png" /></span></P><H3 id="toc-hId--251959336"><STRONG>8. Conclusion</STRONG></H3><P>Our project is ready. RFID device successfully interacts with SAP HANA Database via API.</P><P>I'm looking forward to your feedback. Hope this blog will inspire you to create new projects and allow to discover new capabilities of SAP platform.</P> 2024-05-14T13:46:58.943000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/develop-with-joule-in-sap-build-code/ba-p/13695326 Develop with Joule in SAP Build Code 2024-05-16T22:12:27.753000+02:00 ale_biagi https://community.sap.com/t5/user/viewprofilepage/user-id/7035 <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AI-team-software-development-2048x1075.jpg" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107505i413D961E3FA33892/image-size/large?v=v2&amp;px=999" role="button" title="AI-team-software-development-2048x1075.jpg" alt="AI-team-software-development-2048x1075.jpg" /></span></P><P><FONT size="2"><SPAN>Authors:&nbsp;</SPAN><A href="https://community.sap.com/t5/user/viewprofilepage/user-id/7035" target="_self">@ale_biagi</A><SPAN>&nbsp;|&nbsp;</SPAN><A href="https://community.sap.com/t5/user/viewprofilepage/user-id/7022" target="_self">@YatseaLi</A></FONT></P><P>This blog post is part of a webinar series to show you how to explore the Generative AI capabilities of SAP AI Foundation on SAP BTP, along with proof of concepts in the form of use cases. You will have the opportunity to earn a knowledge badge with the title "<U><STRONG>Generative AI development with SAP BTP</STRONG></U>" by <SPAN class=""><SPAN>taking the <STRONG>first three</STRONG> sessions or <A href="https://partneredge.sap.com/en/library/education/products/btp/build/e_ep_use-cases_ai-foundation.html?#accordion-panel-section-libraryItem-descriptionSection-accordionitem_694022185" target="_self" rel="noopener noreferrer">replays</A> and passing its associated <A href="https://performancemanager.successfactors.eu/sf/learning?destUrl=https%3a%2f%2fsaplearninghub%2eplateau%2ecom%2flearning%2fuser%2fdeeplink%5fredirect%2ejsp%3flinkId%3dPROGRAM%5fDETAILS%26programID%3dPE%5fKB%5fGEN%5fAI%5fBTP%5fWA%26fromSF%3dY&amp;company=learninghub" target="_self" rel="nofollow noopener noreferrer">web assessment</A></SPAN></SPAN></P><H4 id="toc-hId-1252626405"><A href="https://partneredge.sap.com/en/library/education/psd/2024/mar/e_oe_te_w_PSD_WEB_00005664.html" target="_self" rel="noreferrer noopener"><SPAN class="">Replay: Develop with Joule in SAP Build Code</SPAN></A></H4><P><SPAN class=""><SPAN>Here we will explore Generative AI-based code development using <STRONG>Joule in SAP Build Code</STRONG> with a sample use case, following the <STRONG>Clean Core</STRONG> approach and <STRONG>extending SAP S/4HANA Cloud</STRONG> with <STRONG>side-by-side extensibility</STRONG>.</SPAN></SPAN></P><P><SPAN class=""><SPAN>Here you will find the source code of the final solution developed in SAP Build Code with the assistance of Joule:&nbsp;<A href="https://github.com/SAP-samples" target="_blank" rel="author nofollow noopener noreferrer">SAP-samples&nbsp;</A>/&nbsp;<STRONG><A href="https://github.com/SAP-samples/btp-generative-ai-hub-use-cases/tree/main/03-develop-with-joule-in-sap-build-code" target="_blank" rel="nofollow noopener noreferrer">develop-with-joule-in-sap-build-code</A></STRONG></SPAN></SPAN></P><H2 id="toc-hId-797947462"><SPAN class=""><SPAN>Why Generative AI-based Code Development matters?</SPAN></SPAN></H2><P>Let’s start by reviewing why&nbsp;<STRONG>Generative AI-based Code Development </STRONG>matters nowadays, especially in the context of the SAP ecosystem.</P><H3 id="toc-hId-730516676">The Developers Dilemma</H3><P>A recent research from IDC shows that <STRONG>developers spend only 20% of their time</STRONG> doing what they’re supposed to do: <STRONG>develop high quality business applications</STRONG>. The other 80% are spent performing peripheral overhead activities. This has a huge impact on their productivity.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_0-1715177298186.png" style="width: 736px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107551iD339A784906028BD/image-dimensions/736x414?v=v2" width="736" height="414" role="button" title="ale_biagi_0-1715177298186.png" alt="ale_biagi_0-1715177298186.png" /></span></P><P>Developers wear many different hats.&nbsp; Instead of spending their time coding developers are having to spend more time performing tests, implementing CI/CD, fine tuning performance and making sure the application is secure.&nbsp; All of this is necessary to create resilient applications, but in the end all developers want to be more productive and produce applications more efficiently.</P><P>Developers are more productive when they have the proper tools at their fingertips, when they can easily access data, and when they can reduce or eliminate tedious tasks.&nbsp;</P><P>To make a developer more productive, it comes at a cost.&nbsp; Developers need to implement a solution to handle CI/CD, another tool to access API’s, another tool to do transport management and they are always looking at ways to eliminate repetitive tasks. These are ways to increase developer productivity, but it comes at a cost when looking at solutions that come from multiple vendors to support development.</P><P>So, what is SAP doing to help with the Total Cost of Development and the Total Cost of Ownership when looking for application and extension development? That's exactly what we will discuss in the upcoming paragraphs.</P><H3 id="toc-hId-534003171">How does this dilemma affect the SAP ecosystem?</H3><P>All of you should have already noticed that the <STRONG>core </STRONG><STRONG>of</STRONG> <STRONG>SAP’s</STRONG> <STRONG>strategy</STRONG>, lies in the <STRONG>Case for Cloud</STRONG> led by the <STRONG>Cloud ERP</STRONG> and its peripheral cloud solutions, powered by the <STRONG>Business Technology Platform</STRONG> as their foundation and driving force.</P><P>Such core strategy is executed through two main global programs:<STRONG>&nbsp;</STRONG></P><UL><LI><STRONG>RISE with SAP</STRONG>: focused on the installed base and private cloud;</LI><LI><STRONG>GROW with SAP</STRONG>: focused on net new names and public cloud</LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_2-1715177900894.png" style="width: 740px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107562iA7F21DC80C9D3337/image-dimensions/740x333?v=v2" width="740" height="333" role="button" title="ale_biagi_2-1715177900894.png" alt="ale_biagi_2-1715177900894.png" /></span></P><P>So, what are the biggest <STRONG>roadblocks</STRONG> and <STRONG>challenges</STRONG> when executing this strategy?</P><P>For the cases of <STRONG>brown-field conversion</STRONG>, we noticed that technology-driven organizations have historically built on top of standard functionality to extend the capability to meet business needs. However, continuing to maintain <STRONG>decades-old technology</STRONG> now limits benefits and increases the cost of adopting new technologies.</P><P>Organizations cannot drive the next level of business transformation while carrying significant technical debt, because they are slower to innovate, more expensive to run and upgrade, and riskier to operate.</P><P>And for the cases of <STRONG>green-field implementation</STRONG>, what would be the challenge, then?</P><P>Thinking in terms of a <STRONG>cloud mindset</STRONG>, the concept of <STRONG>fit-to-standard</STRONG> should be applied in most of the cases whenever possible, leveraging the high flexibility provided by cloud solutions regarding configurations and personalization. When it’s not possible, a quick implementation for rapid turnaround of digital transformation should rely on the <STRONG>fast development of new loosely coupled solution extensions</STRONG>.</P><H3 id="toc-hId-337489666">SAP's approach to fast-paced Cloud ERP innovation</H3><P>And here is where the <STRONG>Clean Core Concept</STRONG> comes into play!</P><P>Such concept is essentially based in four main principles:</P><UL><LI><SPAN>First, every solution extension should be built as a <STRONG>loosely coupled service</STRONG> instead of a tightly coupled monolithic application</SPAN></LI><LI>Then, when building such services, as they’re loosely coupled, they’re supposed to <STRONG>extend the transactions from the backend system</STRONG> instead of modifying them in terms of either data and code</LI><LI>To do so, it’s imperative to <STRONG>strictly consume officially released APIs</STRONG> from the backend system, thus ensuring that changes to the core do not affect extensions as those APIs are maintained by SAP and backwards compatibility is guaranteed. This opens the path for continuous innovation through constant upgrades.</LI><LI>And last, but not least, by building extensions in a <STRONG>multi-tenant approach</STRONG> the extended functionality can benefit several customers with one single code-base.</LI></UL><P>By envisioning this concept as the <STRONG>backbone for continuously evolved cloud software</STRONG>, SAP has provided several tools and technologies in the last couple of years to make it reality for its customers and partners (such as <STRONG>UI5</STRONG>, the <STRONG>Cloud Application Programing Model</STRONG> framework – both NodeJS and Java – coupled with the <STRONG>SAP Cloud SDK</STRONG> – also NodeJS and Java – and the <STRONG>ABAP Cloud</STRONG> with its RESTfull Application Programming model approach).</P><P>All of this has been done so that <STRONG>brown-field</STRONG> ERP migrations can <STRONG>clean-up the backend system core&nbsp;</STRONG>and <STRONG>green-field</STRONG> new implementations <STRONG>do not touch the core</STRONG>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_3-1715178715374.png" style="width: 743px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107568i3A4887B078DDC108/image-dimensions/743x351?v=v2" width="743" height="351" role="button" title="ale_biagi_3-1715178715374.png" alt="ale_biagi_3-1715178715374.png" /></span></P><P>In the context of <STRONG>S/4HANA </STRONG><STRONG>extensibility</STRONG>, we have basically two scenarios: <STRONG>Core </STRONG><STRONG>Solution</STRONG> <STRONG>Extensions</STRONG> (also known as <STRONG>On</STRONG><STRONG>-Stack</STRONG> or <STRONG>In-App</STRONG> Extensions), which run in the same stack of the ERP and the so called <STRONG>Side-by-Side</STRONG> <STRONG>Extensions</STRONG>, running on BTP. I guess you all have already heard about it, right?</P><P>In the On-Stack Extensibility we have the <STRONG>Classic </STRONG><STRONG>Extensibility</STRONG>, which usually modifies transactions’ code and data, and, consequently, is <STRONG>not</STRONG><STRONG> clean core</STRONG>.</P><P>For a <STRONG>clean core approach</STRONG> with start with the <STRONG>Key </STRONG><STRONG>User</STRONG> <STRONG>Extensibility</STRONG> provided by an extensive set of core personalization functionalities and, on top of those, we add the so called <STRONG>Developer</STRONG> <STRONG>Extensibility</STRONG> which is achieved through the <STRONG>Embedded</STRONG> <STRONG>Steampunk</STRONG> – that can be described as an <STRONG>On</STRONG><STRONG>-Stack ABAP </STRONG><STRONG>environment</STRONG> – leveraging <STRONG>ABAP’s</STRONG> <STRONG>RESTfull</STRONG> <STRONG>Application</STRONG> <STRONG>Programming</STRONG><STRONG> Model </STRONG>(in short RAP).</P><P>For the <STRONG>sibe-by-side</STRONG> <STRONG>extensibility</STRONG> powered by <STRONG>SAP BTP</STRONG> (which is <STRONG>clean core by nature</STRONG>), we rely on the broad spectrum of development tools provided by <STRONG>SAP Build</STRONG> and <STRONG>SAP Build </STRONG><STRONG>Code</STRONG> (which is the focus of this post), and the <STRONG>BTP ABAP </STRONG><STRONG>Environment</STRONG>.</P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_5-1715179088189.png" style="width: 753px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107571i1E43640CD3A0F0B5/image-dimensions/753x385?v=v2" width="753" height="385" role="button" title="ale_biagi_5-1715179088189.png" alt="ale_biagi_5-1715179088189.png" /></span></P><H3 id="toc-hId-140976161">The dynamics of Generative AI into SAP ecosystem</H3><P>Now, coming down to the <STRONG>Generative AI</STRONG> topic, here’s how we envision its dynamics into the SAP ecosystem.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_6-1715179806608.png" style="width: 741px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107577i4B753C212D91C61A/image-dimensions/741x418?v=v2" width="741" height="418" role="button" title="ale_biagi_6-1715179806608.png" alt="ale_biagi_6-1715179806608.png" /></span></P><P>The first thing that will change for customers (and SAP) is that we will <STRONG>use GenAI to Build Code</STRONG>. For customers that have legacy applications the typical strategy is to “do nothing”. Do nothing has the advantage of being low effort, but the downside is that it is high risk. Keeping old school applications rife with technical debt and disconnected to other business processes allows digital natives to leapfrog and disrupt your business. The second approach is to use traditional software development approach powered by humans. This is high effort and high risk: it is also really expensive. The third approach is to infuse Generative AI into software development process which we characterize as medium effort and medium risk.&nbsp; As time goes on our intuition this will become table stakes for all organizations. It is really what sets Generative AI apart from traditional ML in terms of disruption and economic value.</P><P>The second thing that is going to change is <STRONG>analytics</STRONG>: Generative AI is going to be table stakes for analytical applications. SAP cleverly acquired Ask Data over 2 years ago, and we are close to fully embedding it into SAC and as a pattern within Joule. We will see incredible capabilities emerge within SAC and other embedded analytical capabilities in the near future.&nbsp;&nbsp;&nbsp;</P><P>In <STRONG>enterprise applications</STRONG> Generative AI will emerge as a critical capability that powers automation, assistants, and agents. The most obvious example is Joule as an assistant that will power our major LoBs including Success Factors and SAP S/4HANA Cloud (Public Edition and Private Editions).</P><P>In this post we will focus on the first and clearly important vertical.&nbsp;For more information about the <STRONG>Generative AI topic in the SAP ecosystem</STRONG>, please refer to <A href="https://partneredge.sap.com/en/library/education/psd/2024/jan/e_oe_te_w_PSD_WEB_00004648.html" target="_self" rel="noopener noreferrer"><STRONG>this link</STRONG></A>.</P><H2 id="toc-hId--184620063">Overview on SAP Build Code and its Generative AI Capabilities</H2><P>Since it's general availability announcement on March 27th, a lot of good content has been produced about the outstanding capabilities of SAP Build Code. To avoid "reinventing the wheel" we've compiled a short list of selected blog posts describing the many features of SAP Build Code:</P><UL><LI><A href="https://community.sap.com/t5/technology-blogs-by-sap/announcing-general-availability-of-sap-build-code-speed-up-development-with/bc-p/13650754" target="_self">Announcement of SAP Build Code</A></LI><LI><A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-build-sap-build-code-when-generative-ai-comes-to-help/ba-p/13584227" target="_self">SAP Build Code - When Generative AI comes to help!</A></LI><LI><A href="https://community.sap.com/t5/application-development-blog-posts/test-drive-joule-s-generative-ai-features-in-sap-build-code-now/ba-p/13649882" target="_self">Test Drive of SAP Build Code</A></LI><LI><A href="https://community.sap.com/t5/technology-blogs-by-sap/joule-in-sap-build-code/ba-p/13576765" target="_self">Joule in SAP Build Code</A></LI><LI><A href="https://community.sap.com/t5/technology-blogs-by-members/sap-build-code-blog-series-1-welcome-to-the-lobby/ba-p/13646093" target="_self">SAP Build Code Blog Series</A></LI></UL><P>We strongly recommend you read through those posts before proceeding with this one. You can also view the <A href="https://partneredge.sap.com/en/library/education/psd/2024/mar/e_oe_te_w_PSD_WEB_00005664.html" target="_self" rel="noopener noreferrer"><STRONG>session replay</STRONG></A> for the live SAP Build Code overview.</P><H3 id="toc-hId--252050849">The Paradigm Shift of Programming with Natural Language</H3><P>So, there’s no doubt that Generative AI will bring a <STRONG>new paradigm </STRONG>to the context of software development within the SAP ecosystem by introducing <STRONG>Natural Language</STRONG> into the <STRONG>programming process.</STRONG></P><P>To understand this paradigm shift, let’s picture a simple ERP migration to the cloud scenario where we usually have a bunch of tightly-coupled classic extensions which have to be converted into clean core extensions.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_0-1715181822085.png" style="width: 757px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107589i5AB45E180F67FD7A/image-dimensions/757x350?v=v2" width="757" height="350" role="button" title="ale_biagi_0-1715181822085.png" alt="ale_biagi_0-1715181822085.png" /></span></P><P>In such context we usually have one or more <STRONG>product or business or process owners</STRONG> (in our case here, Mary) reviewing such extensions and making specifications in natural language.</P><P>Mary, then, passes those specifications to John (the developer), who refine them by transforming them into prompts, and, in SAP BTP, there’s the SAP Build Code subscription containing the <STRONG>Joule copilot</STRONG> to which John passes the prompts. Based on such prompts Joule is able to generate the application’s data model, service definition, test data, Fiori elements UI and business logic as well as unit test scripts to test the logic.</P><P>Finally, using a <STRONG>one-click approach</STRONG>, John can <STRONG>deploy</STRONG> the application to either Cloud Foundry or Kyma.</P><H3 id="toc-hId--448564354">The Flow of the New Paradigm</H3><P>Now, let’s take a look into the flow of such process. So, Mary starts by reviewing functionality of legacy on-stack classic extensions in brown-field scenarios or defining new solutions requirements in green-field scenarios. In both cases she prepares the specifications in <STRONG>natural language</STRONG></P><P>Here’s where John come into play, reviewing Mary’s specifications. He, then, performs <STRONG>prompt engineering</STRONG> (now called <STRONG>code generation prompt engineering</STRONG>) to prepare for the solution development.</P><P>Next, he enters the prompts in Joule,&nbsp;<SPAN>reviews and accepts (or not) the code, refining the prompts if necessary,<STRONG>&nbsp;</STRONG></SPAN><SPAN>does manual adjustments and some additional coding if required (and yes, there’s manual work in the process!), performing unit tests -&nbsp;</SPAN>these three steps are repeated until the desired outcome is achieved -&nbsp;and, finally, john deploys the solution handing it over back to Mary who’s responsible for the final testing and approval.</P><H2 id="toc-hId--774160578">Development Use Case - Customer Loyalty Management App for Retailers</H2><P>Well, for this post we designed an inspiring <STRONG>Use Case</STRONG> to showcase the development process with <STRONG>Joule in SAP Build Code </STRONG>in action. This use case is about a customer loyalty program management app for retailers, let’s start by understanding the business scenario:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_0-1715191974809.png" style="width: 759px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107664i3B880B13B0885832/image-dimensions/759x370?v=v2" width="759" height="370" role="button" title="ale_biagi_0-1715191974809.png" alt="ale_biagi_0-1715191974809.png" /></span></P><P>The business scenario is a customer loyalty program management application for the business partners who make purchases in retailers. It’s a quite simple scenario managed by three personas:</P><OL><LI>The first one is <STRONG>Mary</STRONG>, an <STRONG>ERP administrator</STRONG> who manages products and business partners in&nbsp; S/4HANA Cloud which provides information to the second persona...</LI><LI><STRONG>Jane</STRONG>, a <STRONG>loyalty program manager</STRONG> responsible for providing additional loyalty program data and monitoring purchases and redeemed rewards through an S/4 extension.</LI><LI>Finally, there’s <STRONG>Watson</STRONG>, a <STRONG>customer</STRONG> (actually a business partner in S/4) who basically makes purchases of selected S/4 products and redeems the corresponding rewards.</LI></OL><H3 id="toc-hId--916822733">Solution Architecture</H3><P>Now, let’s see how to design a solution architecture foundation to cover this business scenario:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_1-1715192275082.png" style="width: 752px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107666iDC3D2AAAE6E3F1E4/image-dimensions/752x328?v=v2" width="752" height="328" role="button" title="ale_biagi_1-1715192275082.png" alt="ale_biagi_1-1715192275082.png" /></span></P><P>On one side we have the <STRONG>SAP Business Technology Platform</STRONG>, hosting Cloud Foundry and Kyma run-times and, on the other, there’s the SAP Cloud Solutions with <STRONG>S/4HANA Cloud</STRONG> being one of them.</P><P>As previously mentioned, the ERP admin manages <STRONG>products</STRONG> and <STRONG>business partners</STRONG> in S/4HANA Cloud. Our Customer Loyalty solution extension is deployed to SAP BTP (in our case in Cloud Foundry) using <STRONG>SAP HANA Cloud</STRONG> as data persistence and reading Products and Business Partners from S/4HANA Cloud via <STRONG>Destination</STRONG>.</P><P>Finally, the Customer Loyalty Manager and the Customer can access the solution through a desktop or mobile device.</P><P>The <STRONG>highlighted CAP application</STRONG> is the solution extension that we will develop with <STRONG>SAP Build Code</STRONG> with the assistance of <STRONG>Joule</STRONG> throughout this post.</P><H3 id="toc-hId--1113336238">Fusion Development Approach</H3><P>This architecture can be alternatively extended to leverage a UI built with <STRONG>SAP Build Apps</STRONG> instead of a standard Fiori UI. In this case, the <STRONG>CAP service is exposed</STRONG> as OData to SAP Build Apps via <STRONG>Destination</STRONG>. This is what we call <STRONG>Fusion Development</STRONG>:&nbsp;a combination of low-code/no-code citizen development with pro-code development.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_2-1715192950221.png" style="width: 745px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107671i1C52FADBFBF49BCF/image-dimensions/745x272?v=v2" width="745" height="272" role="button" title="ale_biagi_2-1715192950221.png" alt="ale_biagi_2-1715192950221.png" /></span></P><P>In this post we will focus on the <STRONG>first approach</STRONG>: Fiori Elements UI.</P><H3 id="toc-hId--1309849743">Demo of the Finished Product</H3><P><SPAN>Now, let’s have a look at a live demo of the Customer Loyalty Management application in action:</SPAN></P><P><div class="video-embed-center video-embed"><iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKFOHVXx8uQg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKFOHVXx8uQg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKFOHVXx8uQg%2Fhqdefault.jpg&amp;key=b0d40caa4f094c68be7c29880b16f56e&amp;type=text%2Fhtml&amp;schema=youtube" width="400" height="225" scrolling="no" title="Customer Loyalty App Demo" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div></P><H2 id="toc-hId--1212960241">Build the Use Case with Generative AI-based Code Development</H2><H3 id="toc-hId--1702876753">Implementation Steps</H3><P>Now that we got to know the generative AI-base code development with Joule in SAP Build Code, let’s have a look at the implementation steps that will be examined one by one in detail in the upcoming paragraphs.</P><OL><LI>We will start with a short demo on how to setup SAP Build Code in your SAP BTP global account</LI><LI>The first block of steps essentially relies on automatic code generation powered by Joule. The steps of this block are:<OL class="lia-list-style-type-lower-alpha"><LI>Build and Run the initial base CAP application…</LI><LI>Generate NodeJS code for business logic and unit tests…</LI><LI>Generate Fiori UI Apps through wizards and enhanced by Joule</LI></OL></LI><LI>The last block is focused on manual coding. Here we will:<OL class="lia-list-style-type-lower-alpha"><LI><SPAN>Manually enhance the app to integrate with S/4HANA Cloud and...</SPAN></LI><LI>Refine the data model and some annotations with manual code.</LI></OL></LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ale_biagi_0-1715198563578.png" style="width: 757px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/107722iB35BF52816DBC774/image-dimensions/757x385?v=v2" width="757" height="385" role="button" title="ale_biagi_0-1715198563578.png" alt="ale_biagi_0-1715198563578.png" /></span></P><P>The above steps are quite well demonstrated in a series of <STRONG>hands-on videos</STRONG> listed below (or you can choose to view the <A href="https://partneredge.sap.com/en/library/education/psd/2024/mar/e_oe_te_w_PSD_WEB_00005664.html" target="_self" rel="noopener noreferrer"><STRONG>session replay</STRONG></A> to watch them in sequence):</P><UL><LI><A href="https://youtu.be/R_bt59hSIaQ" target="_blank" rel="noopener nofollow noreferrer">On-boarding</A><UL><LI><STRONG>Auto Code Generation</STRONG><UL><LI><EM><STRONG>Build &amp; Run the Initial App</STRONG></EM><UL><LI><A href="https://youtu.be/HmaN3SIuuyc" target="_blank" rel="noopener nofollow noreferrer">Create Project</A></LI><LI><A href="https://youtu.be/LAGSGjGIHJ4" target="_blank" rel="noopener nofollow noreferrer">Data Model &amp; Service</A></LI><LI><A href="https://youtu.be/2ibK0zXC8rE" target="_blank" rel="noopener nofollow noreferrer">Sample Data &amp; Run</A></LI></UL></LI><LI><EM><STRONG>Generate Business Logic &amp; Unit Test</STRONG></EM><UL><LI><A href="https://youtu.be/Y3OrzR1vLUw" target="_blank" rel="noopener nofollow noreferrer">Business Logic</A></LI><LI><A href="https://youtu.be/9NP3cDSkOVY" target="_blank" rel="noopener nofollow noreferrer">Unit Tests</A></LI></UL></LI><LI><EM><STRONG>Generate UI Apps</STRONG></EM><UL><LI><A href="https://youtu.be/DXl1wZmn25w" target="_blank" rel="noopener nofollow noreferrer">Generate Fiori Elements App</A></LI><LI><A href="https://youtu.be/SQtQhpjyv7A" target="_blank" rel="noopener nofollow noreferrer">Generate Free Style UI App</A></LI></UL></LI></UL></LI><LI><STRONG>Manual Coding</STRONG><UL><LI><EM><STRONG>SAP S/4HANA Cloud Integration</STRONG></EM><UL><LI><A href="https://youtu.be/UphNx-atPak" target="_blank" rel="noopener nofollow noreferrer">Add S/4 BP Resource</A></LI><LI><A href="https://youtu.be/EiyezALdx74" target="_blank" rel="noopener nofollow noreferrer">Data Model Enhancement</A></LI><LI><A href="https://youtu.be/P42e0APLPbY" target="_blank" rel="noopener nofollow noreferrer">Service Enhancement</A></LI><LI><A href="https://youtu.be/99xXKK5E4QY" target="_blank" rel="noopener nofollow noreferrer">UI Adaptation</A></LI><LI><A href="https://youtu.be/8G6oSCk3fqc" target="_blank" rel="noopener nofollow noreferrer">Live Data Config</A></LI><LI><A href="https://youtu.be/JNo7Udss-qc" target="_blank" rel="noopener nofollow noreferrer">UI Enhancement</A></LI></UL></LI><LI><A href="https://youtu.be/pwbo3SwLQdY" target="_blank" rel="noopener nofollow noreferrer">Manual Enhancement</A></LI></UL></LI></UL></LI></UL><H2 id="toc-hId--1605987251">Best Practices of Code Development with Joule in SAP Build Code</H2><P>To get the best from SAP Build Code, here are some best practices that can be considered.</P><P>As we have seen in the previous demos, the structured guided development process with proven best practices has been innate in SAP Build Code, which we should follow throughout the whole development lifecycle.</P><P>The Storyboard allows you to develop applications using graphical editors and wizards. Use the Storyboard as the entry point to all the artifacts of the project.</P><P>In terms of UI, SAP Build Code provides the wizard templates for UI App creation, and the awesome graphical page editor for UI annotation. Use these wizards and graphical page editor instead of Joule for UI.</P><P>When using Joule in SAP Build Code, here’s a list of some best practices for<STRONG> prompt engineering</STRONG>:</P><UL><LI>As a rule of thumb for prompt engineering, the more <STRONG>specific</STRONG>, <STRONG>descriptive</STRONG>, and <STRONG>detailed</STRONG> the prompts are, the <STRONG>better</STRONG> are the <STRONG>results</STRONG> they yield.</LI><LI>Use <STRONG>explicit constraints</STRONG> (e.g. when to use simple associations or compositions in entity relationships).</LI><LI>For Data Modelling, please <STRONG>avoid</STRONG> using <STRONG>technical CDS terms</STRONG> in the Data Model description, such as aspect, enumeration, code list etc. which will be filtered by Joule.</LI><LI><STRONG>Do not include</STRONG> any detail about the <STRONG>application logic</STRONG> in the <STRONG>Data Model</STRONG>, as it will be ignored by Joule.</LI><LI>In the application logic for <STRONG>actions</STRONG> and <STRONG>unit tests</STRONG>, give detailed information on <STRONG>how data is passed</STRONG> into the request.</LI><LI>For <STRONG>unit tests</STRONG>, provide the <STRONG>appropriate data</STRONG> for positive and negative cases to make sure the tests pass accordingly.</LI><LI><STRONG>Always review</STRONG> the generated code or data, regenerate if necessary, iterate and fine-tune the prompt as much as needed.</LI><LI>And last, but not least, it doesn’t matter how much you try to be the most precise and perfect in your prompts, there will be always situations when editing the code directly will be quite more quicker and effective.</LI></UL><P>Still in the prompt engineering topic, when you are not sure how to get started on the solution and need some inspirations, here are some tips:</P><UL><LI>Get inspiration with the target <STRONG>solution name</STRONG> and its <STRONG>entities</STRONG> in Joule (e.g. “Create a customer loyalty management app with customer, purchase and reward redemption entities”). Joule will automatically generate <STRONG>5 fields for each entity</STRONG>, so you can take it from here to enhance it further.</LI><LI>Alternatively,&nbsp; ask another LLM chatbot (e.g. <STRONG>Prompt Editor of SAP Generative AI Hub</STRONG>, <STRONG>ChatGPT</STRONG>, etc.) to describe the entities relationship of your solution as an inspiration for data model description(e.g. "Describe the the entities relationship model for customer loyalty management solution"), and edit the generated entities relationship if needed. Then pass it to Joule in SAP Build Code as the prompt for generating the data model.<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Describe Entity Relationship with Prompt Editor in SAP Generative AI Hub" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/111302iCAF8E3E82BD88DB2/image-size/large?v=v2&amp;px=999" role="button" title="Promt_Editor_ER.jpg" alt="Describe Entity Relationship with Prompt Editor in SAP Generative AI Hub" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Describe Entity Relationship with Prompt Editor in SAP Generative AI Hub</span></span><P>&nbsp;</P></LI></UL><H2 id="toc-hId--1802500756">Findings Summary of CAP Development with Joule in SAP Build Code</H2><P>Here’s a brief summary of findings gathered during the development process of the customer loyalty extension, with short recommendations. You will notice that only the modification of the business logic and its corresponding unit tests is done with pure manual coding. All the rest can be achieved with full or partial assistance from Joule combined with the productivity tools and some possible manual coding. Our <STRONG>conclusion</STRONG> is that <STRONG>SAP Build Code proves in practice that it’s truly capable of turbocharging software development</STRONG> especially in the context of the SAP ecosystem</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Findings Summary" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/111304i8A03A205C669E82C/image-size/large?v=v2&amp;px=999" role="button" title="Fing_Summary_updated.jpg" alt="Findings Summary" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Findings Summary</span></span></P><H2 id="toc-hId--1999014261">Conclusions and Takeaways</H2><P>These are the main takeaways we foresee when applying this new development paradigm in the context of the SAP ecosystem, by turbocharging software development&nbsp; leveraging SAP Build Code with the assistance of Joule Copilot:</P><UL><LI>Speed-up migration of legacy on-stack extensions to the cloud following the Clean Core principles</LI><LI>Safeguard technology investments by avoiding vendor lock-in and reducing TCO</LI><LI>Take advantage of a learning opportunity to quickly adopt industry standard technology and the new natural language programming paradigm</LI><LI>Accelerate time-to-market with quick prototyping and monetization of solution extensions</LI><LI>And last, but not least, prepare for fast-paced future innovations peculiar to cloud software either in the backend system and in the extensions themselves</LI></UL><H2 id="toc-hId-2099439530">Frequent Asked Questions:</H2><P>During our webinar sessions, there are quite a number of questions have been raised. Here summarize the the most frequent asked questions and answers.</P><P><STRONG>Q1: Can we use Joule to refactor an existing CAP project?</STRONG></P><P><STRONG>Answer</STRONG><SPAN>: Not as of 14 May 2024. However, the new feature of Refactoring existing CAP code using generative AI is under development and scheduled for Q2 of 2024. </SPAN><SPAN><BR /></SPAN><SPAN>It allows developers using Joule to generate SAP Cloud Application Programming Model (CAP) data models, application logic, and unit tests to:</SPAN></P><UL><LI>Add or remove an entity</LI><LI>Add, modify, or remove the properties of entities</LI><LI>Create or remove associations between entities</LI><LI>Get more support on a service projection definition</LI></UL><P><SPAN>&nbsp;Please find more detail <A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;range=CURRENT-LAST#Q2%202024;INNO=4B1ACEFEF2C91EDEB9D0FFD56DB789FE" target="_self" rel="noopener noreferrer">here</A>. </SPAN></P><P><STRONG>Q2: Can the classic CAP NodeJS application(not generated by Joule) leverage the productivity tools such as Story Board, Page Editor etc.?</STRONG></P><P><STRONG>Answer</STRONG><SPAN>:&nbsp; As of 14 May 2024, the productivity tools is now only available in SAP Build Code. However, it will be also available in SAP Business Application Studio for classic CAP NodeJS Application development, which is planned for Q2 2024. Please check <A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;range=CURRENT-LAST#Q2%202024;INNO=139B28CB2E8C1EDEA7AF7FCF6DEFA26E" target="_self" rel="noopener noreferrer">here</A> for more detail. </SPAN></P><P><STRONG>Q3</STRONG>: <STRONG>Can I use Joule in SAP Build Code for CAP Java Application development?</STRONG></P><P><STRONG>Answer</STRONG><SPAN>: As of 14 May 2024, only CAP NodeJS Application development is supported with Joule in SAP Build Code. However, CAP Java Application development is planned in Q3 2024. Please check <A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;q=java&amp;range=CURRENT-LAST#;INNO=D5DC47561FA21EDEB58FCC2E2488A770" target="_self" rel="noopener noreferrer">here</A> for more detail. </SPAN></P><P><STRONG>Q4: How can I jump start with SAP Build Code? </STRONG></P><P><STRONG>Answer: </STRONG><SPAN>Please follow <A href="https://developers.sap.com/mission.sap-build-code-test-drive.html" target="_self" rel="noopener noreferrer">this developer tutorial</A> to have a test drive with SAP Build Code. </SPAN></P><P><STRONG>Q5: What license do I need to use SAP Build Code? Do I need SAP Generative AI Hub in my SAP BTP Global Account for it?</STRONG><BR /><STRONG>Answer</STRONG>: You will just need the license and entitlement of SAP Build Code in your SAP BTP account to use it. No extra license required.</P><P>SAP Build Code is available on <STRONG>Trial </STRONG>and the <STRONG>Free-tier</STRONG> plan of SAP BTP for free evaluation, and commercially available through <STRONG>SAP BTPEA</STRONG> and <STRONG>Pay-As-You-Go</STRONG> for production. For partners, it is also available in <STRONG>TDD</STRONG> license.</P><P><STRONG>Q6: What are the differences between SAP Build Code and SAP Business Application Studio? </STRONG></P><P><STRONG>Answer: </STRONG>SAP Build Code is built on top of SAP Business Application Studio with <STRONG>generative AI capabilities</STRONG> for code generation, <STRONG>guided development</STRONG> and <STRONG>end-to-end unified development experience</STRONG> of SAP solution and extension.&nbsp; It offers unparalleled efficiency and effectiveness in application development.</P><P><STRONG>Q7: What is the future of SAP Business Application Studio? We have seen the evolution of SAP Web IDE, then SAP Business Application Studio, Now SAP Build Code.<BR /></STRONG></P><P><STRONG>Answer: </STRONG>SAP Business Application Studio remain as a separated product for development of&nbsp; classic CAP application, Fiori application, mobile application development etc. It will be also evolved and improved overtime. For example, The productivity tools such as Story Board, New Fiori Template Wizard and Page Editor will be also available in Business Application Studio to improve the developer efficiency and experience. However, the generative-AI capabilities are exclusively available in SAP Build Code. Please check its <A href="https://roadmaps.sap.com/board?range=CURRENT-LAST&amp;PRODUCT=67837800100800007077#Q2%202024" target="_self" rel="noopener noreferrer">roadmap</A> for more detail.</P><P><STRONG>Q8: When should I choose SAP Build Code? And When should I use ABAP side-by-side or On-stack extensibility for Clean Core development? </STRONG></P><P><STRONG>Answer: </STRONG>It is not a simple answer, which depends on the use case and technical capability of the team. Here you have use case pattern of SAP S/4HANA Cloud extension in high-level.</P><P><STRONG>On-Stack Extensibility:</STRONG></P><UL><LI>Adapt SAP Standard applications(UI, Custom Field, Custom Data Model) through public extension point</LI><LI>Full-stack application or new integration in embedded steampunk with public local API</LI></UL><P><STRONG>Side-by-Side Extensibility:</STRONG></P><UL><LI>Full-stack application: single tenant, multi-tenant SaaS, hub scenario.</LI><LI>Mobile applications</LI><LI>Process Automation among multiple systems</LI></UL><P><SPAN>Please to go through </SPAN><A href="https://help.sap.com/docs/sap-btp-guidance-framework/extension-architecture-guide/what-is-extension-architecture-guide" target="_self" rel="noopener noreferrer"><STRONG>Extension Architecture Guide </STRONG></A><SPAN>for more details.</SPAN>&nbsp;</P><P><STRONG>Q9: Will be similar generative-AI capability available for ABAP?</STRONG><BR /><STRONG>Answer</STRONG>: Yes. Similar <STRONG>generative-AI capability </STRONG>is planned for ABAP Cloud. Please stay tuned.</P><P><STRONG>Q10: Is it Clean Core only applicable with side-by-side extensibility? How about On-Stack extensibility?</STRONG><STRONG>Answer: </STRONG>Not, Clean Core can be through both On-Stack extensibility and Side-by-Side extensibility.</P><P><STRONG>Q11: Is there any plan to make extension development easier for SAP S/4HANA Cloud with SAP Build Code?<BR />Answer: </STRONG>There are some features planned in SAP Build Code about closer integration with ABAP, such as:</P><UL><LI><A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;range=CURRENT-LAST&amp;q=bapi#Q3%202024;INNO=ABC1893F1B121EEEB9BD9D89D2AE9F00" target="_self" rel="noopener noreferrer">Enabling remote function call consumption</A></LI><LI><A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;q=abap&amp;range=CURRENT-LAST#;INNO=4B1ACEFEF2C91EDEB9BD7CA30CD289F1" target="_self" rel="noopener noreferrer">Generation of services in ABAP RESTful application programming model for building extensions</A></LI><LI><A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;q=abap&amp;range=CURRENT-LAST#;INNO=452DD1C72D3A1EEEB9BD8C4B7EFE18F5" target="_self" rel="noopener noreferrer">Generation of services in ABAP RESTful application programming model from business objects in SAP S/4HANA</A></LI><LI><A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;range=CURRENT-LAST&amp;q=abap#Q3%202024" target="_self" rel="noopener noreferrer">more</A> ...</LI></UL><H2 id="toc-hId-1902926025">Additional Material</H2><P>In this final section, we have compiled additional materials you can check, in order to deepen your knowledge on this topic:</P><H3 id="toc-hId-1581193204">Generative AI at SAP</H3><UL><LI><U><A href="https://open.sap.com/courses/genai1" target="_blank" rel="noopener noreferrer">OpenSAP</A></U><U><A href="https://open.sap.com/courses/genai1" target="_blank" rel="noopener noreferrer"> Course | Generative AI with SAP</A></U></LI><LI><A href="https://pages.community.sap.com/topics/machine-learning" target="_blank" rel="noopener noreferrer">SAP Community | Artificial Intelligence and Machine Learning at SAP</A></LI><LI><A href="https://www.sap.com/products/artificial-intelligence.html" target="_blank" rel="noopener noreferrer">SAP Global Site | SAP Business AI</A></LI></UL><H3 id="toc-hId-1384679699">SAP Build Code</H3><UL><LI><U><A href="https://www.sap.com/products/technology-platform/developer-tools.html" target="_blank" rel="noopener noreferrer">SAP Global Site | SAP Build Code</A></U></LI><LI><U><A href="https://pages.community.sap.com/topics/build-code" target="_blank" rel="noopener noreferrer">SAP Community | SAP Build Code</A></U></LI><LI><U><A href="https://help.sap.com/docs/build_code/d0d8f5bfc3d640478854e6f4e7c7584a/504854f457cc4fbf9f79136dbc773618.html" target="_blank" rel="noopener noreferrer">SAP Help Portal | SAP Build Code</A></U></LI><LI><U><A href="https://discovery-center.cloud.sap/serviceCatalog/sap-build-code?service_plan=standard&amp;region=all&amp;commercialModel=cloud" target="_blank" rel="noopener nofollow noreferrer">Discovery Center | SAP Build Code</A></U></LI><LI><U><A href="https://developers.sap.com/tutorial-navigator.html?tag=software-product%3Atechnology-platform%2Fsap-build-code%2Fsap-build-code" target="_blank" rel="noopener noreferrer">SAP Developers Portal | SAP Build Code Tutorials &amp; Missions </A></U></LI></UL><H3 id="toc-hId-1188166194">Additional Materials of this session</H3><UL><LI><U><A href="https://github.com/SAP-samples/btp-generative-ai-hub-use-cases/tree/main/03-develop-with-joule-in-sap-build-code" target="_blank" rel="noopener nofollow noreferrer">Customer Loyalty Program App – GitHub repository</A></U></LI><LI><U><A href="https://performancemanager.successfactors.eu/sf/learning?destUrl=https%3a%2f%2fsaplearninghub%2eplateau%2ecom%2flearning%2fuser%2fdeeplink%5fredirect%2ejsp%3flinkId%3dPROGRAM%5fDETAILS%26programID%3dPE%5fKB%5fGEN%5fAI%5fBTP%5fWA%26fromSF%3dY&amp;company=learninghub" target="_blank" rel="noopener nofollow noreferrer">Web Assessment to earn the Knowledge badge of "</A><A href="https://performancemanager.successfactors.eu/sf/learning?destUrl=https%3a%2f%2fsaplearninghub%2eplateau%2ecom%2flearning%2fuser%2fdeeplink%5fredirect%2ejsp%3flinkId%3dPROGRAM%5fDETAILS%26programID%3dPE%5fKB%5fGEN%5fAI%5fBTP%5fWA%26fromSF%3dY&amp;company=learninghub" target="_blank" rel="noopener nofollow noreferrer">Generative AI development with SAP BTP</A>"</U></LI><LI><U><SPAN class=""><SPAN><A href="https://partneredge.sap.com/en/library/education/products/btp/build/e_ep_use-cases_ai-foundation.html?#accordion-panel-section-libraryItem-descriptionSection-accordionitem_694022185" target="_self" rel="noopener noreferrer">Replays of the series about&nbsp;Augment your SAP BTP Use Cases with AI Foundation </A></SPAN></SPAN></U></LI></UL> 2024-05-16T22:12:27.753000+02:00