SAP PEG02_UPDATE_ASSIGNMENTS Function Module for









PEG02_UPDATE_ASSIGNMENTS is a standard peg02 update assignments 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 peg02 update assignments FM, simply by entering the name PEG02_UPDATE_ASSIGNMENTS into the relevant SAP transaction such as SE37 or SE38.

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



Function PEG02_UPDATE_ASSIGNMENTS 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 'PEG02_UPDATE_ASSIGNMENTS'"
EXPORTING
* I_SORT = 'X' "
* I_TEST = "
* I_CHECK_TSTK = "
* I_TCTRL = "

IMPORTING
E_ASS_CHG = "
E_ASS_NEW = "
E_ASS_DEL = "
E_ASS_UNCHG = "

CHANGING
* CT_REPOBJ = "
* CT_PEG_TASS_HIST = "
* CT_PEG_TASS = "
* CT_PEG_TSTK = "
* CT_PEG_TSTK_HIST = "
* CT_PEG_TACTASS = "
* CT_PEG_TACTASS_HIST = "

TABLES
* T_PEG_ADMIN_INS = "
* T_PEG_ADMIN_DEL = "
* T_MSPR = "
* T_MSEG = "
* T_MKPF = "
* T_WLST_DEL = "
.



IMPORTING Parameters details for PEG02_UPDATE_ASSIGNMENTS

I_SORT -

Data type: BOOLE-BOOLE
Default: 'X'
Optional: Yes
Call by Reference: Yes

I_TEST -

Data type: BOOLE-BOOLE
Optional: Yes
Call by Reference: Yes

I_CHECK_TSTK -

Data type: BOOLE-BOOLE
Optional: Yes
Call by Reference: Yes

I_TCTRL -

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

EXPORTING Parameters details for PEG02_UPDATE_ASSIGNMENTS

E_ASS_CHG -

Data type: I
Optional: No
Call by Reference: Yes

E_ASS_NEW -

Data type: I
Optional: No
Call by Reference: Yes

E_ASS_DEL -

Data type: I
Optional: No
Call by Reference: Yes

E_ASS_UNCHG -

Data type: I
Optional: No
Call by Reference: Yes

CHANGING Parameters details for PEG02_UPDATE_ASSIGNMENTS

CT_REPOBJ -

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

CT_PEG_TASS_HIST -

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

CT_PEG_TASS -

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

CT_PEG_TSTK -

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

CT_PEG_TSTK_HIST -

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

CT_PEG_TACTASS -

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

CT_PEG_TACTASS_HIST -

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

TABLES Parameters details for PEG02_UPDATE_ASSIGNMENTS

T_PEG_ADMIN_INS -

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

T_PEG_ADMIN_DEL -

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

T_MSPR -

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

T_MSEG -

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

T_MKPF -

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

T_WLST_DEL -

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

Copy and paste ABAP code example for PEG02_UPDATE_ASSIGNMENTS 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_i_sort  TYPE BOOLE-BOOLE, "   'X'
lv_ct_repobj  TYPE PEG_T_REPOBJ, "   
lv_e_ass_chg  TYPE I, "   
lt_t_peg_admin_ins  TYPE STANDARD TABLE OF PEG_ADMIN, "   
lv_i_test  TYPE BOOLE-BOOLE, "   
lv_e_ass_new  TYPE I, "   
lt_t_peg_admin_del  TYPE STANDARD TABLE OF PEG_ADMIN, "   
lv_ct_peg_tass_hist  TYPE PEG_T_TASS, "   
lt_t_mspr  TYPE STANDARD TABLE OF SMSPR, "   
lv_e_ass_del  TYPE I, "   
lv_ct_peg_tass  TYPE PEG_T_TASS, "   
lv_i_check_tstk  TYPE BOOLE-BOOLE, "   
lt_t_mseg  TYPE STANDARD TABLE OF MSEG, "   
lv_i_tctrl  TYPE PEG_TCTRL, "   
lv_ct_peg_tstk  TYPE PEG_T_TSTK, "   
lv_e_ass_unchg  TYPE I, "   
lt_t_mkpf  TYPE STANDARD TABLE OF MKPF, "   
lv_ct_peg_tstk_hist  TYPE PEG_T_TSTK, "   
lt_t_wlst_del  TYPE STANDARD TABLE OF DIS_WLST, "   
lv_ct_peg_tactass  TYPE PEG_T_TACTASS, "   
lv_ct_peg_tactass_hist  TYPE PEG_T_TACTASS. "   

  CALL FUNCTION 'PEG02_UPDATE_ASSIGNMENTS'  "
    EXPORTING
         I_SORT = lv_i_sort
         I_TEST = lv_i_test
         I_CHECK_TSTK = lv_i_check_tstk
         I_TCTRL = lv_i_tctrl
    IMPORTING
         E_ASS_CHG = lv_e_ass_chg
         E_ASS_NEW = lv_e_ass_new
         E_ASS_DEL = lv_e_ass_del
         E_ASS_UNCHG = lv_e_ass_unchg
    CHANGING
         CT_REPOBJ = lv_ct_repobj
         CT_PEG_TASS_HIST = lv_ct_peg_tass_hist
         CT_PEG_TASS = lv_ct_peg_tass
         CT_PEG_TSTK = lv_ct_peg_tstk
         CT_PEG_TSTK_HIST = lv_ct_peg_tstk_hist
         CT_PEG_TACTASS = lv_ct_peg_tactass
         CT_PEG_TACTASS_HIST = lv_ct_peg_tactass_hist
    TABLES
         T_PEG_ADMIN_INS = lt_t_peg_admin_ins
         T_PEG_ADMIN_DEL = lt_t_peg_admin_del
         T_MSPR = lt_t_mspr
         T_MSEG = lt_t_mseg
         T_MKPF = lt_t_mkpf
         T_WLST_DEL = lt_t_wlst_del
. " PEG02_UPDATE_ASSIGNMENTS




ABAP code using 7.40 inline data declarations to call FM PEG02_UPDATE_ASSIGNMENTS

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 BOOLE FROM BOOLE INTO @DATA(ld_i_sort).
DATA(ld_i_sort) = 'X'.
 
 
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_test).
 
 
 
 
 
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_check_tstk).
 
 
 
 
 
 
 
 
 
 


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!