SAP ASSORTMENT_SHOP_COPY_SAVE Function Module for Save assortmentcopy for new site









ASSORTMENT_SHOP_COPY_SAVE is a standard assortment shop copy save SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Save assortmentcopy for new 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 assortment shop copy save FM, simply by entering the name ASSORTMENT_SHOP_COPY_SAVE into the relevant SAP transaction such as SE37 or SE38.

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



Function ASSORTMENT_SHOP_COPY_SAVE 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_SHOP_COPY_SAVE'"Save assortmentcopy for new site
EXPORTING
LOCATION = "
* UPD_MODE = ' ' "
* LIST_DELIV_PLANTS = ' ' "list all supplying sites automatically when assigning assortment carrier
CREATE_CHANGE_DOCUMENT = "Change Indicator (I_nsert, U_pdate, D_elete, ' ')

TABLES
COPY_TABLE = "i.W. content of screen 142 (SAPMWSO3)
POSITIONS = "all module positions of source site
.



IMPORTING Parameters details for ASSORTMENT_SHOP_COPY_SAVE

LOCATION -

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

UPD_MODE -

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

LIST_DELIV_PLANTS - list all supplying sites automatically when assigning assortment carrier

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

CREATE_CHANGE_DOCUMENT - Change Indicator (I_nsert, U_pdate, D_elete, SPACE)

Data type: WTDY-FLAG1
Optional: No
Call by Reference: Yes

TABLES Parameters details for ASSORTMENT_SHOP_COPY_SAVE

COPY_TABLE - i.W. content of screen 142 (SAPMWSO3)

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

POSITIONS - all module positions of source site

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

Copy and paste ABAP code example for ASSORTMENT_SHOP_COPY_SAVE 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_location  TYPE WINT_BETR-WERKSS_K, "   
lt_copy_table  TYPE STANDARD TABLE OF WINT_COPY, "   
lv_upd_mode  TYPE RMMG2-CALL_MODE2, "   SPACE
lt_positions  TYPE STANDARD TABLE OF WSOP, "   
lv_list_deliv_plants  TYPE WINT_DEF1-ALLVZ, "   SPACE
lv_create_change_document  TYPE WTDY-FLAG1. "   

  CALL FUNCTION 'ASSORTMENT_SHOP_COPY_SAVE'  "Save assortmentcopy for new site
    EXPORTING
         LOCATION = lv_location
         UPD_MODE = lv_upd_mode
         LIST_DELIV_PLANTS = lv_list_deliv_plants
         CREATE_CHANGE_DOCUMENT = lv_create_change_document
    TABLES
         COPY_TABLE = lt_copy_table
         POSITIONS = lt_positions
. " ASSORTMENT_SHOP_COPY_SAVE




ABAP code using 7.40 inline data declarations to call FM ASSORTMENT_SHOP_COPY_SAVE

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 WERKSS_K FROM WINT_BETR INTO @DATA(ld_location).
 
 
"SELECT single CALL_MODE2 FROM RMMG2 INTO @DATA(ld_upd_mode).
DATA(ld_upd_mode) = ' '.
 
 
"SELECT single ALLVZ FROM WINT_DEF1 INTO @DATA(ld_list_deliv_plants).
DATA(ld_list_deliv_plants) = ' '.
 
"SELECT single FLAG1 FROM WTDY INTO @DATA(ld_create_change_document).
 


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!