SAP FC_DOCUMENT_POST Function Module for
FC_DOCUMENT_POST is a standard fc document post 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 fc document post FM, simply by entering the name FC_DOCUMENT_POST into the relevant SAP transaction such as SE37 or SE38.
Function Group: FC05
Program Name: SAPLFC05
Main Program: SAPLFC05
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FC_DOCUMENT_POST 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 'FC_DOCUMENT_POST'".
EXPORTING
E_RLDNR = "
E_DIMEN = "
E_ITCLG = "
E_PERID = "
E_RVERS = "
E_RYEAR = "
TABLES
IT_HEADER = "
IT_POSTAB = "
IT_MSGTAB = "
* IT_DOCNR = "
IMPORTING Parameters details for FC_DOCUMENT_POST
E_RLDNR -
Data type: ECMCA-RLDNROptional: No
Call by Reference: No ( called with pass by value option)
E_DIMEN -
Data type: ECMCA-RDIMENOptional: No
Call by Reference: No ( called with pass by value option)
E_ITCLG -
Data type: ECMCA-RITCLGOptional: No
Call by Reference: No ( called with pass by value option)
E_PERID -
Data type: ECMCA-POPEROptional: No
Call by Reference: No ( called with pass by value option)
E_RVERS -
Data type: ECMCA-RVERSOptional: No
Call by Reference: No ( called with pass by value option)
E_RYEAR -
Data type: ECMCA-RYEAROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FC_DOCUMENT_POST
IT_HEADER -
Data type: FC05_T_DOC_HEADOptional: No
Call by Reference: No ( called with pass by value option)
IT_POSTAB -
Data type: FC05PTABOptional: No
Call by Reference: No ( called with pass by value option)
IT_MSGTAB -
Data type: FC05_T_MESSAGEOptional: No
Call by Reference: No ( called with pass by value option)
IT_DOCNR -
Data type: FC05_T_DOCNROptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FC_DOCUMENT_POST 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_e_rldnr | TYPE ECMCA-RLDNR, " | |||
| lt_it_header | TYPE STANDARD TABLE OF FC05_T_DOC_HEAD, " | |||
| lv_e_dimen | TYPE ECMCA-RDIMEN, " | |||
| lt_it_postab | TYPE STANDARD TABLE OF FC05PTAB, " | |||
| lv_e_itclg | TYPE ECMCA-RITCLG, " | |||
| lt_it_msgtab | TYPE STANDARD TABLE OF FC05_T_MESSAGE, " | |||
| lv_e_perid | TYPE ECMCA-POPER, " | |||
| lt_it_docnr | TYPE STANDARD TABLE OF FC05_T_DOCNR, " | |||
| lv_e_rvers | TYPE ECMCA-RVERS, " | |||
| lv_e_ryear | TYPE ECMCA-RYEAR. " |
|   CALL FUNCTION 'FC_DOCUMENT_POST' " |
| EXPORTING | ||
| E_RLDNR | = lv_e_rldnr | |
| E_DIMEN | = lv_e_dimen | |
| E_ITCLG | = lv_e_itclg | |
| E_PERID | = lv_e_perid | |
| E_RVERS | = lv_e_rvers | |
| E_RYEAR | = lv_e_ryear | |
| TABLES | ||
| IT_HEADER | = lt_it_header | |
| IT_POSTAB | = lt_it_postab | |
| IT_MSGTAB | = lt_it_msgtab | |
| IT_DOCNR | = lt_it_docnr | |
| . " FC_DOCUMENT_POST | ||
ABAP code using 7.40 inline data declarations to call FM FC_DOCUMENT_POST
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 RLDNR FROM ECMCA INTO @DATA(ld_e_rldnr). | ||||
| "SELECT single RDIMEN FROM ECMCA INTO @DATA(ld_e_dimen). | ||||
| "SELECT single RITCLG FROM ECMCA INTO @DATA(ld_e_itclg). | ||||
| "SELECT single POPER FROM ECMCA INTO @DATA(ld_e_perid). | ||||
| "SELECT single RVERS FROM ECMCA INTO @DATA(ld_e_rvers). | ||||
| "SELECT single RYEAR FROM ECMCA INTO @DATA(ld_e_ryear). | ||||
Search for further information about these or an SAP related objects