on 04-27-2015 6:45 AM
Dear Frds,
I found the below formula from different threads,
Fetching from s031,s032 Tables ..... I want the fields for below formula pls help me out......
opening stock = quantity total stock + issue total stock - receipt total stock.
= 0totalstck + 0isstotstck - 0rectotstck.
closing stock = opening stock + receipt total stock - issue total stock.(0totalstck).
(but in BW it is calculated in extractors there is no need for calculation simply rename it 0totalstck as closing stock.
Kabil.
Hi Kabil,
Please refer below formula to calculate Closing and opening stock
Yesterday's Closing Stock = 0RECTOTSTCK till yesterday - 0ISSTOTSTCK till yesterday
Today's Opening Stock = Yesterday Closing is the opening stock for today.
If you calculate today's closing stock then it will be opening stock for next day.
Thanks,
Kashif Ali Khan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kabil,
If you want to match the same stock value which is showing in standard report S_P00_07000139, it is better to get the value from standard report itself from Custom one. Because there are more number of logic returned in standard report, either we are suppose have same logic in custom program or we have to call the standard program using SUBMIT Command.
Do the enhancement in standard report and export the value and call the standard report using SUBMIT command from custom report.
Please find the document below.
Regards
Rajkumar Narasimman
Hi Kabil,
Without enhancement in standard program, it is possible to receive the value in custom program using FM LIST_FROM_MEMORY.
Population of data based on Submit report List Object - Code Gallery - SCN Wiki
Regards
Rajkumar Narasimman
Hi Kabil,
It is possible. We can create our custom program and schedule the report in background and get the values using LIST_FROM_MEMORY and we can save the values in Z-table too, but it is not recommendable one.
We need only the current updated stock value which is already system fetches using some standard report. It is better to follow the standards, using the above said(z-table) we can minimize the performance but standards need to be considered .
Regards
Rajkumar Narasimman
Hi Kabil,
Yes, since the code is written in Initialization event, we can overwrite the same by creating the Variant for the particular screen, Call the Submit report like SUBMIT USING SELECTION-SET like shown below, here I have created the variant 'TEST2'.
Call the selection screen as follows.
SUBMIT J_1HSTCD
VIA SELECTION-SCREEN
EXPORTING LIST TO MEMORY
AND RETURN
USING SELECTION-SET 'TEST2'.
To change the variant value using FM FASU_RS_CHANGE_CREATED_VARIANT. Please find the document below.
Mass Change of Variants - Code Gallery - SCN Wiki
If you found more difficult, you can another method using BDC too and there are more number of implicit enhancements available for the program J_1HSTCD as shown below. write the export statement inside implicit enhancement and get the value in the custom program.
Regards
Rajkumar Narasimman
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.