SAP LOCATION_MERCHGROUPS_WITH_TEXT Function Module for NOTRANSL: Werkswarengruppen zu Werk/-abteilung mit Bezeichnung









LOCATION_MERCHGROUPS_WITH_TEXT is a standard location merchgroups with text 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: Werkswarengruppen zu Werk/-abteilung mit Bezeichnung 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 location merchgroups with text FM, simply by entering the name LOCATION_MERCHGROUPS_WITH_TEXT into the relevant SAP transaction such as SE37 or SE38.

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



Function LOCATION_MERCHGROUPS_WITH_TEXT 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 'LOCATION_MERCHGROUPS_WITH_TEXT'"NOTRANSL: Werkswarengruppen zu Werk/-abteilung mit Bezeichnung
EXPORTING
* I_WERKS = "Plant Number
* I_KUNNR = "Customer Number of Plant
* I_ABTNR = "Department Number
* I_LANGU = "Language

TABLES
O_MERCHGROUPS = "Material group of a plant/plant department incl. description

EXCEPTIONS
INVALID_PLANT = 1 PLANT_NOT_FOUND = 2 PLANT_IS_NO_RETAIL_SITE = 3 PLANT_HAS_NO_CUSTOMER = 4 INVALID_DEPARTMENT = 5 PLANT_HAS_NO_MERCHGROUPS = 6 DEPARTMENT_HAS_NO_MERCHGROUPS = 7 NO_DESCRIBTION_FOUND = 8
.



IMPORTING Parameters details for LOCATION_MERCHGROUPS_WITH_TEXT

I_WERKS - Plant Number

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

I_KUNNR - Customer Number of Plant

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

I_ABTNR - Department Number

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

I_LANGU - Language

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

TABLES Parameters details for LOCATION_MERCHGROUPS_WITH_TEXT

O_MERCHGROUPS - Material group of a plant/plant department incl. description

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

EXCEPTIONS details

INVALID_PLANT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

PLANT_NOT_FOUND - Plant does not exist

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

PLANT_IS_NO_RETAIL_SITE - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

PLANT_HAS_NO_CUSTOMER - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

INVALID_DEPARTMENT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

PLANT_HAS_NO_MERCHGROUPS - No material groups were found

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

DEPARTMENT_HAS_NO_MERCHGROUPS - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NO_DESCRIBTION_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

Copy and paste ABAP code example for LOCATION_MERCHGROUPS_WITH_TEXT 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_werks  TYPE T001W-WERKS, "   
lv_invalid_plant  TYPE T001W, "   
lt_o_merchgroups  TYPE STANDARD TABLE OF BAPISITEMGRP, "   
lv_i_kunnr  TYPE T001W-KUNNR, "   
lv_plant_not_found  TYPE T001W, "   
lv_i_abtnr  TYPE WRF6-ABTNR, "   
lv_plant_is_no_retail_site  TYPE WRF6, "   
lv_i_langu  TYPE SY-LANGU, "   
lv_plant_has_no_customer  TYPE SY, "   
lv_invalid_department  TYPE SY, "   
lv_plant_has_no_merchgroups  TYPE SY, "   
lv_department_has_no_merchgroups  TYPE SY, "   
lv_no_describtion_found  TYPE SY. "   

  CALL FUNCTION 'LOCATION_MERCHGROUPS_WITH_TEXT'  "NOTRANSL: Werkswarengruppen zu Werk/-abteilung mit Bezeichnung
    EXPORTING
         I_WERKS = lv_i_werks
         I_KUNNR = lv_i_kunnr
         I_ABTNR = lv_i_abtnr
         I_LANGU = lv_i_langu
    TABLES
         O_MERCHGROUPS = lt_o_merchgroups
    EXCEPTIONS
        INVALID_PLANT = 1
        PLANT_NOT_FOUND = 2
        PLANT_IS_NO_RETAIL_SITE = 3
        PLANT_HAS_NO_CUSTOMER = 4
        INVALID_DEPARTMENT = 5
        PLANT_HAS_NO_MERCHGROUPS = 6
        DEPARTMENT_HAS_NO_MERCHGROUPS = 7
        NO_DESCRIBTION_FOUND = 8
. " LOCATION_MERCHGROUPS_WITH_TEXT




ABAP code using 7.40 inline data declarations to call FM LOCATION_MERCHGROUPS_WITH_TEXT

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 WERKS FROM T001W INTO @DATA(ld_i_werks).
 
 
 
"SELECT single KUNNR FROM T001W INTO @DATA(ld_i_kunnr).
 
 
"SELECT single ABTNR FROM WRF6 INTO @DATA(ld_i_abtnr).
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_i_langu).
 
 
 
 
 
 


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!