cancel
Showing results for 
Search instead for 
Did you mean: 

MD04 function module MD_STOCK_REQUIREMENTS_LIST_API

former_member209175
Participant
0 Kudos

Hi Team,

I am using the function module MD_STOCK_REQUIREMENTS_LIST_API for my reporting. In the function module i have the following fields

MNG01- PIR Qty

MNG02- Requirement Qty

MNG03- Receipt Qty.

What does the above fields mean?

The field "MNG01-PIR qty" will be updated after MRP run for a particular material based on the entry maintained in the transaction MD61(Create PIR). Am i right?

I can not able to understand the field "MNG02-Requirement qty". Is this the sales order qty for the finished goods item? Will this field MNG02 only considers sales order qty? Will purchase order qty also will be considered for this field? On what basis this field will be upadated?

Also I can not able to understand the field "MNG03-Receipt qty". Is this field considers all the scenarios like GR against sales order, GR against purcahse order and GR production order? On what basis this field will be upadated?

request for your valuable guidance here.

Thanks

psk

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi

your answer is correct for all the fields.

former_member209175
Participant
0 Kudos

Hi AP,

Still i can not able understand these fields.What is the meaning of the fields MNG02- Requirement qty and MNG03-Receipt-Qty?

Can you please explain me about these fields? what type of goods movement type will be considered as requirement and what type of goods movement type will be considered as receipt?

In what way requirement qty and receipt qty is different?

If you have any documentation on this please share.

thanks

psk

Edited by: psk.psg on Feb 1, 2012 2:26 PM

Edited by: psk.psg on Feb 1, 2012 2:30 PM

anup_patil3
Active Contributor
0 Kudos

Hi,

In generic terms, Requirements & Receipts are as:

Requirement Elements: Sales Order, Planned Ind Reqmts, Dependent Requirement, Reservations whereas

Receipt Elements: Planned Order, Production Order, Purchase Requisition, Purchase Order

Hope it's clear.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Thank you very much for your clear information. So in the FM "MD_STOCK_REQUIREMENTS_LIST_API", the field MNG02- Requirements qty sums up all the requirement elements you mentioned (ie, Sales Order, Planned Ind Reqmts, Dependent Requirement, Reservations). Am i right?

For example for a given plant and material combination, i have sale order qty 30, PIR qty 15, reservation qty 12 and the dependent req qty 20. Then after MRP run, if i execute the FM "MD_STOCK_REQUIREMENTS_LIST_API" for this material, in the MNG02 field i can see qty as 77 (301512+20). Am i right?

In the FM i have field "MNG01-PIR qty". Will it display only the PIR qty for the material? If yes, as per my above example, after MRP run, i can the PIR qty as 15 in the field MNG01. Am i right?

One more clarification. Can i able to see the material consumption qty for given time period using this FM?

Thank you very much for your clarification.

psk

Edited by: psk.psg on Feb 2, 2012 6:03 AM

Edited by: psk.psg on Feb 2, 2012 6:04 AM

anup_patil3
Active Contributor
0 Kudos

Hi PSK,

I'm really not sure what exactly your requirement is.... but if I look at FM- MD_STOCK_REQUIREMENTS_LIST_API it can be used to read Stock/Reqmt List for a material/plant combination with a particular planning scenario.

Now when you say Requirement Qty (Sales order, PIR etc), system has seperate "MRP Element Indicator" for each of these to segregate those. Like:

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

Also when I execute this FM, I can see meaning of MNG01/02/03 as below :

MNG01 - Qty Received/ Required Qty

MNG02 - Scrap

MNG03 - Shortage Qty...

So I will suggest you to talk to your ABAPer and get more info on this FM.

Also depending on your requirement, you may need to put logic to add up all Requirements Qty and Receipt Qty using 'MRP Element Ind'.

Revert if any more issue.

Regards,

Anup

anup_patil3
Active Contributor
0 Kudos

Also, I will suggest you to use BAPI - BAPI_MATERIAL_STOCK_REQ_LIST if you want to fetch some data from Stock/Requirement List and make some output reports.

BAPI - BAPI_MATERIAL_STOCK_REQ_LIST is more simpler & easy.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Thank you for the input. My requirement is to display the requirement qty and the receipt qty for a material in the report output.

As you said, use the relevant MRP elements to fetch the requirement qty and the receipt qty for a material.

I am not clear which MRP element should iuse to fetch the requirement qty of a material. Also I am not clear which MRP element should iuse to fetch the receipt qty of a material.

Can you please guide me to which MRP element to be used for the above requirement?

thanks

psk

anup_patil3
Active Contributor
0 Kudos

Hi PSK,

As mentioned in earlier reply, Requirement & Receipt Elements are as below. Now I'm putting down respective "MRP Element Indicator" in bracket below.

Requirement Elements: Sales Order (VC), Planned Ind Reqmts (PP), Dependent Requirement (SB), Reservations (MR) whereas

