SAP PEG02_UPDATE_ASSIGNMENTS_NEW Function Module for
PEG02_UPDATE_ASSIGNMENTS_NEW is a standard peg02 update assignments new 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 new FM, simply by entering the name PEG02_UPDATE_ASSIGNMENTS_NEW 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_NEW 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_NEW'".
EXPORTING
* I_SORT = 'X' "
* I_TEST = "
* I_CHECK_TSTK = "
* I_CLIENT = "Pegging: General settings for customizing
* I_LOG_HANDLE = "Application Log: Log Handle
IMPORTING
E_ASS_CHG = "
E_ASS_NEW = "
E_ASS_DEL = "
E_ASS_UNCHG = "
CHANGING
* CT_REPOBJ = "
* CT_PEG_TSTK_H = "Pegging: Stock table
* CT_PEG_TSTK_HIST_H = "Pegging: Stock table
* CT_PEG_TACTASS_H = "Table of Issues
* CT_PEG_TACTASS_HIST_H = "Table of Issues
* CT_PEG_TGTG = "Pegging: Group to group transfers records
* CT_PEG_TGTG_HIST = "Pegging: Group to group transfers records
* CT_PEG_TASS_TMP_HIST = "Grp-to-Grp Transf. Pegging: Assign. of Replen to WBS Elems.
* CT_PEG_TASS_TMP = "Grp-to-Grp Transf. Pegging: Assign. of Replen to WBS Elems.
* CT_PEG_TASS_WLST_HIST = "Grp-to-Grp Transf. Pegging: Subcomponents of transf'd. mat.
* CT_PEG_TASS_WLST = "Grp-to-Grp Transf. Pegging: Subcomponents of transf'd. mat.
* CT_PEG_TASS_HIST = "
* CT_PEG_TGTG_H = "Pegging: Group to group transfers records
* CT_PEG_TGTG_HIST_H = "Pegging: Group to group transfers records
* CT_PEG_TXPT_HISTORY = "Table of cross plant transfers history w.r.t STO's
* CT_PEG_TXPT_HISTORY_HIST = "Table of cross plant transfers history w.r.t STO's
* CT_PEG_TASS = "
* CT_PEG_TSTK = "
* CT_PEG_TSTK_HIST = "
* CT_PEG_TACTASS = "
* CT_PEG_TACTASS_HIST = "
* CT_PEG_TXPT_HIST = "Pegging: Record of goods movements w.r.t STO's
* CT_PEG_TXPT = "Pegging: Record of goods movements w.r.t STO's
TABLES
* T_PEG_ADMIN_INS = "
* T_PEG_ADMIN_DEL = "
* T_MSPR = "Pegging: SMSPR
* T_MSEG = "
* T_MKPF = "
* T_WLST_DEL = "
* T_PEG_DIS_ADMIN_INS = "Pegging and Distribution - administration table
* T_PEG_DIS_ADMIN_DEL = "Pegging and Distribution - administration table
* T_PEG_DIS_ADMIN_UPD = "Pegging and Distribution - administration table
IMPORTING Parameters details for PEG02_UPDATE_ASSIGNMENTS_NEW
I_SORT -
Data type: BOOLE-BOOLEDefault: 'X'
Optional: Yes
Call by Reference: Yes
I_TEST -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: Yes
I_CHECK_TSTK -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: Yes
I_CLIENT - Pegging: General settings for customizing
Data type: PEG_CLIENTOptional: Yes
Call by Reference: Yes
I_LOG_HANDLE - Application Log: Log Handle
Data type: BALLOGHNDLOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for PEG02_UPDATE_ASSIGNMENTS_NEW
E_ASS_CHG -
Data type: IOptional: No
Call by Reference: Yes
E_ASS_NEW -
Data type: IOptional: No
Call by Reference: Yes
E_ASS_DEL -
Data type: IOptional: No
Call by Reference: Yes
E_ASS_UNCHG -
Data type: IOptional: No
Call by Reference: Yes
CHANGING Parameters details for PEG02_UPDATE_ASSIGNMENTS_NEW
CT_REPOBJ -
Data type: PEG_T_REPOBJOptional: Yes
Call by Reference: Yes
CT_PEG_TSTK_H - Pegging: Stock table
Data type: PEG_T_TSTKOptional: Yes
Call by Reference: Yes
CT_PEG_TSTK_HIST_H - Pegging: Stock table
Data type: PEG_T_TSTKOptional: Yes
Call by Reference: Yes
CT_PEG_TACTASS_H - Table of Issues
Data type: PEG_T_TACTASSOptional: Yes
Call by Reference: Yes
CT_PEG_TACTASS_HIST_H - Table of Issues
Data type: PEG_T_TACTASSOptional: Yes
Call by Reference: Yes
CT_PEG_TGTG - Pegging: Group to group transfers records
Data type: PEG_T_TGTGOptional: Yes
Call by Reference: Yes
CT_PEG_TGTG_HIST - Pegging: Group to group transfers records
Data type: PEG_T_TGTGOptional: Yes
Call by Reference: Yes
CT_PEG_TASS_TMP_HIST - Grp-to-Grp Transf. Pegging: Assign. of Replen to WBS Elems.
Data type: PEG_T_TASS_TMPOptional: Yes
Call by Reference: Yes
CT_PEG_TASS_TMP - Grp-to-Grp Transf. Pegging: Assign. of Replen to WBS Elems.
Data type: PEG_T_TASS_TMPOptional: Yes
Call by Reference: Yes
CT_PEG_TASS_WLST_HIST - Grp-to-Grp Transf. Pegging: Subcomponents of transf'd. mat.
Data type: PEG_T_TASS_WLSTOptional: Yes
Call by Reference: Yes
CT_PEG_TASS_WLST - Grp-to-Grp Transf. Pegging: Subcomponents of transf'd. mat.
Data type: PEG_T_TASS_WLSTOptional: Yes
Call by Reference: Yes
CT_PEG_TASS_HIST -
Data type: PEG_T_TASSOptional: Yes
Call by Reference: Yes
CT_PEG_TGTG_H - Pegging: Group to group transfers records
Data type: PEG_T_TGTGOptional: Yes
Call by Reference: Yes
CT_PEG_TGTG_HIST_H - Pegging: Group to group transfers records
Data type: PEG_T_TGTGOptional: Yes
Call by Reference: Yes
CT_PEG_TXPT_HISTORY - Table of cross plant transfers history w.r.t STO's
Data type: PEG_T_TXPT_HISTOptional: Yes
Call by Reference: Yes
CT_PEG_TXPT_HISTORY_HIST - Table of cross plant transfers history w.r.t STO's
Data type: PEG_T_TXPT_HISTOptional: Yes
Call by Reference: Yes
CT_PEG_TASS -
Data type: PEG_T_TASSOptional: Yes
Call by Reference: Yes
CT_PEG_TSTK -
Data type: PEG_T_TSTKOptional: Yes
Call by Reference: Yes
CT_PEG_TSTK_HIST -
Data type: PEG_T_TSTKOptional: Yes
Call by Reference: Yes
CT_PEG_TACTASS -
Data type: PEG_T_TACTASSOptional: Yes
Call by Reference: Yes
CT_PEG_TACTASS_HIST -
Data type: PEG_T_TACTASSOptional: Yes
Call by Reference: Yes
CT_PEG_TXPT_HIST - Pegging: Record of goods movements w.r.t STO's
Data type: PEG_T_TXPTOptional: Yes
Call by Reference: Yes
CT_PEG_TXPT - Pegging: Record of goods movements w.r.t STO's
Data type: PEG_T_TXPTOptional: Yes
Call by Reference: Yes
TABLES Parameters details for PEG02_UPDATE_ASSIGNMENTS_NEW
T_PEG_ADMIN_INS -
Data type: PEG_ADMINOptional: Yes
Call by Reference: No ( called with pass by value option)
T_PEG_ADMIN_DEL -
Data type: PEG_ADMINOptional: Yes
Call by Reference: No ( called with pass by value option)
T_MSPR - Pegging: SMSPR
Data type: SMSPROptional: Yes
Call by Reference: Yes
T_MSEG -
Data type: MSEGOptional: Yes
Call by Reference: No ( called with pass by value option)
T_MKPF -
Data type: MKPFOptional: Yes
Call by Reference: No ( called with pass by value option)
T_WLST_DEL -
Data type: DIS_WLSTOptional: Yes
Call by Reference: No ( called with pass by value option)
T_PEG_DIS_ADMIN_INS - Pegging and Distribution - administration table
Data type: PEG_DIS_ADMINOptional: Yes
Call by Reference: Yes
T_PEG_DIS_ADMIN_DEL - Pegging and Distribution - administration table
Data type: PEG_DIS_ADMINOptional: Yes
Call by Reference: Yes
T_PEG_DIS_ADMIN_UPD - Pegging and Distribution - administration table
Data type: PEG_DIS_ADMINOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for PEG02_UPDATE_ASSIGNMENTS_NEW 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_ct_peg_tstk_h | TYPE PEG_T_TSTK, " | |||
| lv_ct_peg_tstk_hist_h | TYPE PEG_T_TSTK, " | |||
| lv_ct_peg_tactass_h | TYPE PEG_T_TACTASS, " | |||
| lv_ct_peg_tactass_hist_h | TYPE PEG_T_TACTASS, " | |||
| lv_ct_peg_tgtg | TYPE PEG_T_TGTG, " | |||
| lv_ct_peg_tgtg_hist | TYPE PEG_T_TGTG, " | |||
| lv_ct_peg_tass_tmp_hist | TYPE PEG_T_TASS_TMP, " | |||
| lv_ct_peg_tass_tmp | TYPE PEG_T_TASS_TMP, " | |||
| lv_ct_peg_tass_wlst_hist | TYPE PEG_T_TASS_WLST, " | |||
| lv_ct_peg_tass_wlst | TYPE PEG_T_TASS_WLST, " | |||
| 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, " | |||
| lv_ct_peg_tgtg_h | TYPE PEG_T_TGTG, " | |||
| lv_ct_peg_tgtg_hist_h | TYPE PEG_T_TGTG, " | |||
| lv_ct_peg_txpt_history | TYPE PEG_T_TXPT_HIST, " | |||
| lv_ct_peg_txpt_history_hist | TYPE PEG_T_TXPT_HIST, " | |||
| 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_client | TYPE PEG_CLIENT, " | |||
| lv_ct_peg_tstk | TYPE PEG_T_TSTK, " | |||
| lv_e_ass_unchg | TYPE I, " | |||
| lt_t_mkpf | TYPE STANDARD TABLE OF MKPF, " | |||
| lv_i_log_handle | TYPE BALLOGHNDL, " | |||
| 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, " | |||
| lt_t_peg_dis_admin_ins | TYPE STANDARD TABLE OF PEG_DIS_ADMIN, " | |||
| lv_ct_peg_txpt_hist | TYPE PEG_T_TXPT, " | |||
| lt_t_peg_dis_admin_del | TYPE STANDARD TABLE OF PEG_DIS_ADMIN, " | |||
| lv_ct_peg_txpt | TYPE PEG_T_TXPT, " | |||
| lt_t_peg_dis_admin_upd | TYPE STANDARD TABLE OF PEG_DIS_ADMIN. " |
|   CALL FUNCTION 'PEG02_UPDATE_ASSIGNMENTS_NEW' " |
| EXPORTING | ||
| I_SORT | = lv_i_sort | |
| I_TEST | = lv_i_test | |
| I_CHECK_TSTK | = lv_i_check_tstk | |
| I_CLIENT | = lv_i_client | |
| I_LOG_HANDLE | = lv_i_log_handle | |
| 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_TSTK_H | = lv_ct_peg_tstk_h | |
| CT_PEG_TSTK_HIST_H | = lv_ct_peg_tstk_hist_h | |
| CT_PEG_TACTASS_H | = lv_ct_peg_tactass_h | |
| CT_PEG_TACTASS_HIST_H | = lv_ct_peg_tactass_hist_h | |
| CT_PEG_TGTG | = lv_ct_peg_tgtg | |
| CT_PEG_TGTG_HIST | = lv_ct_peg_tgtg_hist | |
| CT_PEG_TASS_TMP_HIST | = lv_ct_peg_tass_tmp_hist | |
| CT_PEG_TASS_TMP | = lv_ct_peg_tass_tmp | |
| CT_PEG_TASS_WLST_HIST | = lv_ct_peg_tass_wlst_hist | |
| CT_PEG_TASS_WLST | = lv_ct_peg_tass_wlst | |
| CT_PEG_TASS_HIST | = lv_ct_peg_tass_hist | |
| CT_PEG_TGTG_H | = lv_ct_peg_tgtg_h | |
| CT_PEG_TGTG_HIST_H | = lv_ct_peg_tgtg_hist_h | |
| CT_PEG_TXPT_HISTORY | = lv_ct_peg_txpt_history | |
| CT_PEG_TXPT_HISTORY_HIST | = lv_ct_peg_txpt_history_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 | |
| CT_PEG_TXPT_HIST | = lv_ct_peg_txpt_hist | |
| CT_PEG_TXPT | = lv_ct_peg_txpt | |
| 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 | |
| T_PEG_DIS_ADMIN_INS | = lt_t_peg_dis_admin_ins | |
| T_PEG_DIS_ADMIN_DEL | = lt_t_peg_dis_admin_del | |
| T_PEG_DIS_ADMIN_UPD | = lt_t_peg_dis_admin_upd | |
| . " PEG02_UPDATE_ASSIGNMENTS_NEW | ||
ABAP code using 7.40 inline data declarations to call FM PEG02_UPDATE_ASSIGNMENTS_NEW
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