SAP ACCOUNT_DETERMINATION_REPLACE Function Module for Automatic account assignment: replacement of account symbols









ACCOUNT_DETERMINATION_REPLACE is a standard account determination replace SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Automatic account assignment: replacement of account symbols processing and below is the pattern details for this FM, 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 account determination replace FM, simply by entering the name ACCOUNT_DETERMINATION_REPLACE into the relevant SAP transaction such as SE37 or SE38.

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



Function ACCOUNT_DETERMINATION_REPLACE 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 'ACCOUNT_DETERMINATION_REPLACE'"Automatic account assignment: replacement of account symbols
EXPORTING
I_ANWND = "Application
* I_SAKINB = ' ' "Account no. for credit posting to be modified
I_KOMO1 = "Modification key 1
* I_KOMO1B = ' ' "Modification key 1 for credit posting
I_KOMO2 = "Modification key 2
* I_KOMO2B = ' ' "Modification key 2 for credit posting
I_KTOPL = "Chart of accounts
I_KTOS1 = "Account symbol debits
I_KTOS2 = "Account symbol credits
I_SAKIN = "Account number to be modified

IMPORTING
E_IKOFI = "Transfer interface Result Account determination

EXCEPTIONS
INPUT_MISSING = 1 INPUT_WRONG = 2 REPLACE_IMPOSSIBLE = 3
.



IMPORTING Parameters details for ACCOUNT_DETERMINATION_REPLACE

I_ANWND - Application

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

I_SAKINB - Account no. for credit posting to be modified

Data type: IKOFI-SAKINB
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KOMO1 - Modification key 1

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

I_KOMO1B - Modification key 1 for credit posting

Data type: IKOFI-KOMO1B
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KOMO2 - Modification key 2

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

I_KOMO2B - Modification key 2 for credit posting

Data type: IKOFI-KOMO2B
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KTOPL - Chart of accounts

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

I_KTOS1 - Account symbol debits

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

I_KTOS2 - Account symbol credits

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

I_SAKIN - Account number to be modified

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

EXPORTING Parameters details for ACCOUNT_DETERMINATION_REPLACE

E_IKOFI - Transfer interface Result Account determination

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

EXCEPTIONS details

INPUT_MISSING - Do not transfer chart of accounts or application

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

INPUT_WRONG - Chart of accounts or application do not exist

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

REPLACE_IMPOSSIBLE - Replacement of account symbol not possible

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

Copy and paste ABAP code example for ACCOUNT_DETERMINATION_REPLACE 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_ikofi  TYPE IKOFI, "   
lv_i_anwnd  TYPE IKOFI-ANWND, "   
lv_input_missing  TYPE IKOFI, "   
lv_i_sakinb  TYPE IKOFI-SAKINB, "   ' '
lv_i_komo1  TYPE IKOFI-KOMO1, "   
lv_input_wrong  TYPE IKOFI, "   
lv_i_komo1b  TYPE IKOFI-KOMO1B, "   ' '
lv_replace_impossible  TYPE IKOFI, "   
lv_i_komo2  TYPE IKOFI-KOMO2, "   
lv_i_komo2b  TYPE IKOFI-KOMO2B, "   ' '
lv_i_ktopl  TYPE IKOFI-KTOPL, "   
lv_i_ktos1  TYPE IKOFI-KTOS1, "   
lv_i_ktos2  TYPE IKOFI-KTOS2, "   
lv_i_sakin  TYPE IKOFI-SAKIN. "   

  CALL FUNCTION 'ACCOUNT_DETERMINATION_REPLACE'  "Automatic account assignment: replacement of account symbols
    EXPORTING
         I_ANWND = lv_i_anwnd
         I_SAKINB = lv_i_sakinb
         I_KOMO1 = lv_i_komo1
         I_KOMO1B = lv_i_komo1b
         I_KOMO2 = lv_i_komo2
         I_KOMO2B = lv_i_komo2b
         I_KTOPL = lv_i_ktopl
         I_KTOS1 = lv_i_ktos1
         I_KTOS2 = lv_i_ktos2
         I_SAKIN = lv_i_sakin
    IMPORTING
         E_IKOFI = lv_e_ikofi
    EXCEPTIONS
        INPUT_MISSING = 1
        INPUT_WRONG = 2
        REPLACE_IMPOSSIBLE = 3
. " ACCOUNT_DETERMINATION_REPLACE




ABAP code using 7.40 inline data declarations to call FM ACCOUNT_DETERMINATION_REPLACE

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 ANWND FROM IKOFI INTO @DATA(ld_i_anwnd).
 
 
"SELECT single SAKINB FROM IKOFI INTO @DATA(ld_i_sakinb).
DATA(ld_i_sakinb) = ' '.
 
"SELECT single KOMO1 FROM IKOFI INTO @DATA(ld_i_komo1).
 
 
"SELECT single KOMO1B FROM IKOFI INTO @DATA(ld_i_komo1b).
DATA(ld_i_komo1b) = ' '.
 
 
"SELECT single KOMO2 FROM IKOFI INTO @DATA(ld_i_komo2).
 
"SELECT single KOMO2B FROM IKOFI INTO @DATA(ld_i_komo2b).
DATA(ld_i_komo2b) = ' '.
 
"SELECT single KTOPL FROM IKOFI INTO @DATA(ld_i_ktopl).
 
"SELECT single KTOS1 FROM IKOFI INTO @DATA(ld_i_ktos1).
 
"SELECT single KTOS2 FROM IKOFI INTO @DATA(ld_i_ktos2).
 
"SELECT single SAKIN FROM IKOFI INTO @DATA(ld_i_sakin).
 


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!