Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Material Availability

Former Member
0 Likes
570

Hi,

I am using the BAPI BAPI_MATERIAL_AVAILABILITY to get the available qty of the Material.

but this BAPI is used in loop of which contains more than 20000 Materials, that makes my processing very slow.

I sthere any other way to get the available material skipping the BAPI to increas my performance.

3 REPLIES 3
Read only

Former Member
0 Likes
466

Hi Friend,

To get the material avialable qunatity, it is better to fetch from DDIC table.

If it is batch managed then fetch from MCHB table otherwise from MARD table passing material number, plant and storage location.

Hope it will solve your problem.

Regards

Krishnendu

Read only

Former Member
0 Likes
466

HI

Go to MARD table use the field LABST to get the total availabilty for the material selected

regards

Shiva

Read only

Former Member
0 Likes
466

hi

good

Check this funtion module , might help you to solve your problem

DATA: t_mdpsx TYPE TABLE OF mdps,

t_mdezx TYPE TABLE OF mdez,

t_mdsux TYPE TABLE OF mdsu,

t_mdinx TYPE TABLE OF mdin.

DATA: wa_mt61d TYPE mt61d,

wa_mdezx TYPE mdez.

  • Initial screen

CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'

EXPORTING

matnr = '000000000000000175'

werks = '1100'

IMPORTING

e_mt61d = wa_mt61d

TABLES

mdpsx = t_mdpsx

mdezx = t_mdezx

mdsux = t_mdsux

EXCEPTIONS

OTHERS = 1.

  • Switch to period totals button

CALL FUNCTION 'ATP_BERECHNEN_MDEZX'

EXPORTING

emt61d = wa_mt61d

TABLES

mdezx = t_mdezx

mdinx = t_mdinx

mdpsx = t_mdpsx.

READ TABLE t_mdezx INTO wa_mdezx INDEX 1.

IF sy-subrc EQ 0.

WRITE: wa_mdezx-mng04.

ENDIF.

thanks

mrutyun^