Skip to Content
author's profile photo Former Member
Former Member

bex calculations

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 06:03 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 06:41 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.