Receipt Elements: Planned Order (PA), Production Order (FE), Purchase Requisition (BA/U2), Purchase Order (LA/U1)

Also based on your business requirement you can chose from below available SAP standard MRP elements.

AR Dependent reservation

BA Purchase requisition

BB Subcontractor requirements of material provided

BE Order item schedule line

BP Gross requirements planning

BR Process order

CH Batch stock

ER End of replenishment lead time

E1 Subcontracting purchasing

FE Production order

FH End of planning time fence

IH Maintenance order

JI JIT call

IM Actual goods receipt quantity

IW In plant (only relevant for IS Automotive)

KB Individual customer stock

KD Customer independent requirement (currently not used)

KK Consignment stock for customer (availability check)

LA Shipping notification

LB Storage location stock

LC Batch/storage location stock

LE SA schedule line

LF JIT delivery schedule

LK Stock with subcontractor

LL Forecast delivery schedule

MB Goods issue

MR Reservation

MS Direct production

NE Network order

PA Planned order

PB Project stock

PP Planned independent requirement

PR Forecast requirement

QM Inspection lot for quality management

RP Returns item

RR MRP requirement (only relevant for IS-Automotive)

RU Confirmation

S2 Simulated requirement from availability check

SA Simulation order

SB Dependent requirement

SF Safety requirement

SH Safety stock

SI Simulation requirement

SM Sim. dependent reqmts

SU Total requirements

TB Transfer requirements WMS

U1 Release order for a stock transfer order

U2 Release order for a stock transfer requisition

U3 Transfer requirement for simulation order

U4 Release order for stock transport scheduling agreement

UB Unplanned requirement

UL Reservation in another plant

UR Stock transfer reservation

VA Request for quotation

VB Quotation

VC Order

VE SD scheduling agreement

VF SD scheduling agreement; external service agent

VG Contract

VH Returns from Consignation Stock at Customer

VI Delivery Free of Charge

VJ Delivery

VP Planning

VT Returns (availability check)

VW External sales order

VZ Unverified delivery

WA Goods issue

WB Plant stock

WE Goods receipt

WH End replenishment period

DD Effective-out date

Hope this will help.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Thank very much for your help.

So should i only consider the below MRP elements to fetch the requirement qty and receipt qty. The other MRP elements are not for requirement qty and receipt qty. Am i right?

So i can consider only the below MRP elements for my requirement (ie, requirement qty and receipt qty). Am i right?

MRP element for Requirement Qty: Sales Order (VC), Planned Ind Reqmts (PP), Dependent Requirement (SB), Reservations (MR)

MRP element for Receipt Qty: Planned Order (PA), Production Order (FE), Purchase Requisition (BA/U2), Purchase Order (LA/U1).

Please guide me

thanks

psk

Edited by: psk.psg on Feb 2, 2012 3:02 PM

anup_patil3
Active Contributor
0 Kudos

Hi PSK,

See, what I had mentioned as Requirement & Receipt Quantity are correct & complete in generic terms and you can go-ahead with those for your requirement.

But again depending upon your business requirement, you/your customer may like to include some more MRP Elements.

For example: Sales Order is a requirement qty element. But once you create a Delivery for a sales order, it will vanish from MD04 and a delivery will be displayed on MD04.

So now, you need to ask question/s to yourself / your customer, whether want to consider DELIVERY also as a requirement Quantity or not. In that case, you need to consider MRP Element-Delivery (VJ) also in your report logic.

Hope it's clear.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Really very good info for me. As you said, once we create the delivery for the sale order, the sale order will vanish from MD04 and delivery will be displayed in MD04. So i need to consider the MRP element VJ also as requirement element.

Similar way, the planned order will vanish from MD04 after i convert planned order to production order. So i need to consider both MRP elements for receipty qty.

As well, the purchase requisition will vanish from MD04 after i convert purcahse requisition to purchase order. So i need to consider both MRP elements for receipty qty.

Like above, should i need to consider other child MRP elements for PIR, reservations, dependent requirements.

Note: Here I mean child MRP element as "VJ-Delivery". Becasue the element VJ has been created from sale oder. Similar way any child MRP element will be created for PIR, reservations, dependent requirements,Purchase Order?

Thanks

psk

Edited by: psk.psg on Feb 3, 2012 6:12 AM

anup_patil3
Active Contributor
0 Kudos

Hi,

Answers to your queries are given below.

1. Similar way, the planned order will vanish from MD04 after i convert planned order to production order. So i need to consider both MRP elements for receipty qty.

- For this case, as I already mentioned, we are considering Planned Order & Production Order as RECEIPT QTY.

2. As well, the purchase requisition will vanish from MD04 after i convert purcahse requisition to purchase order. So i need to consider both MRP elements for receipty qty.

- For this case also, as I already mentioned, we are considering PR & PO as REQUIREMENT QTY.

3. Like above, should i need to consider other child MRP elements for PIR, reservations, dependent requirements.

