12-13-2009 3:41 AM
See the following eg:
MaterialNo Validfrom ValidTo RecordNo Value
A100 01.01.2007 13.05.2007 1000 1150/-
14.05.2007 24.08.2007 1001 1550/-
Now I want to break these dates into mm/yyyy format based on a condition. If the date(day) 15th lies in the range of dates
then it should pick that Value.
The output should be in this format.
MaterialNo Validfrom ValidTo Date RecordNo Value
A100 01.01.2007 13.05.2007 012007 1000 1150/-
022007 1000 1150/-
032007 1000 1150/-
042007 1000 1150/-
A100 14.05.2007 24.08.2007 052007 1001 1550/-
062007 1001 1550/-
072007 1001 1550/-
082007 1001 1550/-
12-13-2009 5:17 AM
Hi Shiva,
In your Report Program, you can define the field of type sy-datum. And then fill the fields with the date. And then you can extract the rest of it manually by this small and simple lines of code. Once you have the date extracting logic then you can output the date in any manner according to your wish.
data : lv_date TYPE sy-datum.
data : lv_month TYPE c LENGTH 2.
data : lv_year TYPE c LENGTH 4.
data : lv_month_year TYPE c LENGTH 6.
lv_date = sy-datum.
lv_month = lv_date+4(2).
lv_year = lv_date+0(4).
CONCATENATE lv_month lv_year INTO lv_month_year.
Hope this helps.
Thanks,
Samantak.
12-13-2009 5:17 AM
Hi Shiva,
In your Report Program, you can define the field of type sy-datum. And then fill the fields with the date. And then you can extract the rest of it manually by this small and simple lines of code. Once you have the date extracting logic then you can output the date in any manner according to your wish.
data : lv_date TYPE sy-datum.
data : lv_month TYPE c LENGTH 2.
data : lv_year TYPE c LENGTH 4.
data : lv_month_year TYPE c LENGTH 6.
lv_date = sy-datum.
lv_month = lv_date+4(2).
lv_year = lv_date+0(4).
CONCATENATE lv_month lv_year INTO lv_month_year.
Hope this helps.
Thanks,
Samantak.
12-13-2009 5:34 AM
But my requirement is different. Please go through my requirement..
12-13-2009 2:07 PM
Please do not ask or answer DATE questions, thank you. Tis is our requirement.
Regards,
Clemens