on 05-28-2021 2:10 PM
Hello SAP experts,
at the moment we have the following use case. We want to automatically upload a file to our SAP BO 4.2/4.3 frontend.
We already developed solutions for downloading reports or uploading files.
E.g. we have a function for upload
def file_upload(host: str, logon_token: str, folder_id: str, filename: str):
document_url = f"http://{host}:6405/biprws/infostore/folder/{folder_id}/file"
files = {'file': open(filename, 'rb')} headers = {"X-SAP-LogonToken": logon_token}
res = requests.post(document_url, headers=headers, files=files)
res.raise_for_status()
return res.content
With this we want to create a webi Report that uses this file as a source.
The problem is that a repitition of the function dont update/replace the file instead it creates an additional file like file.xlsx + file[1].xlsx ...
We could delete and reupload the file but this destroys the internal file id and the depending webi report cannot be updated.
So i hope you understand my situation and have some idea. I expect that there is another type of requests that replaces a file correctly but i couldnt find such a thing in the documetation.
Best,
Patrick
User | Count |
---|---|
68 | |
26 | |
9 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.