cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_MATERIAL_GETLIST returns nothing

Former Member
0 Kudos

Hello friends,

dont know if this the right forum to ask this R/3 question but i am trying SE37 command and trying to execute <b>BAPI_MATERIAL_GETLIST</b> , it asks for maxrows which i give as say 5-6 , and hit execute button,

I expect it to reuturn a list of all materials with their material number , <b>however it returns nothing in MATNRLIST</b> ,

it only returns one entry in each of following

MATNRSELECTION :

sign : E

Option : CP

MATNR_LOW :

MATNR_HIGH :

MATERIALSHORTDESCSEL

sign : E

Option : CP

MATNR_LOW :

MATNR_HIGH :

what i want is , it should give me a list of all material numbers , as i have to iterate over these material numbers and call BAPI_MATERIAL_GET_DETAIL to get details of all the materials

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

Documnetation on : BAPI_MATERIAL_GETLIST

I thing you need to fill in some of the tables as described in the example.

Selection of ALL given materials in plant 0001, storage location 0001 or storage location 002:

MATNRSELECTION : 'I', 'CP', '*' , ' '

PLANTSELECTION : 'I', 'EQ', '0001', ' '

STORAGELOCATIONSELECT : 'I', 'EQ', '0001', ' '

'I', 'EQ', '0002', ' '

Selection of all given materials in plant 0001 and whose description begins with 'XY':

MATERIALSHORTDESCSEL : 'I', 'CP', 'XY*' , ' '

PLANTSELECTION : 'I', 'EQ', '0001', ' '

Regards

Vijaya

Former Member
0 Kudos

hi vijaya,bhavesh

thanks for your replies

Vijaya, din get your point , see when i execture BAPI_MATERIAL_GETLIST , then it asks me only for maxrows so ideally it should return that many rows of material that i specified.

but this isnt happening as i have created around 5 to 6 materials.

Former Member
0 Kudos

Hi Rohit,

Thats only the Import parameter.

Table act as both Import and export paramter.

As given in the example above you have to put in data in the:

MATNRSELECTION

PLANTSELECTION

STORAGELOCATIONSELECT etc.

Now if you want all the material

In the table MATNRSELECTION:

give

S = I

OP = CP

MATNR_LOW = *

And then execute

Regards

Vijaya

Former Member
0 Kudos

thanks vijaya , that solved my problem , 10/10

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Rohit,

You can also try posting this question on the ABAP forum.

regards,

Bhavesh