SAP BAPI_DFS_CMN_DOCUMENT_SYNC Function Module for BAPI Wrapper for Attachment
BAPI_DFS_CMN_DOCUMENT_SYNC is a standard bapi dfs cmn document sync SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI Wrapper for Attachment processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for bapi dfs cmn document sync FM, simply by entering the name BAPI_DFS_CMN_DOCUMENT_SYNC into the relevant SAP transaction such as SE37 or SE38.
Function Group: BAPI_DFS_COMMON
Program Name: SAPLBAPI_DFS_COMMON
Main Program: SAPLBAPI_DFS_COMMON
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_DFS_CMN_DOCUMENT_SYNC pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'BAPI_DFS_CMN_DOCUMENT_SYNC'"BAPI Wrapper for Attachment.
EXPORTING
* IS_BAPI_INPUT = "Syclo BAPI Wrapper Standard Input Setting
* IV_OBJECT_TYPE = "Sync framework - Internal Object Type
* IV_OBJECT_KEY = "Sync Framework - Object Key
* IV_OBJKY = "Document Management Object Key
* IS_DOCUMENTDATA = "BAPIS DMS: Document Data
* IS_EXTERNAL_OBJECT_INFO = "Sync Framework - External sync object info
* IV_MASS = "Boolean Variables (X=true, space=false)
* IV_SUBS_ID = "Subscription ID
* IS_CONTROL_STRUCTURE = "BAPI Wrapper Control Parameters
IMPORTING
ES_BAPI_OUTPUT = "Syclo BAPI Wrapper Standard Output Structure
TABLES
* ET_RETURN = "Return Parameter
* IT_LONGTEXTS = "BAPIS DMS: long text data for a document
* IT_DMS_DOCUMENT = "DMS Document Info (Table)
* IT_DMS_CONTENT = "DMS Document Content (Table)
* IT_GOS_DOCUMENT = "Table type for GOS Document
* IT_SIGNATURE = "Syclo: Table type for BAPISIGNAT
* IT_COMPONENT = "Syclo: Table type for BAPICOMPON
* IT_CONNECTIONS = "Table Type for BAPICONNEC
* IT_OBJECTS_LIST = "Table Type For Object List
* IT_DRAD = "Document-Object Link
* IT_DOCUMENTDATA = "BAPIS DMS: Document Data
* ET_TRANSACTION_REQ_STATUS = "Table type for /SMFND/IBQ_TRANS_REQ_STA_STR
* IT_TRANSACTION_REQ_INFO = "Table type for /SMFND/IBQ_TRANS_REQ_INFO_STR
* IT_TRANSACTION_REQ_DEPENDENCY = "Table type for /SMFND/IBQ_TRNREQ_DEP_INFO_STR
* ET_SUBQ_TRANSACTION_REQ_INFO = "Table type for /SMFND/CORE_DEP_SYNC_INFO_STR
* IT_DOCUMENTDESCRIPTIONS = "BAPIS DMS: short texts
* IT_DOCUMENTSTRUCTURE = "BAPIs DMS: Structure Data for a Document
* IT_OBJECTLINKS = "BAPIS DMS: document object links
* IT_DOCUMENTFILES = "BAPIS DMS: Document Originals
IMPORTING Parameters details for BAPI_DFS_CMN_DOCUMENT_SYNC
IS_BAPI_INPUT - Syclo BAPI Wrapper Standard Input Setting
Data type: /SYCLO/CORE_BAPI_INPUT_STROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_OBJECT_TYPE - Sync framework - Internal Object Type
Data type: /SMFND/SYNC_OBJECT_TYPE_DTEOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_OBJECT_KEY - Sync Framework - Object Key
Data type: /SMFND/SYNC_OBJECT_KEY_DTEOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_OBJKY - Document Management Object Key
Data type: OBJKYOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_DOCUMENTDATA - BAPIS DMS: Document Data
Data type: BAPI_DOC_DRAW2Optional: Yes
Call by Reference: No ( called with pass by value option)
IS_EXTERNAL_OBJECT_INFO - Sync Framework - External sync object info
Data type: /SMFND/CORE_EXT_SYNC_INFO_STROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MASS - Boolean Variables (X=true, space=false)
Data type: BOOLEAN_FLGOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SUBS_ID - Subscription ID
Data type: DFS_SUBS_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_CONTROL_STRUCTURE - BAPI Wrapper Control Parameters
Data type: DFS_CORE_BAPI_CTRL_PARAM_SOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_DFS_CMN_DOCUMENT_SYNC
ES_BAPI_OUTPUT - Syclo BAPI Wrapper Standard Output Structure
Data type: /SYCLO/CORE_BAPI_OUTPUT_STROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_DFS_CMN_DOCUMENT_SYNC
ET_RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
IT_LONGTEXTS - BAPIS DMS: long text data for a document
Data type: BAPI_DOC_TEXTOptional: Yes
Call by Reference: Yes
IT_DMS_DOCUMENT - DMS Document Info (Table)
Data type: /SMERP/CORE_DMS_INFO_TABOptional: Yes
Call by Reference: Yes
IT_DMS_CONTENT - DMS Document Content (Table)
Data type: /SMERP/CORE_DMS_CONTENT_TABOptional: Yes
Call by Reference: Yes
IT_GOS_DOCUMENT - Table type for GOS Document
Data type: DFS_COMMON_GOS_DOCUMENT_TTOptional: Yes
Call by Reference: Yes
IT_SIGNATURE - Syclo: Table type for BAPISIGNAT
Data type: /SYCLO/CS_BAPISIGNAT_TABOptional: Yes
Call by Reference: Yes
IT_COMPONENT - Syclo: Table type for BAPICOMPON
Data type: /SYCLO/CS_BAPICOMPON_TABOptional: Yes
Call by Reference: Yes
IT_CONNECTIONS - Table Type for BAPICONNEC
Data type: /SYCLO/CS_BAPICONNEC_TABOptional: Yes
Call by Reference: Yes
IT_OBJECTS_LIST - Table Type For Object List
Data type: DFS_OBJECT_LIST_TTOptional: Yes
Call by Reference: Yes
IT_DRAD - Document-Object Link
Data type: DRADOptional: Yes
Call by Reference: Yes
IT_DOCUMENTDATA - BAPIS DMS: Document Data
Data type: BAPI_DOC_DRAW2Optional: Yes
Call by Reference: Yes
ET_TRANSACTION_REQ_STATUS - Table type for /SMFND/IBQ_TRANS_REQ_STA_STR
Data type: /SMFND/IBQ_TRANS_REQ_STA_TABOptional: Yes
Call by Reference: Yes
IT_TRANSACTION_REQ_INFO - Table type for /SMFND/IBQ_TRANS_REQ_INFO_STR
Data type: /SMFND/IBQ_TRANS_REQ_INFO_TABOptional: Yes
Call by Reference: Yes
IT_TRANSACTION_REQ_DEPENDENCY - Table type for /SMFND/IBQ_TRNREQ_DEP_INFO_STR
Data type: /SMFND/IBQ_TRNREQ_DEP_INFO_TABOptional: Yes
Call by Reference: Yes
ET_SUBQ_TRANSACTION_REQ_INFO - Table type for /SMFND/CORE_DEP_SYNC_INFO_STR
Data type: /SMFND/CORE_DEP_SYNC_INFO_TABOptional: Yes
Call by Reference: Yes
IT_DOCUMENTDESCRIPTIONS - BAPIS DMS: short texts
Data type: BAPI_DOC_DRATOptional: Yes
Call by Reference: Yes
IT_DOCUMENTSTRUCTURE - BAPIs DMS: Structure Data for a Document
Data type: BAPI_DOC_STRUCTUREOptional: Yes
Call by Reference: Yes
IT_OBJECTLINKS - BAPIS DMS: document object links
Data type: BAPI_DOC_DRADOptional: Yes
Call by Reference: Yes
IT_DOCUMENTFILES - BAPIS DMS: Document Originals
Data type: BAPI_DOC_FILES2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_DFS_CMN_DOCUMENT_SYNC Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lt_et_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_is_bapi_input | TYPE /SYCLO/CORE_BAPI_INPUT_STR, " | |||
| lv_es_bapi_output | TYPE /SYCLO/CORE_BAPI_OUTPUT_STR, " | |||
| lt_it_longtexts | TYPE STANDARD TABLE OF BAPI_DOC_TEXT, " | |||
| lt_it_dms_document | TYPE STANDARD TABLE OF /SMERP/CORE_DMS_INFO_TAB, " | |||
| lt_it_dms_content | TYPE STANDARD TABLE OF /SMERP/CORE_DMS_CONTENT_TAB, " | |||
| lt_it_gos_document | TYPE STANDARD TABLE OF DFS_COMMON_GOS_DOCUMENT_TT, " | |||
| lt_it_signature | TYPE STANDARD TABLE OF /SYCLO/CS_BAPISIGNAT_TAB, " | |||
| lt_it_component | TYPE STANDARD TABLE OF /SYCLO/CS_BAPICOMPON_TAB, " | |||
| lt_it_connections | TYPE STANDARD TABLE OF /SYCLO/CS_BAPICONNEC_TAB, " | |||
| lt_it_objects_list | TYPE STANDARD TABLE OF DFS_OBJECT_LIST_TT, " | |||
| lt_it_drad | TYPE STANDARD TABLE OF DRAD, " | |||
| lt_it_documentdata | TYPE STANDARD TABLE OF BAPI_DOC_DRAW2, " | |||
| lv_iv_object_type | TYPE /SMFND/SYNC_OBJECT_TYPE_DTE, " | |||
| lt_et_transaction_req_status | TYPE STANDARD TABLE OF /SMFND/IBQ_TRANS_REQ_STA_TAB, " | |||
| lv_iv_object_key | TYPE /SMFND/SYNC_OBJECT_KEY_DTE, " | |||
| lt_it_transaction_req_info | TYPE STANDARD TABLE OF /SMFND/IBQ_TRANS_REQ_INFO_TAB, " | |||
| lv_iv_objky | TYPE OBJKY, " | |||
| lt_it_transaction_req_dependency | TYPE STANDARD TABLE OF /SMFND/IBQ_TRNREQ_DEP_INFO_TAB, " | |||
| lv_is_documentdata | TYPE BAPI_DOC_DRAW2, " | |||
| lt_et_subq_transaction_req_info | TYPE STANDARD TABLE OF /SMFND/CORE_DEP_SYNC_INFO_TAB, " | |||
| lv_is_external_object_info | TYPE /SMFND/CORE_EXT_SYNC_INFO_STR, " | |||
| lt_it_documentdescriptions | TYPE STANDARD TABLE OF BAPI_DOC_DRAT, " | |||
| lv_iv_mass | TYPE BOOLEAN_FLG, " | |||
| lt_it_documentstructure | TYPE STANDARD TABLE OF BAPI_DOC_STRUCTURE, " | |||
| lv_iv_subs_id | TYPE DFS_SUBS_ID, " | |||
| lt_it_objectlinks | TYPE STANDARD TABLE OF BAPI_DOC_DRAD, " | |||
| lt_it_documentfiles | TYPE STANDARD TABLE OF BAPI_DOC_FILES2, " | |||
| lv_is_control_structure | TYPE DFS_CORE_BAPI_CTRL_PARAM_S. " |
|   CALL FUNCTION 'BAPI_DFS_CMN_DOCUMENT_SYNC' "BAPI Wrapper for Attachment |
| EXPORTING | ||
| IS_BAPI_INPUT | = lv_is_bapi_input | |
| IV_OBJECT_TYPE | = lv_iv_object_type | |
| IV_OBJECT_KEY | = lv_iv_object_key | |
| IV_OBJKY | = lv_iv_objky | |
| IS_DOCUMENTDATA | = lv_is_documentdata | |
| IS_EXTERNAL_OBJECT_INFO | = lv_is_external_object_info | |
| IV_MASS | = lv_iv_mass | |
| IV_SUBS_ID | = lv_iv_subs_id | |
| IS_CONTROL_STRUCTURE | = lv_is_control_structure | |
| IMPORTING | ||
| ES_BAPI_OUTPUT | = lv_es_bapi_output | |
| TABLES | ||
| ET_RETURN | = lt_et_return | |
| IT_LONGTEXTS | = lt_it_longtexts | |
| IT_DMS_DOCUMENT | = lt_it_dms_document | |
| IT_DMS_CONTENT | = lt_it_dms_content | |
| IT_GOS_DOCUMENT | = lt_it_gos_document | |
| IT_SIGNATURE | = lt_it_signature | |
| IT_COMPONENT | = lt_it_component | |
| IT_CONNECTIONS | = lt_it_connections | |
| IT_OBJECTS_LIST | = lt_it_objects_list | |
| IT_DRAD | = lt_it_drad | |
| IT_DOCUMENTDATA | = lt_it_documentdata | |
| ET_TRANSACTION_REQ_STATUS | = lt_et_transaction_req_status | |
| IT_TRANSACTION_REQ_INFO | = lt_it_transaction_req_info | |
| IT_TRANSACTION_REQ_DEPENDENCY | = lt_it_transaction_req_dependency | |
| ET_SUBQ_TRANSACTION_REQ_INFO | = lt_et_subq_transaction_req_info | |
| IT_DOCUMENTDESCRIPTIONS | = lt_it_documentdescriptions | |
| IT_DOCUMENTSTRUCTURE | = lt_it_documentstructure | |
| IT_OBJECTLINKS | = lt_it_objectlinks | |
| IT_DOCUMENTFILES | = lt_it_documentfiles | |
| . " BAPI_DFS_CMN_DOCUMENT_SYNC | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_DFS_CMN_DOCUMENT_SYNC
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects