Ansicht
Dokumentation
BAPI_SRM_DOC_CHECKIN_CONT_TAB - SRM BAPI: Set Document Content in Tables with Length 255
rdisp/max_wprun_time - Maximum work process run time ABAP Short ReferenceThis documentation is copyright by SAP AG.
Functionality
Transfers the content of a document to the Records Management back end by specifying internal tables. The document content is sent in tables with a row length of 255.
Note:
- If the document contains more than one file, then the content of all components can be transported in text format or binary format only. A new component must always start with a new row in the table ASCII_CONTENT or BIN_CONTENT. A parameter error exception is raised if both ASCII_CONTENT and BIN_CONTENT are filled when a function is called.
- The file size must be specified. It is specified with the field COMP_SIZE of the structure BAPIDOCCOMP. The file size is always given in bytes.
Example
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
* Specifies in which order a component appears in the content table
* The field comp_count is not saved persistently in the backend repository.
wa_comp-comp_count = 1.
wa_comp-comp_id = 'my.txt'.
wa_comp-mimetype = 'text/plain'. " Always lowercase
wa_comp-comp_size = filelen. "File size in bytes
wa_comp-binary_flag = ''.
* Numbering of a component in the document, saved persistently in the backend repository
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' " Create new logical version
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 lowercase
wa_comp-comp_size = filelen. "File sizes 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' " Create new logical version
do_commit = 'X'
* IMPORTING
* return = return
TABLES
components = lt_comp
bin_content = lt_bin
.
Notes
Further information
Parameters
ASCII_CONTENTAS_NEW_VERSION
BIN_CONTENT
COMPONENTS
DOCUMENTCLASS
DOC_CONTEXT
DO_COMMIT
OBJECTID
RETURN
VSCAN_PROFILE
X_NEW_DOC_CREATED
Exceptions
Function Group
SRM_BAPI_DOCUMENTBAL Application Log Documentation TXBHW - Original Tax Base Amount in Local Currency
This documentation is copyright by SAP AG.
Length: 4701 Date: 20240523 Time: 160552 sap01-206 ( 50 ms )