SAP LOCATION_SORTIMENT_UPDATE Function Module for Update the Assortment of a Site









LOCATION_SORTIMENT_UPDATE is a standard location sortiment update SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Update the Assortment of a Site 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 location sortiment update FM, simply by entering the name LOCATION_SORTIMENT_UPDATE into the relevant SAP transaction such as SE37 or SE38.

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



Function LOCATION_SORTIMENT_UPDATE 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 'LOCATION_SORTIMENT_UPDATE'"Update the Assortment of a Site
EXPORTING
* I_WRF1 = "Plant data
I_T001W = "Plants/Branches
* I_ONLY_WRF6 = ' ' "Change flag (I_nsert, U_pdate, D_elete, ' ')
* I_CT001W = "Plants/Branches
* I_CLASS = ' ' "Change flag (I_nsert, U_pdate, D_elete, ' ')
* I_WRS1 = "Assortment
* I_T001W_OLD = "Plants/Branches

TABLES
I_WRF6 = "Structure for Change Documents; Generated by RSSCD000
* I_YWRF6 = "Structure for Change Documents; Generated by RSSCD000

EXCEPTIONS
NO_CUSTOMER_NUMBER = 1 INVALID_ASORT_NUMBER = 2
.



IMPORTING Parameters details for LOCATION_SORTIMENT_UPDATE

I_WRF1 - Plant data

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

I_T001W - Plants/Branches

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

I_ONLY_WRF6 - Change flag (I_nsert, U_pdate, D_elete, SPACE)

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

I_CT001W - Plants/Branches

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

I_CLASS - Change flag (I_nsert, U_pdate, D_elete, SPACE)

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

I_WRS1 - Assortment

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

I_T001W_OLD - Plants/Branches

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

TABLES Parameters details for LOCATION_SORTIMENT_UPDATE

I_WRF6 - Structure for Change Documents; Generated by RSSCD000

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

I_YWRF6 - Structure for Change Documents; Generated by RSSCD000

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

EXCEPTIONS details

NO_CUSTOMER_NUMBER -

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

INVALID_ASORT_NUMBER -

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

Copy and paste ABAP code example for LOCATION_SORTIMENT_UPDATE 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_i_wrf1  TYPE WRF1, "   
lt_i_wrf6  TYPE STANDARD TABLE OF FWRF6, "   
lv_no_customer_number  TYPE FWRF6, "   
lv_i_t001w  TYPE T001W, "   
lt_i_ywrf6  TYPE STANDARD TABLE OF FWRF6, "   
lv_invalid_asort_number  TYPE FWRF6, "   
lv_i_only_wrf6  TYPE WTDY-FLAG1, "   SPACE
lv_i_ct001w  TYPE T001W, "   
lv_i_class  TYPE WTDY-FLAG1, "   SPACE
lv_i_wrs1  TYPE WRS1, "   
lv_i_t001w_old  TYPE T001W. "   

  CALL FUNCTION 'LOCATION_SORTIMENT_UPDATE'  "Update the Assortment of a Site
    EXPORTING
         I_WRF1 = lv_i_wrf1
         I_T001W = lv_i_t001w
         I_ONLY_WRF6 = lv_i_only_wrf6
         I_CT001W = lv_i_ct001w
         I_CLASS = lv_i_class
         I_WRS1 = lv_i_wrs1
         I_T001W_OLD = lv_i_t001w_old
    TABLES
         I_WRF6 = lt_i_wrf6
         I_YWRF6 = lt_i_ywrf6
    EXCEPTIONS
        NO_CUSTOMER_NUMBER = 1
        INVALID_ASORT_NUMBER = 2
. " LOCATION_SORTIMENT_UPDATE




ABAP code using 7.40 inline data declarations to call FM LOCATION_SORTIMENT_UPDATE

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 FLAG1 FROM WTDY INTO @DATA(ld_i_only_wrf6).
DATA(ld_i_only_wrf6) = ' '.
 
 
"SELECT single FLAG1 FROM WTDY INTO @DATA(ld_i_class).
DATA(ld_i_class) = ' '.
 
 
 


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!