SAP PEG04_MM_GOODS_TRANSFER Function Module for Handling of Transfer Postings









PEG04_MM_GOODS_TRANSFER is a standard peg04 mm goods transfer SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Handling of Transfer Postings processing and below is the pattern details for this FM, 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 peg04 mm goods transfer FM, simply by entering the name PEG04_MM_GOODS_TRANSFER into the relevant SAP transaction such as SE37 or SE38.

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



Function PEG04_MM_GOODS_TRANSFER 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 'PEG04_MM_GOODS_TRANSFER'"Handling of Transfer Postings
EXPORTING
I_MKPF = "
I_MATNR = "
* I_TLLONR = "
* I_WOCOST = "
* I_TPLANT = "
* I_TCODE = "
* I_XCODE = "
I_REVERSAL = "Reversal movement type

TABLES
T_MSEG = "
T_PEG_STK = "
T_PEG_ACTASS = "
T_VM07M = "
.



IMPORTING Parameters details for PEG04_MM_GOODS_TRANSFER

I_MKPF -

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

I_MATNR -

Data type: MARA-MATNR
Optional: No
Call by Reference: Yes

I_TLLONR -

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

I_WOCOST -

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

I_TPLANT -

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

I_TCODE -

Data type: SY-TCODE
Optional: Yes
Call by Reference: Yes

I_XCODE -

Data type: SY-TCODE
Optional: Yes
Call by Reference: Yes

I_REVERSAL - Reversal movement type

Data type: T156-XSTBW
Optional: No
Call by Reference: Yes

TABLES Parameters details for PEG04_MM_GOODS_TRANSFER

T_MSEG -

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

T_PEG_STK -

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

T_PEG_ACTASS -

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

T_VM07M -

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

Copy and paste ABAP code example for PEG04_MM_GOODS_TRANSFER 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_mkpf  TYPE MKPF, "   
lt_t_mseg  TYPE STANDARD TABLE OF MSEG, "   
lv_i_matnr  TYPE MARA-MATNR, "   
lt_t_peg_stk  TYPE STANDARD TABLE OF PEG_TSTK, "   
lv_i_tllonr  TYPE TBLP_BELNR, "   
lt_t_peg_actass  TYPE STANDARD TABLE OF PEG_TACTASS, "   
lt_t_vm07m  TYPE STANDARD TABLE OF VM07M, "   
lv_i_wocost  TYPE WOCOST, "   
lv_i_tplant  TYPE WERKS_D, "   
lv_i_tcode  TYPE SY-TCODE, "   
lv_i_xcode  TYPE SY-TCODE, "   
lv_i_reversal  TYPE T156-XSTBW. "   

  CALL FUNCTION 'PEG04_MM_GOODS_TRANSFER'  "Handling of Transfer Postings
    EXPORTING
         I_MKPF = lv_i_mkpf
         I_MATNR = lv_i_matnr
         I_TLLONR = lv_i_tllonr
         I_WOCOST = lv_i_wocost
         I_TPLANT = lv_i_tplant
         I_TCODE = lv_i_tcode
         I_XCODE = lv_i_xcode
         I_REVERSAL = lv_i_reversal
    TABLES
         T_MSEG = lt_t_mseg
         T_PEG_STK = lt_t_peg_stk
         T_PEG_ACTASS = lt_t_peg_actass
         T_VM07M = lt_t_vm07m
. " PEG04_MM_GOODS_TRANSFER




ABAP code using 7.40 inline data declarations to call FM PEG04_MM_GOODS_TRANSFER

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 MATNR FROM MARA INTO @DATA(ld_i_matnr).
 
 
 
 
 
 
 
"SELECT single TCODE FROM SY INTO @DATA(ld_i_tcode).
 
"SELECT single TCODE FROM SY INTO @DATA(ld_i_xcode).
 
"SELECT single XSTBW FROM T156 INTO @DATA(ld_i_reversal).
 


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!