https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/members/developer-advocates/nicoschoenteich.xml SAP Community - Nicolai Schoenteich 2024-02-26T00:30:19.425357+00:00 python-feedgen Nicolai Schoenteich in SAP Community https://community.sap.com/t5/technology-q-a/re-make-cursor-appear-on-an-editable-field-in-object-page-table/qaq-p/12791440/comment-id/4802562#M4802562 Re: Make Cursor appear on an editable field in Object Page Table 2023-10-10T12:55:16+02:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi there,</P><P>I believe you need a way of accessing the specific input field - maybe open the console and see if there is something unique about that field, or maybe it's always(?) the n-th child of the row or something like that. Once you have the input field reference you can fire a press event on that input field ( .firePress() ), which puts the cursor into the field.</P><P>Best, Nico</P> 2023-10-10T12:55:16+02:00 https://community.sap.com/t5/technology-q-a/re-mta-standalone-approuter-with-ui5-tooling-live-reload/qaq-p/12704134/comment-id/4767077#M4767077 Re: MTA Standalone Approuter with UI5 Tooling, live reload? 2023-10-10T13:03:47+02:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi all,</P><P>I know this is question is already a few months old, but a new solution to your problem was released recently: the <A href="https://www.npmjs.com/package/dev-approuter" rel="nofollow noopener noreferrer">dev-approuter</A>. It hooks the UI5 Tooling (and an SAP CAP project if you want) into the SAP Approuter at dev time. I believe this is exactly what you were trying to achieve. The xs-dev.json file also clearly seperates dev time and productive configuration - so there is no need to edit a file before building the project.</P><P>Best, Nico</P> 2023-10-10T13:03:47+02:00 https://community.sap.com/t5/technology-q-a/re-make-cursor-appear-on-an-editable-field-in-object-page-table/qaq-p/12791442/comment-id/4802564#M4802564 Re: Make Cursor appear on an editable field in Object Page Table 2023-10-10T14:50:18+02:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>How about looping through all children of the table row and finding the first one that is of type sap.ui.comp.smartfield.SmartField ?</P> 2023-10-10T14:50:18+02:00 https://community.sap.com/t5/technology-q-a/re-make-cursor-appear-on-an-editable-field-in-object-page-table/qaq-p/12791444/comment-id/4802566#M4802566 Re: Make Cursor appear on an editable field in Object Page Table 2023-10-10T17:26:13+02:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>If you call getMetadata() on any control you should get the control type.</P> 2023-10-10T17:26:13+02:00 https://community.sap.com/t5/technology-q-a/re-make-cursor-appear-on-an-editable-field-in-object-page-table/qaq-p/12791446/comment-id/4802568#M4802568 Re: Make Cursor appear on an editable field in Object Page Table 2023-10-13T12:19:43+02:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Do something like this for the cell inside a table row:</P><PRE><CODE>for (let i = 0; i &lt; cells.length; i++) { const cell = cells[i]; if (cell.getMetadata().getName() === "sap.ui.comp.smartfield.SmartField") { cell.firePress(); }</CODE></PRE> 2023-10-13T12:19:43+02:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-tech-bytes-using-the-sap-approuter-at-dev-time-a-full-stack-journey/ba-p/13577409 SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and SAP CAP - Cloud Foundry Basics #6 2023-10-13T16:56:10+02:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <EM>This SAP Tech Byte is about how to develop a full-stack application using the SAP Approuter, UI5, and the SAP Cloud Application Programming Model (CAP). In part 1 we will focus on how to setup our project so that both the UI5 Tooling and the CAP server can be started with a single command and run on the same port. For this we will use the <A href="https://www.npmjs.com/package/cds-plugin-ui5" rel="nofollow noopener noreferrer">cds-plugin-ui5</A>, which frees us from complex proxy or destination configuration we had in the past. In part 2 we will add productive authentication and run our application with a hybrid setup using the SAP Authorization and Trust Management Service (XSUAA) on SAP BTP, Cloud Foundry environment. For this we will use the <A href="https://www.npmjs.com/package/dev-approuter" rel="nofollow noopener noreferrer">dev-approuter</A>, which is a dev time wrapper for the SAP Approuter. It allows us to use all of the SAP Approuter capabilities (OAuth 2.0 login flow with XSUAA etc.) while still running the UI5 Tooling and CAP server in the same process.</EM><BR /> <BR /> <STRONG>The source code for this blog post can be found at&nbsp;<A href="https://github.com/SAP-samples/sap-tech-bytes/tree/cloud-foundry-basics/post6" target="_blank" rel="noopener nofollow noreferrer">https://github.com/SAP-samples/sap-tech-bytes/tree/cloud-foundry-basics/post6</A>.</STRONG><BR /> <BR /> This blog post is also available in video format - presented as part of Devtoberfest 2023:<BR /> <BR /> <IFRAME width="560" height="315" src="https://www.youtube.com/embed/bJIMIE7yjIE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></IFRAME><BR /> <BR /> &nbsp;<BR /> <H1 id="toc-hId-834962539">NPM Workspaces</H1><BR /> We start this project by setting up <A href="https://docs.npmjs.com/cli/v7/using-npm/workspaces" rel="nofollow noopener noreferrer">NPM workspaces</A>, which make it easy to manage and run multiple Node.js applications inside one bigger project. Also, NPM workspaces install node modules very efficiently, so that multiple applications share the same resources. To set up NPM workspaces, all we need is this simple <EM>package.json</EM> file:<BR /> <PRE class="language-javascript"><CODE>{<BR /> "name": "devtoberfest-dev-approuter",<BR /> "workspaces": [<BR /> "packages/*"<BR /> ],<BR /> "scripts": {<BR /> "dev": "npm run dev -w=approuter"<BR /> },<BR /> "sapux": [<BR /> "packages/uimodule"<BR /> ]<BR /> }</CODE></PRE><BR /> The line most relevant for now is the one defining the <EM>packages/</EM> directory as the home for all our workspaces (think Node.js applications). The rest of the file contains configuration for things that not yet exist in our project, but which we will add shortly.<BR /> <BR /> &nbsp;<BR /> <H1 id="toc-hId-638449034">SAP CAP Application</H1><BR /> Let's create and navigate into the <EM>packages/</EM> directory:<BR /> <PRE class="language-markup"><CODE>mkdir packages</CODE></PRE><BR /> <PRE class="language-markup"><CODE>cd packages/</CODE></PRE><BR /> We can now create a SAP CAP Application in the form of the well-known bookshop sample. Such an application can easily be generated by running the following commands in the Terminal of your choice:<BR /> <PRE class="language-markup"><CODE>cds init cap-server</CODE></PRE><BR /> <PRE class="language-markup"><CODE>cd cap-server/</CODE></PRE><BR /> <PRE class="language-markup"><CODE>cds add sample</CODE></PRE><BR /> Note: "cap-server" is the name of our application and is therefore exchangeable.<BR /> <BR /> And that's it for the SAP CAP part. Our server is ready.<BR /> <BR /> &nbsp;<BR /> <H1 id="toc-hId-441935529">UI5 Application</H1><BR /> Let's now create a new UI5 application from scratch. Using the <A href="https://marketplace.visualstudio.com/items?itemName=SAPSE.sap-ux-fiori-tools-extension-pack" rel="nofollow noopener noreferrer">SAP Fiori Tools Application Generator</A> we can easily choose one of the available floorplans, select our SAP CAP project as the data source, and then enable the use of the cds-plugin-ui5:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/2023-10-12_18-20-06.png" /></P><BR /> <STRONG>Wait a minute, why do we need the cds-plugin-ui5 in the first place?</STRONG><BR /> <BR /> SAP CAP applications by default come with an <EM>app/</EM> directory, which is the place for frontend applications. Any contents (such as html files) inside this directory get statically served by the SAP CAP server. One could be tempted so simply put UI5 apps in there and serve them through the SAP CAP server (and to be honest this works fairly well), but this approach completely misses out on all of the capabilities that the UI5 Tooling has to offer. Think about a UI5 application developed with TypeScript for example. TypeScript cannot run in the browser as it first needs to be transpiled to JavaScript. We need the UI5 Tooling in this case. Additionally, there should be a clear separation of concern and both components - the SAP CAP backend and UI5 frontend - should be developed and served using their respective tooling. The cds-plugin-ui5 is very helpful in that regard as it hooks the UI5 Tooling into the SAP CAP server, which means we can use both toolings using a single command.<BR /> <BR /> Back to our project. Enabling the cds-plugin-ui5 and NPM workspaces in the SAP Fiori Tools Application Generator (see red box above) adds both configurations to the SAP CAP's <EM>package.json</EM>. However, we already have configured NPM workspaces one level higher in the parent directory, so we can delete this newly added configuration from the SAP CAP's <EM>package.json</EM>. It is important to leave the cds-plugin-ui5 dependency though, so that upon start of the SAP CAP server the cds-plugin-ui5 can hook all connected UI5 apps into the server.<BR /> <BR /> But how does this "connection" between the SAP CAP server and the UI5 apps work? There are two options here. The first one being to simply place the UI5 apps inside the<EM> app/</EM> directory of the SAP CAP project, which is the default place for frontend applications. The second option is to add the UI5 apps as devDependencies to the SAP CAP's <EM>package.json</EM> and provide the path to them (when using NPM workspaces, a wildcard * is enough - NPM will handle the module resolution properly). We will go with the second approach here add the "uimodule" as a devDependency. All of the mentioned changes leave us with the following <EM>package.json</EM> for the SAP CAP project:<BR /> <PRE class="language-javascript"><CODE>{<BR /> "name": "cap-server",<BR /> "version": "1.0.0",<BR /> "description": "A simple CAP project.",<BR /> "repository": "&lt;Add your repository here&gt;",<BR /> "license": "UNLICENSED",<BR /> "private": true,<BR /> "dependencies": {<BR /> "@sap/cds": "^7",<BR /> "express": "^4"<BR /> },<BR /> "devDependencies": {<BR /> "@cap-js/sqlite": "^1",<BR /> "cds-plugin-ui5": "^0.2.1",<BR /> "uimodule": "*"<BR /> },<BR /> "scripts": {<BR /> "start": "cds-serve"<BR /> }<BR /> }</CODE></PRE><BR /> In spirit of the side-by-side approach (as far as tooling is concerned) mentioned earlier, we will now move our newly created <EM>uimodule</EM> out of the SAP CAP server and place it next to it. After that, we can completely remove the <EM>app/</EM> directory, which we no longer need, so we end up with the following project structure (dot files and generated files omitted for brevity):<BR /> <PRE class="language-markup"><CODE>- packages/<BR /> - cap-server/<BR /> - db/<BR /> - srv/<BR /> - package.json<BR /> + uimodule/<BR /> - package.json</CODE></PRE><BR /> So far so good. We can now install all dependencies from the project root (not the SAP CAP root) - thanks to the NPM workspaces:<BR /> <PRE class="language-markup"><CODE>npm install</CODE></PRE><BR /> Interesting side note: For the <EM>uimodule</EM> "installing" means creating a symbolic link inside the <EM>node_modules/</EM> to the actual <EM>uimodule</EM>.<BR /> <BR /> We should now be able to start both the SAP CAP server and the UI5 Tooling simultaneously. All we have to do is start the SAP CAP server, the cds-plugin-ui5 will do the rest for us. Run the following command from the SAP CAP root (<EM>/packages/cap-server/</EM><span class="lia-unicode-emoji" title=":disappointed_face:">😞</span><BR /> <PRE class="language-markup"><CODE>npm start</CODE></PRE><BR /> <P style="overflow: hidden;margin-bottom: 0px">In the logs of the terminal we can see that the UI5 app was mounted to the SAP CAP server:</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/2023-10-13_13-25-13.png" /></P><BR /> We can also see the UI5 app being served with the SAP CAP server. It even gives us a small hint that this web app is being served using the UI5 Tooling:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/2023-10-13_13-27-06.png" /></P><BR /> Our UI5 app is fully functional and display the data it retrieves from the SAP CAP server. And the best part is, we didn't have to configure any destination or proxies, as both the backend and frontend run on the same port:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/2023-10-13_13-29-07.png" /></P><BR /> &nbsp;<BR /> <H1 id="toc-hId-245422024">Authentication</H1><BR /> Our current dev setup is pretty nice and powerful already, but there is one aspect we haven't touched so far - and that is authentication. Our SAP CAP server currently uses <A href="https://cap.cloud.sap/docs/node.js/authentication#mocked" rel="nofollow noopener noreferrer">basic (mocked) authentication</A>, which should be sufficient for the largest portion of your development efforts. But what if we want to test our app with "real" productive authentication using the <A href="https://discovery-center.cloud.sap/serviceCatalog/authorization-and-trust-management-service?region=all" rel="nofollow noopener noreferrer">SAP Authorization and Trust Management Service</A> on SAP BTP (XSUAA)? As far as SAP CAP is concerned, this is not a problem at all. In the SAP CAP project directory, we can simply run the following command to add the XSUAA feature to the app:<BR /> <PRE class="language-markup"><CODE>cds add xsuaa &amp;&amp; npm install</CODE></PRE><BR /> We can then create an instance of the XSUAA service (in case we don't have on yet), create the respective service key and bind it to our local SAP CAP project:<BR /> <PRE class="language-markup"><CODE>cf create-service xsuaa application my-xsuaa -c xs-security.json</CODE></PRE><BR /> <PRE class="language-markup"><CODE>cf create-service-key my-xsuaa my-sk</CODE></PRE><BR /> <PRE class="language-markup"><CODE>cds bind --to my-xsuaa:my-sk</CODE></PRE><BR /> Note: This approach uses the <A href="https://docs.cloudfoundry.org/cf-cli/install-go-cli.html" rel="nofollow noopener noreferrer">cf CLI</A>. Of course, you could achieve the same thing using the SAP BTP Cockpit in the browser.<BR /> <BR /> Ok, so far so good, but if we were to run our full-stack application now, we would always get a "401 - Unauthorized" error since we haven't logged in (see screen shot below). Without logging into the XSUAA instance (running on SAP BTP) we don't have a valid JSON Web Token (JWT) and SAP CAP rightfully rejects our requests. Maybe this already rings a bell with you (the title of this blog post certainly gives a hint) - we need an SAP Approuter to handle the login flow.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/2023-10-13_14-52-35.png" /></P><BR /> &nbsp;<BR /> <H1 id="toc-hId-48908519">Approuter</H1><BR /> An SAP Approuter is a simple Node.js based application that is using the <A href="https://www.npmjs.com/package/@sap/approuter" rel="nofollow noopener noreferrer">@sap/approuter</A> package. It is used to forward user requests to several data sources (usually via destinations), handle user logins and sessions, and also serve static content, such as frontend applications. This sounds almost exactly like what we need, but only almost. Our UI5 application, which is developed in TypeScript, doesn't really qualify as "static content" as it needs to be transpiled (using the UI5 Tooling) before we can run it in the browser and the SAP Approuter can serve it. This means we want to connect an SAP Approuter to the UI5 Tooling, and also to the SAP CAP server while we are at it. There is a new dev-time wrapper for the SAP Approuter that fullfils exactly this purpose: the <A href="https://www.npmjs.com/package/dev-approuter" rel="nofollow noopener noreferrer">dev-approuter</A>. Let's use it.<BR /> <BR /> As we are using NPM workspaces, we can simply create a new directory for our new (dev-)approuter in the <EM>packages/</EM> directory:<BR /> <PRE class="language-markup"><CODE>mkdir approuter</CODE></PRE><BR /> We can then add this package.json to the <EM>approuter/</EM> directory:<BR /> <PRE class="language-javascript"><CODE>{<BR /> "name": "approuter",<BR /> "scripts": {<BR /> "dev": "CDS_ENV=hybrid node -e 'new require(`dev-approuter`)' _"<BR /> },<BR /> "devDependencies": {<BR /> "dev-approuter": "*",<BR /> "cap-server": "*",<BR /> "uimodule": "*"<BR /> }<BR /> }</CODE></PRE><BR /> Note that the "dev" script starts the dev-approuter with the <EM>CDS_ENV</EM> environment variable set to <EM>hybrid</EM>, which makes sure the SAP CAP server gets started in hybrid mode using the XSUAA instance on SAP BTP. Speaking of the SAP CAP server ("cap-server") - it is added to the application as a devDepdendency, just like our UI5 application ("uimodule"). This is very similar to the way we configured the cds-plugin-ui5 - remember? This is because the dev-approuter reuses the cds-plugin-ui5 under the hood.<BR /> <BR /> The SAP Approuter's routing configuration is usually described in <EM>xs-app.json</EM> file. For the dev-approuter however, we can create an <EM>xs-dev.json</EM> file, which is to safely separate dev time configuration from productive code. The <EM>xs-dev.json</EM> can be seen as a superset of the <EM>xs-app.json</EM> - it follows the same syntax and has the same features, but there is one extra goodie: you can directly link dependencies (defined in the package.json) to routes. See this <EM>xs-dev.json</EM> file, which we now add to the <EM>approuter/</EM> directory:<BR /> <PRE class="language-javascript"><CODE>{<BR /> "welcomeFile": "uimodule/index.html",<BR /> "authenticationMethod": "route",<BR /> "routes": [<BR /> {<BR /> "source": "^/user-api(.*)",<BR /> "target": "$1",<BR /> "service": "sap-approuter-userapi"<BR /> },<BR /> {<BR /> "dependency": "uimodule",<BR /> "authenticationType": "xsuaa"<BR /> },<BR /> {<BR /> "dependency": "cap-server",<BR /> "authenticationType": "xsuaa"<BR /> }<BR /> ]<BR /> }</CODE></PRE><BR /> The bottom to route (reflecting our dependencies) are protected with XSUAA, which means we will have to provide the dev-approuter with credentials to connect to the XSUAA instance on SAP BTP. We can get the service key which we created earlier with the following command:<BR /> <PRE class="language-markup"><CODE>cf service-key my-xsuaa my-sk</CODE></PRE><BR /> Copy the service key from the terminal output and provide it to the dev-approuter via a <EM>default-env.json</EM> file in the <EM>approuter/</EM> directory:<BR /> <PRE class="language-javascript"><CODE>{<BR /> "PORT": 5001,<BR /> "destinations": [<BR /> {<BR /> "Name": "cap-server",<BR /> "Authentication": "NoAuthentication",<BR /> "ProxyType": "Internet",<BR /> "Type": "HTTP",<BR /> "URL": "http://localhost:4004",<BR /> "forwardAuthToken": true<BR /> }<BR /> ],<BR /> "VCAP_SERVICES": {<BR /> "xsuaa": [<BR /> {<BR /> "tags": [<BR /> "xsuaa"<BR /> ],<BR /> "credentials": { SERVICE KEY FROM TERMINAL OUTPUT }<BR /> }<BR /> ]<BR /> }<BR /> }</CODE></PRE><BR /> As you can see, the <EM>default-env.json</EM> in our case not only includes the service key credentials, but also a destination to our SAP CAP server. This is necessary, because we require the additional parameter <EM>forwardAuthToken</EM> to be true, and the destination injected by the dev-approuter by default does not include this parameter.<BR /> <BR /> We are now ready to start the dev-approuter using the following command from the project root (the NPM workspaces root):<BR /> <PRE class="language-markup"><CODE>npm run dev</CODE></PRE><BR /> Et voilà, we can now login and access our UI5 application through the dev-approuter, which displays the data from the SAP CAP server:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/2023-10-13_16-33-39.png" /></P><BR /> We can verify that we are logged in with our SAP BTP user by accessing the <EM>/user-api</EM> route (also defined in <EM>xs-dev.json</EM><span class="lia-unicode-emoji" title=":disappointed_face:">😞</span><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/10/2023-10-13_16-33-49.png" /></P><BR /> By the way, the livereload for the UI5 application (via the UI5 Tooling) also works using the dev-approuter.<BR /> <BR /> And that's it, we now have an SAP Approuter using the dev-approuter package to hook the UI5 Tooling as well as the SAP CAP server into it. All of this is running in hybrid mode connected to our XSUAA instance on SAP BTP - talk about a powerful full-stack dev setup!<BR /> <BR /> &nbsp;<BR /> <BR /> Feel free to reach out in case you have any questions!<BR /> <BR /> &nbsp;<BR /> <BR /> <HR /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/06/tech_bytes.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> SAP Tech Bytes is an initiative to bring you bite-sized information on all manner of topics, in&nbsp;<A href="https://www.youtube.com/playlist?list=PL6RpkC85SLQC3HBShmlMaPu_nL--4f20z" target="_blank" rel="noopener nofollow noreferrer">video</A>&nbsp;and&nbsp;<A href="https://blogs.sap.com/tag/sap-tech-bytes/" rel="noopener noreferrer">written</A>&nbsp;format. Enjoy!<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp; 2023-10-13T16:56:10+02:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-tech-bytes-using-the-sap-approuter-at-dev-time-a-full-stack-journey/bc-p/13577411#M167041 Re: SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and SAP CAP - Cloud Foundry Basics #6 2023-10-16T09:43:07+02:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi Sagar,</P><P>fantastic questions! Let's dive into them:</P><P>1) You are almost right. From the cap-server root we could run:</P><PRE class="language-markup"><CODE>cds bind --exec -- npm run dev --prefix ../approuter​</CODE></PRE><P>The cds bind command only works in the cap directory, so we cannot initiate it from the NPM workspaces root directly. Of course, we could set up a script in the cap-server root and call that script from the NPM workspaces root.</P><P>2) You can consume destination from SAP BTP during local development, yes. Maybe <A href="https://blogs.sap.com/2023/02/14/sap-tech-bytes-using-destinations-during-local-development-cloud-foundry-basics-4/" rel="ugc noopener noreferrer">this blog post</A> can help you with that.</P><P>3) What exactly do you mean by "differentiating between local and deployed services"? Do you mean deployed services vs. local UI5 or SAP CAP applications?</P><P>Best, Nico</P> 2023-10-16T09:43:07+02:00 https://community.sap.com/t5/sap-teched-blog-posts/kasimir-is-back/bc-p/299627#M264 Re: Kasimir is back! 2023-11-02T08:21:33.841000+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Who came here by executing the code from this image? <span class="lia-unicode-emoji" title=":man_technologist:">👨🏻‍💻</span>🙋🏻‍<span class="lia-unicode-emoji" title=":male_sign:">♂️</span><BR /><BR /><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-11-02 at 08.20.27.png" style="width: 772px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/48696i4F132FDCE2B057D3/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2023-11-02 at 08.20.27.png" alt="Screenshot 2023-11-02 at 08.20.27.png" /></span></P> 2023-11-02T08:21:33.841000+01:00 https://community.sap.com/t5/technology-q-a/does-the-core-autoexpand-annotation-in-sap-cap-actually-do-something/qaq-p/12755016 Does the @Core.AutoExpand annotation in SAP CAP actually do something? 2023-11-08T14:36:14+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi everyone!</P> <P>I have this very basic schema definition:</P> <PRE><CODE>entity Apps : managed, cuid { views : Composition of many Views on views.app = $self @Core.AutoExpand; }; entity Views : managed, cuid { app : Association to one Apps; };</CODE></PRE> <P> I want to auto expand the "views" whenever I call "/Apps", meaning "/Apps" should always be treated like "/Apps?$expand=views". I found this "@Core.AutoExpand" annotation, which seems to do exactly that:</P> <P><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2227518-screenshot-2023-11-08-at-120324.png" /></P> <P> Unfortunately, it doesn't seem to work. The auto expand doesn't happen. Does this annotation actually do something? Or am I as a developer responsible to implement the feature, and the annotation is just a standardized label for this feature? But, this isn't how annotation usually work, right?</P> <P>I appreciate your help!</P> <P>Best, Nico</P> 2023-11-08T14:36:14+01:00 https://community.sap.com/t5/technology-q-a/re-does-the-core-autoexpand-annotation-in-sap-cap-actually-do-something/qaq-p/12755018/comment-id/4787754#M4787754 Re: Does the @Core.AutoExpand annotation in SAP CAP actually do something? 2023-11-08T17:24:43+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Thank you for the answer. For some reason my research didn't lead me to those existing issues...</P><P>The link you shared is internal, which works for me, but does not for everyone. For everyone else: You didn't miss much, the feature is simply not (yet) implemented.</P> 2023-11-08T17:24:43+01:00 https://community.sap.com/t5/technology-blogs-by-members/extending-legacy-fiori-apps-in-bas/bc-p/13579889#M165279 Re: Extending legacy Fiori apps in BAS 2023-11-13T09:06:28+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Thanks for clarifying Oliver! But, shouldn't the tile in the SAP Business Application Studio called "Adaptation or Extension Project" then - as it acts as an entry door to either one?</P> 2023-11-13T09:06:28+01:00 https://community.sap.com/t5/technology-q-a/re-error-using-yo-easy-ui5-project-generator/qaq-p/12656909/comment-id/4748402#M4748402 Re: Error using yo easy-ui5 project generator 2023-11-13T09:08:50+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi <SPAN class="mention-scrubbed">mondalta</SPAN>, the easy-ui5 generator has been updated in the mean time and works with Node 18. Make sure to get the latest version of the generator with</P><PRE><CODE>yo easy-ui5 project --forceUpdate</CODE></PRE> 2023-11-13T09:08:50+01:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-tech-bytes-using-the-sap-approuter-at-dev-time-a-full-stack-journey/bc-p/13577413#M167043 Re: SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and SAP CAP - Cloud Foundry Basics #6 2023-11-13T09:23:13+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi Arun,</P><P>Do the applications 1 &amp; 2 use the UI5 Tooling, a.k.a. do they have a ui5.yaml and package.json file? If yes, you can add them as devDependencies to the dev-approuter and also declare them individually in the xs-dev.json. You can do the same thing with the launchpad itself. Add the UI5 Tooling and add it to the dev-approuter.</P><P>Only adding their parent directoy (uimodule/) to the dev-approuter unfortunately won't be sufficient, as the dev-approuter expects the UI5 apps itself as devDependecy.</P><P>Hope this helps!</P><P>Best, Nico</P> 2023-11-13T09:23:13+01:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-tech-bytes-using-the-sap-approuter-at-dev-time-a-full-stack-journey/bc-p/13577415#M167045 Re: SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and SAP CAP - Cloud Foundry Basics #6 2023-11-14T12:37:53+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 Hi Jürgen,<BR /> <BR /> Interesting thoughts, thanks for sharing.<BR /> <BR /> In your scenario (where you are using the approuter, plus a CAP app using cds-plugin-ui5 in a separate process), how are you pointing the approuter to your UI5 app? Via the <EM>localDir</EM> property in the xs-app.json? And if yes, does it simply point to the TypeScript source files? If I do that, I get the error that the Component.js couldn't be found (rightfully so, we only have a Component.ts).<BR /> <BR /> I'm curious how you got this to work!<BR /> <BR /> Best, Nico<BR /> <BR /> &nbsp; 2023-11-14T12:37:53+01:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-tech-bytes-using-the-sap-approuter-at-dev-time-a-full-stack-journey/bc-p/13577417#M167047 Re: SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and SAP CAP - Cloud Foundry Basics #6 2023-11-15T08:52:12+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 Interesting!<BR /> <BR /> You are right, this is not really how it is intended as in a deployed scenario you wouldn't serve your frontend apps through your CAP service (srv-api). You would most likely use the HTML5 Apps Repository Service and point the approuter directly to it - or place the html5 in a <EM>localDir</EM> inside the approuter.<BR /> <BR /> But still, a nice little trick you found there!<BR /> <BR /> Best, Nico 2023-11-15T08:52:12+01:00 https://community.sap.com/t5/technology-q-a/re-cap-hdi-deployment-error-cannot-find-module-core-util-is/qaq-p/12801761/comment-id/4806842#M4806842 Re: CAP HDI deployment error: cannot find module core-util-is 2023-12-13T15:39:37+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>I believe this issue is back with @sap/hdi-deploy version 4.9.0. Can someone please also test this before we report?</P> 2023-12-13T15:39:37+01:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-tech-bytes-using-the-sap-approuter-at-dev-time-a-full-stack-journey/bc-p/13577422#M167052 Re: SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and SAP CAP - Cloud Foundry Basics #6 2024-01-04T16:36:44+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi <SPAN class="mention-scrubbed">jacek.wozniczak</SPAN></P><P>You can point to your annotations file from a cds file within your CAP project, which the provided sample didn't do. Thanks for the pointer!<BR />I have fixed it: <A href="https://github.com/SAP-samples/sap-tech-bytes/commit/442b4fad35b1f7b03552143aec1d790ff1649b4e" rel="nofollow ugc noopener noreferrer">https://github.com/SAP-samples/sap-tech-bytes/commit/442b4fad35b1f7b03552143aec1d790ff1649b4e</A></P><P>Best, Nico</P> 2024-01-04T16:36:44+01:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-tech-bytes-using-the-sap-approuter-at-dev-time-a-full-stack-journey/bc-p/13600526#M168925 Re: SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and SAP CAP 2024-02-09T13:31:15.949000+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>Hi&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/38010">@KazuhikoTakata</a>,</P><P>Thank you for your question!</P><P>Unfortunately the dev-approuter doesn't support CAP TS projects as of now. But you can use the <A href="https://www.npmjs.com/package/cds-plugin-ui5" target="_self" rel="nofollow noopener noreferrer">cds-plugin-ui5</A> to hook your UI5 Tooling into your CAP server (running via cds-ts watch)&nbsp; for a very similar experience.</P><P>Hope this helps! Best, Nico</P> 2024-02-09T13:31:15.949000+01:00 https://community.sap.com/t5/application-development-discussions/february-developer-challenge-cap-plugins-week-1/m-p/13600591#M2026472 Re: February Developer Challenge - CAP Plugins: Week 1 2024-02-09T14:39:37.563000+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-09 at 14.28.26.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/63274i6DCCBA66F04210C6/image-size/medium/is-moderation-mode/true?v=v2&amp;px=400" role="button" title="Screenshot 2024-02-09 at 14.28.26.png" alt="Screenshot 2024-02-09 at 14.28.26.png" /></span></P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-09 at 14.37.28.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/63275iEA0C0AC1F8FC4AA9/image-size/medium/is-moderation-mode/true?v=v2&amp;px=400" role="button" title="Screenshot 2024-02-09 at 14.37.28.png" alt="Screenshot 2024-02-09 at 14.37.28.png" /></span></P><P> </P> 2024-02-09T14:39:37.563000+01:00 https://community.sap.com/t5/sap-codejam/sap-codejam-ui5-amp-sap-fiori-elements-flexible-programming-model-utrecht/ev-p/13614294 🇳🇱 SAP CodeJam UI5 & SAP Fiori elements flexible programming model (Utrecht, Netherlands) 2024-02-21T12:24:37.721000+01:00 nicoschoenteich https://community.sap.com/t5/user/viewprofilepage/user-id/898 <P>This<SPAN>&nbsp;</SPAN><A href="https://groups.community.sap.com/t5/sap-codejam/gh-p/code-jam" target="_blank" rel="noopener noreferrer">SAP CodeJam</A><SPAN>&nbsp;</SPAN>event is about UI5, more specifically about the SAP Fiori elements flexible programming model (FPM). After a quick introduction to UI5, we will dive into the SAP Fiori elements and learn how<SPAN>&nbsp;to build a web application that allows users to browse and order books. Using the FPM, we will customise this SAP Fiori elements application. With this hands-on experience you will be able to start developing your own applications after this CodeJam. This CodeJam is not about freestyle UI5 development, but rather focuses on SAP Fiori elements flexible programming model.</SPAN></P><P>The content for the event can be accessed here:&nbsp;<A href="https://github.com/SAP-samples/ui5-exercises-codejam?tab=readme-ov-file#part-2---sap-fiori-elements-flexible-programming-model" target="_blank" rel="nofollow noopener noreferrer">https://github.com/SAP-samples/ui5-exercises-codejam?tab=readme-ov-file#part-2---sap-fiori-elements-flexible-programming-model</A>&nbsp;(we will only work on part 2 of this repository, which will be heavily extended by the time of the CodeJam)</P><P>This is an<SPAN>&nbsp;</SPAN><STRONG>in-person event</STRONG>&nbsp;<STRONG>only</STRONG><SPAN>&nbsp;</SPAN>(not virtual) and is planned for<SPAN>&nbsp;</SPAN><STRONG>Friday 19 April 2024 at the <SPAN>INNOV8iON</SPAN> offices in&nbsp;Utrecht, Netherlands</STRONG><SPAN>&nbsp;</SPAN>from 13:00 - 19:00 local time. The language of the event and the content will be English.&nbsp;</P><P>The instructor will be Developer Advocate<SPAN>&nbsp;</SPAN><A href="https://people.sap.com/nicolai.geburek" target="_blank" rel="noopener noreferrer">Nico Schoenteich</A>.</P><P>There are essential prerequisites that must be completed by every attendee, before arriving at the event location. They are documented here:&nbsp;<A href="https://github.com/SAP-samples/ui5-exercises-codejam/blob/main/chapters/1.00-prep-dev-environment/readme.md#1-prerequisites" target="_blank" rel="noopener nofollow noreferrer">https://github.com/SAP-samples/ui5-exercises-codejam/blob/main/chapters/1.00-prep-dev-environment/re...</A>.</P><P>Please note that spaces are limited - we can only accommodate 30 attendees. Register here in the Community Event using the RSVP functionality.</P><P><EM>For more information on SAP CodeJam events, to ask questions, and to chat with your fellow attendees, head over to the<SPAN>&nbsp;</SPAN><A href="https://groups.community.sap.com/t5/sap-codejam/gh-p/code-jam" target="_self" rel="noopener noreferrer">SAP CodeJam group</A>.</EM></P> 2024-02-21T12:24:37.721000+01:00