SAP KBPS_GET_CURRENCY Function Module for Determination transaction currency budget / planning
KBPS_GET_CURRENCY is a standard kbps get currency SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determination transaction currency budget / planning 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 kbps get currency FM, simply by entering the name KBPS_GET_CURRENCY into the relevant SAP transaction such as SE37 or SE38.
Function Group: KBPS
Program Name: SAPLKBPS
Main Program: SAPLKBPS
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function KBPS_GET_CURRENCY 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 'KBPS_GET_CURRENCY'"Determination transaction currency budget / planning.
EXPORTING
* FIKRS = ' ' "Financial management area
* FIKRS_CA_PERIV = ' ' "Period version in FM01-CA_PERIV
* FIKRS_PERIV = ' ' "Period version in FM01-PERIV
* KOKRS = ' ' "Controlling area
* I_WAER = ' ' "
IMPORTING
PERIV = "Period version
TWAER = "Transaction currency
OP_DECIM = "Number of Decimal Places
EXCEPTIONS
FIKRS_NOT_FOUND = 1 KOKRS_NOT_FOUND = 2 NO_PARAMETERS = 3
IMPORTING Parameters details for KBPS_GET_CURRENCY
FIKRS - Financial management area
Data type: FM01-FIKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FIKRS_CA_PERIV - Period version in FM01-CA_PERIV
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FIKRS_PERIV - Period version in FM01-PERIV
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KOKRS - Controlling area
Data type: TKA01-KOKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WAER -
Data type: BPIN-TWAERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for KBPS_GET_CURRENCY
PERIV - Period version
Data type: BPIN-PERIVOptional: No
Call by Reference: No ( called with pass by value option)
TWAER - Transaction currency
Data type: BPIN-TWAEROptional: No
Call by Reference: No ( called with pass by value option)
OP_DECIM - Number of Decimal Places
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FIKRS_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
KOKRS_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PARAMETERS - Do Not Pass Any Parameters
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for KBPS_GET_CURRENCY 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_fikrs | TYPE FM01-FIKRS, " SPACE | |||
| lv_periv | TYPE BPIN-PERIV, " | |||
| lv_fikrs_not_found | TYPE BPIN, " | |||
| lv_twaer | TYPE BPIN-TWAER, " | |||
| lv_fikrs_ca_periv | TYPE BPIN, " SPACE | |||
| lv_kokrs_not_found | TYPE BPIN, " | |||
| lv_op_decim | TYPE BPIN, " | |||
| lv_fikrs_periv | TYPE BPIN, " SPACE | |||
| lv_no_parameters | TYPE BPIN, " | |||
| lv_kokrs | TYPE TKA01-KOKRS, " SPACE | |||
| lv_i_waer | TYPE BPIN-TWAER. " SPACE |
|   CALL FUNCTION 'KBPS_GET_CURRENCY' "Determination transaction currency budget / planning |
| EXPORTING | ||
| FIKRS | = lv_fikrs | |
| FIKRS_CA_PERIV | = lv_fikrs_ca_periv | |
| FIKRS_PERIV | = lv_fikrs_periv | |
| KOKRS | = lv_kokrs | |
| I_WAER | = lv_i_waer | |
| IMPORTING | ||
| PERIV | = lv_periv | |
| TWAER | = lv_twaer | |
| OP_DECIM | = lv_op_decim | |
| EXCEPTIONS | ||
| FIKRS_NOT_FOUND = 1 | ||
| KOKRS_NOT_FOUND = 2 | ||
| NO_PARAMETERS = 3 | ||
| . " KBPS_GET_CURRENCY | ||
ABAP code using 7.40 inline data declarations to call FM KBPS_GET_CURRENCY
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 FIKRS FROM FM01 INTO @DATA(ld_fikrs). | ||||
| DATA(ld_fikrs) | = ' '. | |||
| "SELECT single PERIV FROM BPIN INTO @DATA(ld_periv). | ||||
| "SELECT single TWAER FROM BPIN INTO @DATA(ld_twaer). | ||||
| DATA(ld_fikrs_ca_periv) | = ' '. | |||
| DATA(ld_fikrs_periv) | = ' '. | |||
| "SELECT single KOKRS FROM TKA01 INTO @DATA(ld_kokrs). | ||||
| DATA(ld_kokrs) | = ' '. | |||
| "SELECT single TWAER FROM BPIN INTO @DATA(ld_i_waer). | ||||
| DATA(ld_i_waer) | = ' '. | |||
Search for further information about these or an SAP related objects