Skip to Content
0

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

Sep 07, 2017 at 11:36 AM

82

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mario Tibollo Sep 08, 2017 at 08:22 AM
0

search for formula variable

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Former Member
Former Member

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.

0
Former Member
Former Member

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

0