SAP ASSORTMENT_GET_ASORT_OF_CUST Function Module for NOTRANSL: Ermitteln der Sortimentsträger zu einem Kunden









ASSORTMENT_GET_ASORT_OF_CUST is a standard assortment get asort of cust 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: Ermitteln der Sortimentsträger zu einem Kunden 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 get asort of cust FM, simply by entering the name ASSORTMENT_GET_ASORT_OF_CUST into the relevant SAP transaction such as SE37 or SE38.

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



Function ASSORTMENT_GET_ASORT_OF_CUST 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_GET_ASORT_OF_CUST'"NOTRANSL: Ermitteln der Sortimentsträger zu einem Kunden
EXPORTING
CUSTOMER = "
* VKORG = "
* VTWEG = "
* SPART = "
* SELECT_INVALID_ASORT = ' ' "
* NO_BUFFER = ' ' "
* VALID_PER_DATE = SY-DATUM "
* DATE_TO = "Valid-to date

IMPORTING
DEFAULT_ASORT = "

TABLES
* LIST_OF_ASORT = "
* LIST_OF_WRSZ = "

EXCEPTIONS
OBJECT_HAS_NO_ASORT = 1 OBJECT_IS_NO_ASS_CUSTOMER = 2
.




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_SAPLWSOT_001 User Exit for Controling Listing Condition Maintenance

IMPORTING Parameters details for ASSORTMENT_GET_ASORT_OF_CUST

CUSTOMER -

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

VKORG -

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

VTWEG -

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

SPART -

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

SELECT_INVALID_ASORT -

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

NO_BUFFER -

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

VALID_PER_DATE -

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

DATE_TO - Valid-to date

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

EXPORTING Parameters details for ASSORTMENT_GET_ASORT_OF_CUST

DEFAULT_ASORT -

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

TABLES Parameters details for ASSORTMENT_GET_ASORT_OF_CUST

LIST_OF_ASORT -

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

LIST_OF_WRSZ -

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

EXCEPTIONS details

OBJECT_HAS_NO_ASORT -

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

OBJECT_IS_NO_ASS_CUSTOMER -

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

Copy and paste ABAP code example for ASSORTMENT_GET_ASORT_OF_CUST 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_customer  TYPE KNA1-KUNNR, "   
lv_default_asort  TYPE WRS1-ASORT, "   
lt_list_of_asort  TYPE STANDARD TABLE OF WINT_CARRH, "   
lv_object_has_no_asort  TYPE WINT_CARRH, "   
lv_vkorg  TYPE KNVP-VKORG, "   
lt_list_of_wrsz  TYPE STANDARD TABLE OF WRSZ, "   
lv_object_is_no_ass_customer  TYPE WRSZ, "   
lv_vtweg  TYPE KNVP-VTWEG, "   
lv_spart  TYPE KNVP-SPART, "   
lv_select_invalid_asort  TYPE WTDY-TYP01, "   ' '
lv_no_buffer  TYPE WTDY-TYP01, "   SPACE
lv_valid_per_date  TYPE SY-DATUM, "   SY-DATUM
lv_date_to  TYPE SY-DATUM. "   

  CALL FUNCTION 'ASSORTMENT_GET_ASORT_OF_CUST'  "NOTRANSL: Ermitteln der Sortimentsträger zu einem Kunden
    EXPORTING
         CUSTOMER = lv_customer
         VKORG = lv_vkorg
         VTWEG = lv_vtweg
         SPART = lv_spart
         SELECT_INVALID_ASORT = lv_select_invalid_asort
         NO_BUFFER = lv_no_buffer
         VALID_PER_DATE = lv_valid_per_date
         DATE_TO = lv_date_to
    IMPORTING
         DEFAULT_ASORT = lv_default_asort
    TABLES
         LIST_OF_ASORT = lt_list_of_asort
         LIST_OF_WRSZ = lt_list_of_wrsz
    EXCEPTIONS
        OBJECT_HAS_NO_ASORT = 1
        OBJECT_IS_NO_ASS_CUSTOMER = 2
. " ASSORTMENT_GET_ASORT_OF_CUST




ABAP code using 7.40 inline data declarations to call FM ASSORTMENT_GET_ASORT_OF_CUST

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 KUNNR FROM KNA1 INTO @DATA(ld_customer).
 
"SELECT single ASORT FROM WRS1 INTO @DATA(ld_default_asort).
 
 
 
"SELECT single VKORG FROM KNVP INTO @DATA(ld_vkorg).
 
 
 
"SELECT single VTWEG FROM KNVP INTO @DATA(ld_vtweg).
 
"SELECT single SPART FROM KNVP INTO @DATA(ld_spart).
 
"SELECT single TYP01 FROM WTDY INTO @DATA(ld_select_invalid_asort).
DATA(ld_select_invalid_asort) = ' '.
 
"SELECT single TYP01 FROM WTDY INTO @DATA(ld_no_buffer).
DATA(ld_no_buffer) = ' '.
 
"SELECT single DATUM FROM SY INTO @DATA(ld_valid_per_date).
DATA(ld_valid_per_date) = SY-DATUM.
 
"SELECT single DATUM FROM SY INTO @DATA(ld_date_to).
 


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!