Hi SD Experts;
We are working on a report to output the PGI quantity of each delivery item. The current logic is as follows.
Pass the delivery number to 'le_vbeln' of table MKPF, then fetch the material document 'mblnr' from MKPF and pass it to MSEG to retrieve all the items for that delivery. Finally we use delivery number and material number as the link to populating the PGI quantity of each item. But the problem is if there are several items with same material number in a delivery, the PGI quantity from MEG is not properly matched with the delivery item by the link we used.
I have checked MSEG table and found there seems some useful fields such sales item number or reference item number. But those fields are not maintained at all thus we can't use them for the link.
Let me know if you have faced same requirement and share your solution.
Thanks in advance for your inputs.