2011 Jun 15 10:46 AM
Hello sdn,
I am opening this thread, because although the search, i didn't find a clear answer.
My problem is that, i want to correct a query we have developed, which is calculate the z-field TOTAL stock on posting date in a wrong way.
So the input should be :
material number
plant
posting date
and the output the TOTAL stock
The functionality is like the MB5B tcode..
Is there any SAP function to do this or i have to develop one ?
Thanks in advance
2011 Jun 15 10:59 AM
The functionality is like the MB5B tcode.. Is there any SAP function to do this or i have to develop one ?
If you want to find the opening & closing stock on a particular date, unfortunately SAP doesn't provide any FMs to cater to this requirement.
Run a SQL trace to check the DB tables which are involved in MB5B, then debug the trxn & figure out a logic.
BR,
Suhas
PS: In one of my previous projects we had developed a custom FM for similar kind of requirement. In that we had made use of combination of LIS structure & standard SAP "stock" tables viz., MARD/MARDH, MCHB/MCHBH etc. to calculate the stock for a particular date!
Hello sdn,
I am opening this thread, because although the search, i didn't find a clear answer.
My problem is that, i want to correct a query we have developed, which is calculate the z-field TOTAL stock on posting date in a wrong way.
So the input should be :
material number
plant
posting date
and the output the TOTAL stock
The functionality is like the MB5B tcode..
Is there any SAP function to do this or i have to develop one ?
Thanks in advance
2011 Jun 15 10:53 AM
I can't help it, this sounds like a masked "spec dumping" attempt. Maybe you can "clear my doubts". Please describe what you have researched so far. Also post the query that gives the wrong result for better analysis.
Since you know that MB5B has the desired functionality, did you try analyzing/debugging how this transaction does it? If not, why not?
Thomas
2011 Jun 15 10:59 AM
The functionality is like the MB5B tcode.. Is there any SAP function to do this or i have to develop one ?
If you want to find the opening & closing stock on a particular date, unfortunately SAP doesn't provide any FMs to cater to this requirement.
Run a SQL trace to check the DB tables which are involved in MB5B, then debug the trxn & figure out a logic.
BR,
Suhas
PS: In one of my previous projects we had developed a custom FM for similar kind of requirement. In that we had made use of combination of LIS structure & standard SAP "stock" tables viz., MARD/MARDH, MCHB/MCHBH etc. to calculate the stock for a particular date!
2011 Jun 15 11:00 AM
2011 Jun 15 1:03 PM
Thank you all for your answers,
The problem is that the MARDH table (which the program reads) doesn't seem to be right.
The total quantity of 168,900 at the end of 3rd period is correctly added to MBEWH table, but the MARDH table shows this quantity at the end of 4th !
see link for details..
[https://export.writer.zoho.com/public/stratos.ts/mbewh-vs-mardh|https://export.writer.zoho.com/public/stratos.ts/mbewh-vs-mardh]
How is this possible ???
2011 Jun 15 10:03 PM
Perhaps this is better asked in the MM forum. It's not really an ABAP issue.
2011 Jun 16 6:37 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |