2024 Apr 03 12:35 PM - edited 2024 May 02 8:17 AM
The challenge is now over. See our wrap-up blog.
Always good to brush up on your OData access … I mean, we’re at SAP.
We started the challenge earlier this week with a preliminary task so you can have your SAP Build Apps set up. Now we'll start one challenge a week, on Wednesdays – today's about working with S/4HANA Cloud OData services.
The challenges so far:
Getting data from SAP backends is one of the key capabilities of SAP Build Apps, and one of the things you’ll want to make sure is second nature for you. To get SAP backend data into your app, you’ll need to know a few things.
Within the data variable there is a way to filter, sort, and paginate the data that you retrieve from the backend. For more on these tasks, you can see this blog.
In this challenge, you will get demo sales order data, filter/sort/paginate the data, and display the data in your app.
To do this task, you'll need an SAP Build Apps system and to import our skeleton app. To do all this, make sure you've done Task 0.
IMPORTANT: When you create your destination, the URL should be:
https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_SALES_ORDER_SRV
YOU'LL LIKE THIS: We have given you a file you can import to create the destination in a few seconds. You just have to add your API key.
IMPORTANT: In the data variable, you MUST implement sorting/filtering/paging as follows:
To make it look nice, I changed the width and height for the list item component, using the Custom setting and setting the width to 90%. I also changed the shape. You can adjust the UI as you like.
Take a screenshot, something like this (your values will differ and MUST reflect the filtering above).
Take note of the amount for the 10th entry – this is the value you must hash (remember, your values will be different than the one's above). The value should be with 2 decimal places, no commas and no currency sign, something like this: 123.99.
Your entry should look like this:
Open your app in the mobile preview and tap somewhere on the S/4HANA Sales Order page reveal a 30-second video about an event the SAP Developer Advocates put on around the world (a second tap will hide the video). Type the name of the event in your reply.
2024 Apr 03 1:11 PM - edited 2024 Apr 03 1:44 PM
3b69385764b78f00234b55931ced6844f0ee9fd9f2b332df0950deea9e7a2c69
2024 Apr 03 5:13 PM
7f2219831db1b079dd2dfe17d1d47627004961ccc9c789353b7e8ea82b8df75c
Event name - SAP BUILD code jam
2024 Apr 04 11:29 AM
b5ecf82978fa4978a3577ea5d7bd8440d90323a90fc52dd548db05c96a41d617
2024 Apr 04 11:51 AM
2024 Apr 04 1:25 PM
@Dan_Wroblewski wrote:tap somewhere on the S/4HANA Sales Order page
Can't find it on the list page, clicking on the banner gives, "React Native WebView does not support this platform."
2024 Apr 04 1:53 PM - edited 2024 Apr 04 1:53 PM
2024 Apr 04 4:47 PM
Works on mobile preview, "SAP Build Code Jam". Thanks.
2024 Apr 04 5:31 PM
@Dan_Wroblewski wrote:I used a control that is only available if you run on mobile. I could have easily used a second control in case someone opened on web ... I learned for next year's challenge 🙂
Can you open on the mobile preview app?
Tapping the Header Text sets a variable "showVideo" to NOT "showVideo" so presumably there's code somewhere responding to the "showVideo" = TRUE.
2024 Apr 05 5:17 PM
Have replaced the Webview with "Open URL" which works on both preview and mobile.
2024 Apr 04 11:59 PM - edited 2024 Apr 04 11:59 PM
I see the video. Also see the logic.
But where is the source? Where did you provide the link to the video?
2024 Apr 05 7:54 AM
Hi @Venkat_Vyza The link to the video is provided in webview1 control, and the visibility of this control is managed by the page variable showVideo.
2024 Apr 05 3:12 PM
2024 Apr 05 2:59 PM
2024 Apr 09 12:24 PM
@Venkat_Vyza Your hash is still not correct. Would love to have you submit the correct hash 😸
2024 Apr 04 1:14 PM
e9d55d09753d46f903dc21ec66c301c62ae89b58d62f6b14c5efe7700c961d4e
The event name from the video - SAP Build Code Jam
2024 Apr 05 11:33 AM
I'd just have one question : I wasn't able to fulfill this task until I set the TrustAll property in the Destination Configuration to True. I previously had the "Use default JDK truststore" checkbox set and I wasn't able to fetch the correct data.
Any ideas on what could I do to be able to complete the exercise without having TrustAll in my destination config?
2024 Apr 07 9:53 AM
2024 Apr 08 12:00 PM
Yes, I added the TrustAll property and set it to "true" in order to make the exercise work.
Otherwise, if I let the default JDK truststore in place, my app won't fetch any data and won't show it in the table view :
I have multiple users (S and P-type users) on the same account, could it be due to that?
My curiosity is : how to overcome this? For exercise purposes it's ok to set the TrustAll property but in a productive environment it might not be the best approach and it'd be nice to know the exact cause of the issue and how to overcome it.
2024 Apr 08 2:26 PM
I'm not an expert on destinations -- it's a little opaque what's going on there (people are all confused when doing "check connection" and getting error even though the destination is OK). I don't really understand the issue since you are "authenticating" with an API key so your user should have nothing to do with it.
2024 Apr 19 1:44 PM
I found that people had similar issues :
2024 Apr 19 1:57 PM
I had a word with @eshrinivasan , and my issue is now resolved. I am putting what i was doing wrong here : Destination - 401 Unauthorized - SAP Community
2024 Apr 05 9:37 AM
Hi,
Taking Screenshot is not allowed in the build app preview.
e26f5b1b935afaf5e399a450f1c1350df646b087245e5eb976c9b09ce5f6e596
2024 Apr 05 11:09 AM
SAP Build CodeJam
f4f2fb8144b2e47c5a940fc80edde36d6fcbefce783bb987ba7ccdf9520f4cdc
2024 Apr 05 1:19 PM
2024 Apr 05 2:57 PM
2024 Apr 05 8:22 PM
2024 Apr 07 9:44 AM
2024 Apr 07 7:38 PM
2024 Apr 10 9:22 AM
Hello @Dan_Wroblewski,
hash - fbfa72aad41fd27a59f507c806ae71e9776048f2e1c39f83e4954573ea99edb9
Is it correct hash?
2024 Apr 05 2:14 PM - edited 2024 Apr 05 3:28 PM
2024 Apr 05 2:39 PM
1846d98cae355f1bf4e1bc0375b3ff43677a67a41c216545ccef2410f5a58b5d
SAP Build Codejam
2024 Apr 06 10:55 AM
Here my answer on a sunny day in BE 😀
3bc3d7b9eb5b9947c6d5a560c24da4513a7796f86a5285facac8e2f2cd6ef4aa
SAP Build Codejam
2024 Apr 07 4:42 PM
973c2376bcb13457808c207e03cfa687c514f19e1b4898c200e438b334d44902
Would love to host a:
SAP Build CodeJam
in Austria 🙂
2024 Apr 08 5:12 AM
We'd love to do so. Can you enter a reply to this post and provide details about company, time, number of people?
2024 Apr 07 5:10 PM
f93ea0f25716e2c92257f5af39618ee31055989af3460a0aa59d32bd
SAP Build CodeJam
2024 Apr 08 5:10 AM
2024 Apr 09 10:19 AM
Lets hope now is good 😛
d84863d2f93ea0f25716e2c92257f5af39618ee31055989af3460a0aa59d32bd
2024 Apr 07 5:32 PM
0009ba1bbe60e3f90698349038ebd353bdf5c130fe97a3ee02385f5a1bbff9e8
SAP Build CodeJam
2024 Apr 07 7:23 PM
O a, facing with Task1. Could you please review my steps and guide if I am missing any step . I am able to add my Data Variables from API and set Filter, Sort and Paging. But in UI Canvas I drag and dropped List Item and tried to bind the data source but some how I get warning if I choose it from Data Variable but I change properties to Repeated and choose from current I am able to select Item Text and Net Amount but Data is not rendered in output. Attaching screen shots for your reference.