‎2007 May 16 6:40 AM
If the upload file contains a 6 digit date, in this for example 150507 representing 2007, can we say if the date field is less than or equal to 49, then it should recognise as full year 2049 but any value of 50 and above is treated as full year 1950 (etc).
Is there a way to do this. Thanks.
‎2007 May 16 6:49 AM
store the value in the string say str .
year1 = str(2)+5. wil give u last two character .
year2 = sy-datum(2)+5.
if year1>49 .
concatenate year2 year1 into lv_year.
else.
concatenate (year2-1) year1 into lv_year.
endif.
please reward points if answer is helpfull
‎2007 May 16 6:44 AM
Hi
There is no scope for the date field with 6 digits (with 2 for month, 2 for date and 2 for year)
it should be eight digits or 10 digits aor in some cases without date Month and year will be considered (see SPMON field)
Though the flat file contains six digits it has to converted to related 8 digit date and to be used.
Reward points if useful
Regards
Anji
‎2007 May 16 6:49 AM
store the value in the string say str .
year1 = str(2)+5. wil give u last two character .
year2 = sy-datum(2)+5.
if year1>49 .
concatenate year2 year1 into lv_year.
else.
concatenate (year2-1) year1 into lv_year.
endif.
please reward points if answer is helpfull
‎2007 May 16 7:09 AM
hi
good
try this
Examples:-
DATA: dec type p decimals 2 value 24.98,
round_up type i,
round_down type i.
round_up = CEIL(dec) " will equal 25
round_down - FLOOR(dec) " will equal 24
thanks
mrutyun^
‎2007 May 16 7:36 AM
Hi,
You can take the help from this code :
data : d_date(6),
day(2),
month(2),
year(2),
Year_change(4),
year1(2),
year2(2).
year1 = 20.
year2 = 19.
d_date = 150507.
day = d_date+0(2).
month = d_date+2(2).
year = d_date+4(2).
if year lt 50.
concatenate year1 year into year_change.
else.
concatenate year2 year into year_change.
endif.
write : d_date.
write : year_change.
Reward, if helpful,
Regards,
Sandeep Kaushik