SAP ASSORTMENT_MAINTAIN_MATERIAL Function Module for Call of Maintenance Module for Product Segment Creation









ASSORTMENT_MAINTAIN_MATERIAL is a standard assortment maintain material SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Call of Maintenance Module for Product Segment Creation 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 assortment maintain material FM, simply by entering the name ASSORTMENT_MAINTAIN_MATERIAL into the relevant SAP transaction such as SE37 or SE38.

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



Function ASSORTMENT_MAINTAIN_MATERIAL 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 'ASSORTMENT_MAINTAIN_MATERIAL'"Call of Maintenance Module for Product Segment Creation
EXPORTING
* WRITE_PROT = ' ' "Generic Type
* SEND_MESSAGE = ' ' "Generic Type
* NR_OF_RECORDS = 100 "ABAP System Field: Row Index of Internal Tables
* P_CREATE_CHANGE_DOCUMENT = X "Text 'Category'
* IV_UPD_TASK = "Checkbox

TABLES
* P_ALL_MATNR = "Retail Data Transfer: Material Master Header Record
* P_UPD_MAW1 = "MAW1 for Data Transfer by ALE (Extended to Include TRANC)
* P_INS_MARC = "Retail Data Transfer: List of Identically Maintained Plants
* P_INS_MBEW = "Retail Data Transfer: List of Ident. Maint. Valuation Types
* P_INS_MVKE = "Retail Data Transfer: List of Ident. Maint. Distr. Chains
* P_UPD_MVKE = "Field TRANC Added to MVKE
* P_INS_WRPL = "Replenishment: Master Data Creation via Listing
.



IMPORTING Parameters details for ASSORTMENT_MAINTAIN_MATERIAL

WRITE_PROT - Generic Type

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

SEND_MESSAGE - Generic Type

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

NR_OF_RECORDS - ABAP System Field: Row Index of Internal Tables

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

P_CREATE_CHANGE_DOCUMENT - Text 'Category'

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

IV_UPD_TASK - Checkbox

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

TABLES Parameters details for ASSORTMENT_MAINTAIN_MATERIAL

P_ALL_MATNR - Retail Data Transfer: Material Master Header Record

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

P_UPD_MAW1 - MAW1 for Data Transfer by ALE (Extended to Include TRANC)

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

P_INS_MARC - Retail Data Transfer: List of Identically Maintained Plants

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

P_INS_MBEW - Retail Data Transfer: List of Ident. Maint. Valuation Types

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

P_INS_MVKE - Retail Data Transfer: List of Ident. Maint. Distr. Chains

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

P_UPD_MVKE - Field TRANC Added to MVKE

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

P_INS_WRPL - Replenishment: Master Data Creation via Listing

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

Copy and paste ABAP code example for ASSORTMENT_MAINTAIN_MATERIAL 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_write_prot  TYPE STRING, "   ' '
lt_p_all_matnr  TYPE STANDARD TABLE OF SMATNR_HDR, "   
lt_p_upd_maw1  TYPE STANDARD TABLE OF MAW1_UEB, "   
lv_send_message  TYPE MAW1_UEB, "   ' '
lt_p_ins_marc  TYPE STANDARD TABLE OF SWRKKY, "   
lv_nr_of_records  TYPE SY-TABIX, "   100
lt_p_ins_mbew  TYPE STANDARD TABLE OF SBWAKY, "   
lv_p_create_change_document  TYPE WTDY-TYP01, "   X
lt_p_ins_mvke  TYPE STANDARD TABLE OF SVTLKY, "   
lv_iv_upd_task  TYPE XFELD, "   
lt_p_upd_mvke  TYPE STANDARD TABLE OF MVKE_UEB, "   
lt_p_ins_wrpl  TYPE STANDARD TABLE OF WRPL_KEY_LISTING. "   

  CALL FUNCTION 'ASSORTMENT_MAINTAIN_MATERIAL'  "Call of Maintenance Module for Product Segment Creation
    EXPORTING
         WRITE_PROT = lv_write_prot
         SEND_MESSAGE = lv_send_message
         NR_OF_RECORDS = lv_nr_of_records
         P_CREATE_CHANGE_DOCUMENT = lv_p_create_change_document
         IV_UPD_TASK = lv_iv_upd_task
    TABLES
         P_ALL_MATNR = lt_p_all_matnr
         P_UPD_MAW1 = lt_p_upd_maw1
         P_INS_MARC = lt_p_ins_marc
         P_INS_MBEW = lt_p_ins_mbew
         P_INS_MVKE = lt_p_ins_mvke
         P_UPD_MVKE = lt_p_upd_mvke
         P_INS_WRPL = lt_p_ins_wrpl
. " ASSORTMENT_MAINTAIN_MATERIAL




ABAP code using 7.40 inline data declarations to call FM ASSORTMENT_MAINTAIN_MATERIAL

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.

DATA(ld_write_prot) = ' '.
 
 
 
DATA(ld_send_message) = ' '.
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_nr_of_records).
DATA(ld_nr_of_records) = 100.
 
 
"SELECT single TYP01 FROM WTDY INTO @DATA(ld_p_create_change_document).
DATA(ld_p_create_change_document) = X.
 
 
 
 
 


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!