SAP MATERIAL_READ_ALL_SINGLE Function Module for Reading all material master data in the select single mode









MATERIAL_READ_ALL_SINGLE is a standard material read all single SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reading all material master data in the select single mode 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 all single FM, simply by entering the name MATERIAL_READ_ALL_SINGLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MACD
Program Name: SAPLMACD
Main Program: SAPLMACD
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function MATERIAL_READ_ALL_SINGLE 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_ALL_SINGLE'"Reading all material master data in the select single mode
EXPORTING
* AKTVSTATUS = ' ' "Current operation status (determined if empty)
HERKUNFT = "Determines type of call
* IMARA = "Not evaluated for origin MATL, LVORM, BTCI
SCHLUESSEL = "Org. level values, material no., control indicator

IMPORTING
AKTVSTATUS_NEW = "New current operation status
TMLGT = "
TMPOP = "
TMVKE = "
TMYMS = "
RETURN = "Return codes
TMAKT = "
TMARA = "
TMARC = "
TMARD = "
TMBEW = "
TMFHM = "
TMLGN = "

TABLES
* MTAB = "Table of maintenance tables for operation status
* RMMME_ITAB = "Table of units of measure for material

EXCEPTIONS
MATERIAL_NOT_FOUND = 1 MATNR_MISSING = 2 NO_AKTVSTATUS = 3 LOCK_ON_MATERIAL = 4 LOCK_SYSTEM_ERROR = 5
.



IMPORTING Parameters details for MATERIAL_READ_ALL_SINGLE

AKTVSTATUS - Current operation status (determined if empty)

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

HERKUNFT - Determines type of call

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

IMARA - Not evaluated for origin MATL, LVORM, BTCI

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

SCHLUESSEL - Org. level values, material no., control indicator

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

EXPORTING Parameters details for MATERIAL_READ_ALL_SINGLE

AKTVSTATUS_NEW - New current operation status

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

TMLGT -

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

TMPOP -

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

TMVKE -

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

TMYMS -

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

RETURN - Return codes

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

TMAKT -

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

TMARA -

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

TMARC -

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

TMARD -

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

TMBEW -

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

TMFHM -

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

TMLGN -

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

TABLES Parameters details for MATERIAL_READ_ALL_SINGLE

MTAB - Table of maintenance tables for operation status

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

RMMME_ITAB - Table of units of measure for material

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

EXCEPTIONS details

MATERIAL_NOT_FOUND - Material not found

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

MATNR_MISSING - Material number missing

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

NO_AKTVSTATUS - New current operation status is empty

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

LOCK_ON_MATERIAL - Material is already locked

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

LOCK_SYSTEM_ERROR - System error while locking the material

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

Copy and paste ABAP code example for MATERIAL_READ_ALL_SINGLE 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_mtab  TYPE STANDARD TABLE OF SPTAP, "   
lv_aktvstatus  TYPE T130M-PSTAT, "   ' '
lv_aktvstatus_new  TYPE T130M-PSTAT, "   
lv_material_not_found  TYPE T130M, "   
lv_tmlgt  TYPE MLGT, "   
lv_tmpop  TYPE MPOP, "   
lv_tmvke  TYPE MVKE, "   
lv_tmyms  TYPE MYMS, "   
lv_return  TYPE MTCOR, "   
lv_herkunft  TYPE T130R-TBHER, "   
lt_rmmme_itab  TYPE STANDARD TABLE OF RMMME, "   
lv_matnr_missing  TYPE RMMME, "   
lv_imara  TYPE MARA, "   
lv_tmakt  TYPE MAKT, "   
lv_no_aktvstatus  TYPE MAKT, "   
lv_tmara  TYPE MARA, "   
lv_schluessel  TYPE MTCOM, "   
lv_lock_on_material  TYPE MTCOM, "   
lv_tmarc  TYPE MARC, "   
lv_lock_system_error  TYPE MARC, "   
lv_tmard  TYPE MARD, "   
lv_tmbew  TYPE MBEW, "   
lv_tmfhm  TYPE MFHM, "   
lv_tmlgn  TYPE MLGN. "   

  CALL FUNCTION 'MATERIAL_READ_ALL_SINGLE'  "Reading all material master data in the select single mode
    EXPORTING
         AKTVSTATUS = lv_aktvstatus
         HERKUNFT = lv_herkunft
         IMARA = lv_imara
         SCHLUESSEL = lv_schluessel
    IMPORTING
         AKTVSTATUS_NEW = lv_aktvstatus_new
         TMLGT = lv_tmlgt
         TMPOP = lv_tmpop
         TMVKE = lv_tmvke
         TMYMS = lv_tmyms
         RETURN = lv_return
         TMAKT = lv_tmakt
         TMARA = lv_tmara
         TMARC = lv_tmarc
         TMARD = lv_tmard
         TMBEW = lv_tmbew
         TMFHM = lv_tmfhm
         TMLGN = lv_tmlgn
    TABLES
         MTAB = lt_mtab
         RMMME_ITAB = lt_rmmme_itab
    EXCEPTIONS
        MATERIAL_NOT_FOUND = 1
        MATNR_MISSING = 2
        NO_AKTVSTATUS = 3
        LOCK_ON_MATERIAL = 4
        LOCK_SYSTEM_ERROR = 5
. " MATERIAL_READ_ALL_SINGLE




ABAP code using 7.40 inline data declarations to call FM MATERIAL_READ_ALL_SINGLE

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 PSTAT FROM T130M INTO @DATA(ld_aktvstatus).
DATA(ld_aktvstatus) = ' '.
 
"SELECT single PSTAT FROM T130M INTO @DATA(ld_aktvstatus_new).
 
 
 
 
 
 
 
"SELECT single TBHER FROM T130R INTO @DATA(ld_herkunft).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!