SAP MATERIAL_AKTVSTATUS Function Module for Determine activity status for RMMG1 and PTAB original material for copying









MATERIAL_AKTVSTATUS is a standard material aktvstatus SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine activity status for RMMG1 and PTAB original material for copying 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 aktvstatus FM, simply by entering the name MATERIAL_AKTVSTATUS into the relevant SAP transaction such as SE37 or SE38.

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



Function MATERIAL_AKTVSTATUS 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_AKTVSTATUS'"Determine activity status for RMMG1 and PTAB original material for copying
EXPORTING
IRMMG1 = "Org. levels, matl no., matl type ....orig./tgt matl
MARA_VPSTA = "MARA-VPSTA of original material
* KZRFB = ' ' "Indicator: Refresh buffer
* FLG_ERWEITERN = ' ' "Indicator: Extend target material
* NEUFLAG = ' ' "New flag in relation to original material (always empty)
* AKTYP = 'A' "Activity category in relation to original material (always display)

IMPORTING
AKTVSTATUS = "Current activity status for target material
BISSTATUS = "Previous maintenance status of original material

TABLES
MTAB = "Table of maintenance tables for original material
* RED_STAT = "Output only

EXCEPTIONS
ERROR = 1
.



IMPORTING Parameters details for MATERIAL_AKTVSTATUS

IRMMG1 - Org. levels, matl no., matl type ....orig./tgt matl

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

MARA_VPSTA - MARA-VPSTA of original material

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

KZRFB - Indicator: Refresh buffer

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

FLG_ERWEITERN - Indicator: Extend target material

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

NEUFLAG - New flag in relation to original material (always empty)

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

AKTYP - Activity category in relation to original material (always display)

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

EXPORTING Parameters details for MATERIAL_AKTVSTATUS

AKTVSTATUS - Current activity status for target material

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

BISSTATUS - Previous maintenance status of original material

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

TABLES Parameters details for MATERIAL_AKTVSTATUS

MTAB - Table of maintenance tables for original material

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

RED_STAT - Output only

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

EXCEPTIONS details

ERROR - Other application errors (see messages)

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

Copy and paste ABAP code example for MATERIAL_AKTVSTATUS 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_error  TYPE SPTAP, "   
lv_irmmg1  TYPE RMMG1, "   
lv_aktvstatus  TYPE T130M-PSTAT, "   
lt_red_stat  TYPE STANDARD TABLE OF MREDSTAT, "   
lv_bisstatus  TYPE T130M-PSTAT, "   
lv_mara_vpsta  TYPE MARA-VPSTA, "   
lv_kzrfb  TYPE MTCOM-KZRFB, "   ' '
lv_flg_erweitern  TYPE T130F-KZREF, "   ' '
lv_neuflag  TYPE T130F-KZREF, "   ' '
lv_aktyp  TYPE T130M-AKTYP. "   'A'

  CALL FUNCTION 'MATERIAL_AKTVSTATUS'  "Determine activity status for RMMG1 and PTAB original material for copying
    EXPORTING
         IRMMG1 = lv_irmmg1
         MARA_VPSTA = lv_mara_vpsta
         KZRFB = lv_kzrfb
         FLG_ERWEITERN = lv_flg_erweitern
         NEUFLAG = lv_neuflag
         AKTYP = lv_aktyp
    IMPORTING
         AKTVSTATUS = lv_aktvstatus
         BISSTATUS = lv_bisstatus
    TABLES
         MTAB = lt_mtab
         RED_STAT = lt_red_stat
    EXCEPTIONS
        ERROR = 1
. " MATERIAL_AKTVSTATUS




ABAP code using 7.40 inline data declarations to call FM MATERIAL_AKTVSTATUS

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).
 
 
"SELECT single PSTAT FROM T130M INTO @DATA(ld_bisstatus).
 
"SELECT single VPSTA FROM MARA INTO @DATA(ld_mara_vpsta).
 
"SELECT single KZRFB FROM MTCOM INTO @DATA(ld_kzrfb).
DATA(ld_kzrfb) = ' '.
 
"SELECT single KZREF FROM T130F INTO @DATA(ld_flg_erweitern).
DATA(ld_flg_erweitern) = ' '.
 
"SELECT single KZREF FROM T130F INTO @DATA(ld_neuflag).
DATA(ld_neuflag) = ' '.
 
"SELECT single AKTYP FROM T130M INTO @DATA(ld_aktyp).
DATA(ld_aktyp) = 'A'.
 


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!