Solved

Integration K2-SAP: how to send an attachment file to SAP

  • 21 February 2020
  • 4 replies
  • 240 views

Hello,

 

in the context of an integration K2-SAP, we would like to send data from a K2 "application" to SAP. 

Data exchange from "normal" fields like textboxes is working fine.

Neverthless, we do not succeed to configure data exchange from a K2 form/view to SAP for attachment file controls.

 

We understand this integration is working with SharePoint thanks to a specific sharepoint service which is handling this. But nothing exists for SAP.

 

Therefore we have developed in SAP the API which will receive the data and published it to K2.

 

Find here-after some screenshots:

 

The Form to manage Attachements in K2

Question

  • Someone has any idea about the way this integration could be implemented ?

 

Thanks in advance for your suggestions,

BR

icon

Best answer by JSC 24 February 2020, 06:55

OK. I think you can do it in a workflow but not as rules in a view/form (may the devs prove me wrong...)

In the workflow designer you have function for "toBase64" etc.
and from the the SmartObject references you can get the file and its content...
(I have done this for SharePoint attachments - I can use the file and also its file name and its content)
View original

4 replies

Badge +6
Depending on how big the files are, you could decode them base64 in K2, send them over as text and decode them on SAP side? 🙂

Hi Kudos,

 

thanks for your fast reply, the solution proposed sounds good but we have no idea how to get the file content from K2 and how to decode it base64 in K2. 

 

We have explored all methods of the file attachment control, but we don't find any method providing the file content / size.

 

Thanks,

BR

Badge +6
OK. I think you can do it in a workflow but not as rules in a view/form (may the devs prove me wrong...)

In the workflow designer you have function for "toBase64" etc.
and from the the SmartObject references you can get the file and its content...
(I have done this for SharePoint attachments - I can use the file and also its file name and its content)
I called you KUDO... sorry for that I am not used to this forum. :)

Your hint was the good one, interaction can be handled in a workflow.

Thanks a lot for your support.

Reply