Quantcast
Channel: SCN : All Content - Data Warehousing
Viewing all articles
Browse latest Browse all 1423

Customer Exit Variable - Range values being collapsed to single value

$
0
0

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

 

SceanrioFROMTODesired Output
101.01.201431.01.201401.01.2014 -> 31.01.2014 ( I BT 01.01.2014 31.01.2014)
201.01.201401.01.2014 -> 01.01.2014 ( I BT 01.01.2014 01.01.2014)
312.01.201412.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


Viewing all articles
Browse latest Browse all 1423

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>