cancel
Showing results for 
Search instead for 
Did you mean: 

bex calculations

Former Member
0 Kudos

I need to calculate number of weeks for each month from current date for next 20 weeks..

Eg: Dec Jan Feb Mar Apr May........So on untill 20 weeks

3 4 4 5 4

any idea on how to do in Bex would be helpful.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

yes you should use a user exit.

to compute days:

FORM compute_days USING p_begda

p_endda

CHANGING p_days.

p_days = p_endda - p_begda.

ENDFORM. " compute_days

to compute Weeks:

Just divide by 7.

Reg's

Edan

Former Member
0 Kudos

Hi Anupama,

Utilize the BEX user exit to read the factory calendar to determine the number of weeks for each month. You will then have this value to perform any calculations you need this number for.

You can also do the same for number of "working days" in a month.

Hope this helps,

Mike