Scale prices have been defined for a scheduling agreement item. When a goods receipt is posted, the scale price applicable to the target quantity of the scheduling agreement item is applied for valuation purposes.
Example: Scale From 1 pc - 100.00 EUR
from 50 pc - 90.00 EUR
from 100 pc - 80.00 EUR
Target quant. 100 pc
schedule lines 30 pc
A goods receipt of 30 pc is valuated at the price 80.00 EUR.
It is desired that price determination be based on the quantity posted at the time of goods receipt.
User exit EXIT_SAPLEINR_003 exists; it is a part of enhancement MEVME001. By using this user exit, you can influence the quantity and the date of the price determination at the time of the goods receipt for the scheduling agreement.
However, you need to bear in mind, that when you call up the user exit, the quantity of goods received actually to be posted does not yet exist. Therefore, this cannot be used to determine the price (also refer to Note 453655).
MOVE ett TO cett.
CALL CUSTOMER-FUNCTION '003'
EXPORTING i_ekko = ekko
i_ekpo = ekpo
i_budat = budat
i_bldat = i_bldat
TABLES xeket = cett
CHANGING c_datum = p_datum
c_menge = p_menge.
The schedule lines are in internal table CETT.The target quantity of the scheduling agreement is in ekpo-ktmng, the total of the schedule line quantities is in ekpo-menge.
At this point, you can also only access the schedule line quantities of internal table CETT.