SAP RP_GET_CURRENCY Function Module for
RP_GET_CURRENCY is a standard rp 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 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 rp get currency FM, simply by entering the name RP_GET_CURRENCY into the relevant SAP transaction such as SE37 or SE38.
Function Group: RPGC
Program Name: SAPLRPGC
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RP_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 'RP_GET_CURRENCY'".
EXPORTING
* MOLGA = '01' "HR country grouping
* TRFAR = "Pay scale type
* TRFGB = "Pay scale area
* TRFKZ = "Pay scale indicator
* BEGDA = "
* ENDDA = "
IMPORTING
WAERS = "Currency
VALID_BEGDA = "
VALID_ENDDA = "
RETURN = "
CURRENCY_SOURCE = "
TABLES
* CURRENCY_TABLE = "
EXCEPTIONS
MOLGA_NOT_IN_T001P = 1 NO_ENTRY_FOUND_IN_TABLE_T001 = 2 NO_ENTRY_FOUND_IN_TABLE_T500P = 3 NO_ENTRY_FOUND_IN_TABLE_T500C = 4
IMPORTING Parameters details for RP_GET_CURRENCY
MOLGA - HR country grouping
Data type: T001P-MOLGADefault: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TRFAR - Pay scale type
Data type: T510-TRFAROptional: Yes
Call by Reference: No ( called with pass by value option)
TRFGB - Pay scale area
Data type: T510-TRFGBOptional: Yes
Call by Reference: No ( called with pass by value option)
TRFKZ - Pay scale indicator
Data type: T503-TRFKZOptional: Yes
Call by Reference: No ( called with pass by value option)
BEGDA -
Data type: P0008-BEGDAOptional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA -
Data type: P0008-ENDDAOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RP_GET_CURRENCY
WAERS - Currency
Data type: T500C-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
VALID_BEGDA -
Data type: P0008-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
VALID_ENDDA -
Data type: P0008-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
RETURN -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
CURRENCY_SOURCE -
Data type: DD02L-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RP_GET_CURRENCY
CURRENCY_TABLE -
Data type: T500COptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MOLGA_NOT_IN_T001P - No entry in T001P with requested coutry grouping
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRY_FOUND_IN_TABLE_T001 - No entry in T001W
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRY_FOUND_IN_TABLE_T500P -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRY_FOUND_IN_TABLE_T500C -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RP_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_molga | TYPE T001P-MOLGA, " '01' | |||
lv_waers | TYPE T500C-WAERS, " | |||
lt_currency_table | TYPE STANDARD TABLE OF T500C, " | |||
lv_molga_not_in_t001p | TYPE T500C, " | |||
lv_trfar | TYPE T510-TRFAR, " | |||
lv_valid_begda | TYPE P0008-BEGDA, " | |||
lv_no_entry_found_in_table_t001 | TYPE P0008, " | |||
lv_trfgb | TYPE T510-TRFGB, " | |||
lv_valid_endda | TYPE P0008-ENDDA, " | |||
lv_no_entry_found_in_table_t500p | TYPE P0008, " | |||
lv_trfkz | TYPE T503-TRFKZ, " | |||
lv_return | TYPE SY-SUBRC, " | |||
lv_no_entry_found_in_table_t500c | TYPE SY, " | |||
lv_begda | TYPE P0008-BEGDA, " | |||
lv_currency_source | TYPE DD02L-TABNAME, " | |||
lv_endda | TYPE P0008-ENDDA. " |
  CALL FUNCTION 'RP_GET_CURRENCY' " |
EXPORTING | ||
MOLGA | = lv_molga | |
TRFAR | = lv_trfar | |
TRFGB | = lv_trfgb | |
TRFKZ | = lv_trfkz | |
BEGDA | = lv_begda | |
ENDDA | = lv_endda | |
IMPORTING | ||
WAERS | = lv_waers | |
VALID_BEGDA | = lv_valid_begda | |
VALID_ENDDA | = lv_valid_endda | |
RETURN | = lv_return | |
CURRENCY_SOURCE | = lv_currency_source | |
TABLES | ||
CURRENCY_TABLE | = lt_currency_table | |
EXCEPTIONS | ||
MOLGA_NOT_IN_T001P = 1 | ||
NO_ENTRY_FOUND_IN_TABLE_T001 = 2 | ||
NO_ENTRY_FOUND_IN_TABLE_T500P = 3 | ||
NO_ENTRY_FOUND_IN_TABLE_T500C = 4 | ||
. " RP_GET_CURRENCY |
ABAP code using 7.40 inline data declarations to call FM RP_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 MOLGA FROM T001P INTO @DATA(ld_molga). | ||||
DATA(ld_molga) | = '01'. | |||
"SELECT single WAERS FROM T500C INTO @DATA(ld_waers). | ||||
"SELECT single TRFAR FROM T510 INTO @DATA(ld_trfar). | ||||
"SELECT single BEGDA FROM P0008 INTO @DATA(ld_valid_begda). | ||||
"SELECT single TRFGB FROM T510 INTO @DATA(ld_trfgb). | ||||
"SELECT single ENDDA FROM P0008 INTO @DATA(ld_valid_endda). | ||||
"SELECT single TRFKZ FROM T503 INTO @DATA(ld_trfkz). | ||||
"SELECT single SUBRC FROM SY INTO @DATA(ld_return). | ||||
"SELECT single BEGDA FROM P0008 INTO @DATA(ld_begda). | ||||
"SELECT single TABNAME FROM DD02L INTO @DATA(ld_currency_source). | ||||
"SELECT single ENDDA FROM P0008 INTO @DATA(ld_endda). | ||||
Search for further information about these or an SAP related objects