SAP MATERIAL_CREATE_VARIANTS_DARK Function Module for NOTRANSL: Erzeugen von Varianten in der Datenübernahme (dunkel)









MATERIAL_CREATE_VARIANTS_DARK is a standard material create variants dark 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: Erzeugen von Varianten in der Datenübernahme (dunkel) 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 create variants dark FM, simply by entering the name MATERIAL_CREATE_VARIANTS_DARK into the relevant SAP transaction such as SE37 or SE38.

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



Function MATERIAL_CREATE_VARIANTS_DARK 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_CREATE_VARIANTS_DARK'"NOTRANSL: Erzeugen von Varianten in der Datenübernahme (dunkel)
EXPORTING
P_SATNR = "
P_MEINS = "
P_MTART = "

TABLES
TVAR_TAB = "
TAUSP_TAB = "
TCHAR_VARI = "
TVALU_VARI = "

EXCEPTIONS
NO_CLFC = 1 CHAR_VARI_NOT_DEFINED = 2 VALU_VARI_NOT_DEFINED = 3
.



IMPORTING Parameters details for MATERIAL_CREATE_VARIANTS_DARK

P_SATNR -

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

P_MEINS -

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

P_MTART -

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

TABLES Parameters details for MATERIAL_CREATE_VARIANTS_DARK

TVAR_TAB -

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

TAUSP_TAB -

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

TCHAR_VARI -

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

TVALU_VARI -

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

EXCEPTIONS details

NO_CLFC -

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

CHAR_VARI_NOT_DEFINED -

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

VALU_VARI_NOT_DEFINED -

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

Copy and paste ABAP code example for MATERIAL_CREATE_VARIANTS_DARK 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_no_clfc  TYPE STRING, "   
lv_p_satnr  TYPE MARA-MATNR, "   
lt_tvar_tab  TYPE STANDARD TABLE OF SVARTAB, "   
lv_p_meins  TYPE MARA-MEINS, "   
lt_tausp_tab  TYPE STANDARD TABLE OF SAUSPW, "   
lv_char_vari_not_defined  TYPE SAUSPW, "   
lv_p_mtart  TYPE MARA-MTART, "   
lt_tchar_vari  TYPE STANDARD TABLE OF API_CHAR, "   
lv_valu_vari_not_defined  TYPE API_CHAR, "   
lt_tvalu_vari  TYPE STANDARD TABLE OF API_VALI. "   

  CALL FUNCTION 'MATERIAL_CREATE_VARIANTS_DARK'  "NOTRANSL: Erzeugen von Varianten in der Datenübernahme (dunkel)
    EXPORTING
         P_SATNR = lv_p_satnr
         P_MEINS = lv_p_meins
         P_MTART = lv_p_mtart
    TABLES
         TVAR_TAB = lt_tvar_tab
         TAUSP_TAB = lt_tausp_tab
         TCHAR_VARI = lt_tchar_vari
         TVALU_VARI = lt_tvalu_vari
    EXCEPTIONS
        NO_CLFC = 1
        CHAR_VARI_NOT_DEFINED = 2
        VALU_VARI_NOT_DEFINED = 3
. " MATERIAL_CREATE_VARIANTS_DARK




ABAP code using 7.40 inline data declarations to call FM MATERIAL_CREATE_VARIANTS_DARK

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 MATNR FROM MARA INTO @DATA(ld_p_satnr).
 
 
"SELECT single MEINS FROM MARA INTO @DATA(ld_p_meins).
 
 
 
"SELECT single MTART FROM MARA INTO @DATA(ld_p_mtart).
 
 
 
 


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!