cancel
Showing results for 
Search instead for 
Did you mean: 

FM: SRM_DOCUMENT_CHECKIN_VIA_TAB not working propertly

tkuebler1
Explorer
0 Kudos

I am Trying to upload a xlsx file into our Records Management (Folder Management)

i am using the FM: SRM_DOCUMENT_CHECKIN_VIA_TAB

Files like pdf or xls are no problem.

i can upload the file, but if i open it in ORGRANIZER i get this error

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error115240_01.xml</logFileName><summary>Fehler in Datei 'C:\Users\yyyyyyAppData\Local\Temp\~SAP{8433BAC6-8357-4A78-AC0B-B5F24C55D2CB}.xlsx'</summary><additionalInfo><info>Excel hat die Überprüfung und Reparatur auf Dateiebene abgeschlossen. Einige Teile dieser Arbeitsmappe wurden repariert oder verworfen.</info></additionalInfo></recoveryLog>

the mime-type for xlsx = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet was used

cl_bcs_convert=>xstring_to_xtab(
EXPORTING
iv_xstring = i_obj_xstring " Eingabedaten
IMPORTING
et_xtab = lt_bin_new " Ausgabedaten
).
* CATCH cx_bcs. " BCS: Allgemeine Ausnahmen
* CATCH cx_bcs. " BCS: Allgemeine Ausnahmen
* lt_bin_new = cl_bcs_convert=>

*== Erzeuge Componente ==
* CONCATENATE i_doc_id '.pdf' INTO lf_comp_id.
ls_comp-comp_count = 1.
ls_comp-comp_id = i_doc_id. "lf_comp_id.
ls_comp-mimetype = lf_mimetype.
ls_comp-binary_flag = abap_true.
ls_comp-comp_num = 1.
ls_comp-comp_size = xstrlen( i_obj_xstring ). " Filesize Berechnung

APPEND ls_comp TO lt_comp.

CALL FUNCTION 'SRM_DOCUMENT_CHECKIN_VIA_TAB'
EXPORTING
objectid = e_doc_id
documentclass = e_bapidclass
* AS_NEW_VERSION =
* DO_COMMIT =
* DOC_CONTEXT =
vscan_profile = '/SRM/RCM_CREATE'
IMPORTING
* X_NEW_DOC_CREATED =
return = lf_return
TABLES
components = lt_comp
* ASCII_CONTENT =
bin_content = lt_bin_new
EXCEPTIONS
internal_error = 1
parameter_error = 2
not_authorized = 3
doc_not_found = 4
yet_locked = 5

Accepted Solutions (0)

Answers (0)