BAPI_ASSORTMENT_MAINTAINDATA is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name BAPI_ASSORTMENT_MAINTAINDATA into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
1070
Released Date:
16.06.1998
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_ASSORTMENT_MAINTAINDATA' "Maintenance of Assortments
EXPORTING
assortment = " bapie1wrs1
assortmentx = " bapie1wrs1x
IMPORTING
return = " bapiret2
* TABLES
* materialgroup = " bapie1wrs6
* materialgroupx = " bapie1wrs6x
* description = " bapie1wrst
* descriptionx = " bapie1wrstx
* assortmentusers = " bapie1wrsz
* assortmentusersx = " bapie1wrszx
. " BAPI_ASSORTMENT_MAINTAINDATA
The ABAP code below is a full code listing to execute function module BAPI_ASSORTMENT_MAINTAINDATA including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_return | TYPE BAPIRET2 , |
| it_materialgroup | TYPE STANDARD TABLE OF BAPIE1WRS6,"TABLES PARAM |
| wa_materialgroup | LIKE LINE OF it_materialgroup , |
| it_materialgroupx | TYPE STANDARD TABLE OF BAPIE1WRS6X,"TABLES PARAM |
| wa_materialgroupx | LIKE LINE OF it_materialgroupx , |
| it_description | TYPE STANDARD TABLE OF BAPIE1WRST,"TABLES PARAM |
| wa_description | LIKE LINE OF it_description , |
| it_descriptionx | TYPE STANDARD TABLE OF BAPIE1WRSTX,"TABLES PARAM |
| wa_descriptionx | LIKE LINE OF it_descriptionx , |
| it_assortmentusers | TYPE STANDARD TABLE OF BAPIE1WRSZ,"TABLES PARAM |
| wa_assortmentusers | LIKE LINE OF it_assortmentusers , |
| it_assortmentusersx | TYPE STANDARD TABLE OF BAPIE1WRSZX,"TABLES PARAM |
| wa_assortmentusersx | LIKE LINE OF it_assortmentusersx . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_return | TYPE BAPIRET2 , |
| ld_assortment | TYPE BAPIE1WRS1 , |
| it_materialgroup | TYPE STANDARD TABLE OF BAPIE1WRS6 , |
| wa_materialgroup | LIKE LINE OF it_materialgroup, |
| ld_assortmentx | TYPE BAPIE1WRS1X , |
| it_materialgroupx | TYPE STANDARD TABLE OF BAPIE1WRS6X , |
| wa_materialgroupx | LIKE LINE OF it_materialgroupx, |
| it_description | TYPE STANDARD TABLE OF BAPIE1WRST , |
| wa_description | LIKE LINE OF it_description, |
| it_descriptionx | TYPE STANDARD TABLE OF BAPIE1WRSTX , |
| wa_descriptionx | LIKE LINE OF it_descriptionx, |
| it_assortmentusers | TYPE STANDARD TABLE OF BAPIE1WRSZ , |
| wa_assortmentusers | LIKE LINE OF it_assortmentusers, |
| it_assortmentusersx | TYPE STANDARD TABLE OF BAPIE1WRSZX , |
| wa_assortmentusersx | LIKE LINE OF it_assortmentusersx. |
This method can be used to create new assortment and change or delete
existing material master data.
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_ASSORTMENT_MAINTAINDATA or its description.
BAPI_ASSORTMENT_MAINTAINDATA - Maintenance of Assortments BAPI_ASSORTMENTLIST_GETPOS - Select Assortment List Items BAPI_ASSORTMENTLIST_GETHEAD - Select Assortment List Header BAPI_ASSORTMENTLIST_GETGROUP - Select Assortment List Groups BAPI_ASSET_WRITEUP_POST - Assets: Post Write-Up BAPI_ASSET_WRITEUP_CHECK - Assets: Check Write-Up