Application Development 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: 

FM to check available stock

Former Member
0 Kudos
9,091

Hi experts,

You Know some FM that checks the available stock of some material in somer Storage Location ?

Thanks in advance.

Alexandre Nogueira

1 ACCEPTED SOLUTION

Former Member
0 Kudos
738

Hi Check this FM BAPI_MATERIAL_AVAILABILITY

Suresh B mannem

7 REPLIES 7

Former Member
0 Kudos
738

Hi ,

Check table MARD for stocks.

0 Kudos
738

No, it's not that simple, I need a FM that check the reservations, and everything.

Alexandre Nogueira

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
738

You can use tables MARD and MSKA.

Oh ok, you need to check availibility, right?

Regards,

Rich HEilman

Message was edited by: Rich Heilman

0 Kudos
738

Yeap, I need to check availibility.

But I know there is a FM that do this ATP check, but I cant find it out!!

thanks,

Alexandre Nogueira

0 Kudos
738

Have you checked into this BAPI yet?



report zrich_0003.


data:  iwmdvsx type table of bapiwmdvs with header line,
       iwmdvex type table of bapiwmdve with header line.

parameters: p_matnr type mara-matnr,
            p_werks type marc-werks,
            p_meins type mara-meins.

call function 'BAPI_MATERIAL_AVAILABILITY'
  exporting
    plant            = p_werks
    material         = p_matnr
    unit             = p_meins
*   CHECK_RULE       =
*   STGE_LOC         =
*   BATCH            =
*   CUSTOMER         =
*   DOC_NUMBER       =
*   ITM_NUMBER       =
*   WBS_ELEM         =
*   STOCK_IND        =
* IMPORTING
*   ENDLEADTME       =
*   AV_QTY_PLT       =
*   DIALOGFLAG       =
*   RETURN           =
  tables
    wmdvsx           = iwmdvsx
    wmdvex           = iwmdvex.

check sy-subrc = 0.

Oops, looks like I'm a tad late. Oh well.

Regards,

RIch Heilman

Former Member
0 Kudos
739

Hi Check this FM BAPI_MATERIAL_AVAILABILITY

Suresh B mannem

0 Kudos
738

Thanks Suresh,

It's exactly what I need.

Alexandre Nogueira