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

BAPI_DOCUMENT_GETDETAIL2 Get Document Info Record Details

Reads the data of a document info record and, depending on the GET… flags, also its descriptions, object links, originals, classification, long texts, structure and status log. It is used by reports and portals that display documents linked to materials or equipment and by programs that download originals. Set only the GET… flags you need to keep the call fast and check RETURN for errors.

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
GETOBJECTLINKSBAPI_DOC_AUX-FLAGRead object links—
GETDOCDESCRIPTIONSBAPI_DOC_AUX-FLAGRead descriptions—
GETDOCFILESBAPI_DOC_AUX-FLAGRead originals—
GETCLASSIFICATIONBAPI_DOC_AUX-FLAGRead classification—
GETLONGTEXTSBAPI_DOC_AUX-FLAGRead long texts—
GETSTATUSLOGBAPI_DOC_AUX-FLAGRead status log—
GETSTRUCTUREBAPI_DOC_AUX-FLAGRead document structure—
GETWHEREUSEDBAPI_DOC_AUX-FLAGRead where-used list—
GETACTIVEFILESBAPI_DOC_AUX-FLAGRead active originals—
HOSTNAMEBAPI_DOC_AUX-HOSTNAMEFront-end host name—

Exporting parameters

ParameterTypeDescription
DOCUMENTDATABAPI_DOC_DRAW2Document data
RETURNBAPIRET2Return message

Tables parameters

ParameterTypeDescriptionRequired
OBJECTLINKSBAPI_DOC_DRADObject links—
DOCUMENTDESCRIPTIONSBAPI_DOC_DRATDescriptions—
DOCUMENTFILESBAPI_DOC_FILES2Original files—
CLASSALLOCATIONSBAPI_CLASS_ALLOCATIONClass assignments—
CHARACTERISTICVALUESBAPI_CHARACTERISTIC_VALUESCharacteristic values—
LONGTEXTSBAPI_DOC_TEXTLong texts—
STATUSLOGBAPI_DOC_DRAPStatus log—
DOCUMENTSTRUCTUREBAPI_DOC_STRUCTUREDocument structure—
WHEREUSEDLISTBAPI_DOC_STRUCTUREWhere-used list—
COMPONENTSBAPI_DOC_COMPAdditional files—

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_GETDETAIL2'
  EXPORTING
    documenttype = lv_documenttype
    documentnumber = lv_documentnumber
    documentpart = lv_documentpart
    documentversion = lv_documentversion
  IMPORTING
    documentdata = lv_documentdata
    return = lv_return
  TABLES
    objectlinks = lt_objectlinks
    documentdescriptions = lt_documentdescriptions
    documentfiles = lt_documentfiles
    classallocations = lt_classallocations
    characteristicvalues = lt_characteristicvalues
    longtexts = lt_longtexts
    statuslog = lt_statuslog
    documentstructure = lt_documentstructure
    whereusedlist = lt_whereusedlist
    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