SAP ASSORTMENT_VERSION_P Function Module for Check for adherence to listing rules - prof. procedure (astmt grade/MatGp)
ASSORTMENT_VERSION_P is a standard assortment version p 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 for adherence to listing rules - prof. procedure (astmt grade/MatGp) 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 version p FM, simply by entering the name ASSORTMENT_VERSION_P 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 ASSORTMENT_VERSION_P 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_VERSION_P'"Check for adherence to listing rules - prof. procedure (astmt grade/MatGp).
EXPORTING
* ASS_LEVEL_SHOP = ' ' "Assortment grade, assortment (optional)
* ASS_LEVEL_ITEM = ' ' "Assortment grade, material
* LISTING_METHOD = ' ' "Listing procedure
* MERCHANDISE_GROUP = ' ' "Material group
* SHOP = ' ' "Assortment
* DATE = ' ' "Access date (time)
* ITEM = ' ' "
IMPORTING
WSCOR = "Error information, assortments
EXCEPTIONS
M_GROUP_NOT_EXISTS_IN_SHOP = 1 ASS_LEVEL_NOT_MATCHING = 2
IMPORTING Parameters details for ASSORTMENT_VERSION_P
ASS_LEVEL_SHOP - Assortment grade, assortment (optional)
Data type: WSOP-SSTUFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ASS_LEVEL_ITEM - Assortment grade, material
Data type: WSOP-SSTUFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LISTING_METHOD - Listing procedure
Data type: TWLV-LSTFLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MERCHANDISE_GROUP - Material group
Data type: MARA-MATKLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHOP - Assortment
Data type: KNA1-KUNNRDefault: SPACE
Optional: Yes
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)
ITEM -
Data type: MARA-MATNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ASSORTMENT_VERSION_P
WSCOR - Error information, assortments
Data type: WSCOROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
M_GROUP_NOT_EXISTS_IN_SHOP - According to assortment master, material group does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ASS_LEVEL_NOT_MATCHING - Assortment grade is unsuitable
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ASSORTMENT_VERSION_P 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_level_shop | TYPE WSOP-SSTUF, " SPACE | |||
| lv_m_group_not_exists_in_shop | TYPE WSOP, " | |||
| lv_ass_level_item | TYPE WSOP-SSTUF, " SPACE | |||
| lv_ass_level_not_matching | TYPE WSOP, " | |||
| lv_listing_method | TYPE TWLV-LSTFL, " SPACE | |||
| lv_merchandise_group | TYPE MARA-MATKL, " SPACE | |||
| lv_shop | TYPE KNA1-KUNNR, " SPACE | |||
| lv_date | TYPE SY-DATUM, " SPACE | |||
| lv_item | TYPE MARA-MATNR. " SPACE |
|   CALL FUNCTION 'ASSORTMENT_VERSION_P' "Check for adherence to listing rules - prof. procedure (astmt grade/MatGp) |
| EXPORTING | ||
| ASS_LEVEL_SHOP | = lv_ass_level_shop | |
| ASS_LEVEL_ITEM | = lv_ass_level_item | |
| LISTING_METHOD | = lv_listing_method | |
| MERCHANDISE_GROUP | = lv_merchandise_group | |
| SHOP | = lv_shop | |
| DATE | = lv_date | |
| ITEM | = lv_item | |
| IMPORTING | ||
| WSCOR | = lv_wscor | |
| EXCEPTIONS | ||
| M_GROUP_NOT_EXISTS_IN_SHOP = 1 | ||
| ASS_LEVEL_NOT_MATCHING = 2 | ||
| . " ASSORTMENT_VERSION_P | ||
ABAP code using 7.40 inline data declarations to call FM ASSORTMENT_VERSION_P
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 SSTUF FROM WSOP INTO @DATA(ld_ass_level_shop). | ||||
| DATA(ld_ass_level_shop) | = ' '. | |||
| "SELECT single SSTUF FROM WSOP INTO @DATA(ld_ass_level_item). | ||||
| DATA(ld_ass_level_item) | = ' '. | |||
| "SELECT single LSTFL FROM TWLV INTO @DATA(ld_listing_method). | ||||
| DATA(ld_listing_method) | = ' '. | |||
| "SELECT single MATKL FROM MARA INTO @DATA(ld_merchandise_group). | ||||
| DATA(ld_merchandise_group) | = ' '. | |||
| "SELECT single KUNNR FROM KNA1 INTO @DATA(ld_shop). | ||||
| DATA(ld_shop) | = ' '. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_date). | ||||
| DATA(ld_date) | = ' '. | |||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_item). | ||||
| DATA(ld_item) | = ' '. | |||
Search for further information about these or an SAP related objects