Quantcast
Channel: SCN : Discussion List - SAP Business Explorer (SAP BEx)
Viewing all articles
Browse latest Browse all 4032

How to get PREVIOUS transaction date?

$
0
0

Hi guys,

 

Just wanted to ask how to get the PREVIOUS or last two (2) transaction dates based on the parameter entered using query designer?

 

This is my raw data:

 

Transaction DateCustomerMaterialAmount
20160121AX10
20160201AX20
20160210AX30
20160225AX40
20160304AX50
20160316AX60

 

 

I wanted to have this query:

 

My parameter is transaction date..So if user entered 20160201 - 20160228, this will be my result..


CustomerLast Transaction DatePrevious Transaction DateAmount (based on Last Transaction Date)
A201602252016021040

 

 

 

So if user again entered 20160101 - 20160131, this will be my result..


CustomerLast Transaction DatePrevious Transaction DateAmount (based on Last Transaction Date)
A2016012110

 

 

 

Another example, if user entered 20160306 - 20160315, this will be my result..Assuming I did not suppress ZERO result..


CustomerLast Transaction DatePrevious Transaction DateAmount (based on Last Transaction Date)
A0

 

 

How can I achieve this in query designer? I'm planning to do this in transformation level but just giving a try if this can be achieved in BEx level..

 

LAST TRANSACTION DATE can be obtained by using the MAX function in formula..How about the PREVIOUS TRANSACTION DATE?

 

Thank you..

 

Loed


Viewing all articles
Browse latest Browse all 4032

Trending Articles



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