cancel
Showing results for 
Search instead for 
Did you mean: 

Formula variable with replacement path on system date

Former Member
0 Kudos
389

Hi Experts,

I got a requirement to calculate "Days without payment" in report level.

Days without payment = System Date - Payment Date.

(Payment date field is available in CUBE, but system date field is not available in the CUBE)

As we know, the difference b/w 2 dates is not possible directly.It can be possible by creating 2 formula variables with replacement paths on the dates and by writing aformula on these 2 formula variables.

But the thing is I dont have system date readily available, and I tried by using SAP Exit. But we cant create formula variable replacement path on another variable (SAP EXIT).

Do we have any SAP variable for formula with replacement path readily avaliable to get system date (or) any other suggession.

Please suggest me.

Thanks,

Sai Chand.S

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks.

Problem Solved...

Former Member
0 Kudos

Hi Arminder,

Thanks for ur reply.

Even if we make the 2 dates as key fig's,I guess we cant subtract 2 keyfig's to get number of days.

Thanks,

Sai Chand.S

former_member360228
Contributor
0 Kudos

You can do it, try it... i am doing the same in AR report.

Former Member
0 Kudos

Hi Arminder,

Thanks for your valuable answer.

I tried doing the same previously.As u said we can get system date by creating customer exit variable.

But the thing is to find difference b/w 2 dates, we cant do it directly, we need to create 2 formula variables with replacement path.

1) Var1 = Formula variable with replacement path on system date(custoer exit variable).

2) Var2 = Formula variable with replacement path on paymanet date.

Number of days = var1 - var2.

But as in 1st point, we cant create formula variable with replacement path on another variable, as system date is already a variable of type customer exit.

We can create replacement paths only on characteristics.

Please suggest me .

Thanks,

Sai Chand.S

former_member360228
Contributor
0 Kudos

Ok.. another way of doing the same thing is to have a key-figure of type date in your info-cube or dso (whatever is being used for reporting) and populate it with the same value as payment date. In this way in a CKF you can use the customer exit formula variable which is getting the system date and use the payment date key-figure for subtraction.

Regards,

Arminder Singh

Former Member
0 Kudos

check this thread...

[]

you can achieve this by creating FV with customer exit to get system date... the only thing you have to make sure is that you have to select date as type in the "currency/unit" tab(last tab) of your Formula variable screen.

--- Thanks...

former_member202517
Participant
0 Kudos

Could some one please explain me when can we use formula variable with replacement path and i have seen docs related to replacement path of formula variable showing the difference between the dates, Is that the only case where we use formula variable with replacement path or are there any more scenarios?

Please provide me guidance.

former_member360228
Contributor
0 Kudos

Hi,

If you need the system date for some calculation then you can create a formula variable of type 'customer exit' and write a code to pupulate it with the system date.

Or did i missed something in your question? Let me know.

Regards,

Arminder