SAP ASSORTMENT_POS_HANDLING Function Module for









ASSORTMENT_POS_HANDLING is a standard assortment pos handling SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 pos handling FM, simply by entering the name ASSORTMENT_POS_HANDLING into the relevant SAP transaction such as SE37 or SE38.

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



Function ASSORTMENT_POS_HANDLING 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_POS_HANDLING'"
EXPORTING
ASSORTMENT_HEAD = "Assortment Modules SAP Retail
* CREATE_CHANGE_DOCUMENT = 'X' "Text 'Category'
ASSORTMENT_POS_NEW = "Transfer assortment items to maint. functions
* ASSORTMENT_POS_OLD = ' ' "Transfer assortment items to maint. functions
FUNCTION = "Text 'Category'
* LOCATION = ' ' "Assortment
* VKORG = ' ' "Sales Organization
* VTWEG = ' ' "Distribution Channel
* LAST_LISTING = ' ' "Text 'Category'
* UPD_MODE = ' ' "3-Byte field

IMPORTING
WSCOR = "Error transfers from assortment maint. IS-R

TABLES
* UNITS = "Transfer Un to be excluded
* VARIANTS = "Excerpt MARA and MAW1 for assortment transfer
* CONNECTIONS = "Module Assignment (SAP Retail) to Plants

EXCEPTIONS
ASSORTMENT_POS_ALREADY_EXISTS = 1 ASSORTMENT_POS_NOT_FOUND = 2 NEW_TIME_RANGE_TOO_LONG = 3 NEW_TIME_RANGE_TOO_SMALL = 4 WRONG_FUNCTION = 5
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLWSO1_001 User Exit for Controling Data Adjustment for Listing/Article Maintenance
EXIT_SAPLWSO1_002 Do Not Include Supplying Plant Control in Material Maintenance
EXIT_SAPLWSO1_003 User Exit for Controling List. Conditions in Integrated Artl. Maintenance
EXIT_SAPLWSO1_004 Control for Creating Additional MVKE Data During Listing

IMPORTING Parameters details for ASSORTMENT_POS_HANDLING

ASSORTMENT_HEAD - Assortment Modules SAP Retail

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

CREATE_CHANGE_DOCUMENT - Text 'Category'

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

ASSORTMENT_POS_NEW - Transfer assortment items to maint. functions

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

ASSORTMENT_POS_OLD - Transfer assortment items to maint. functions

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

FUNCTION - Text 'Category'

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

LOCATION - Assortment

Data type: WSOF-FILIALE
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VKORG - Sales Organization

Data type: TVKO-VKORG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VTWEG - Distribution Channel

Data type: TVTW-VTWEG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

LAST_LISTING - Text 'Category'

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

UPD_MODE - 3-Byte field

Data type: RMMG2-CALL_MODE2
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for ASSORTMENT_POS_HANDLING

WSCOR - Error transfers from assortment maint. IS-R

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

TABLES Parameters details for ASSORTMENT_POS_HANDLING

UNITS - Transfer Un to be excluded

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

VARIANTS - Excerpt MARA and MAW1 for assortment transfer

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

CONNECTIONS - Module Assignment (SAP Retail) to Plants

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

EXCEPTIONS details

ASSORTMENT_POS_ALREADY_EXISTS - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

ASSORTMENT_POS_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NEW_TIME_RANGE_TOO_LONG - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NEW_TIME_RANGE_TOO_SMALL - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

WRONG_FUNCTION - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

Copy and paste ABAP code example for ASSORTMENT_POS_HANDLING 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:
lt_units  TYPE STANDARD TABLE OF WINT_ME, "   
lv_wscor  TYPE WSCOR, "   
lv_assortment_head  TYPE WSOH, "   
lv_assortment_pos_already_exists  TYPE WSOH, "   
lv_create_change_document  TYPE WTDY-TYP01, "   'X'
lt_variants  TYPE STANDARD TABLE OF WINT_WAM1, "   
lv_assortment_pos_new  TYPE WINT_POS, "   
lv_assortment_pos_not_found  TYPE WINT_POS, "   
lt_connections  TYPE STANDARD TABLE OF WSOF, "   
lv_assortment_pos_old  TYPE WINT_POS, "   SPACE
lv_new_time_range_too_long  TYPE WINT_POS, "   
lv_function  TYPE WTDY-TYP01, "   
lv_new_time_range_too_small  TYPE WTDY, "   
lv_location  TYPE WSOF-FILIALE, "   SPACE
lv_wrong_function  TYPE WSOF, "   
lv_vkorg  TYPE TVKO-VKORG, "   SPACE
lv_vtweg  TYPE TVTW-VTWEG, "   SPACE
lv_last_listing  TYPE WTDY-TYP01, "   SPACE
lv_upd_mode  TYPE RMMG2-CALL_MODE2. "   SPACE

  CALL FUNCTION 'ASSORTMENT_POS_HANDLING'  "
    EXPORTING
         ASSORTMENT_HEAD = lv_assortment_head
         CREATE_CHANGE_DOCUMENT = lv_create_change_document
         ASSORTMENT_POS_NEW = lv_assortment_pos_new
         ASSORTMENT_POS_OLD = lv_assortment_pos_old
         FUNCTION = lv_function
         LOCATION = lv_location
         VKORG = lv_vkorg
         VTWEG = lv_vtweg
         LAST_LISTING = lv_last_listing
         UPD_MODE = lv_upd_mode
    IMPORTING
         WSCOR = lv_wscor
    TABLES
         UNITS = lt_units
         VARIANTS = lt_variants
         CONNECTIONS = lt_connections
    EXCEPTIONS
        ASSORTMENT_POS_ALREADY_EXISTS = 1
        ASSORTMENT_POS_NOT_FOUND = 2
        NEW_TIME_RANGE_TOO_LONG = 3
        NEW_TIME_RANGE_TOO_SMALL = 4
        WRONG_FUNCTION = 5
. " ASSORTMENT_POS_HANDLING




ABAP code using 7.40 inline data declarations to call FM ASSORTMENT_POS_HANDLING

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 TYP01 FROM WTDY INTO @DATA(ld_create_change_document).
DATA(ld_create_change_document) = 'X'.
 
 
 
 
 
DATA(ld_assortment_pos_old) = ' '.
 
 
"SELECT single TYP01 FROM WTDY INTO @DATA(ld_function).
 
 
"SELECT single FILIALE FROM WSOF INTO @DATA(ld_location).
DATA(ld_location) = ' '.
 
 
"SELECT single VKORG FROM TVKO INTO @DATA(ld_vkorg).
DATA(ld_vkorg) = ' '.
 
"SELECT single VTWEG FROM TVTW INTO @DATA(ld_vtweg).
DATA(ld_vtweg) = ' '.
 
"SELECT single TYP01 FROM WTDY INTO @DATA(ld_last_listing).
DATA(ld_last_listing) = ' '.
 
"SELECT single CALL_MODE2 FROM RMMG2 INTO @DATA(ld_upd_mode).
DATA(ld_upd_mode) = ' '.
 


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!