SAP BAPI_ASSORTMENTLIST_GETPOS Function Module for Select Assortment List Items









BAPI_ASSORTMENTLIST_GETPOS is a standard bapi assortmentlist getpos SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Select Assortment List Items 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 bapi assortmentlist getpos FM, simply by entering the name BAPI_ASSORTMENTLIST_GETPOS into the relevant SAP transaction such as SE37 or SE38.

Function Group: 3032
Program Name: SAPL3032
Main Program: SAPL3032
Appliation area: W
Release date: 23-Mar-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_ASSORTMENTLIST_GETPOS 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 'BAPI_ASSORTMENTLIST_GETPOS'"Select Assortment List Items
EXPORTING
CUSTOMERSITE = "
ASSORTMENTLISTTYPE = "
ASSORTMENTLISTVERSION = "
* GROUP_NO = "Assortment List Group Number
* GROUP_SELECTION = "Flag, whether selection wanted using GROUP1 and GROUP2
* GROUP1 = "Assortment List: Grouping Field 1
* GROUP2 = "Assortment List: Grouping Field 2
* MATERIAL = "
* MATERIAL_EVG = "Long Material Number

IMPORTING
FIELD_CONTROL = "Assortment List Field Control
RETURN = "Structure for Return Code

TABLES
ASSORTMENTLISTPOS = "Assortment List Item
.



IMPORTING Parameters details for BAPI_ASSORTMENTLIST_GETPOS

CUSTOMERSITE -

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

ASSORTMENTLISTTYPE -

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

ASSORTMENTLISTVERSION -

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

GROUP_NO - Assortment List Group Number

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

GROUP_SELECTION - Flag, whether selection wanted using GROUP1 and GROUP2

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

GROUP1 - Assortment List: Grouping Field 1

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

GROUP2 - Assortment List: Grouping Field 2

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

MATERIAL -

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

MATERIAL_EVG - Long Material Number

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

EXPORTING Parameters details for BAPI_ASSORTMENTLIST_GETPOS

FIELD_CONTROL - Assortment List Field Control

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

RETURN - Structure for Return Code

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

TABLES Parameters details for BAPI_ASSORTMENTLIST_GETPOS

ASSORTMENTLISTPOS - Assortment List Item

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

Copy and paste ABAP code example for BAPI_ASSORTMENTLIST_GETPOS 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_customersite  TYPE BAPI3032-CUSTOMER_SITE, "   
lv_field_control  TYPE BAPI3032_FIELD_CONTROL, "   
lt_assortmentlistpos  TYPE STANDARD TABLE OF BAPI3032_POSITION, "   
lv_return  TYPE BAPIRETURN1, "   
lv_assortmentlisttype  TYPE BAPI3032-ASSORTLIST_TYPE, "   
lv_assortmentlistversion  TYPE BAPI3032_HEAD-VERSION_NO, "   
lv_group_no  TYPE BAPI3032_GROUP-GROUP_NO, "   
lv_group_selection  TYPE BAPI3032_GROUP_SEL, "   
lv_group1  TYPE BAPI3032_GROUP-GROUP1, "   
lv_group2  TYPE BAPI3032_GROUP-GROUP2, "   
lv_material  TYPE BAPI3032_POSITION-MATERIAL, "   
lv_material_evg  TYPE BAPIMGVMATNR. "   

  CALL FUNCTION 'BAPI_ASSORTMENTLIST_GETPOS'  "Select Assortment List Items
    EXPORTING
         CUSTOMERSITE = lv_customersite
         ASSORTMENTLISTTYPE = lv_assortmentlisttype
         ASSORTMENTLISTVERSION = lv_assortmentlistversion
         GROUP_NO = lv_group_no
         GROUP_SELECTION = lv_group_selection
         GROUP1 = lv_group1
         GROUP2 = lv_group2
         MATERIAL = lv_material
         MATERIAL_EVG = lv_material_evg
    IMPORTING
         FIELD_CONTROL = lv_field_control
         RETURN = lv_return
    TABLES
         ASSORTMENTLISTPOS = lt_assortmentlistpos
. " BAPI_ASSORTMENTLIST_GETPOS




ABAP code using 7.40 inline data declarations to call FM BAPI_ASSORTMENTLIST_GETPOS

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 CUSTOMER_SITE FROM BAPI3032 INTO @DATA(ld_customersite).
 
 
 
 
"SELECT single ASSORTLIST_TYPE FROM BAPI3032 INTO @DATA(ld_assortmentlisttype).
 
"SELECT single VERSION_NO FROM BAPI3032_HEAD INTO @DATA(ld_assortmentlistversion).
 
"SELECT single GROUP_NO FROM BAPI3032_GROUP INTO @DATA(ld_group_no).
 
 
"SELECT single GROUP1 FROM BAPI3032_GROUP INTO @DATA(ld_group1).
 
"SELECT single GROUP2 FROM BAPI3032_GROUP INTO @DATA(ld_group2).
 
"SELECT single MATERIAL FROM BAPI3032_POSITION INTO @DATA(ld_material).
 
 


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!