Ansicht
Dokumentation
BAPI_SRM_DOC_CHECKIN_CONT_TAB - SRM BAPI: Dokumentinhaltes via Übergabe von Tabellen d. Länge 255 setzen
BAL Application Log Documentation Vendor Master (General Section)Diese Dokumentation steht unter dem Copyright der SAP AG.
Funktionalität
Transfer des Dokumentinhaltes zum Records Management Backend via Übergabe von internen Tabellen . Der Dokumentinhalt wird über Tabelle der Zeilenlänge 255 übergeben.
Hinweis:
- Falls das Dokument mehr als eine Datei enthält, darf der Inhalt aller Bestandkomponenten ausschließlich im Textformat bzw. im binären Format transportiert werden. Eine neue Komponente muss immer mit einer neuen Zeilen in der Tabelle ASCII_CONTENT bzw. BIN_CONTENT beginnen. Die Ausnahme Parameterfehler wird ausgeworfen, falls sowohl die Tabelle ASCII_CONTENT als BIN_CONTENT bei einem Funktionsaufruf ausgefüllt wird.
- Die Angabe der Dateigröße mit dem Feld COMP_SIZE der Struktur BAPIDOCCOMP ist obligatorisch. Die Dateigröße wird immer in Bytes gegeben.
Beispiel
DATA:
objectid TYPE bapisrmdoc-guid,
documentclass TYPE bapisrmdoc-docclass,
wa_comp TYPE bapidoccomp,
lt_comp TYPE TABLE OF bapidoccomp,
wa_bin TYPE bapicontent255,
it_bin TYPE TABLE OF bapicontent255,
wa_ascii TYPE bapiascont255,
lt_ascii TYPE TABLE of bapiascont255.
...
* ASCII content
* gibt an, in welcher Reihenfolge eine Bestandkomponente in der Inhalt-Tabelle erscheint
* Das Feld comp_count wird nicht persistent im Backend-Repository gespeichert.
wa_comp-comp_count = 1.
wa_comp-comp_id = 'my.txt'.
wa_comp-mimetype = 'text/plain'. " immer in Kleinbuchstaben
wa_comp-comp_size = filelen. "Dateigröße in Bytes
wa_comp-binary_flag = ''.
* Nummerierung einer Bestandkomponente im Dokument, wird persistent im Backend-Repository gespeichert.
wa_comp-com_num = 1.
append wa_comp to lt_comp.
wa_ascii-line = 'This is my first text'.
append wa_ascii to lt_ascii.
CALL FUNCTION 'BAPI_SRM_DOC_CHECKIN_VIA_TAB'
EXPORTING
objectid = objectid
documentclass = documentclass
as_new_version = 'X' " neue logische Version anlegen
do_commit = 'X'
* IMPORTING
* return = return
TABLES
components = lt_comp
ascii_content = lt_ascii
.
* Binary content
wa_comp-comp_count = 1.
wa_comp-comp_id = 'my_ms.doc'.
wa_comp-mimetype = 'application/msword'. " must be lower case
wa_comp-comp_size = filelen. "Dateigröße in Bytes
wa_comp-binary_flag = 'X'.
wa_comp-com_num = 1.
APPEND wa_comp TO lt_comp.
wa_bin-line = bin_line.
APPEND wa_bin TO lt_bin.
CALL FUNCTION 'BAPI_SRM_DOC_CHECKIN_VIA_TAB'
EXPORTING
objectid = objectid
documentclass = documentclass
as_new_version = 'X' " neue logische Version anlegen
do_commit = 'X'
* IMPORTING
* return = return
TABLES
components = lt_comp
bin_content = lt_bin
.
Hinweise
Weiterführende Informationen
Parameter
ASCII_CONTENTAS_NEW_VERSION
BIN_CONTENT
COMPONENTS
DOCUMENTCLASS
DOC_CONTEXT
DO_COMMIT
OBJECTID
RETURN
VSCAN_PROFILE
X_NEW_DOC_CREATED
Ausnahmen
Funktionsgruppe
SRM_BAPI_DOCUMENTrdisp/max_wprun_time - Maximum work process run time BAL_S_LOG - Application Log: Log header data
Diese Dokumentation steht unter dem Copyright der SAP AG.
Length: 4966 Date: 20240523 Time: 175842 sap01-206 ( 53 ms )