SAP FCO_EXCESS_COMP_DOCUMENT_WRITE Function Module for
FCO_EXCESS_COMP_DOCUMENT_WRITE is a standard fco excess comp document write SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fco excess comp document write FM, simply by entering the name FCO_EXCESS_COMP_DOCUMENT_WRITE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCO_DOCUMENT
Program Name: SAPLFCO_DOCUMENT
Main Program: SAPLFCO_DOCUMENT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FCO_EXCESS_COMP_DOCUMENT_WRITE 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 'FCO_EXCESS_COMP_DOCUMENT_WRITE'".
EXPORTING
I_BELNR = "
* I_NOTIF_NUMBER = "
* I_BUDAT = SY-DATLO "
* I_BLDAT = SY-DATLO "
* I_UNAME = SY-UNAME "
* I_GSBER = "
* I_PRCTR = "
I_ACC_OBJ = "
I_MAT_DOC = "
I_MATNR = "
I_WERKS = "
* I_VERID = "
* I_AUFNR = "
* I_MGRND = "
* I_RESPCC = "
TABLES
I_FCO_DOC_ITEM = "
EXCEPTIONS
INTERNAL_ERROR = 1 OVERFLOW = 2 INVALID_DOC_NUMBER = 3
IMPORTING Parameters details for FCO_EXCESS_COMP_DOCUMENT_WRITE
I_BELNR -
Data type: FCO_BELNROptional: No
Call by Reference: Yes
I_NOTIF_NUMBER -
Data type: QMNUMOptional: Yes
Call by Reference: Yes
I_BUDAT -
Data type: BUDATDefault: SY-DATLO
Optional: Yes
Call by Reference: Yes
I_BLDAT -
Data type: CO_BLDATDefault: SY-DATLO
Optional: Yes
Call by Reference: Yes
I_UNAME -
Data type: USNAMDefault: SY-UNAME
Optional: Yes
Call by Reference: Yes
I_GSBER -
Data type: GSBEROptional: Yes
Call by Reference: Yes
I_PRCTR -
Data type: PRCTROptional: Yes
Call by Reference: Yes
I_ACC_OBJ -
Data type: FCO_ACC_OBJOptional: No
Call by Reference: Yes
I_MAT_DOC -
Data type: MBLNROptional: No
Call by Reference: Yes
I_MATNR -
Data type: MATNROptional: No
Call by Reference: Yes
I_WERKS -
Data type: WERKS_DOptional: No
Call by Reference: Yes
I_VERID -
Data type: VERIDOptional: Yes
Call by Reference: Yes
I_AUFNR -
Data type: AUFNROptional: Yes
Call by Reference: Yes
I_MGRND -
Data type: FCO_EXCESS_REASONOptional: Yes
Call by Reference: Yes
I_RESPCC -
Data type: KOSTLOptional: Yes
Call by Reference: Yes
TABLES Parameters details for FCO_EXCESS_COMP_DOCUMENT_WRITE
I_FCO_DOC_ITEM -
Data type: FCO_DOC_ITEMOptional: No
Call by Reference: Yes
EXCEPTIONS details
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: Yes
OVERFLOW -
Data type:Optional: No
Call by Reference: Yes
INVALID_DOC_NUMBER -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FCO_EXCESS_COMP_DOCUMENT_WRITE 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_i_belnr | TYPE FCO_BELNR, " | |||
| lv_internal_error | TYPE FCO_BELNR, " | |||
| lt_i_fco_doc_item | TYPE STANDARD TABLE OF FCO_DOC_ITEM, " | |||
| lv_i_notif_number | TYPE QMNUM, " | |||
| lv_i_budat | TYPE BUDAT, " SY-DATLO | |||
| lv_i_bldat | TYPE CO_BLDAT, " SY-DATLO | |||
| lv_i_uname | TYPE USNAM, " SY-UNAME | |||
| lv_i_gsber | TYPE GSBER, " | |||
| lv_i_prctr | TYPE PRCTR, " | |||
| lv_overflow | TYPE PRCTR, " | |||
| lv_i_acc_obj | TYPE FCO_ACC_OBJ, " | |||
| lv_i_mat_doc | TYPE MBLNR, " | |||
| lv_invalid_doc_number | TYPE MBLNR, " | |||
| lv_i_matnr | TYPE MATNR, " | |||
| lv_i_werks | TYPE WERKS_D, " | |||
| lv_i_verid | TYPE VERID, " | |||
| lv_i_aufnr | TYPE AUFNR, " | |||
| lv_i_mgrnd | TYPE FCO_EXCESS_REASON, " | |||
| lv_i_respcc | TYPE KOSTL. " |
|   CALL FUNCTION 'FCO_EXCESS_COMP_DOCUMENT_WRITE' " |
| EXPORTING | ||
| I_BELNR | = lv_i_belnr | |
| I_NOTIF_NUMBER | = lv_i_notif_number | |
| I_BUDAT | = lv_i_budat | |
| I_BLDAT | = lv_i_bldat | |
| I_UNAME | = lv_i_uname | |
| I_GSBER | = lv_i_gsber | |
| I_PRCTR | = lv_i_prctr | |
| I_ACC_OBJ | = lv_i_acc_obj | |
| I_MAT_DOC | = lv_i_mat_doc | |
| I_MATNR | = lv_i_matnr | |
| I_WERKS | = lv_i_werks | |
| I_VERID | = lv_i_verid | |
| I_AUFNR | = lv_i_aufnr | |
| I_MGRND | = lv_i_mgrnd | |
| I_RESPCC | = lv_i_respcc | |
| TABLES | ||
| I_FCO_DOC_ITEM | = lt_i_fco_doc_item | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| OVERFLOW = 2 | ||
| INVALID_DOC_NUMBER = 3 | ||
| . " FCO_EXCESS_COMP_DOCUMENT_WRITE | ||
ABAP code using 7.40 inline data declarations to call FM FCO_EXCESS_COMP_DOCUMENT_WRITE
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.| DATA(ld_i_budat) | = SY-DATLO. | |||
| DATA(ld_i_bldat) | = SY-DATLO. | |||
| DATA(ld_i_uname) | = SY-UNAME. | |||
Search for further information about these or an SAP related objects