SAP AC_DOCUMENT_CREATE Function Module for









AC_DOCUMENT_CREATE is a standard ac document create 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 ac document create FM, simply by entering the name AC_DOCUMENT_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: RWCL
Program Name: SAPLRWCL
Main Program: SAPLRWCL
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function AC_DOCUMENT_CREATE 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 'AC_DOCUMENT_CREATE'"
EXPORTING
* I_COMP = ' ' "Component limitation
* I_COMP_CHECK = ' ' "Component limitation for checks
* I_FREE_TABLE = 'X' "

TABLES
T_ACCHD = "Account document header information
* T_ACCWT = "
* T_ACCIT_EXT = "ACC Document: Additional Item Information
* T_AUSZ2 = "
* T_AUSZ3 = "
* T_AUSZ4 = "Assgt of Clrg Items - Cleared Items with Acct Assignment
* T_ACCIT_SPL = "
* T_ACCIT_EXT_SPL = "ACC Document: Additional Item Information
* T_ACCCR_SPL = "
* T_SPLINFO = "Splittling Information of Open Items
* T_SPLINFO_VAL = "Splitting Information of Open Item Values
T_ACCIT = "FI/CO document item information
* T_ACCIT_REF = "
T_ACCCR = "FI/CO document currency information
* T_ACCDA = "FI/CO document assets additional information
* T_ACCFI = "FI/CO document financial accounting additional information
* T_ACCTX = "Tax statement
* T_ACCTAX = "Tax information
* T_ACCIT_PA = "
* T_ACCCR_PA = "
.



IMPORTING Parameters details for AC_DOCUMENT_CREATE

I_COMP - Component limitation

Data type: TRWPR-COMPONENT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_COMP_CHECK - Component limitation for checks

Data type: TRWPR-COMPONENT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FREE_TABLE -

Data type: XFELD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for AC_DOCUMENT_CREATE

T_ACCHD - Account document header information

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

T_ACCWT -

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

T_ACCIT_EXT - ACC Document: Additional Item Information

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

T_AUSZ2 -

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

T_AUSZ3 -

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

T_AUSZ4 - Assgt of Clrg Items - Cleared Items with Acct Assignment

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

T_ACCIT_SPL -

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

T_ACCIT_EXT_SPL - ACC Document: Additional Item Information

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

T_ACCCR_SPL -

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

T_SPLINFO - Splittling Information of Open Items

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

T_SPLINFO_VAL - Splitting Information of Open Item Values

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

T_ACCIT - FI/CO document item information

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

T_ACCIT_REF -

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

T_ACCCR - FI/CO document currency information

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

T_ACCDA - FI/CO document assets additional information

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

T_ACCFI - FI/CO document financial accounting additional information

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

T_ACCTX - Tax statement

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

T_ACCTAX - Tax information

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

T_ACCIT_PA -

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

T_ACCCR_PA -

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

Copy and paste ABAP code example for AC_DOCUMENT_CREATE 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_comp  TYPE TRWPR-COMPONENT, "   SPACE
lt_t_acchd  TYPE STANDARD TABLE OF ACCHD, "   
lt_t_accwt  TYPE STANDARD TABLE OF ACCIT_WT, "   
lt_t_accit_ext  TYPE STANDARD TABLE OF ACCIT_EXTENSION, "   
lt_t_ausz2  TYPE STANDARD TABLE OF AUSZ2, "   
lt_t_ausz3  TYPE STANDARD TABLE OF AUSZ_CLR, "   
lt_t_ausz4  TYPE STANDARD TABLE OF AUSZ_CLR_ASGMT, "   
lt_t_accit_spl  TYPE STANDARD TABLE OF ACCIT, "   
lt_t_accit_ext_spl  TYPE STANDARD TABLE OF ACCIT_EXTENSION, "   
lt_t_acccr_spl  TYPE STANDARD TABLE OF ACCCR, "   
lt_t_splinfo  TYPE STANDARD TABLE OF FAGL_S_ALE_SPLINFO, "   
lt_t_splinfo_val  TYPE STANDARD TABLE OF FAGL_SPLINFO_VAL, "   
lt_t_accit  TYPE STANDARD TABLE OF ACCIT, "   
lv_i_comp_check  TYPE TRWPR-COMPONENT, "   SPACE
lt_t_accit_ref  TYPE STANDARD TABLE OF ACCIT_REFERENCE, "   
lt_t_acccr  TYPE STANDARD TABLE OF ACCCR, "   
lv_i_free_table  TYPE XFELD, "   'X'
lt_t_accda  TYPE STANDARD TABLE OF ACCDA, "   
lt_t_accfi  TYPE STANDARD TABLE OF ACCFI, "   
lt_t_acctx  TYPE STANDARD TABLE OF ACCBSET, "   
lt_t_acctax  TYPE STANDARD TABLE OF ACCTAX, "   
lt_t_accit_pa  TYPE STANDARD TABLE OF ACCIT_PA, "   
lt_t_acccr_pa  TYPE STANDARD TABLE OF ACCCR_PA. "   

  CALL FUNCTION 'AC_DOCUMENT_CREATE'  "
    EXPORTING
         I_COMP = lv_i_comp
         I_COMP_CHECK = lv_i_comp_check
         I_FREE_TABLE = lv_i_free_table
    TABLES
         T_ACCHD = lt_t_acchd
         T_ACCWT = lt_t_accwt
         T_ACCIT_EXT = lt_t_accit_ext
         T_AUSZ2 = lt_t_ausz2
         T_AUSZ3 = lt_t_ausz3
         T_AUSZ4 = lt_t_ausz4
         T_ACCIT_SPL = lt_t_accit_spl
         T_ACCIT_EXT_SPL = lt_t_accit_ext_spl
         T_ACCCR_SPL = lt_t_acccr_spl
         T_SPLINFO = lt_t_splinfo
         T_SPLINFO_VAL = lt_t_splinfo_val
         T_ACCIT = lt_t_accit
         T_ACCIT_REF = lt_t_accit_ref
         T_ACCCR = lt_t_acccr
         T_ACCDA = lt_t_accda
         T_ACCFI = lt_t_accfi
         T_ACCTX = lt_t_acctx
         T_ACCTAX = lt_t_acctax
         T_ACCIT_PA = lt_t_accit_pa
         T_ACCCR_PA = lt_t_acccr_pa
. " AC_DOCUMENT_CREATE




ABAP code using 7.40 inline data declarations to call FM AC_DOCUMENT_CREATE

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 COMPONENT FROM TRWPR INTO @DATA(ld_i_comp).
DATA(ld_i_comp) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single COMPONENT FROM TRWPR INTO @DATA(ld_i_comp_check).
DATA(ld_i_comp_check) = ' '.
 
 
 
DATA(ld_i_free_table) = 'X'.
 
 
 
 
 
 
 


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!