Skip to Content
0
Former Member
Sep 06, 2007 at 06:56 PM

How to fetch the correct netprice based on contract item conditions

475 Views

Hi,

When you display a contract using ME33K and you click on a item and view its conditions(shift+F6), there might be 2 validity periods for a given item.

and each period will have different netprice in it.

Let me describe the same.

Suppose the PO creation date is 04.07.2007

The conditions for an item in a contract for the PO are as follows;

1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00

2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00

We need to always fetch the net price from the validity period which always matches with the PO creation date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.

But the program is fetching the netprice 200.000 which belongs to the second validity period. That is because the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.The fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrieves the net price of current data in contract validity and not with respect to PO creation date.

This data is then used to fetch the get the netpr data from EKPO.

what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date..

Now I have the internal table which is having data retrieved from Ekko and EKPO table.

Now how do I retrive the correct price by using the condition tables KONV and KONP.

Can you pls give the code snippet..

Thanks in advance.