- Here I do NOT think that there will be any child MRP element (as per your terminology..) for PIR, Reservations & DR's.

Reason being, all above three elements will disappear as soon as parent requirement is completed.

Hope this will help you further.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Thank you for the detailed info. I have some clarification.

1. After we run MRP, i am converting the purchase requisition into schedule lines. In this case, i need to consider the MRP element of schedule line for receipt qty calculation. what is the MRP element for Schedule lines?

2. In the MRP element list which you have sent, i could not able to understand the difference between the below MRP elements.

What is the difference between the MRP element "AR- Dependent Reservation" and "SB-Dependent Requirement"? can you please explain me with some example?

3. while calculating the requirement qty, i may need to consider the below MRP element also knowlike sale order. Am i right?

VE SD scheduling agreement

VF SD scheduling agreement; external service agent

VG Contract

What is the difference between VE and VF? And what is the difference between "VE - Scheduling agreement" and "VG-Contract"?

Your valuable guidance required

psk

anup_patil3
Active Contributor
0 Kudos

Hi PSK,

1. LE is MRP element for Schedule Line.

2. Not sure about diff between "AR- Dependent Reservation" and "SB-Dependent Requirement". But my unnderstanding is that, AR is reservation created manually by a specific transaction whereas SB is the requirement from a confirmed planned order/PR, created automatically in MRP.

3. Yes, if you've some elements like VE-SD scheduling agreement, VF-SD scheduling agreement; external service agent &

VG Contract in your business process, you need to consider that also. Similar way if you've any "Free Of Charge Delivery", then you need to consider MRP Elmement- VI also in addition to Normal Delivery-VJ.

Also, SAP standard system has all these three different documents (VE SD scheduling agreement / VF SD scheduling agreement; external service agent / VG Contract) in SD module... So you better check with SD person for distinct difference.

I believe, after looking for solution with this FM, as a PP consultant, you might have known now the complexity of Stock/Requirements List (MD04) screen and all related MRP Elements...

But dont worry, as you start developing Custom Report using this FM, you'll get more insight to these. And off-course, at some point of time you yourself need to decide which MRP Element need to be considered and which one not.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Thank you for the info.As you said, the MRP element SB is for dependent req. But the MR element AR is not for reservation which has been created manually. For manual reservation we have the MRp element MR. So the MRP element AR is for some thing else.

If possible, can you please get some details for MRP element AR?

thanks

psk

anup_patil3
Active Contributor
0 Kudos

Hi PSK,

AR is Dependent Reservations created for MRP requirements through automatic MRP run whereas

MR is reservations created MANUALLY for specific goods movement using MB21.

Apologies for confusion between AR & MR element.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Thank you for the info.As you said, the MRP element SB is for dependent req. But the MR element AR is not for reservation which has been created manually. For manual reservation we have the MRp element MR. So the MRP element AR is for some thing else.

If possible, can you please get some details for MRP element AR?

In addition to that, i would like to get the consumption details of the particular material. Is it possible to get the consumption details of a material from the FM MD_STOCK_REQUIREMENTS_LIST_API. If not, how can i get the consumption details of the material for given period?

thanks

psk

anup_patil3
Active Contributor
0 Kudos

Hi PSK,

FM you're using for MD04 elements can not give consumtion details.

Consumption details can get either from table-MSEG using specific Movement Types (e.g. 261 & 201) or from Tcode-MB51 with same movement types.

Regards,

Anup

former_member209175
Participant
0 Kudos

Hi Anup,

Thank you for the info. As you said, AR is for reservation created automatically thro MRP. Then what is SB-Dependent requirement. i feel both look similar. In what way these two are different?

Regarding consumption, you said movement type 261 and 201. Apart from these movement types, do we have any other standard movement types to consider for material consumption?

thanks

psk

anup_patil3
Active Contributor
0 Kudos

Hi PSK,

A dependent requirement is a component linked to a planned order fo header material. When the planned order is converted to a production order, the dependent requirement for this component become a reservation.

Also, a reservation can be created manually for a particular movement (without any reference to production order).

Regarding consumption Movement Types... You need to search for more on SDN or SAP Help, if any.

Movement Type-201 & 261 just came into my mind & I shared those with you.

Check out detailed Movement types info on wiki:

http://wiki.sdn.sap.com/wiki/display/ERPLO/Movement+types

Hope it will help you.

Regards,

Anup

former_member209175
Participant
0 Kudos

HI Anup,

Thank you very much for ur info. Regarding the material consumption, can i use the data from table MVER?

On what basis the table MVER will be updated? In this table we do not have any movement type field. According to which movement type this table will be updated.

Please guide me

thnaks

psk

anup_patil3
Active Contributor
0 Kudos

Hi PSK.

Really not sure how table-MVER is being updated.

MVER doesn't have any Movement Type and even not Period/Month. For example, if you want to see Consumption Details for Dec-11, you'l' not be able to get it. So not sure, how feasible table-MVER will be ?

Regards,

Anup