Skip to Content
-1

I am not able to open a file .xlsx in GOS attachment

Mar 05 at 01:20 PM

112

avatar image
Former Member

Hi All,

I am calling a transaction MIRO or FB60 through custom program to create the invoice document, once the invoice document gets created then I attached a file to the document which is stored in DMS server. In DMS I am able to open the file correctly but when I open the same file in invoice document (MIRO, FB60) , it opens in corrupted format. While other formats like .doc, .pdf, .jpg are getting open correctly. Your valuable inputs are very much appriicated.

10 |10000 characters needed characters left characters exceeded

If it's "corrupted" then Excel wouldn't be able to open it at all. Please provide more details, as well as a screenshot of what exactly is happening.

Also try if this works with XLS format.

1
Former Member

Hi Jelena thanks for you response. As I already said that file is already stored in DMS server, which I am able to open in cv03n in corrected or readable format but it is coming in corrupted format as shown in below screenshot. I tried to save the file in .XLS format but it is not working, shows the same corrupted format.

DMS server ( if file is in .XLS ) - GOS attachment ( It's working fine )

DMS server ( If file is in .xlsx ) - GOS attachment ( It is giving unreadable format, when I try to save it in .xls format still gives the same error )
If required I can share my code also.

mg6wc.png (100.1 kB)
1

It's showing the XLSX file as if it was simple text (we can see "PK" at the beginning which usually indicates it's a ZIP file, an XLSX being a ZIP file with a specific hierarchy of files)

Please download the file on your desktop and open it. Does it open correctly?

Did you indicate &SO_FILENAME=filename.xlsx in the header while attaching it? (cf note 1582868 - GOS: Support for four-character file name extensions)

1
Former Member
Sandra Rossi

Hi Sandra,

I have downloaded it on desktop and checked but it is giving the same issue.

I have used the FM SO_OBJECT_INSERT to attach the file, where I am passing a parameter as a file name ( filename.xlsx ).

0

According to me (according to the note 1582868), you must pass the parameters OBJECT_TYPE = 'EXT' and OBJHEAD = VALUE soli_tab( ( LINE = '&SO_FILENAME=filename.xlsx' ) ) (use a valid ABAP syntax of course)

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Domi Bigl Mar 06 at 08:12 AM
0

Hi

It looks like the mime type for XLSX is incorrect or missing

please check Tx OAD2 or DC30

regards

Domi

Share
10 |10000 characters needed characters left characters exceeded