cancel
Showing results for 
Search instead for 
Did you mean: 

From Invoice Date - get No of days

Former Member
0 Kudos

Hi,

I have invoice date,

in my report there is calculations need tobe done for the following.

Case - MTD

Invoice Date - 2009.03.24. I need to capture no. of days in that month ie, 03 (march)

Case - Elapse Days

no of elapse days since 1st of every month ie, if current day is 2009.03.24, elapse days will be 24days....not the working days...but all the days in that month from 1st of ebery month to till today.

provide your suggestions.

pratap

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you every one for your suggestions. Got it.

Thanks,

Pra

Former Member
0 Kudos

Hi,

Here two options are there

1) your requirement pertaing to every month or no of days elapsed as on current date.

if it is the above case

craete the customer exit for getting the currentdate on cal day

when 'zcedate'.

clear l_s_range.

l_s_range-low = sy-datum.

l_s_range-sign = 'i'.

l_s_range-option = 'eq'.

append l_s_range to e_t_range.

here u r getting the current data

crete one more formula varible with replacement path by using the invoice date now in ckf just u do customer exit varible -replacment with formulavarible = no of daysof invoice as on date.

2) if do u want to for particular month here u can go for the i_step = 2

here when u r enter ing taht date for that it has to calculate the days

so user exit variable with i_step=2

then in ckf use as below

that i_step=2variable - invoice date formula varible == no of days on which date u entered in selection screen.

Thanks & Regards

sathish

Former Member
0 Kudos

> in my report there is calculations need tobe done for the following.

>

> Case - MTD

>

> Invoice Date - 2009.03.24. I need to capture no. of days in that month ie, 03 (march)

You can pass your Invoice date ( Month and Year ) into Function Module NUMBER_OF_DAYS_PER_MONTH_GET

and get no.of days for that Month.

> Case - Elapse Days

>

> no of elapse days since 1st of every month ie, if current day is 2009.03.24, elapse days will be 24days....not the working days...but all the days in that month from 1st of ebery month to till today.

Can you explain your requirment more elaborate.

For my understanding

1) if your invoice date is 2009.03.24, and you want elapse days will be 24.

use Concatenate funtion and get the value 24.

2) if your Current date (system date )is 2009.03.24, and you want elapse days will be 24.

use Concatenate funtion to system date and get the value 24.

3)if your invoice date is 2009.03.01,system date is 2009.03.24 and you want elapse days will be 24.

use function module 'DAYS_BETWEEN_TWO_DATES' with passing your invoice date ans system date, you will get the elapse days vale 24.

Cheers,

Sree