Hi there Community!
Happy 2022!!
So, we’ve developed an app to register some useful information to our production lines. To be specific, we use SAP Business One on Hana and whenever we have a production order we read this information from our app and should register new info on specific user fields already created on SAP. We can already read tables and info without problem, but when we want to write the trouble begins…
To write on SAP Hana we should use Service Layer but we get error 401 / 301, see below.
We try connecting with POSTMAN and everything is ok, but when we try the same GET on powerapps we can’t get to save cookie/session , so we get invalid session.
Your help is pretty much appreciated and please let me know if we could move forward on something…. below all the info I have:
Entries:
B1SESSION=9382da7c-68aa-11ec-8000-005056a0f6df; ROUTEID=.node2
Body:
{
"error": {
"code": 301,
"message": {
"lang": "en-us",
"value": "Invalid session or session already timeout."
}
}
}
Header:
{
"Vary": "Accept-Encoding",
"DataServiceVersion": "3.0",
"x-ms-apihub-cached-response": "true",
"Date": "Wed, 29 Dec 2021 13:24:22 GMT",
"Set-Cookie": "ROUTEID=.node3; path=/",
"WWW-Authenticate": "Basic realm=/b1s/v1/InventoryGenEntries(26193)",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "164"
}
-------
Unprocessed entries:
{
"host": {
"connectionReferenceName": "shared_conexion-20postman-20sap-20-2d-20no-20auth-5fbb-be18e6deead69675",
"operationId": "GET_ReciboProduccion_26193"
},
"parameters": {
"Cookie": "B1SESSION=9382da7c-68aa-11ec-8000-005056a0f6df; ROUTEID=.node2"
}
}
Unprocessed outputs:
{
"statusCode": 401,
"headers": {
"Vary": "Accept-Encoding",
"DataServiceVersion": "3.0",
"x-ms-apihub-cached-response": "true",
"Date": "Wed, 29 Dec 2021 13:24:22 GMT",
"Set-Cookie": "ROUTEID=.node3; path=/",
"WWW-Authenticate": "Basic realm=/b1s/v1/InventoryGenEntries(26193)",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "164"
},
"body": {
"error": {
"code": 301,
"message": {
"lang": "en-us",
"value": "Invalid session or session already timeout."
}
}
}
}
Error details:

Example GET:

Thank you for your help!!