wir lassen aus Outlook die Mails als Meldungen anlegen. Dabei werden auch die Anlagen der Mails als Objekte an der Meldung angelegt. Bis zur Umstellung auf Hana und Unicode konnten die Dateien auch Prima geöffnet werden. Jetzt ist es so, dass die Dateien korrupt sind.
Mein Problem ist folgendes:
Ich habe den Klartext der Dateien (Bei Textdateien lesbar bei Bilder natürlich nicht Klartext im eigentliche Sinne) in einer Variable String drin.
Diesen Text bereits ich auf und teile ihn immer nach 255 Zeichen in eine Tabelle vom Typ TYPE STANDARD TABLE OF soli. Die Tabelle hat dann den Klartext zeilenweise darin. Dann lege ich das Objekt mittels folgendem Fuba an:
- Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
- CALL FUNCTION 'SO_OBJECT_INSERT'
- EXPORTING
- folder_id = ls_insert_folder
- * OBJECT_FL_CHANGE = ' '
- object_hd_change = ls_document_head
- object_type = 'EXT'
- * ORIGINATOR_ID = ' '
- * OWNER = ' '
- IMPORTING
- * OBJECT_FL_DISPLAY =
- * OBJECT_HD_DISPLAY =
- object_id = ls_document_id
- objcont = lt_attachment
- objhead = lt_attachment_head
- * OBJPARA =
- * OBJPARB =
- EXCEPTIONS
- active_user_not_exist = 1
- communication_failure = 2
- component_not_available = 3
- dl_name_exist = 4
- folder_not_exist = 5
- folder_no_authorization = 6
- object_type_not_exist = 7
- operation_no_authorization = 8
- owner_not_exist = 9
- parameter_error = 10
- substitute_not_active = 11
- substitute_not_defined = 12
- system_failure = 13
- x_error = 14
- OTHERS = 15.
- GeSHi ©
Im Anschluss noch ein
- Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
- CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
- EXPORTING
- obj_rolea = ls_rolea
- obj_roleb = ls_roleb
- relationtype = 'ATTA'
- * IMPORTING
- * binrel =
- * TABLES
- * binrel_attrib =
- EXCEPTIONS
- no_model = 1
- internal_error = 2
- unknown = 3
- OTHERS = 4.
- GeSHi ©
Getestet habe ich jetzt Bilder und Textdateien. Bilder lassen sich nicht öffnen und Textdateien beinhalten teilweise chinesische Zeichen.
Ich Finde nicht herraus woran es liegt.
Vielleicht hat jemadn noch Tipps.
cl_abap_char_utilities=>charsize bring 2 also Unicode.
Grüße und Danke