BAPI_DOCUMENT_CHANGE2 Change Document Info Record
Changes an existing document info record, for example its status, descriptions, object links, classification or originals, like transaction CV02N. It is used in interfaces that update document status from an approval workflow or add links to new objects. Mark changed header fields in DOCUMENTDATAX; for the tables, check the DELETEVALUE/UPDATE flags of their structures to control whether entries are added or removed, then check RETURN and call BAPI_TRANSACTION_COMMIT.
- Function group
- CVBAPI
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| DOCUMENTTYPE | BAPI_DOC_AUX-DOCTYPE | Document type | Yes |
| DOCUMENTNUMBER | BAPI_DOC_AUX-DOCNUMBER | Document number | Yes |
| DOCUMENTPART | BAPI_DOC_AUX-DOCPART | Document part | Yes |
| DOCUMENTVERSION | BAPI_DOC_AUX-DOCVERSION | Document version | Yes |
| DOCUMENTDATA | BAPI_DOC_DRAW2 | Document data | Yes |
| DOCUMENTDATAX | BAPI_DOC_DRAWX2 | Change flags for document data | Yes |
| HOSTNAME | BAPI_DOC_AUX-HOSTNAME | Front-end host name | — |
| DOCBOMCHANGENUMBER | BAPI_DOC_DRAW2-ECNUMBER | Change number for document structure | — |
| DOCBOMVALIDFROM | BAPI_DOC_DRAW2-VALIDFROMDATE | Valid-from date of document structure | — |
| DOCBOMREVISIONLEVEL | BAPI_DOC_DRAW2-REVLEVEL | Revision level | — |
| SENDCOMPLETEBOM | BAPI_DOC_AUX-FLAG | Complete document structure is sent | — |
| ACCEPT_EMPTY_BOM | BAPI_DOC_AUX-FLAG | Accept empty document structure | — |
| CAD_MODE | CSDATA-XFELD | CAD indicator for document structure | — |
| PF_FTP_DEST | RFCDES-RFCDEST | FTP destination for file transfer | — |
| PF_HTTP_DEST | RFCDES-RFCDEST | HTTP destination for file transfer | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRET2 | Return message |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| CHARACTERISTICVALUES | BAPI_CHARACTERISTIC_VALUES | Characteristic values | — |
| CLASSALLOCATIONS | BAPI_CLASS_ALLOCATION | Class assignments | — |
| DOCUMENTDESCRIPTIONS | BAPI_DOC_DRAT | Descriptions | — |
| OBJECTLINKS | BAPI_DOC_DRAD | Object links | — |
| DOCUMENTSTRUCTURE | BAPI_DOC_STRUCTURE | Document structure | — |
| DOCUMENTFILES | BAPI_DOC_FILES2 | Original files | — |
| LONGTEXTS | BAPI_DOC_TEXT | Long texts | — |
| COMPONENTS | BAPI_DOC_COMP | Additional files for originals | — |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
EXPORTING
documenttype = lv_documenttype
documentnumber = lv_documentnumber
documentpart = lv_documentpart
documentversion = lv_documentversion
documentdata = lv_documentdata
documentdatax = lv_documentdatax
IMPORTING
return = lv_return
TABLES
characteristicvalues = lt_characteristicvalues
classallocations = lt_classallocations
documentdescriptions = lt_documentdescriptions
objectlinks = lt_objectlinks
documentstructure = lt_documentstructure
documentfiles = lt_documentfiles
longtexts = lt_longtexts
components = lt_components.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.