Hi,
I hope you are able to track the opening stock for a period. If you get the opening stock, you can find the closing stock as = Opening stock + Total Receipt in the period - Total Goods Issue in the period.
The details can be obtained from S031 table.
Valuated stock receipts (Qty) : S031 - MZUBB
Valuated Stock receipts Value : S031 - WZUBB
Valuated Stock Issue Qty : S031 - MAGBB
Valuated stock Issues Value : S031 -WAGBB
If it it include multiple periods, then you have to take the sum of stock receipt or issues for that period interval.
So inorder to find the closing stock for a period, you may use the logic as :
Closing stock qty = opening stock qty + (S031 - MZUBB) - (S031 - MAGBB)
Closing stock value = Opening stock val + (S031 - WZUBB) - (S031 -WAGBB)
You may consider consignment stock also if required.
Regards,
AKPT