SAP MM_GROUP_REQUISITIONS Function Module for NOTRANSL: Gruppierung von Bestellanforderungen für die automatische Bestel









MM_GROUP_REQUISITIONS is a standard mm group requisitions 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: Gruppierung von Bestellanforderungen für die automatische Bestel 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 mm group requisitions FM, simply by entering the name MM_GROUP_REQUISITIONS into the relevant SAP transaction such as SE37 or SE38.

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



Function MM_GROUP_REQUISITIONS 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 'MM_GROUP_REQUISITIONS'"NOTRANSL: Gruppierung von Bestellanforderungen für die automatische Bestel
EXPORTING
* I_GROUP_BY_COMPANY_CODE = 'X' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_CONTRACT = 'X' "ABAP System Field: Call Mode of Current ABAP Program
* I_GEN_SCHED_LINES = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_PLANT = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_PURCHASING_GROUP = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_ITEM_CATEGORY = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_DELIVERY_DATE = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_VSR = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_STORAGE_LOCATION = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_REQUISITION = ' ' "ABAP System Field: Call Mode of Current ABAP Program
* I_GROUP_BY_REQUISITION_ITEM = ' ' "ABAP System Field: Call Mode of Current ABAP Program

TABLES
* T_EBAN = "Purchase Requisition
* T_EBANX = "Control Break Structure in Case of Automatic PO Generation

EXCEPTIONS
MISSING_SOURCE_OF_SUPPLY = 1 ERROR_IN_COMPANY_CODE = 2
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLME59_001 Grouping of Requisitions for Automatic Generation of Purchase Orders

IMPORTING Parameters details for MM_GROUP_REQUISITIONS

I_GROUP_BY_COMPANY_CODE - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_CONTRACT - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GEN_SCHED_LINES - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_PLANT - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_PURCHASING_GROUP - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_ITEM_CATEGORY - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_DELIVERY_DATE - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_VSR - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_STORAGE_LOCATION - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_REQUISITION - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GROUP_BY_REQUISITION_ITEM - ABAP System Field: Call Mode of Current ABAP Program

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MM_GROUP_REQUISITIONS

T_EBAN - Purchase Requisition

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

T_EBANX - Control Break Structure in Case of Automatic PO Generation

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

EXCEPTIONS details

MISSING_SOURCE_OF_SUPPLY -

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

ERROR_IN_COMPANY_CODE -

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

Copy and paste ABAP code example for MM_GROUP_REQUISITIONS 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_t_eban  TYPE STANDARD TABLE OF EBAN, "   
lv_i_group_by_company_code  TYPE SY-CALLD, "   'X'
lv_missing_source_of_supply  TYPE SY, "   
lv_i_group_by_contract  TYPE SY-CALLD, "   'X'
lv_i_gen_sched_lines  TYPE SY-CALLD, "   SPACE
lt_t_ebanx  TYPE STANDARD TABLE OF EBANX, "   
lv_i_group_by_plant  TYPE SY-CALLD, "   SPACE
lv_error_in_company_code  TYPE SY, "   
lv_i_group_by_purchasing_group  TYPE SY-CALLD, "   SPACE
lv_i_group_by_item_category  TYPE SY-CALLD, "   SPACE
lv_i_group_by_delivery_date  TYPE SY-CALLD, "   SPACE
lv_i_group_by_vsr  TYPE SY-CALLD, "   SPACE
lv_i_group_by_storage_location  TYPE SY-CALLD, "   SPACE
lv_i_group_by_requisition  TYPE SY-CALLD, "   SPACE
lv_i_group_by_requisition_item  TYPE SY-CALLD. "   SPACE

  CALL FUNCTION 'MM_GROUP_REQUISITIONS'  "NOTRANSL: Gruppierung von Bestellanforderungen für die automatische Bestel
    EXPORTING
         I_GROUP_BY_COMPANY_CODE = lv_i_group_by_company_code
         I_GROUP_BY_CONTRACT = lv_i_group_by_contract
         I_GEN_SCHED_LINES = lv_i_gen_sched_lines
         I_GROUP_BY_PLANT = lv_i_group_by_plant
         I_GROUP_BY_PURCHASING_GROUP = lv_i_group_by_purchasing_group
         I_GROUP_BY_ITEM_CATEGORY = lv_i_group_by_item_category
         I_GROUP_BY_DELIVERY_DATE = lv_i_group_by_delivery_date
         I_GROUP_BY_VSR = lv_i_group_by_vsr
         I_GROUP_BY_STORAGE_LOCATION = lv_i_group_by_storage_location
         I_GROUP_BY_REQUISITION = lv_i_group_by_requisition
         I_GROUP_BY_REQUISITION_ITEM = lv_i_group_by_requisition_item
    TABLES
         T_EBAN = lt_t_eban
         T_EBANX = lt_t_ebanx
    EXCEPTIONS
        MISSING_SOURCE_OF_SUPPLY = 1
        ERROR_IN_COMPANY_CODE = 2
. " MM_GROUP_REQUISITIONS




ABAP code using 7.40 inline data declarations to call FM MM_GROUP_REQUISITIONS

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 CALLD FROM SY INTO @DATA(ld_i_group_by_company_code).
DATA(ld_i_group_by_company_code) = 'X'.
 
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_contract).
DATA(ld_i_group_by_contract) = 'X'.
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_gen_sched_lines).
DATA(ld_i_gen_sched_lines) = ' '.
 
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_plant).
DATA(ld_i_group_by_plant) = ' '.
 
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_purchasing_group).
DATA(ld_i_group_by_purchasing_group) = ' '.
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_item_category).
DATA(ld_i_group_by_item_category) = ' '.
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_delivery_date).
DATA(ld_i_group_by_delivery_date) = ' '.
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_vsr).
DATA(ld_i_group_by_vsr) = ' '.
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_storage_location).
DATA(ld_i_group_by_storage_location) = ' '.
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_requisition).
DATA(ld_i_group_by_requisition) = ' '.
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_group_by_requisition_item).
DATA(ld_i_group_by_requisition_item) = ' '.
 


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!