on 2023 Dec 08 7:19 PM
Hello,
I use an ABAP backend based on an OData service with the "GetStream" method overridden to respond with PDF files generated in the backend.
That part works well! If I call the URL from SAP in the Gateway client:
sap/opu/odata/sap/MY_ODATA_SRV/myEntitySet(Key1='',Key2='')/$value
It shows the PDF file! 😄
The problem I am facing is that I don't know how to retrieve that file in Swift using the iOS SDK.
(I'm building an ONLINE app)
I attempted with this code, but it didn't work:
let oItem = MyODataSrvFmwk.MyEntity()
oItem.key1= "123"
oItem.key2= "123"
Task{
do{
let media = try await myOData.dataService!.downloadMedia(entity: oItem)
print(media)
}
catch{
print(error)
}
}
This code always ends up in an error.
Could you please help me with this?
On the other hand, I searched the documentation and found nothing.
I am using the documentation from:
https://help.sap.com/docs/btp-sdk-ios/sap-btp-sdk-for-ios/utilizing-odata-api?locale=en-US
Is there another one that is more complete?
Request clarification before answering.
and there are some examples on usage in the online documentation at https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPOData...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.