SAP FMCA_DOC_CREATE_AND_CLEAR Function Module for









FMCA_DOC_CREATE_AND_CLEAR is a standard fmca doc create and clear 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 fmca doc create and clear FM, simply by entering the name FMCA_DOC_CREATE_AND_CLEAR into the relevant SAP transaction such as SE37 or SE38.

Function Group: FMCA_DOC_FI
Program Name: SAPLFMCA_DOC_FI
Main Program: SAPLFMCA_DOC_FI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function FMCA_DOC_CREATE_AND_CLEAR 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 'FMCA_DOC_CREATE_AND_CLEAR'"
EXPORTING
I_DOCUMENTHEADER = "FI Document Header (BKPF)
I_SUBLEDGERDATA = "FI Subsidiary Ledger (FI-AP-AR) (BSEG)
I_RECONCILIATIONKEY = "Reconciliation Key for General Ledger
I_BKPF_PSOFN = "Reference
I_BKPF_AWKEY = "Reference Key
I_RESOB = "Object Category for Which the Reconciliation Key is Reserved
I_RESKY = "Object Category for Which the Reconciliation Key is Reserved

IMPORTING
E_DOCUMENTNUMBER = "Number of a Contract Accounts Receivable and Payable Document
E_RETURN = "Return Parameter(s)

TABLES
T_DOCUMENTPOSITIONS = "
T_TAXPOSITIONS = "FI Tax Data (BSET)
* T_CPDPOSITIONS = "FI Line Item (BSEC) One-Time Data
* T_RETURN = "Return Parameter(s)
.



IMPORTING Parameters details for FMCA_DOC_CREATE_AND_CLEAR

I_DOCUMENTHEADER - FI Document Header (BKPF)

Data type: IFME1FIKPF
Optional: No
Call by Reference: No ( called with pass by value option)

I_SUBLEDGERDATA - FI Subsidiary Ledger (FI-AP-AR) (BSEG)

Data type: IFME1FINBU
Optional: No
Call by Reference: No ( called with pass by value option)

I_RECONCILIATIONKEY - Reconciliation Key for General Ledger

Data type: CHAR12
Optional: No
Call by Reference: No ( called with pass by value option)

I_BKPF_PSOFN - Reference

Data type: CHAR30
Optional: No
Call by Reference: No ( called with pass by value option)

I_BKPF_AWKEY - Reference Key

Data type: CHAR20
Optional: No
Call by Reference: No ( called with pass by value option)

I_RESOB - Object Category for Which the Reconciliation Key is Reserved

Data type: DFKKSUMC-RESOB
Optional: No
Call by Reference: No ( called with pass by value option)

I_RESKY - Object Category for Which the Reconciliation Key is Reserved

Data type: DFKKSUMC-RESKY
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for FMCA_DOC_CREATE_AND_CLEAR

E_DOCUMENTNUMBER - Number of a Contract Accounts Receivable and Payable Document

Data type: CHAR12
Optional: No
Call by Reference: No ( called with pass by value option)

E_RETURN - Return Parameter(s)

Data type: BAPIRET2
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for FMCA_DOC_CREATE_AND_CLEAR

T_DOCUMENTPOSITIONS -

Data type: IFME1FISEG
Optional: No
Call by Reference: Yes

T_TAXPOSITIONS - FI Tax Data (BSET)

Data type: IFME1FISET
Optional: No
Call by Reference: Yes

T_CPDPOSITIONS - FI Line Item (BSEC) One-Time Data

Data type: IFME1FISEC
Optional: Yes
Call by Reference: Yes

T_RETURN - Return Parameter(s)

Data type: BAPIRET2
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for FMCA_DOC_CREATE_AND_CLEAR 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_documentnumber  TYPE CHAR12, "   
lv_i_documentheader  TYPE IFME1FIKPF, "   
lt_t_documentpositions  TYPE STANDARD TABLE OF IFME1FISEG, "   
lv_e_return  TYPE BAPIRET2, "   
lt_t_taxpositions  TYPE STANDARD TABLE OF IFME1FISET, "   
lv_i_subledgerdata  TYPE IFME1FINBU, "   
lt_t_cpdpositions  TYPE STANDARD TABLE OF IFME1FISEC, "   
lv_i_reconciliationkey  TYPE CHAR12, "   
lt_t_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_i_bkpf_psofn  TYPE CHAR30, "   
lv_i_bkpf_awkey  TYPE CHAR20, "   
lv_i_resob  TYPE DFKKSUMC-RESOB, "   
lv_i_resky  TYPE DFKKSUMC-RESKY. "   

  CALL FUNCTION 'FMCA_DOC_CREATE_AND_CLEAR'  "
    EXPORTING
         I_DOCUMENTHEADER = lv_i_documentheader
         I_SUBLEDGERDATA = lv_i_subledgerdata
         I_RECONCILIATIONKEY = lv_i_reconciliationkey
         I_BKPF_PSOFN = lv_i_bkpf_psofn
         I_BKPF_AWKEY = lv_i_bkpf_awkey
         I_RESOB = lv_i_resob
         I_RESKY = lv_i_resky
    IMPORTING
         E_DOCUMENTNUMBER = lv_e_documentnumber
         E_RETURN = lv_e_return
    TABLES
         T_DOCUMENTPOSITIONS = lt_t_documentpositions
         T_TAXPOSITIONS = lt_t_taxpositions
         T_CPDPOSITIONS = lt_t_cpdpositions
         T_RETURN = lt_t_return
. " FMCA_DOC_CREATE_AND_CLEAR




ABAP code using 7.40 inline data declarations to call FM FMCA_DOC_CREATE_AND_CLEAR

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 RESOB FROM DFKKSUMC INTO @DATA(ld_i_resob).
 
"SELECT single RESKY FROM DFKKSUMC INTO @DATA(ld_i_resky).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!