Question:
Dear all
We issue a SO with Qty, let say 100PC, then we deliver 30PC. At this moment when we use MD04 to view, we can get 70PC requirement.
Now, I want to get this 70PC in ABAP program, which table should I read?
Thanks
Elaine
Answer:
Can you retrieve 100 and 30? Maybe you could do a good old subtraction ...
Answer:
Dear nemo,
I can get the 100PC, what is the most efficient way to get the 30PC?
Thanks
Elaine
Answer:
I dont have Logistics configured in my current project. However, the easiest way for you to know where and which tables the underlying data is stored, use SQL trace (tcode ST05).
hope that helps.
Answer:
Dear all
Now I am using VBAP to get the 100PC and sum the 601 in MSEG to get the 30PC and then subtract.
This retrieve way got a very bad performance. Anyone can suggest a more efficient way to get the figure?
Thanks
Elaine
Answer:
Dear all
Now I am using VBAP to get the 100PC and sum the 601 in MSEG to get the 30PC and then subtract.
This retrieve way got a very bad performance. Anyone can suggest a more efficient way to get the figure?
Thanks
Elaine
Have you considered looking at VBEP?
_________________
Kind Regards
Rosie Brent
Please remember to search the forum and check the FAQ before posting questions, thank you.
Tuly Idiot most of the time, part-time Guru
Answer:
You could try using MSKA (sales order stock) or if your going to use the 601 approach, why not use VBFA - I sure would not like to hit the MSEG table without the key.
Hope this helps!
Z
Answer:
Hi,
you could use FM RV_ORDER_FLOW_INFORMATION.
you pass your ordernumber and posnr to the comwa structure of the FM
and the resulting vbfa table contains all the documents related to your sales order.
Then you can loop at the table where VBELV(originating document) = ordernumber and POSNV(originating item) = posnr and add up field rfmng.
That way you get the quantities on delivery, shipped, invoiced,...
i.e. your 30 PC
Also have a look at field vbtyp_n as it indicates the kind of document(delivery, invoice,...) the items are on.