SAP ARTICLE_GET_FOR_MG Function Module for NOTRANSL: Lesen alle Artikel zu einer Basiswarengruppe









ARTICLE_GET_FOR_MG is a standard article get for mg 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: Lesen alle Artikel zu einer Basiswarengruppe 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 article get for mg FM, simply by entering the name ARTICLE_GET_FOR_MG into the relevant SAP transaction such as SE37 or SE38.

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



Function ARTICLE_GET_FOR_MG 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 'ARTICLE_GET_FOR_MG'"NOTRANSL: Lesen alle Artikel zu einer Basiswarengruppe
EXPORTING
I_MATKL = "
* I_LANGU = SY-LANGU "
* MAX_SELECT = 999999999 "

IMPORTING
O_WGBEZ = "
O_DBCNT = "

TABLES
X_WMGMA = "

EXCEPTIONS
NO_MATERIAL = 1
.



IMPORTING Parameters details for ARTICLE_GET_FOR_MG

I_MATKL -

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

I_LANGU -

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

MAX_SELECT -

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

EXPORTING Parameters details for ARTICLE_GET_FOR_MG

O_WGBEZ -

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

O_DBCNT -

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

TABLES Parameters details for ARTICLE_GET_FOR_MG

X_WMGMA -

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

EXCEPTIONS details

NO_MATERIAL - No Materials Found

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

Copy and paste ABAP code example for ARTICLE_GET_FOR_MG 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_matkl  TYPE T023-MATKL, "   
lv_o_wgbez  TYPE T023T-WGBEZ, "   
lt_x_wmgma  TYPE STANDARD TABLE OF WMGMA, "   
lv_no_material  TYPE WMGMA, "   
lv_i_langu  TYPE SY-LANGU, "   SY-LANGU
lv_o_dbcnt  TYPE SY-DBCNT, "   
lv_max_select  TYPE SY-DBCNT. "   999999999

  CALL FUNCTION 'ARTICLE_GET_FOR_MG'  "NOTRANSL: Lesen alle Artikel zu einer Basiswarengruppe
    EXPORTING
         I_MATKL = lv_i_matkl
         I_LANGU = lv_i_langu
         MAX_SELECT = lv_max_select
    IMPORTING
         O_WGBEZ = lv_o_wgbez
         O_DBCNT = lv_o_dbcnt
    TABLES
         X_WMGMA = lt_x_wmgma
    EXCEPTIONS
        NO_MATERIAL = 1
. " ARTICLE_GET_FOR_MG




ABAP code using 7.40 inline data declarations to call FM ARTICLE_GET_FOR_MG

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 MATKL FROM T023 INTO @DATA(ld_i_matkl).
 
"SELECT single WGBEZ FROM T023T INTO @DATA(ld_o_wgbez).
 
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_i_langu).
DATA(ld_i_langu) = SY-LANGU.
 
"SELECT single DBCNT FROM SY INTO @DATA(ld_o_dbcnt).
 
"SELECT single DBCNT FROM SY INTO @DATA(ld_max_select).
DATA(ld_max_select) = 999999999.
 


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!