‎2008 Mar 11 8:26 AM
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.
‎2008 Mar 11 9:05 AM
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
‎2008 Mar 11 9:18 AM
HI
Go to MARD table use the field LABST to get the total availabilty for the material selected
regards
Shiva
‎2008 Mar 11 9:37 AM
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^