Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding date calculations

Former Member
0 Likes
441

Hi Experts,

My problem is i have a start date and either the no of weeks or no of months will be entered dynamically based on this value i.e take for eg. 10 months is entered then i have to calculate the stock for 10 months

and display

1st month 2nd Month 3rd month...

stock au ..... stock quan... stock............

can you help me out .... please its very urgent kindly help

if possible give me a sample program....

Message was edited by:

MADHANGI SAMRAJ

3 REPLIES 3
Read only

Former Member
0 Likes
422

Madhan,

Give your requirement clearly.what is the use of startdate?.Do we need to extract any data based on date?.If you enter 10 weeks do we need to calculate 10 months stock?

Regards...

Read only

0 Likes
422

hi Madhan,

if i enter 10 weeks then a weekly report is to be generated from the start date

am i clear now please help.

Read only

Former Member
0 Likes
422

Find the difference between two days in days, months and years


* Type in two date and find the difference between the two dates in
* days, months and years.
*

REPORT ZDATEDIFF.

DATA: EDAYS   LIKE VTBBEWE-ATAGE,
      EMONTHS LIKE VTBBEWE-ATAGE,
      EYEARS  LIKE VTBBEWE-ATAGE.

PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
            TODATE   LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.

call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
  exporting
    i_date_from          = FROMDATE
    i_date_to            = TODATE
*   I_FLG_SEPARATE       = ' '
  IMPORTING
    E_DAYS               = EDAYS
    E_MONTHS             = EMONTHS
    E_YEARS              = EYEARS.

WRITE:/ 'Difference in Days   ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years  ', EYEARS.

INITIALIZATION.
FROMDATE = SY-DATUM - 60.

reward points if it is usefull ...

Girish