SAP GHO_FDC_CD_SAVE_DOCUMENT Function Module for FDC: Change Document Save
GHO_FDC_CD_SAVE_DOCUMENT is a standard gho fdc cd save document SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for FDC: Change Document Save 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 gho fdc cd save document FM, simply by entering the name GHO_FDC_CD_SAVE_DOCUMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: GHO_FDC_AUDIT_FG
Program Name: SAPLGHO_FDC_AUDIT_FG
Main Program: SAPLGHO_FDC_AUDIT_FG
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GHO_FDC_CD_SAVE_DOCUMENT 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 'GHO_FDC_CD_SAVE_DOCUMENT'"FDC: Change Document Save.
EXPORTING
IV_OBJECT_ID = "Object value
IMPORTING
EV_CDOC_NUMBER = "Document change number
EV_FAILED = "
TABLES
IT_AUDIT_SAVE = "Change documents: Text changes
IT_NEW_VALUE = "Change Document Structure: New Value
IT_OLD_VALUE = "Change Document Structure: Old Value
IMPORTING Parameters details for GHO_FDC_CD_SAVE_DOCUMENT
IV_OBJECT_ID - Object value
Data type: CDHDR-OBJECTIDOptional: No
Call by Reference: Yes
EXPORTING Parameters details for GHO_FDC_CD_SAVE_DOCUMENT
EV_CDOC_NUMBER - Document change number
Data type: CDHDR-CHANGENROptional: No
Call by Reference: Yes
EV_FAILED -
Data type: ABAP_BOOLOptional: No
Call by Reference: Yes
TABLES Parameters details for GHO_FDC_CD_SAVE_DOCUMENT
IT_AUDIT_SAVE - Change documents: Text changes
Data type: CDTXTOptional: No
Call by Reference: Yes
IT_NEW_VALUE - Change Document Structure: New Value
Data type: TABLEOptional: No
Call by Reference: Yes
IT_OLD_VALUE - Change Document Structure: Old Value
Data type: TABLEOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for GHO_FDC_CD_SAVE_DOCUMENT 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: | ||||
| lv_iv_object_id | TYPE CDHDR-OBJECTID, " | |||
| lt_it_audit_save | TYPE STANDARD TABLE OF CDTXT, " | |||
| lv_ev_cdoc_number | TYPE CDHDR-CHANGENR, " | |||
| lv_ev_failed | TYPE ABAP_BOOL, " | |||
| lt_it_new_value | TYPE STANDARD TABLE OF TABLE, " | |||
| lt_it_old_value | TYPE STANDARD TABLE OF TABLE. " |
|   CALL FUNCTION 'GHO_FDC_CD_SAVE_DOCUMENT' "FDC: Change Document Save |
| EXPORTING | ||
| IV_OBJECT_ID | = lv_iv_object_id | |
| IMPORTING | ||
| EV_CDOC_NUMBER | = lv_ev_cdoc_number | |
| EV_FAILED | = lv_ev_failed | |
| TABLES | ||
| IT_AUDIT_SAVE | = lt_it_audit_save | |
| IT_NEW_VALUE | = lt_it_new_value | |
| IT_OLD_VALUE | = lt_it_old_value | |
| . " GHO_FDC_CD_SAVE_DOCUMENT | ||
ABAP code using 7.40 inline data declarations to call FM GHO_FDC_CD_SAVE_DOCUMENT
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.| "SELECT single OBJECTID FROM CDHDR INTO @DATA(ld_iv_object_id). | ||||
| "SELECT single CHANGENR FROM CDHDR INTO @DATA(ld_ev_cdoc_number). | ||||
Search for further information about these or an SAP related objects