Hi
I am trying to create a customer exit variable that will take the values input by a user in a date range variable, and force the output to be a range. The reason for doing this is because of the way that WebI handles (or doesn't handle) BEx input range variables.
If the user only enters a from date, the output must contain that date in both the FROM and TO fields (in variable speak, FROM = LOW and TO = HIGH).
If the user enters a value in FROM & TO, those values are mapped to the FROM and TO
If the user enters a value in the TO, both the FROM (low) and TO (high) must take that value
Sceanrio | FROM | TO | Desired Output |
---|---|---|---|
1 | 01.01.2014 | 31.01.2014 | 01.01.2014 -> 31.01.2014 ( I BT 01.01.2014 31.01.2014) |
2 | 01.01.2014 | 01.01.2014 -> 01.01.2014 ( I BT 01.01.2014 01.01.2014) | |
3 | 12.01.2014 | 12.01.2014 -> 12.01.2014 (I BT 12.01.2014 12.01.2014) |
I have written the ABAP code for the variable, and I can test that function module, and confirm that it returns the correct results.
However, when the variable is included in the query, the range values seem to get compressed to a single value when the LOW and HIGH value are the same.
In scenario 1, when running the query in RSRT, I can see that the customer exit variable is working correctly and outputting the desired range.
In scenario 2, the RSRT output shows just a single value has been output for this variable. In debug mode, I can see that at the end of my function module, the range has been added to e_t_range as I BT 01.01.2014 01.01.2014), so somewhere after that, some standard SAP code must evaluate the range and collapse it to a single value if LOW=HIGH.
Is there any way to prevent this "collapsing" of the variable? When a single value is returned, WebI returns no data
Regards,
Andrew