SAP HR_CH_PK_WRITE_TO_ACCOUNT Function Module for









HR_CH_PK_WRITE_TO_ACCOUNT is a standard hr ch pk write to account 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 ch pk write to account FM, simply by entering the name HR_CH_PK_WRITE_TO_ACCOUNT into the relevant SAP transaction such as SE37 or SE38.

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



Function HR_CH_PK_WRITE_TO_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 'HR_CH_PK_WRITE_TO_ACCOUNT'"
EXPORTING
PERNR = "
* EXPFL = ' ' "
ORGIN = "
* EVFLAG = ' ' "
* TESTMODE = ' ' "
KONNR = "
BUDAT = "
VALTY = "
VALUE = "
* WAERS = ' ' "
VADAT = "
* PABRP = "
* PABRJ = "

IMPORTING
T5CPB_WA = "

EXCEPTIONS
INVALID_ACCOUNT = 1 PERMISSION_DENIED = 2 INVALID_VALTY = 3 INVALID_BUDAT = 4 WRITE_FAILED = 5 TOO_MANY_ENTRIES = 6 ACCOUNT_LOCKED = 7 WRONG_CURRENCY = 8
.



IMPORTING Parameters details for HR_CH_PK_WRITE_TO_ACCOUNT

PERNR -

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

EXPFL -

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

ORGIN -

Data type: T5CPB-ORGIN
Optional: No
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)

TESTMODE -

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

KONNR -

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

BUDAT -

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

VALTY -

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

VALUE -

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

WAERS -

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

VADAT -

Data type: T5CPB-VADAT
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)

EXPORTING Parameters details for HR_CH_PK_WRITE_TO_ACCOUNT

T5CPB_WA -

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

EXCEPTIONS details

INVALID_ACCOUNT -

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

PERMISSION_DENIED -

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

INVALID_VALTY -

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

INVALID_BUDAT -

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

WRITE_FAILED -

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

TOO_MANY_ENTRIES -

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

ACCOUNT_LOCKED -

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

WRONG_CURRENCY -

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

Copy and paste ABAP code example for HR_CH_PK_WRITE_TO_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_pernr  TYPE P0000-PERNR, "   
lv_t5cpb_wa  TYPE T5CPB, "   
lv_invalid_account  TYPE T5CPB, "   
lv_expfl  TYPE P02VS_FLAG, "   ' '
lv_orgin  TYPE T5CPB-ORGIN, "   
lv_evflag  TYPE P02VS_FLAG, "   ' '
lv_testmode  TYPE P02VS_FLAG, "   ' '
lv_konnr  TYPE T5CPK-KONNR, "   
lv_permission_denied  TYPE T5CPK, "   
lv_budat  TYPE T5CPB-BUDAT, "   
lv_invalid_valty  TYPE T5CPB, "   
lv_valty  TYPE T5CA2-VALTY, "   
lv_invalid_budat  TYPE T5CA2, "   
lv_value  TYPE T5CAD-VALUE, "   
lv_write_failed  TYPE T5CAD, "   
lv_waers  TYPE TCURC-WAERS, "   ' '
lv_too_many_entries  TYPE TCURC, "   
lv_vadat  TYPE T5CPB-VADAT, "   
lv_account_locked  TYPE T5CPB, "   
lv_pabrp  TYPE T549Q-PABRP, "   
lv_wrong_currency  TYPE T549Q, "   
lv_pabrj  TYPE T549Q-PABRJ. "   

  CALL FUNCTION 'HR_CH_PK_WRITE_TO_ACCOUNT'  "
    EXPORTING
         PERNR = lv_pernr
         EXPFL = lv_expfl
         ORGIN = lv_orgin
         EVFLAG = lv_evflag
         TESTMODE = lv_testmode
         KONNR = lv_konnr
         BUDAT = lv_budat
         VALTY = lv_valty
         VALUE = lv_value
         WAERS = lv_waers
         VADAT = lv_vadat
         PABRP = lv_pabrp
         PABRJ = lv_pabrj
    IMPORTING
         T5CPB_WA = lv_t5cpb_wa
    EXCEPTIONS
        INVALID_ACCOUNT = 1
        PERMISSION_DENIED = 2
        INVALID_VALTY = 3
        INVALID_BUDAT = 4
        WRITE_FAILED = 5
        TOO_MANY_ENTRIES = 6
        ACCOUNT_LOCKED = 7
        WRONG_CURRENCY = 8
. " HR_CH_PK_WRITE_TO_ACCOUNT




ABAP code using 7.40 inline data declarations to call FM HR_CH_PK_WRITE_TO_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 PERNR FROM P0000 INTO @DATA(ld_pernr).
 
 
 
DATA(ld_expfl) = ' '.
 
"SELECT single ORGIN FROM T5CPB INTO @DATA(ld_orgin).
 
DATA(ld_evflag) = ' '.
 
DATA(ld_testmode) = ' '.
 
"SELECT single KONNR FROM T5CPK INTO @DATA(ld_konnr).
 
 
"SELECT single BUDAT FROM T5CPB INTO @DATA(ld_budat).
 
 
"SELECT single VALTY FROM T5CA2 INTO @DATA(ld_valty).
 
 
"SELECT single VALUE FROM T5CAD INTO @DATA(ld_value).
 
 
"SELECT single WAERS FROM TCURC INTO @DATA(ld_waers).
DATA(ld_waers) = ' '.
 
 
"SELECT single VADAT FROM T5CPB INTO @DATA(ld_vadat).
 
 
"SELECT single PABRP FROM T549Q INTO @DATA(ld_pabrp).
 
 
"SELECT single PABRJ FROM T549Q INTO @DATA(ld_pabrj).
 


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!