cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Offloading XLSX and DOCX document attachments from ECC and loading them to S4

spinellll
Participant
0 Likes
233

Trying to download document attachments from ECC and load them to S4.
We run a custom download program on the ECC side. Assuming type is BKPF:
  Step1. Call method cl_binary_relation=>read_links to read existing attachments using awkey.
  Step2. Loop thru the links and read them via call FM SO_DOCUMENT_READ_API1.
  Step3. With filetype BIN, call FM GUI_DOWNLOAD with the hex output from step 2.

On the S4 side:
  Step1. Call function 'GUI_UPLOAD' to read the downloaded files from the extract, with filetype ‘BIN’ .
  Step2. Call FM SO_DOCUMENT_INSERT.
  Step3. Call method cl_binary_relation=>create_link

All the downloaded files are “successfully” attached to the document.
If you check the attachments in FB03, it works fine with PDF, XLS, DOC files, but does not work with XLSX and DOCX.
When opening an XLSX we get this as if it was opened in Notepad.

spinellll_0-1724426737222.png

Also, if we open a downloaded XLSX directly from the output folder:

spinellll_1-1724426737222.png

spinellll_2-1724426737223.png

Thanks

Leo

 

 

Accepted Solutions (0)

Answers (0)