cancel
Showing results for 
Search instead for 
Did you mean: 

Difference in date

Former Member
0 Kudos

Hi all,

How will I get the difference of Current date and basic start date(Current date - Basic strat) date in the query.

I am getting Basic Start date. User will enter Current date in the selection Variable.

Please help.

Regards,

sunny

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Create a new variable for (Current date - Basic strat) say ZDATE as Customer exit variable.

in the EXIT_SAPLRRSOO_001 (Se37 in the include structure write a logic wich reads the current data - Basicstart date) using the variable name ZDATE.

now the diffrence of the date will be calculated and the data for that data will be displayed.

santosh

Answers (2)

Answers (2)

former_member181964
Active Contributor
0 Kudos

Hi,

If is very simple using customer exit code..

create one Custome exit varible using formula variable and pass SY-DATUM and create a formula varible on Basic Start and do simple subtraction in report see the "Calculating the Ageing of the Materials" Article it will resolve your problem

https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intellige...

Thanks

Reddy

dennis_scoville4
Active Contributor
0 Kudos

Create a Formula Variable for Basic Start Date as you normally would. For the Current Date, you would create the Variable for the end-user input and then create a Formula Variable, but instead of using Key in the Replace With on the Replacement Path tab, use Variable and then select the Variable that you created for this date characteristic.

Then create a CFK to calculate the difference between the two dates.

Former Member
0 Kudos

Hi,

How will I create variable for User end input. If I create that variable on some characteristic it will check that particular date on that char and the query will be executed based on that. May be I am not clear again what you meant to say. Can you please provide me steps for the current day variable and how to give it in a replace with option

Regards,

Sunny