‎2007 Jun 19 3:44 AM
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
‎2007 Jun 19 3:57 AM
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...
‎2007 Jun 19 4:08 AM
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.
‎2007 Jun 19 4:02 AM
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