cancel
Showing results for 
Search instead for 
Did you mean: 

MD04 filter-SAP00002-requirements and stocks

Former Member

Hi All Gurus,

We have developed a Z-Report using function Module MD_STOCK_REQUIREMENTS_LIST_API to get stock report.

My requirement is to get the shortage report with MD04 -> Selection Rules SAP0002 Requirements and Stock ( It exclude Open PO , PR etc.)

I canot see this data ( AVAILABLE QTY COLUMN ) in function Module MD_STOCK_REQUIREMENTS_LIST_API.

Can any one let me know where can see these datas so that i can map up my requirement..

Please guide

Regards

Su

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear all, can anyone help me out pls

Former Member
0 Kudos

Dear Su,

for the next time i advice you BAPI_MATERIAL_STOCK_REQ_LIST instead of MD_STOCK_REQUIREMENTS_LIST_API because this one is released  by SAP and contains in any case MD_STOCK_REQUIREMENTS_LIST_API  inside.

About your requirement i thinks that the selection Rules SAP0002 Requirements and Stock ( It exclude Open PO , PR etc.) are tool for standard filter with some limits, i would advise you to implemented a logic in your custom report in order to calculate the avalaible quantity starting from requirement quantity , stock , and receipt quantity.

The FM MD_STOCK_REQUIREMENTS_LIST_API contains already all the quantity necessary for this calculation and it could be more simple to implement.

You would consider specially DELKZ field for figure out the postive element and the negative element.

For example:

MRP Ele Ind   Object

FE     Production order

BA     Purchase requisition

LA     Shipping notification

PP     Planned independent requirement

SA     Simulation order

KB     Individual customer stock

VC     Order

and so on.

Let me Know if i have been useful for you

Daniele

Former Member
0 Kudos

Dear DP,

Thank you for the reply. I think the Bapi you have suggested will not work as we are using 4.7 but not ecc 6. And in the function module which we have used already gives all the information of MD04/MD07. As said earlier we have used the same in developing the report.

But as per our requirement through selection criteria requirement and stock only, the available quanities will differ. I donot what is written in std. SAP program, because for eg: go to MD04, enter material and plant, you check the report, it considers many things in receipts like open PO, PR etc...and u check available qty column. It considers receipts column as well ....same way you set a filter for sap 00002 requirements and stock...now check available qty column, then compare both with and without filter available qty differs...this difference I tried to check and find out /trace in function module "MNG04" column by doing some addition and substraction to get the total...but iam not getting the same available qty(which we get through setting filter) through function module to get the shortage qty.

Kindly check if possible in your system and let me know please

marianoc
Active Contributor
0 Kudos

Hi Su,

The Available Qty column that you see in MD04 is showing the Stock Projection. This stock projection is the same no matter which is the filter that you enter in MD04. When you filter using SAP0002 Requirements and Stock, you see in MD04 the MRP Elements: Stock and Requirements (e.g.: DepReq). In the Available qty you will see the stock projection that you will have at the time each requirement takes place.

Saying this, you can reproduce the same using your FM.

If you are using FM: MD_STOCK_REQUIREMENTS_LIST_API

You will need to work with MDEZX.

- In column DELKZ you will have the MRP  Element.. Here you will need to filter the MRP Elements that you want to consider as Requirments.

- In column MNG01 you have the corresponding Qty of the MRP Element.

- In column MNG02 you have the Available Qty

Hope this helps,

Kind Regards,

Mariano