SAP FI_DOC_TO_ACC_TRANSFORM Function Module for









FI_DOC_TO_ACC_TRANSFORM is a standard fi doc to acc transform 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 fi doc to acc transform FM, simply by entering the name FI_DOC_TO_ACC_TRANSFORM into the relevant SAP transaction such as SE37 or SE38.

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



Function FI_DOC_TO_ACC_TRANSFORM 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 'FI_DOC_TO_ACC_TRANSFORM'"
EXPORTING
* X_HWAE1 = 'X' "
* STATUS_NEW = ' ' "
* STATUS_OLD = ' ' "
* I_AWTYP_REV = ' ' "

TABLES
T_BKPF = "FI document header
T_BSEG = "FI line item
* T_BSET = "FI tax statement items
* T_BSEGZ = "FI supplement to line item
T_ACCHD = "FI/CO document header
T_ACCIT = "FI/CO line item
T_ACCCR = "FI/CO line item currencies
* T_ACCIT_EXT = "ACC Document: Additional Item Information

EXCEPTIONS
SYSTEM_ERROR = 1
.



IMPORTING Parameters details for FI_DOC_TO_ACC_TRANSFORM

X_HWAE1 -

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

STATUS_NEW -

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

STATUS_OLD -

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

I_AWTYP_REV -

Data type: AWTYP_REV
Default: SPACE
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for FI_DOC_TO_ACC_TRANSFORM

T_BKPF - FI document header

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

T_BSEG - FI line item

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

T_BSET - FI tax statement items

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

T_BSEGZ - FI supplement to line item

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

T_ACCHD - FI/CO document header

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

T_ACCIT - FI/CO line item

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

T_ACCCR - FI/CO line item currencies

Data type: ACCCR
Optional: No
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

EXCEPTIONS details

SYSTEM_ERROR - FI system error occurred

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

Copy and paste ABAP code example for FI_DOC_TO_ACC_TRANSFORM 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:
lt_t_bkpf  TYPE STANDARD TABLE OF BKPF, "   
lv_x_hwae1  TYPE BOOLE, "   'X'
lv_system_error  TYPE BOOLE, "   
lt_t_bseg  TYPE STANDARD TABLE OF BSEG, "   
lv_status_new  TYPE ACCHD-STATUS_NEW, "   SPACE
lt_t_bset  TYPE STANDARD TABLE OF BSET, "   
lv_status_old  TYPE ACCHD-STATUS_OLD, "   SPACE
lt_t_bsegz  TYPE STANDARD TABLE OF BSEGZ, "   
lv_i_awtyp_rev  TYPE AWTYP_REV, "   SPACE
lt_t_acchd  TYPE STANDARD TABLE OF ACCHD, "   
lt_t_accit  TYPE STANDARD TABLE OF ACCIT, "   
lt_t_acccr  TYPE STANDARD TABLE OF ACCCR, "   
lt_t_accit_ext  TYPE STANDARD TABLE OF ACCIT_EXTENSION. "   

  CALL FUNCTION 'FI_DOC_TO_ACC_TRANSFORM'  "
    EXPORTING
         X_HWAE1 = lv_x_hwae1
         STATUS_NEW = lv_status_new
         STATUS_OLD = lv_status_old
         I_AWTYP_REV = lv_i_awtyp_rev
    TABLES
         T_BKPF = lt_t_bkpf
         T_BSEG = lt_t_bseg
         T_BSET = lt_t_bset
         T_BSEGZ = lt_t_bsegz
         T_ACCHD = lt_t_acchd
         T_ACCIT = lt_t_accit
         T_ACCCR = lt_t_acccr
         T_ACCIT_EXT = lt_t_accit_ext
    EXCEPTIONS
        SYSTEM_ERROR = 1
. " FI_DOC_TO_ACC_TRANSFORM




ABAP code using 7.40 inline data declarations to call FM FI_DOC_TO_ACC_TRANSFORM

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_x_hwae1) = 'X'.
 
 
 
"SELECT single STATUS_NEW FROM ACCHD INTO @DATA(ld_status_new).
DATA(ld_status_new) = ' '.
 
 
"SELECT single STATUS_OLD FROM ACCHD INTO @DATA(ld_status_old).
DATA(ld_status_old) = ' '.
 
 
DATA(ld_i_awtyp_rev) = ' '.
 
 
 
 
 


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!