cancel
Showing results for 
Search instead for 
Did you mean: 

Destinations are working in BAS but not in Build Work Zone, advanced edition

christian73
Discoverer

Hey experts,

I am quite new to the whole SAP world. Currently I am trying to retrieve data from a destination using a SAP UI5 integration card. For this reason, I have created a destination in our BTP Cockpit following this tutorial.

test-destination.PNG

After checking that everything was working fine (got 200 ok on 'Check Connection'), I created a UI integration card of type list in Business Application Studio and consumed the destination. 

 

{
    "_version": "1.14.0",
    "sap.app": {
        "id": "ns.directDeploymentTest",
        "type": "card",
        "title": "Destination test",
        "subTitle": "Test card for testing Destinations",
        "applicationVersion": {
            "version": "1.0.34"
        }
    },
    "sap.ui": {
        "technology": "UI5",
        "deviceTypes": {
            "desktop": true,
            "phone": true,
            "tablet": true
        },
        "icons": {
            "icon": "sap-icon://list"
        }
    },
    "sap.card": {
        "extension": "/dataExtension",
        "type": "List",
        "designtime": "dt/configuration",
        "configuration": {
            "parameters": {
                "cases": {
                    "value": "Adresse"
                }
            },
            "destinations": {
                "test": {
                    "name": "test"
                }
            }
        },
        "header": {
            "title": "{version}",
            "subTitle": "Version",
            "icon": {
                "src": "sap-icon://desktop-mobile"
            },
            "data": {
                "extension": {
                    "method": "headerData"
                },
                "path": "/"
            }
        },
        "content": {
            "item": {
                "title": "{{parameters.cases}}: {ShipAddress}",
                "description": "{ShipCity}, {ShipCountry}",
                "info": {
                    "value": "{= format.dateTime(${OrderDate}, {relative:true}) }"
                }
            },
            "maxItems": 5
        },
        "data": {
            "request": {
                "url": "{{destinations.test}}/v4/Northwind/Northwind.svc/Orders",
                "method": "GET"
            },
            "path": "/value"
        },
        "footer": {
            "actionsStrip": [
                {
                    "text": "Refresh",
                    "buttonType": "Emphasized",
                    "actions": [
                        {
                            "type": "Submit"
                        }
                    ]
                },
                {
                    "type": "ToolbarSpacer"
                }
            ]
        }
    },
    "sap.platform.mobilecards": {
        "compatible": false
    }
}

 

Again, everything worked fine and I got a nice preview showing all the data.

preview.PNG

When I use the card in the workzone, the problem starts. When I use the card in my workspace, I get the message "No items available". What is even more strange is the fact that the response "200 OK" is displayed in the network tab for the corresponding request. The response body is some HTML code that I can't do anything with.

 

<html>
    <head>
        <link rel="shortcut icon" href="data&colon;image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"/>
        <script>
            document.cookie = "fragmentAfterLogin=" + encodeURIComponent(location.hash) + ";path=/;Secure;SameSite=None;";
            document.cookie = "locationAfterLogin=" + encodeURIComponent(location.href.split('#')[0].split(location.host)[1]) + ";path=/;Secure;SameSite=None;";
            document.cookie = "signature=bjMqGSOEnOEj9ETqBLXC%2FZgOlB4%3D;path=/;Secure;SameSite=None;";
            location = "https://our-workzone-instance/oauth/authorize?response_type=code&client_id=sb-workzone-rt-approuter!t3664&redirect_uri=https%3A%2F%2Four-workzone-instance%2Flogin%2Fcallback%3FauthType%3Dxsuaa&state=a1239c50-397e-4274-b4fc-7f4c35d7d402"
        </script>
    </head>
</html>

 

Can any of you please give me a clue as to what I am doing wrong? I have tried different destinations but the overall picture does not change.

 

Thanks a lot for your time and effort.

 

Christian

Accepted Solutions (0)

Answers (0)