cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments not saving in ABAP Restful programming managed App

vish89
Explorer
0 Kudos
1,682

Hi Experts,

I have created RAP managed Fiori elements app(draft enabled with GUID as key field) with reuse components of attachment service. I can see attachment tab in Fiori app, when I upload attachments in Fiori, it is only saving as draft, not saving attachments to GOS when I click on 'Save'. I can see post call for attachment service in console, still not saving.

I have followed maheshkumar.palavalli blog which mentioned below. Below blogs talks about BOPF approach, is there any way how we can handle it in ABAP Restful programming. Do I need to save attachments manually like mentioned below blog ?

https://blogs.sap.com/2019/12/16/attachment-service-to-your-rescue-in-s4hana-fiori-elements-using-re...

Regards,

Vishnu Kothuru

Accepted Solutions (0)

Answers (2)

Answers (2)

Raju
Explorer
0 Kudos

Vishnu have u got any solution for this i have a same kind of requirement can u pls update if u find any solution for this

DineshK
Active Participant
0 Kudos

Hi Vishnu,

Have you tried using API 'api_cv_attachment_srv' entity 'CreateUrlAsAttachment' by any chance?

We are using it to create attachment in S/4 from external application... this creates a new doc info record..

call would be something like this '/ sap/opu/odata/sap/API_CV_ATTACHMENT_SRV/CreateUrlAsAttachment?SemanticObject='ZABC'&LinkedSAPObjectKey='1000039'&BusinessObjectTypeName='MARA'&Url='google.com'&UrlDescription='weblink'&MIMEType='Text/URL'&sap-client='XXX'

or Have you tried using BAPI 'BAPI_DOCUMENT_CREATE2' in RAP maybe?

Also please see https://sap.github.io/cloud-sdk/docs/java/features/bapi-and-rfc/bapi-and-rfc-overview/

hope any of these help...

Also, Please share whatever outcome you may have...