cancel
Showing results for 
Search instead for 
Did you mean: 

Access Permission Error in OData Service method while Uploading File to SAP Application Layer

0 Kudos

Hi all,

I am trying to upload file from SAPUI5 app to SAP Application layer by using OData Service.

I am using the SAP function module "ARCHIVFILE_CLIENT_TO_SERVER"  to achieve this requirement.

But when i tried to use this function module inside odata service method, i didn't get the popup which gives permission to access local file.

Please find the attached screenshot(Access Permission popup). Because of missing this popup i am getting SY-SUBRC = 1 "Access error on File" from the function module.

I can successfully upload files when i tried the same in Report program,there i got this permission access popup.


is there any way to set this permission as ALLOW without this popup?

Can any one give me an advice to solve this?

Regards,

Ranjani Sekar.

Accepted Solutions (1)

Accepted Solutions (1)

EkanshCapgemini
Active Contributor
0 Kudos

Hi Ranjani,

The calling of OData service or calling a FM inside a OData service doesn't support dialogs or popups. That is why you are not able to use this FM inside your gateway service.

You will get the file in CREATE_STREAM method of DPC class, here you can send it to your wrapper RFC and save the file to the Application server inside that RFC. To save the file on application server, you can use following keywords (with different variations):

OPEN DATASET

TRANSFER

CLOSE DATASET

you can convert the xstring of file to binary and then store it in a file on application server. You will get more details on searching for this.

Regards,

Ekansh

0 Kudos

Hi Ekansh,

Thank you so much for your valuable reply.

I will try to use OPEN DATASET.

Thanks once again.

Regards,

Ranjani Sekar.

Answers (1)

Answers (1)

0 Kudos

Hi Ranjini,

I'm having a similar requirement to upload the documents into the Application layer using the Odata Service, Could you please help me by sharing your code in CREATE_STREAM method for achieving this.

Thanks,

Anudeep.