SAP MTREE_DATA_SEND Function Module for NOTRANSL: Datenübergabe an SAPLM61T für Tree-Control
MTREE_DATA_SEND is a standard mtree data send SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Datenübergabe an SAPLM61T für Tree-Control 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 mtree data send FM, simply by entering the name MTREE_DATA_SEND into the relevant SAP transaction such as SE37 or SE38.
Function Group: M61T
Program Name: SAPLM61T
Main Program: SAPLM61T
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MTREE_DATA_SEND 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 'MTREE_DATA_SEND'"NOTRANSL: Datenübergabe an SAPLM61T für Tree-Control.
EXPORTING
* ERM61R = "
* EDELNR = "
* EDELPS = 000000 "
* EDELET = 0000 "
* EPOSID = "Work Breakdown Structure Element (WBS Element)
* EMDPS = "
* EMEMFL = "Read Order Report from Buffer
* EBADI_M61R = "BAdI Control Parameters - Material Overview
* EPROFILE = "Customizing: Order Report Profiles
* EMDSAM = "Product Grouping for Stock/Requirements List
* ECM61X = "
* EPRGRP = ' ' "
* EPRGWK = ' ' "
* EPLSCN = '000' "
* EBERID = "MRP Area
* EMDKEI = "
* EPNAME = ' ' "
* EDELKZ = ' ' "
TABLES
* MDKEX = "
* SORTX = "
* PGBAUX = "
IMPORTING Parameters details for MTREE_DATA_SEND
ERM61R -
Data type: RM61ROptional: Yes
Call by Reference: No ( called with pass by value option)
EDELNR -
Data type: DEL12Optional: Yes
Call by Reference: No ( called with pass by value option)
EDELPS -
Data type: DELPSDefault: 000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
EDELET -
Data type: DELETDefault: 0000
Optional: Yes
Call by Reference: No ( called with pass by value option)
EPOSID - Work Breakdown Structure Element (WBS Element)
Data type: PS_POSIDOptional: Yes
Call by Reference: No ( called with pass by value option)
EMDPS -
Data type: MDPSOptional: Yes
Call by Reference: No ( called with pass by value option)
EMEMFL - Read Order Report from Buffer
Data type: MD_MEM_ORDREPOptional: Yes
Call by Reference: No ( called with pass by value option)
EBADI_M61R - BAdI Control Parameters - Material Overview
Data type: BADI_M61ROptional: Yes
Call by Reference: No ( called with pass by value option)
EPROFILE - Customizing: Order Report Profiles
Data type: T464Optional: Yes
Call by Reference: No ( called with pass by value option)
EMDSAM - Product Grouping for Stock/Requirements List
Data type: MDSAMOptional: Yes
Call by Reference: No ( called with pass by value option)
ECM61X -
Data type: CM61XOptional: Yes
Call by Reference: No ( called with pass by value option)
EPRGRP -
Data type: PRGRPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EPRGWK -
Data type: WERKS_DDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EPLSCN -
Data type: PLSCNDefault: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EBERID - MRP Area
Data type: BERIDOptional: Yes
Call by Reference: No ( called with pass by value option)
EMDKEI -
Data type: MDKEOptional: Yes
Call by Reference: No ( called with pass by value option)
EPNAME -
Data type: RS38M-PROGRAMMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EDELKZ -
Data type: DELKZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MTREE_DATA_SEND
MDKEX -
Data type: MDKEOptional: Yes
Call by Reference: No ( called with pass by value option)
SORTX -
Data type: MDSORTOptional: Yes
Call by Reference: No ( called with pass by value option)
PGBAUX -
Data type: PGBAUOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MTREE_DATA_SEND 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_mdkex | TYPE STANDARD TABLE OF MDKE, " | |||
| lv_erm61r | TYPE RM61R, " | |||
| lv_edelnr | TYPE DEL12, " | |||
| lv_edelps | TYPE DELPS, " 000000 | |||
| lv_edelet | TYPE DELET, " 0000 | |||
| lv_eposid | TYPE PS_POSID, " | |||
| lv_emdps | TYPE MDPS, " | |||
| lv_ememfl | TYPE MD_MEM_ORDREP, " | |||
| lv_ebadi_m61r | TYPE BADI_M61R, " | |||
| lv_eprofile | TYPE T464, " | |||
| lv_emdsam | TYPE MDSAM, " | |||
| lt_sortx | TYPE STANDARD TABLE OF MDSORT, " | |||
| lv_ecm61x | TYPE CM61X, " | |||
| lv_eprgrp | TYPE PRGRP, " SPACE | |||
| lt_pgbaux | TYPE STANDARD TABLE OF PGBAU, " | |||
| lv_eprgwk | TYPE WERKS_D, " SPACE | |||
| lv_eplscn | TYPE PLSCN, " '000' | |||
| lv_eberid | TYPE BERID, " | |||
| lv_emdkei | TYPE MDKE, " | |||
| lv_epname | TYPE RS38M-PROGRAMM, " SPACE | |||
| lv_edelkz | TYPE DELKZ. " SPACE |
|   CALL FUNCTION 'MTREE_DATA_SEND' "NOTRANSL: Datenübergabe an SAPLM61T für Tree-Control |
| EXPORTING | ||
| ERM61R | = lv_erm61r | |
| EDELNR | = lv_edelnr | |
| EDELPS | = lv_edelps | |
| EDELET | = lv_edelet | |
| EPOSID | = lv_eposid | |
| EMDPS | = lv_emdps | |
| EMEMFL | = lv_ememfl | |
| EBADI_M61R | = lv_ebadi_m61r | |
| EPROFILE | = lv_eprofile | |
| EMDSAM | = lv_emdsam | |
| ECM61X | = lv_ecm61x | |
| EPRGRP | = lv_eprgrp | |
| EPRGWK | = lv_eprgwk | |
| EPLSCN | = lv_eplscn | |
| EBERID | = lv_eberid | |
| EMDKEI | = lv_emdkei | |
| EPNAME | = lv_epname | |
| EDELKZ | = lv_edelkz | |
| TABLES | ||
| MDKEX | = lt_mdkex | |
| SORTX | = lt_sortx | |
| PGBAUX | = lt_pgbaux | |
| . " MTREE_DATA_SEND | ||
ABAP code using 7.40 inline data declarations to call FM MTREE_DATA_SEND
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_edelps) | = 000000. | |||
| DATA(ld_edelet) | = 0000. | |||
| DATA(ld_eprgrp) | = ' '. | |||
| DATA(ld_eprgwk) | = ' '. | |||
| DATA(ld_eplscn) | = '000'. | |||
| "SELECT single PROGRAMM FROM RS38M INTO @DATA(ld_epname). | ||||
| DATA(ld_epname) | = ' '. | |||
| DATA(ld_edelkz) | = ' '. | |||
Search for further information about these or an SAP related objects