Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
im trying to get this done:
Tables VBRK, VBRP, A305 and KONP.
For every Customer-Material combination there can be one or more Sales Prices (identified by the fields dateFrom and dateTo).
So I created a Key %Customer_Material_Key to link sales table and conditions table.
What i get now is this:
VBELN | Sales Price | Date_From | Date_To | Revenue |
---|---|---|---|---|
12345 | 1.5 | 01-11-2011 | 31-12-2013 | 200 |
12345 | 1.6 | 01-01-2014 | 31-12-2014 | 200 |
12345 | 1.65 | 01-01-2015 | 01.06.2015 | 200 |
Where there should be only one row and not three of course
So i need the the user to be able to select a date for the sales price.
For example, if the user selects 12-06-2012 the first sales price should be displayed (and therefore only the first row).
Can somebody help me?
Don't you mean: "I want to get the correct sales price condition (period from-to) attached to the sales document based on the document date or creation date"?
Hi Peter,
Almost. What i want is:
"I want to get the correct sales price condition (period from-to) attached to the sales document based on the date the User selects for the sales price condition"
Example: two conditions: 01-01-2012 to 31-12-2012: price is 1,23
01-01-2013 to 31-12-2013 price is: 1,29
case 1: User selects 04-05-2012 as price date -->
VBELN | Price | Revenue |
---|---|---|
12345 | 1,23 | 300 |
case 2: user selects 02-03-2013 as price date --->
VBELN | Price | Revenue |
---|---|---|
12345 | 1,29 | 300 |
case 3: user selects 10-10-2005 as price date --->
VBELN | Price | Revenue |
---|---|---|
12345 | NULL | 300 |
Hope this makes it clearer.
Hi,
May be check the Attachment, I created one variable and used as a calendar object..and the expression is
=sum({<Date_From={'<=$(=Date(vDate))'},Date_To={'>=$(=Date(vDate))'}>}[Sales Price])