cancel
Showing results for 
Search instead for 
Did you mean: 

Services for Object - Store Business Documents (issue with XLSX files)

former_member187014
Participant
0 Kudos

Hi,

We are using the Services for Object > Store Business Document to be able to drag and drop files into (for example) Sales Inquiry, Sales Order, Sales Quotations etc.

Within OAC2 we have set up the global document types and these have been linked to the relevant Object Types and Content Repositories in OAC3.  We have also set up the Content Repository as Document Area 'ARCHLINK'.

The ArhciveLink Basic Settings in OAG1 have the 'Always Copy Document Class from Document Type' set under Storage Settings.

The issue we are having is with XLSX document types.  When we drag and drop the XLSX documen type using the Store Business Document the file is stored against the Sales Order but when you come to view the attachments MS Excel opens but an error message appears saying 'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?

We have reviewed SAP notes 1925897, 1739026 and 1145885 however non appear to give me a clear answer as to why this is happening?

I have found that if we unselect the option 'Always Copy Document Class from Document Type' in OAG1 then we can open the XLSX files.

As we have a significant amount of documents attached to various objects, what would be the implications of making this change agianst existing records and new records?

Any advice on this issue would be greatly appreciated.

Gary B

Accepted Solutions (1)

Accepted Solutions (1)

david_liu1
Advisor
Advisor
0 Kudos

Hello,


Have you set the "*" document class in OAC2?


Regarding the "*" document class in OAC2 , there have some info below which
you should keep in mind while storing a document:


Please ensure that you follow the below scenarios while storing a
document using standard SAP modules. There can be two options here :


1) If you use the document class "*" in OAC2 customizing transaction
for a particular document type, then you have to disable the option
"Always copy Document class from Document Type" in OAG1 transaction
while storing a document.


Note : If you donot disable this option in OAG1, the mime type from the
document class * will be used to store the document which is wrong and
the document is stored incorrectly. And the link entry also will be
created with "*" document class/reserve field, which is again wrong.


2) If you want to keep the parameter "Always copy Document class from
Document Type" enabled in OAG1 while storing a document, then you have
to use proper document classes for those document types (eg,PDF,JPG,etc)
in OAC2 to avoid incorrect storage. You should not use "*" as
Document class.


This is how the storage scenario works ( when using SAP standard modules
to store a document and create link entry).


Regards,

David

former_member187014
Participant
0 Kudos

Hello David,

Many thanks for your reply.

Within OAC2 we have set up a series of Document Types for each Document Class - for example we have set up Z* Document Types and used Document Classes FAX, DOC, XLS, TIF, PDF, JPG, BMP, PPT, MSG etc.

Also as explained above within OAG1 we ahve the option 'Always Copy Document Class from Document Type' enabled for the Storage Settings.

I am still unclear as to why with XLSX documents we are still getting the message  'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?

Incidently we have defined Workstation Application XLS together with file formats of .XLS, .XLW, .XLB and .XLSX.

Any advice would be appreciated.

Gary B

Answers (1)

Answers (1)

former_member187014
Participant
0 Kudos

Found SAP Note 1289314 which appears to suggest in DC30 customization for the work station application, set the option 'You cannot rename temporary files' so that the file with actual extension will be downloaded.

Checked our customizing settings and for 'XLS' Work Station this is set however we still have the issue!!

Any advice/help on this issue would be appreciated.

Regards

Gary B

david_liu1
Advisor
Advisor
0 Kudos

Hi Gary,

Check SAP note 1237688 also.

Regards,

David

former_member187014
Participant
0 Kudos

Hi David,

No joy I'm afraid!!

I added entry 'xlslx' with the relevant MIME Type, Application and Description into table TOADD for the ArchiveLink settings and also this entry was already in tables SDOKMIME and SDOKFEXT for KPro.

I then following the process via the Services for Object within VA12 (Change Inquiry) to then Create > Store Business document > Select the relevant Document Type > Drag and Drop the XLSX file into the empty box.

I then saved the record and tried to view the attachement but I am still getting the same message  'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?

Our client is on componet SAP_BASIS release 701 Support Level 0014 and Support Package SAPKB70114 and I can see that note 1237688 is for SAPKB70112?

Regards

Gary