SAP ITEM_ASSORTMENTLEVEL_CHECK Function Module for Check whether material assortment grade satisfies listing rules
ITEM_ASSORTMENTLEVEL_CHECK is a standard item assortmentlevel check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check whether material assortment grade satisfies listing rules 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 item assortmentlevel check FM, simply by entering the name ITEM_ASSORTMENTLEVEL_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: WSOK
Program Name: SAPLWSOK
Main Program: SAPLWSOK
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ITEM_ASSORTMENTLEVEL_CHECK 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 'ITEM_ASSORTMENTLEVEL_CHECK'"Check whether material assortment grade satisfies listing rules.
EXPORTING
ASS_ALG = "Algorithm number from listing procedure
* ASS_LEVEL_SHOP = ' ' "Assortment grade, assortment (optional)
* ASS_LEVEL_ITEM = ' ' "Material assortment grade
MERCHANDISE_GROUP = "Material group
SHOP = "Assortment
* DATE = ' ' "Access date (time)
LISTING_METHOD = "
IMPORTING
WSCOR = "Error-info assortments
EXCEPTIONS
RULES_MATCHING_NOT_OK = 1
IMPORTING Parameters details for ITEM_ASSORTMENTLEVEL_CHECK
ASS_ALG - Algorithm number from listing procedure
Data type: TWLWR-LIST_ALGOptional: No
Call by Reference: No ( called with pass by value option)
ASS_LEVEL_SHOP - Assortment grade, assortment (optional)
Data type: TWSS-SSTUFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ASS_LEVEL_ITEM - Material assortment grade
Data type: TWSS-SSTUFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MERCHANDISE_GROUP - Material group
Data type: MARA-MATKLOptional: No
Call by Reference: No ( called with pass by value option)
SHOP - Assortment
Data type: KNA1-KUNNROptional: No
Call by Reference: No ( called with pass by value option)
DATE - Access date (time)
Data type: SY-DATUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LISTING_METHOD -
Data type: TWLV-LSTFLOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ITEM_ASSORTMENTLEVEL_CHECK
WSCOR - Error-info assortments
Data type: WSCOROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
RULES_MATCHING_NOT_OK - Listing rules not fulfilled
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ITEM_ASSORTMENTLEVEL_CHECK 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_wscor | TYPE WSCOR, " | |||
| lv_ass_alg | TYPE TWLWR-LIST_ALG, " | |||
| lv_rules_matching_not_ok | TYPE TWLWR, " | |||
| lv_ass_level_shop | TYPE TWSS-SSTUF, " SPACE | |||
| lv_ass_level_item | TYPE TWSS-SSTUF, " SPACE | |||
| lv_merchandise_group | TYPE MARA-MATKL, " | |||
| lv_shop | TYPE KNA1-KUNNR, " | |||
| lv_date | TYPE SY-DATUM, " SPACE | |||
| lv_listing_method | TYPE TWLV-LSTFL. " |
|   CALL FUNCTION 'ITEM_ASSORTMENTLEVEL_CHECK' "Check whether material assortment grade satisfies listing rules |
| EXPORTING | ||
| ASS_ALG | = lv_ass_alg | |
| ASS_LEVEL_SHOP | = lv_ass_level_shop | |
| ASS_LEVEL_ITEM | = lv_ass_level_item | |
| MERCHANDISE_GROUP | = lv_merchandise_group | |
| SHOP | = lv_shop | |
| DATE | = lv_date | |
| LISTING_METHOD | = lv_listing_method | |
| IMPORTING | ||
| WSCOR | = lv_wscor | |
| EXCEPTIONS | ||
| RULES_MATCHING_NOT_OK = 1 | ||
| . " ITEM_ASSORTMENTLEVEL_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM ITEM_ASSORTMENTLEVEL_CHECK
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 LIST_ALG FROM TWLWR INTO @DATA(ld_ass_alg). | ||||
| "SELECT single SSTUF FROM TWSS INTO @DATA(ld_ass_level_shop). | ||||
| DATA(ld_ass_level_shop) | = ' '. | |||
| "SELECT single SSTUF FROM TWSS INTO @DATA(ld_ass_level_item). | ||||
| DATA(ld_ass_level_item) | = ' '. | |||
| "SELECT single MATKL FROM MARA INTO @DATA(ld_merchandise_group). | ||||
| "SELECT single KUNNR FROM KNA1 INTO @DATA(ld_shop). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_date). | ||||
| DATA(ld_date) | = ' '. | |||
| "SELECT single LSTFL FROM TWLV INTO @DATA(ld_listing_method). | ||||
Search for further information about these or an SAP related objects