cancel
Showing results for 
Search instead for 
Did you mean: 

No of days - 0FISCPER dynamic calculation

Former Member
0 Kudos

Gurus,

How to calculate the number of days in query using input selection criteria as 0FISCPER ?

If user enters 10/2007 it should select take days as 31 and multiply it to my existing calculated key figure dynamically.

like

CKF * 31

if user enters 02/2007

it should select 28 days ,hence my formula is CKF * 28

thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Tony,

One possible solution is -

1. Create a Formula variable with customer, with i_step = 2, so that you can take the value entered by the end user and calculate the number of days.

2. Use this Formula variable in the creating a formula so that you can multiply this variable value to the ckf.

-Saket

Former Member
0 Kudos

Thanks

I_STEP =2 means you want us to write an customer exit??

since using formula variable i can define only below

Processing by = Replacement Path

Charecteristic = 0customer

Replace variable = Key

In the "Currencies and Units" section

Dimension ID = Number

can you pls explain step by step

thanks

Former Member
0 Kudos

you can do the following.

1. Create a formula variable with customer exit as processing.

For the exit, you have to write a code such that it will take the month value from the selection variable and calculate the number of days of the month as output.

You can use std FM - /OSP/GET_DAYS_IN_MONTH, which calculates the number of days in a month.

If you don't have too much experience writing an exit, try copying other exit code in your system and play around with it.

-Saket

Former Member
0 Kudos

Thanks

Isnt there any thing simple without writing an ABAP code like this link,i hate writing abap.

http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html