CA BAPI RFC Used the same way in S/4HANA

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

ParameterTypeDescriptionRequired
DOCUMENTTYPEBAPI_DOC_AUX-DOCTYPEDocument typeYes
DOCUMENTNUMBERBAPI_DOC_AUX-DOCNUMBERDocument numberYes
DOCUMENTPARTBAPI_DOC_AUX-DOCPARTDocument partYes
DOCUMENTVERSIONBAPI_DOC_AUX-DOCVERSIONDocument versionYes
DOCUMENTDATABAPI_DOC_DRAW2Document dataYes
DOCUMENTDATAXBAPI_DOC_DRAWX2Change flags for document dataYes
HOSTNAMEBAPI_DOC_AUX-HOSTNAMEFront-end host name—
DOCBOMCHANGENUMBERBAPI_DOC_DRAW2-ECNUMBERChange number for document structure—
DOCBOMVALIDFROMBAPI_DOC_DRAW2-VALIDFROMDATEValid-from date of document structure—
DOCBOMREVISIONLEVELBAPI_DOC_DRAW2-REVLEVELRevision level—
SENDCOMPLETEBOMBAPI_DOC_AUX-FLAGComplete document structure is sent—
ACCEPT_EMPTY_BOMBAPI_DOC_AUX-FLAGAccept empty document structure—
CAD_MODECSDATA-XFELDCAD indicator for document structure—
PF_FTP_DESTRFCDES-RFCDESTFTP destination for file transfer—
PF_HTTP_DESTRFCDES-RFCDESTHTTP destination for file transfer—

Exporting parameters

ParameterTypeDescription
RETURNBAPIRET2Return message

Tables parameters

ParameterTypeDescriptionRequired
CHARACTERISTICVALUESBAPI_CHARACTERISTIC_VALUESCharacteristic values—
CLASSALLOCATIONSBAPI_CLASS_ALLOCATIONClass assignments—
DOCUMENTDESCRIPTIONSBAPI_DOC_DRATDescriptions—
OBJECTLINKSBAPI_DOC_DRADObject links—
DOCUMENTSTRUCTUREBAPI_DOC_STRUCTUREDocument structure—
DOCUMENTFILESBAPI_DOC_FILES2Original files—
LONGTEXTSBAPI_DOC_TEXTLong texts—
COMPONENTSBAPI_DOC_COMPAdditional 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.

Request a custom report