Office 2007 documents#

Problem:
Office 2007 Dokumente sind intern Zip Dateien. Das Problem besteht bei xlsx, docx, pptx. Der Server liefert hier den generellen Typ application/octet-stream und der Internet-Explorer nutzt seinen "MIME-Sniffer", der die ersten 200 Bytes untersucht und daraus dann den richtigen Typ zu ermitteln. Dabei kommt zip heraus.

In der URI vom Attachment wird das Content-Repository "CRMORDER" als Parameter mitgegeben. Über t.CREP-CREP_TYPE=03 (=Datenbank des SAP-Systems) und t.CREP_R3DB-R3DB_TAB wird die Datentabelle bestimmt. Die Datentabelle ist t.CRMORDERCONT (RELID=IN, PHIO_ID=DOC_ID). Hier werden auch Metadaten abgelegt. Es gibt es die Clustertabellen INFO_CLUSTER und DOC_CLUSTER. Es gibt keinen Report, der das auslesen kann, sondern nur Funktionsbausteine SCMS_R3DB_xxx.

Der MIME-Typ wird beim Hochladen des Anhangs über t.SDOKFEXT bestimmt und in der Tabelle INFO_CLUSTER abgelegt. D.h. nachträglich kann man den MIME-Type nciht ändern (nur durch erneutes Hochladen). Alle "unbekannten" Dateinamenserweiterungen erhalten als Vorgabe den MIME-Typ "application/octet-stream" und werden vom Browser gemäß den Browsereinstellungen behandelt (Mime-Sniffer). Der IE11 hat einen besseren MIME-Sniffer, so dass Office 2007 Anhänge richtig geöffnet werden. Für IE8 (und generell) müssen die Endugen aber direkt in der t.SDOKFEXT hinzugefügt werden. Umgekehrt sollten sie dann auch in t.SDOKMIME ergänzt werden. Es gibt zu beiden Tabellen auch noch eine Kundenversion xxx_C, aber diese dient offenbar nur der Redefinition, d.h. die Dateiendung sollte in der SAP-Tabelle schon vorhanden sein.

Relations:
CRMORDERPHIO-PHIO_ID=DOC_ID => LOIO_ID
SKWG_BREL-INSTID_B = *LOIO_ID
CRMORDERLOIO-LOIO_ID

t.SDOKMIMESAP Standard-MIME-Typen
t.SDOKMIME_CCustomer redefinition
t.SDOKFEXTthis is used on upload already and stored as DOC_INFO in table CRMORDERCONT
t.SDOKFEXT_CCustomer redefinition
t.TOADDfor contentserver (not used in EIC for attachment storage)
t.TOADV
t.TOAOM
/sap/bc/contentserver => /sap/bc/contentserver 
Handler 
CL_HTTP_EXT_CSIF
	> IF_HTTP_EXTENSION~HANDLE_REQUEST( )
		CL_HTTP_EXT_CSIF->PROCESS_GET( ) 
			> f.SCMS_DOC_READ
				ACCESS_INFO-MIMETYPE
				> f.SCMS_R3DB_IMPORT
					s.CONTENT_INFO-MIMETYPE
					> perform db_import_info
						t.CRMORDERCONT, RELID=IN
							cluster tables 
								info_cluster 
								doc_info
								
						import_in_no_clnt
						<> s.info_cluster
						> f.SCMS_DOC_ADJUST

Note 1812983 - Getting a warning message when importing office 2007/2010 file types

Extention	Mime Type	Application	Description
docm application/vnd.ms-word.document.macroenabled.12	word.documentmacroenabled.12	Microsoft Office Word
docx application/vnd.openxmlformats-officedocument.wordprocessingml.document	word.document.12	Microsoft Office Word
dotm application/vnd.ms-word.template.macroenabled.12	word.templatemacroenabled.12	Microsoft Office Word
dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template	word.template.12	Microsoft Office Word
potm application/vnd.ms-powerpoint.template.macroenabled.12	powerpoint.templatemacroenabled.12	Microsoft Office PowerPoint
potx application/vnd.openxmlformats-officedocument.presentationml.template	powerpoint.template.12	Microsoft Office PowerPoint
ppam application/vnd.ms-powerpoint.addin.macroenabled.12	powerpoint.addin.12	Microsoft Office PowerPoint
ppsm application/vnd.ms-powerpoint.slideshow.macroenabled.12	powerpoint.slideshowmacroenabled.12	Microsoft Office PowerPoint
ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow	powerpoint.slideshow.12	Microsoft Office PowerPoint
pptm application/vnd.ms-powerpoint.presentation.macroenabled.12	powerpoint.showmacroenabled.12	Microsoft Office PowerPoint
pptx application/vnd.openxmlformats-officedocument.presentationml.presentation	powerpoint.show.12	Microsoft Office PowerPoint
xlam application/vnd.ms-excel.addin.macroenabled.12	excel.addinmacroenabled	Microsoft Office Excel
xlsb application/vnd.ms-excel.sheet.binary.macroenabled.12	excel.sheetbinarymacroenabled.12	Microsoft Office Excel
xlsm application/vnd.ms-excel.sheet.macroenabled.12	excel.sheetmacroenabled.12	Microsoft Office Excel
xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet	excel.sheet.12	Microsoft Office Excel
xltm application/vnd.ms-excel.template.macroenabled.12	excel.templatemacroenabled	Microsoft Office Excel
xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template	excel.template	Microsoft Office Excel