SAP ASSORTMENT_AUTO_LOCAL Function Module for NOTRANSL: Nachlisten von Artikel im Sortiment
ASSORTMENT_AUTO_LOCAL is a standard assortment auto local 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: Nachlisten von Artikel im Sortiment 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 auto local FM, simply by entering the name ASSORTMENT_AUTO_LOCAL into the relevant SAP transaction such as SE37 or SE38.
Function Group: WSO3
Program Name: SAPLWSO3
Main Program: SAPLWSO3
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ASSORTMENT_AUTO_LOCAL 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_AUTO_LOCAL'"NOTRANSL: Nachlisten von Artikel im Sortiment.
EXPORTING
ARTNR = "
WERK = "
* DATAB = SY-DATUM "
* DATBI = ' ' "
EXCEPTIONS
NO_ASSORT_MATERIAL = 1 TWPA_NOT_FOUND = 2 T001W_NOT_FOUND = 3 WRF1_NOT_FOUND = 4 ASSORTMENT_ERROR = 5 RETURN_WITH_ERROR = 6 NO_USER_EXIT = 7
IMPORTING Parameters details for ASSORTMENT_AUTO_LOCAL
ARTNR -
Data type: MARC-MATNROptional: No
Call by Reference: No ( called with pass by value option)
WERK -
Data type: MARC-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
DATAB -
Data type: WLK1-DATABDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATBI -
Data type: WLK1-DATBIDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ASSORT_MATERIAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TWPA_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
T001W_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRF1_NOT_FOUND - Plant data not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ASSORTMENT_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RETURN_WITH_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_USER_EXIT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ASSORTMENT_AUTO_LOCAL 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_artnr | TYPE MARC-MATNR, " | |||
| lv_no_assort_material | TYPE MARC, " | |||
| lv_werk | TYPE MARC-WERKS, " | |||
| lv_twpa_not_found | TYPE MARC, " | |||
| lv_datab | TYPE WLK1-DATAB, " SY-DATUM | |||
| lv_t001w_not_found | TYPE WLK1, " | |||
| lv_datbi | TYPE WLK1-DATBI, " SPACE | |||
| lv_wrf1_not_found | TYPE WLK1, " | |||
| lv_assortment_error | TYPE WLK1, " | |||
| lv_return_with_error | TYPE WLK1, " | |||
| lv_no_user_exit | TYPE WLK1. " |
|   CALL FUNCTION 'ASSORTMENT_AUTO_LOCAL' "NOTRANSL: Nachlisten von Artikel im Sortiment |
| EXPORTING | ||
| ARTNR | = lv_artnr | |
| WERK | = lv_werk | |
| DATAB | = lv_datab | |
| DATBI | = lv_datbi | |
| EXCEPTIONS | ||
| NO_ASSORT_MATERIAL = 1 | ||
| TWPA_NOT_FOUND = 2 | ||
| T001W_NOT_FOUND = 3 | ||
| WRF1_NOT_FOUND = 4 | ||
| ASSORTMENT_ERROR = 5 | ||
| RETURN_WITH_ERROR = 6 | ||
| NO_USER_EXIT = 7 | ||
| . " ASSORTMENT_AUTO_LOCAL | ||
ABAP code using 7.40 inline data declarations to call FM ASSORTMENT_AUTO_LOCAL
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 MARC INTO @DATA(ld_artnr). | ||||
| "SELECT single WERKS FROM MARC INTO @DATA(ld_werk). | ||||
| "SELECT single DATAB FROM WLK1 INTO @DATA(ld_datab). | ||||
| DATA(ld_datab) | = SY-DATUM. | |||
| "SELECT single DATBI FROM WLK1 INTO @DATA(ld_datbi). | ||||
| DATA(ld_datbi) | = ' '. | |||
Search for further information about these or an SAP related objects