SAP RP_SET_RECALCULATION Function Module for
RP_SET_RECALCULATION is a standard rp set recalculation 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 set recalculation FM, simply by entering the name RP_SET_RECALCULATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: RPRR
Program Name: SAPLRPRR
Main Program: SAPLRPRR
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RP_SET_RECALCULATION 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_SET_RECALCULATION'".
EXPORTING
P_PERNR = "Pers. number of employee
P_RRDATE = "Retroactive accounting (RA) date to be set
* P_ENQUEUE = 'X' "Lock personnel number? 'X'(default) = Yes
* P_KOABR = ' ' "
* P_SIMULATION = ' ' "
* IV_NO_PCR_CHECK = ' ' "
IMPORTING
P_HAS_SET_KOABR = "
P_IS_RETRO_CALC = "
P_HAS_SET_RRDAT = "
CHANGING
* P_P0003 = "
TABLES
* P_P0001 = "
EXCEPTIONS
NO_PERNR = 1 NO_WORKPLACE = 2 PERNR_ENQUEUED = 3 RRDATE_NEWER = 4 RRDAT_BEFORE_TWM = 5 RRDAT_BEFORE_PERS_TWM = 6 PCR_ERROR = 7 INTERNAL_ERROR = 8 PCR_LOCKED = 9
IMPORTING Parameters details for RP_SET_RECALCULATION
P_PERNR - Pers. number of employee
Data type: P0003-PERNROptional: No
Call by Reference: No ( called with pass by value option)
P_RRDATE - Retroactive accounting (RA) date to be set
Data type: P0003-RRDATOptional: No
Call by Reference: No ( called with pass by value option)
P_ENQUEUE - Lock personnel number? 'X'(default) = Yes
Data type: RPUXXXXX-KR_FELD1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
P_KOABR -
Data type: T52MCW-KOABRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
P_SIMULATION -
Data type: RPUXXXXX-KR_FELD2Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_NO_PCR_CHECK -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RP_SET_RECALCULATION
P_HAS_SET_KOABR -
Data type: T52MCW-KOABROptional: No
Call by Reference: Yes
P_IS_RETRO_CALC -
Data type: COptional: No
Call by Reference: Yes
P_HAS_SET_RRDAT -
Data type: COptional: No
Call by Reference: Yes
CHANGING Parameters details for RP_SET_RECALCULATION
P_P0003 -
Data type: P0003Optional: Yes
Call by Reference: Yes
TABLES Parameters details for RP_SET_RECALCULATION
P_P0001 -
Data type: P0001Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_PERNR - Personnel number does not exist (no IT0003)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_WORKPLACE - No IT 0001 record exists on date specified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERNR_ENQUEUED - Personnel number is locked (only if Lock is set)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RRDATE_NEWER - Old RA date is older than the one to be set
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RRDAT_BEFORE_TWM - RA date is before earliest possible RA date in control record
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RRDAT_BEFORE_PERS_TWM - RA date is before earliest possible RA date (PRDAT)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PCR_ERROR - Error while reading earliest possible RA date (T569V/T549A/T549Q)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR - Internal error (unlock)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PCR_LOCKED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RP_SET_RECALCULATION 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_p_p0001 | TYPE STANDARD TABLE OF P0001, " | |||
| lv_p_p0003 | TYPE P0003, " | |||
| lv_p_pernr | TYPE P0003-PERNR, " | |||
| lv_no_pernr | TYPE P0003, " | |||
| lv_p_has_set_koabr | TYPE T52MCW-KOABR, " | |||
| lv_p_rrdate | TYPE P0003-RRDAT, " | |||
| lv_no_workplace | TYPE P0003, " | |||
| lv_p_is_retro_calc | TYPE C, " | |||
| lv_p_enqueue | TYPE RPUXXXXX-KR_FELD1, " 'X' | |||
| lv_pernr_enqueued | TYPE RPUXXXXX, " | |||
| lv_p_has_set_rrdat | TYPE C, " | |||
| lv_p_koabr | TYPE T52MCW-KOABR, " SPACE | |||
| lv_rrdate_newer | TYPE T52MCW, " | |||
| lv_p_simulation | TYPE RPUXXXXX-KR_FELD2, " SPACE | |||
| lv_rrdat_before_twm | TYPE RPUXXXXX, " | |||
| lv_iv_no_pcr_check | TYPE XFELD, " SPACE | |||
| lv_rrdat_before_pers_twm | TYPE XFELD, " | |||
| lv_pcr_error | TYPE XFELD, " | |||
| lv_internal_error | TYPE XFELD, " | |||
| lv_pcr_locked | TYPE XFELD. " |
|   CALL FUNCTION 'RP_SET_RECALCULATION' " |
| EXPORTING | ||
| P_PERNR | = lv_p_pernr | |
| P_RRDATE | = lv_p_rrdate | |
| P_ENQUEUE | = lv_p_enqueue | |
| P_KOABR | = lv_p_koabr | |
| P_SIMULATION | = lv_p_simulation | |
| IV_NO_PCR_CHECK | = lv_iv_no_pcr_check | |
| IMPORTING | ||
| P_HAS_SET_KOABR | = lv_p_has_set_koabr | |
| P_IS_RETRO_CALC | = lv_p_is_retro_calc | |
| P_HAS_SET_RRDAT | = lv_p_has_set_rrdat | |
| CHANGING | ||
| P_P0003 | = lv_p_p0003 | |
| TABLES | ||
| P_P0001 | = lt_p_p0001 | |
| EXCEPTIONS | ||
| NO_PERNR = 1 | ||
| NO_WORKPLACE = 2 | ||
| PERNR_ENQUEUED = 3 | ||
| RRDATE_NEWER = 4 | ||
| RRDAT_BEFORE_TWM = 5 | ||
| RRDAT_BEFORE_PERS_TWM = 6 | ||
| PCR_ERROR = 7 | ||
| INTERNAL_ERROR = 8 | ||
| PCR_LOCKED = 9 | ||
| . " RP_SET_RECALCULATION | ||
ABAP code using 7.40 inline data declarations to call FM RP_SET_RECALCULATION
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 PERNR FROM P0003 INTO @DATA(ld_p_pernr). | ||||
| "SELECT single KOABR FROM T52MCW INTO @DATA(ld_p_has_set_koabr). | ||||
| "SELECT single RRDAT FROM P0003 INTO @DATA(ld_p_rrdate). | ||||
| "SELECT single KR_FELD1 FROM RPUXXXXX INTO @DATA(ld_p_enqueue). | ||||
| DATA(ld_p_enqueue) | = 'X'. | |||
| "SELECT single KOABR FROM T52MCW INTO @DATA(ld_p_koabr). | ||||
| DATA(ld_p_koabr) | = ' '. | |||
| "SELECT single KR_FELD2 FROM RPUXXXXX INTO @DATA(ld_p_simulation). | ||||
| DATA(ld_p_simulation) | = ' '. | |||
| DATA(ld_iv_no_pcr_check) | = ' '. | |||
Search for further information about these or an SAP related objects