SAP FDBA_GET_DIFFERENCE_ACCOUNT Function Module for Account Determination for Exchange Rate and Rounding Differences (Loan)









FDBA_GET_DIFFERENCE_ACCOUNT is a standard fdba get difference account SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Account Determination for Exchange Rate and Rounding Differences (Loan) 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 fdba get difference account FM, simply by entering the name FDBA_GET_DIFFERENCE_ACCOUNT into the relevant SAP transaction such as SE37 or SE38.

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



Function FDBA_GET_DIFFERENCE_ACCOUNT 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 'FDBA_GET_DIFFERENCE_ACCOUNT'"Account Determination for Exchange Rate and Rounding Differences (Loan)
EXPORTING
* I_DATE = "Date and Time, Current (Application Server) Date
* I_FOREIGN_CURRENCY = "From Currency
* I_LOCAL_CURRENCY = "From Currency
* I_TYPE_OF_RATE = 'M' "Exchange Rate Type
I_CHART_OF_ACCOUNT = "Chart of Accounts
I_MAIN_ACCOUNT = "G/L Account

IMPORTING
E_DEBIT_POSTING_KEY = "Posting key for debit postings
E_CREDIT_POSTING_KEY = "Posting key for credit postings
E_DEBIT_INDICATOR = "Debit/Credit Indicator
E_CREDIT_INDICATOR = "Debit/Credit Indicator
E_DEBIT_ACCOUNT = "Local Account for Realized Exchange Rate Losses
E_CREDIT_ACCOUNT = "Local Account for Realized Exchange Rate Gains

EXCEPTIONS
ENTRY_NOT_FOUND = 1
.



IMPORTING Parameters details for FDBA_GET_DIFFERENCE_ACCOUNT

I_DATE - Date and Time, Current (Application Server) Date

Data type: SY-DATUM
Optional: Yes
Call by Reference: Yes

I_FOREIGN_CURRENCY - From Currency

Data type: TCURR-FCURR
Optional: Yes
Call by Reference: Yes

I_LOCAL_CURRENCY - From Currency

Data type: TCURR-FCURR
Optional: Yes
Call by Reference: Yes

I_TYPE_OF_RATE - Exchange Rate Type

Data type: TCURR-KURST
Default: 'M'
Optional: Yes
Call by Reference: Yes

I_CHART_OF_ACCOUNT - Chart of Accounts

Data type: T001-KTOPL
Optional: No
Call by Reference: Yes

I_MAIN_ACCOUNT - G/L Account

Data type: BSEG-HKONT
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for FDBA_GET_DIFFERENCE_ACCOUNT

E_DEBIT_POSTING_KEY - Posting key for debit postings

Data type: T030B-BSCHS
Optional: No
Call by Reference: Yes

E_CREDIT_POSTING_KEY - Posting key for credit postings

Data type: T030B-BSCHH
Optional: No
Call by Reference: Yes

E_DEBIT_INDICATOR - Debit/Credit Indicator

Data type: TBSL-SHKZG
Optional: No
Call by Reference: Yes

E_CREDIT_INDICATOR - Debit/Credit Indicator

Data type: TBSL-SHKZG
Optional: No
Call by Reference: Yes

E_DEBIT_ACCOUNT - Local Account for Realized Exchange Rate Losses

Data type: T030H-LSREA
Optional: No
Call by Reference: Yes

E_CREDIT_ACCOUNT - Local Account for Realized Exchange Rate Gains

Data type: T030H-LHREA
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ENTRY_NOT_FOUND - Entry not found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for FDBA_GET_DIFFERENCE_ACCOUNT 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_date  TYPE SY-DATUM, "   
lv_entry_not_found  TYPE SY, "   
lv_e_debit_posting_key  TYPE T030B-BSCHS, "   
lv_i_foreign_currency  TYPE TCURR-FCURR, "   
lv_e_credit_posting_key  TYPE T030B-BSCHH, "   
lv_i_local_currency  TYPE TCURR-FCURR, "   
lv_e_debit_indicator  TYPE TBSL-SHKZG, "   
lv_i_type_of_rate  TYPE TCURR-KURST, "   'M'
lv_e_credit_indicator  TYPE TBSL-SHKZG, "   
lv_e_debit_account  TYPE T030H-LSREA, "   
lv_i_chart_of_account  TYPE T001-KTOPL, "   
lv_i_main_account  TYPE BSEG-HKONT, "   
lv_e_credit_account  TYPE T030H-LHREA. "   

  CALL FUNCTION 'FDBA_GET_DIFFERENCE_ACCOUNT'  "Account Determination for Exchange Rate and Rounding Differences (Loan)
    EXPORTING
         I_DATE = lv_i_date
         I_FOREIGN_CURRENCY = lv_i_foreign_currency
         I_LOCAL_CURRENCY = lv_i_local_currency
         I_TYPE_OF_RATE = lv_i_type_of_rate
         I_CHART_OF_ACCOUNT = lv_i_chart_of_account
         I_MAIN_ACCOUNT = lv_i_main_account
    IMPORTING
         E_DEBIT_POSTING_KEY = lv_e_debit_posting_key
         E_CREDIT_POSTING_KEY = lv_e_credit_posting_key
         E_DEBIT_INDICATOR = lv_e_debit_indicator
         E_CREDIT_INDICATOR = lv_e_credit_indicator
         E_DEBIT_ACCOUNT = lv_e_debit_account
         E_CREDIT_ACCOUNT = lv_e_credit_account
    EXCEPTIONS
        ENTRY_NOT_FOUND = 1
. " FDBA_GET_DIFFERENCE_ACCOUNT




ABAP code using 7.40 inline data declarations to call FM FDBA_GET_DIFFERENCE_ACCOUNT

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 DATUM FROM SY INTO @DATA(ld_i_date).
 
 
"SELECT single BSCHS FROM T030B INTO @DATA(ld_e_debit_posting_key).
 
"SELECT single FCURR FROM TCURR INTO @DATA(ld_i_foreign_currency).
 
"SELECT single BSCHH FROM T030B INTO @DATA(ld_e_credit_posting_key).
 
"SELECT single FCURR FROM TCURR INTO @DATA(ld_i_local_currency).
 
"SELECT single SHKZG FROM TBSL INTO @DATA(ld_e_debit_indicator).
 
"SELECT single KURST FROM TCURR INTO @DATA(ld_i_type_of_rate).
DATA(ld_i_type_of_rate) = 'M'.
 
"SELECT single SHKZG FROM TBSL INTO @DATA(ld_e_credit_indicator).
 
"SELECT single LSREA FROM T030H INTO @DATA(ld_e_debit_account).
 
"SELECT single KTOPL FROM T001 INTO @DATA(ld_i_chart_of_account).
 
"SELECT single HKONT FROM BSEG INTO @DATA(ld_i_main_account).
 
"SELECT single LHREA FROM T030H INTO @DATA(ld_e_credit_account).
 


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!