‎2008 Feb 13 4:53 PM
Hi guys,
I'm looking for a bapi function which gives me some data like MMBE or MB52.
Input is: material and plant
Output should be: Storage location, special stock number (if exists), unrestr. use stock qty.
I tried a couple of functions like:
MD_STOCK_REQUIREMENTS_LIST_API (no good, does not support storage location)
MARD_GENERIC_READ_MATNR_PLANT (no good, it does not support "special stock qty")
BAPI_MATERIAL_AVAILABILITY (no good, does not deliver storage location)
Any ideas?
Thanks a lot !!!
Regards
Wolf.
‎2008 Feb 13 5:21 PM
‎2008 Feb 13 5:27 PM
Thanx for your response.
I do not have Warehouse nor quant!
Any other ideas?
‎2008 Feb 13 5:45 PM
‎2008 Feb 14 10:02 AM
Hello Summet,
thx. for your reply.
Tried function w/o getting a result.
This are the requested parameter of the function:
I entered item and plant into MTCOM but don't know what to enter into the other fields?
-
MTCOM 4-001-02-0007 9991
TRTYP
XNEUP
XAENP
MBEQU
SHKZG
XENQU
KZDZV
XMBWL
MBVAL
XWERT
-
What did you enter into this fields? Just blanks doesn't seem to work!
Thx again.
‎2008 Feb 14 10:25 AM
For MD04:
* Initial screen
CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'
EXPORTING
matnr = '...'
werks = '...'
IMPORTING
e_mt61d = wa_mt61d
TABLES
mdpsx = t_mdpsx
mdezx = t_mdezx
mdsux = t_mdsux
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc = 0.
* Switch to period totals button
CALL FUNCTION 'ATP_BERECHNEN_MDEZX'
EXPORTING
emt61d = wa_mt61d
TABLES
mdezx = t_mdezx
mdinx = t_mdinx
mdpsx = t_mdpsx.
Darley
‎2008 Feb 14 11:21 AM
Thx Darley,
do you also have the declaration section for me?
Thx.
‎2008 Feb 14 11:34 AM
yeah.
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.
Darley
‎2011 Jan 17 5:30 AM
‎2008 Feb 14 11:51 AM
Sorry,
result is not what I wanted!
Got no storage location nor special stock quantity.
Thx. anyway !!!
‎2010 Jun 25 4:52 AM
fields that are in need mard table, use the FM MARD_SINGLE_READ
The field of free stock is LABST.