Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

7 REPLIES 7

Jelena
Active Contributor

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.

Sandra_Rossi
Active Contributor
0 Kudos

please move it to your original question. "Answers" are reserved to solutions.

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.

Domi
Contributor
0 Kudos

Hi

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

please check Tx OAD2 or DC30

regards

Domi

Sandra_Rossi
Active Contributor

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)

Former Member
0 Kudos

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 ).

Sandra_Rossi
Active Contributor

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)