SAP HR_PF_REVERSE_POSTING Function Module for









HR_PF_REVERSE_POSTING is a standard hr pf reverse posting 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 hr pf reverse posting FM, simply by entering the name HR_PF_REVERSE_POSTING into the relevant SAP transaction such as SE37 or SE38.

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



Function HR_PF_REVERSE_POSTING 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 'HR_PF_REVERSE_POSTING'"
EXPORTING
PERNR = "
* VPROP = "
* KONNR = "
BUNUM = "
* PABRP = "
* PABRJ = "
* EVFLAG = ' ' "
* EXPFLAG = 'X' "
* UPFLAG = 'X' "
* TESTMODE = ' ' "

CHANGING
* IS_OK = 'X' "
* MESSAGE_TAB = "

TABLES
* I5CPB = "
* I5CPB_NREV = "

EXCEPTIONS
INVALID_ACCOUNT = 1 ENTRY_NOT_FOUND = 2 ACCOUNT_LOCKED = 3 NO_INVERSE = 4 WRITE_FAILED = 5 PERIOD_NOT_FOUND = 6 MISSING_ORG_DATA = 7
.



IMPORTING Parameters details for HR_PF_REVERSE_POSTING

PERNR -

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

VPROP -

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

KONNR -

Data type: T5CPK-KONNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

BUNUM -

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

PABRP -

Data type: T549Q-PABRP
Optional: Yes
Call by Reference: No ( called with pass by value option)

PABRJ -

Data type: T549Q-PABRJ
Optional: Yes
Call by Reference: No ( called with pass by value option)

EVFLAG -

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

EXPFLAG -

Data type: P02VS_FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

UPFLAG -

Data type: P02VS_FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TESTMODE -

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

CHANGING Parameters details for HR_PF_REVERSE_POSTING

IS_OK -

Data type: BOOLE_D
Default: 'X'
Optional: Yes
Call by Reference: Yes

MESSAGE_TAB -

Data type: HRERROR_TAB
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for HR_PF_REVERSE_POSTING

I5CPB -

Data type: T5CPB
Optional: Yes
Call by Reference: Yes

I5CPB_NREV -

Data type: T5CPB
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

INVALID_ACCOUNT -

Data type:
Optional: No
Call by Reference: Yes

ENTRY_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

ACCOUNT_LOCKED -

Data type:
Optional: No
Call by Reference: Yes

NO_INVERSE -

Data type:
Optional: No
Call by Reference: Yes

WRITE_FAILED -

Data type:
Optional: No
Call by Reference: Yes

PERIOD_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

MISSING_ORG_DATA -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for HR_PF_REVERSE_POSTING 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_i5cpb  TYPE STANDARD TABLE OF T5CPB, "   
lv_is_ok  TYPE BOOLE_D, "   'X'
lv_pernr  TYPE PERNR-PERNR, "   
lv_invalid_account  TYPE PERNR, "   
lv_vprop  TYPE P02_VPROP, "   
lv_konnr  TYPE T5CPK-KONNR, "   
lt_i5cpb_nrev  TYPE STANDARD TABLE OF T5CPB, "   
lv_message_tab  TYPE HRERROR_TAB, "   
lv_entry_not_found  TYPE HRERROR_TAB, "   
lv_bunum  TYPE T5CPB-BUNUM, "   
lv_account_locked  TYPE T5CPB, "   
lv_pabrp  TYPE T549Q-PABRP, "   
lv_no_inverse  TYPE T549Q, "   
lv_pabrj  TYPE T549Q-PABRJ, "   
lv_write_failed  TYPE T549Q, "   
lv_evflag  TYPE P02VS_FLAG, "   ' '
lv_period_not_found  TYPE P02VS_FLAG, "   
lv_expflag  TYPE P02VS_FLAG, "   'X'
lv_missing_org_data  TYPE P02VS_FLAG, "   
lv_upflag  TYPE P02VS_FLAG, "   'X'
lv_testmode  TYPE P02VS_FLAG. "   ' '

  CALL FUNCTION 'HR_PF_REVERSE_POSTING'  "
    EXPORTING
         PERNR = lv_pernr
         VPROP = lv_vprop
         KONNR = lv_konnr
         BUNUM = lv_bunum
         PABRP = lv_pabrp
         PABRJ = lv_pabrj
         EVFLAG = lv_evflag
         EXPFLAG = lv_expflag
         UPFLAG = lv_upflag
         TESTMODE = lv_testmode
    CHANGING
         IS_OK = lv_is_ok
         MESSAGE_TAB = lv_message_tab
    TABLES
         I5CPB = lt_i5cpb
         I5CPB_NREV = lt_i5cpb_nrev
    EXCEPTIONS
        INVALID_ACCOUNT = 1
        ENTRY_NOT_FOUND = 2
        ACCOUNT_LOCKED = 3
        NO_INVERSE = 4
        WRITE_FAILED = 5
        PERIOD_NOT_FOUND = 6
        MISSING_ORG_DATA = 7
. " HR_PF_REVERSE_POSTING




ABAP code using 7.40 inline data declarations to call FM HR_PF_REVERSE_POSTING

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.

 
DATA(ld_is_ok) = 'X'.
 
"SELECT single PERNR FROM PERNR INTO @DATA(ld_pernr).
 
 
 
"SELECT single KONNR FROM T5CPK INTO @DATA(ld_konnr).
 
 
 
 
"SELECT single BUNUM FROM T5CPB INTO @DATA(ld_bunum).
 
 
"SELECT single PABRP FROM T549Q INTO @DATA(ld_pabrp).
 
 
"SELECT single PABRJ FROM T549Q INTO @DATA(ld_pabrj).
 
 
DATA(ld_evflag) = ' '.
 
 
DATA(ld_expflag) = 'X'.
 
 
DATA(ld_upflag) = 'X'.
 
DATA(ld_testmode) = ' '.
 


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!