cancel
Showing results for 
Search instead for 
Did you mean: 

how to calculate number of days in a month based on key date variable?

Former Member
0 Kudos

Hi Folks,

We are developing a query DPO (Days payable outstanding report) in that to calculate

DPO the formula is (Accounts Payable+Provisions/Cost of Sales) * No of Days.

so, here based on key date which we enter we need to get no of days dynamically & calculate no of days.

Appreciate your valuable inputs for solving this.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186445
Active Contributor
0 Kudos

search for formula variable

Former Member
0 Kudos

Hello Marco,

The easiest way from my point of view is to create ABAP-exit variable, e.g. based in FM /SDF/RBE_GET_DAYS_PER_MONTH

Kind regards,

Andrey

Former Member
0 Kudos

Hi Andrey,

Thank you for your Valuable Input.But we have to get the Key date entered by the user and from that key date the month and year has to be passed to a Function Module mentioned by you to get the Number of day in that month.(We are clear in this Step)

How to use this customer exit (above logic) in a Formula variable with replacement path to calculate Daily payable outstanding during the runtime of the query.

Former Member
0 Kudos

Hi Navalan,

In this case, I'd rather create 1 input variable(with month), and one customer exit variable(with number of days) which is calculated in i_step = 3, after all the inputs have been done, and use customer exit variable in the formula.

Kind regards,

Andrey

Answers (0)