cancel
Showing results for 
Search instead for 
Did you mean: 

No data in SAP BUILD Preview

damir_sef
Discoverer
0 Kudos
437

Hi everyone,

I'm trying to consume some data from the BTP via destination in SAP BUILD Apps. So far I managed to create a destination on BTP, create a destination sap Build, configure the authentication and successfully test the connection. I receive the data from the backend. I also bound the data to the UI in sap build and I can see the correct values in the SAP Build UI Canvas. However, I can't get the data to show in the preview.

So far I tried:

  1. Binding the value to the using the formula and assigning the value from the data variable e.g. data.Test_API1.profiles[0].attributes.lastName
  2. Using the Get record collection and binding the value to an app or page variable. I also tried binding the value to the 'Output value of another node' and I get the error:

Also, what I don't understand is that I can see that when doing the GET request in the network tab the bearer token is undefined:

But the response returns a success and I can see the data in the responseText:

Did anyone have a similar issue?

Thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

SAP Build Apps is expecting a list but based on the response you are returning an object.

In the response mapper, enter something like this:

{ records: response.data.profiles, driverCode: response.status }

After testing, click Autodetect Schema from Response, and the app will recognize the scheme for the response.

damir_sef
Discoverer
0 Kudos

Hi daniel.wroblewski

thanks for the reply. So far I can confirm the following:

  • Enable BTP Auth - ✓
  • Set up your destination and check that you can see data in the Data tab - ✓
    In order to fetch the data I need to set up a relative path and query using a formula:

    I can confirm that I am receiving data from backend:

  • Create a data variable based on this entity (REST or OData) -- your flow functions should be set up automatically, and in the logic for your variable, add an alert and make sure you can see your data
    I believe I am making a mistake at this step. My flow looks like this:


    As you can see the I can't bind any values as they are incompatible:

    What I don't understand is that I can see the data in the SAP BUILD Canvas when I use the formula:


    But the value is undefined in the preview.

    Any help would be much appreciated.
    Thanks!

    Damir

anuragshripvh
Newcomer
0 Kudos
Hi Damir, I am also facing same issue, Have you got the solution?
Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

It's tough to tell without seeing the entire flow you set up, but it should go something like this:

  • Enable BTP Auth
  • Set up your destination and check that you can see data in the Data tab
  • Create a data variable based on this entity (REST or OData) -- your flow functions should be set up automatically, and in the logic for your variable, add an alert and make sure you can see your data
  • Bind the variable to a UI. If it's a list, bind the variable to the repeat and then use the "data item in repeat" for specific fields.

Feel free to add more about your set up, plus screenshots, and where the data stops appearing.