SAP BAPI_MATERIAL_GETLIST Function Module for Supply List of Materials for Search Criteria Transferred









BAPI_MATERIAL_GETLIST is a standard bapi material getlist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Supply List of Materials for Search Criteria Transferred 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 material getlist FM, simply by entering the name BAPI_MATERIAL_GETLIST into the relevant SAP transaction such as SE37 or SE38.

Function Group: BUS1001
Program Name: SAPLBUS1001
Main Program: SAPLBUS1001
Appliation area: M
Release date: 22-Aug-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_MATERIAL_GETLIST 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_MATERIAL_GETLIST'"Supply List of Materials for Search Criteria Transferred
EXPORTING
* MAXROWS = 0 "Maximum number of materials to be selected

TABLES
* MATNRSELECTION = "Selection options for material number
* MATERIALSHORTDESCSEL = "Selection options for material description
* MANUFACTURERPARTNUMB = "Manufacturer and manufacturer part number
* PLANTSELECTION = "Selection options for plants
* STORAGELOCATIONSELECT = "Selection options for storage locations
* SALESORGANISATIONSELECTION = "Selection options for sales organization
* DISTRIBUTIONCHANNELSELECTION = "Selection options for distribution channel
* MATNRLIST = "List of material numbers with material description
* RETURN = "Return Parameter
.



IMPORTING Parameters details for BAPI_MATERIAL_GETLIST

MAXROWS - Maximum number of materials to be selected

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

TABLES Parameters details for BAPI_MATERIAL_GETLIST

MATNRSELECTION - Selection options for material number

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

MATERIALSHORTDESCSEL - Selection options for material description

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

MANUFACTURERPARTNUMB - Manufacturer and manufacturer part number

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

PLANTSELECTION - Selection options for plants

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

STORAGELOCATIONSELECT - Selection options for storage locations

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

SALESORGANISATIONSELECTION - Selection options for sales organization

Data type: BAPIMATRASO
Optional: Yes
Call by Reference: Yes

DISTRIBUTIONCHANNELSELECTION - Selection options for distribution channel

Data type: BAPIMATRADC
Optional: Yes
Call by Reference: Yes

MATNRLIST - List of material numbers with material description

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

RETURN - Return Parameter

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

Copy and paste ABAP code example for BAPI_MATERIAL_GETLIST 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_maxrows  TYPE BAPIF4A-MAX_ROWS, "   0
lt_matnrselection  TYPE STANDARD TABLE OF BAPIMATRAM, "   
lt_materialshortdescsel  TYPE STANDARD TABLE OF BAPIMATRAS, "   
lt_manufacturerpartnumb  TYPE STANDARD TABLE OF BAPIMATMFRPN, "   
lt_plantselection  TYPE STANDARD TABLE OF BAPIMATRAW, "   
lt_storagelocationselect  TYPE STANDARD TABLE OF BAPIMATRAL, "   
lt_salesorganisationselection  TYPE STANDARD TABLE OF BAPIMATRASO, "   
lt_distributionchannelselection  TYPE STANDARD TABLE OF BAPIMATRADC, "   
lt_matnrlist  TYPE STANDARD TABLE OF BAPIMATLST, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2. "   

  CALL FUNCTION 'BAPI_MATERIAL_GETLIST'  "Supply List of Materials for Search Criteria Transferred
    EXPORTING
         MAXROWS = lv_maxrows
    TABLES
         MATNRSELECTION = lt_matnrselection
         MATERIALSHORTDESCSEL = lt_materialshortdescsel
         MANUFACTURERPARTNUMB = lt_manufacturerpartnumb
         PLANTSELECTION = lt_plantselection
         STORAGELOCATIONSELECT = lt_storagelocationselect
         SALESORGANISATIONSELECTION = lt_salesorganisationselection
         DISTRIBUTIONCHANNELSELECTION = lt_distributionchannelselection
         MATNRLIST = lt_matnrlist
         RETURN = lt_return
. " BAPI_MATERIAL_GETLIST




ABAP code using 7.40 inline data declarations to call FM BAPI_MATERIAL_GETLIST

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 MAX_ROWS FROM BAPIF4A INTO @DATA(ld_maxrows).
 
 
 
 
 
 
 
 
 
 


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!