SAP MATERIAL_READ_WITH_MATKL Function Module for NOTRANSL: Lesen Materialien zu einer Warengruppe









MATERIAL_READ_WITH_MATKL is a standard material read with matkl 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 Materialien zu einer Warengruppe 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 material read with matkl FM, simply by entering the name MATERIAL_READ_WITH_MATKL into the relevant SAP transaction such as SE37 or SE38.

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



Function MATERIAL_READ_WITH_MATKL 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 'MATERIAL_READ_WITH_MATKL'"NOTRANSL: Lesen Materialien zu einer Warengruppe
EXPORTING
MATKL = "
* ONLY_RETAIL = ' ' "
* SPRAS = ' ' "
* ONLY_ACTIVE = 'X' "
* KZRFB = ' ' "Indicator: Reset Buffer for Material_Pre_Fetch
* INCL_PLANNED = '' "DE-EN-LANG-SWITCH-NO-TRANSLATION

TABLES
* T_MARA = "
* T_MAKT = "
.



IMPORTING Parameters details for MATERIAL_READ_WITH_MATKL

MATKL -

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

ONLY_RETAIL -

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

SPRAS -

Data type: MAKT-SPRAS
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

ONLY_ACTIVE -

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

KZRFB - Indicator: Reset Buffer for Material_Pre_Fetch

Data type: MTCOM-KZRFB
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

INCL_PLANNED - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

TABLES Parameters details for MATERIAL_READ_WITH_MATKL

T_MARA -

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

T_MAKT -

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

Copy and paste ABAP code example for MATERIAL_READ_WITH_MATKL 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_matkl  TYPE MARA-MATKL, "   
lt_t_mara  TYPE STANDARD TABLE OF MARA, "   
lt_t_makt  TYPE STANDARD TABLE OF MAKT, "   
lv_only_retail  TYPE MAKT, "   ' '
lv_spras  TYPE MAKT-SPRAS, "   ' '
lv_only_active  TYPE MAKT, "   'X'
lv_kzrfb  TYPE MTCOM-KZRFB, "   ' '
lv_incl_planned  TYPE CHAR1. "   ''

  CALL FUNCTION 'MATERIAL_READ_WITH_MATKL'  "NOTRANSL: Lesen Materialien zu einer Warengruppe
    EXPORTING
         MATKL = lv_matkl
         ONLY_RETAIL = lv_only_retail
         SPRAS = lv_spras
         ONLY_ACTIVE = lv_only_active
         KZRFB = lv_kzrfb
         INCL_PLANNED = lv_incl_planned
    TABLES
         T_MARA = lt_t_mara
         T_MAKT = lt_t_makt
. " MATERIAL_READ_WITH_MATKL




ABAP code using 7.40 inline data declarations to call FM MATERIAL_READ_WITH_MATKL

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 MARA INTO @DATA(ld_matkl).
 
 
 
DATA(ld_only_retail) = ' '.
 
"SELECT single SPRAS FROM MAKT INTO @DATA(ld_spras).
DATA(ld_spras) = ' '.
 
DATA(ld_only_active) = 'X'.
 
"SELECT single KZRFB FROM MTCOM INTO @DATA(ld_kzrfb).
DATA(ld_kzrfb) = ' '.
 
DATA(ld_incl_planned) = ''.
 


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!