12-29-2004 5:54 AM
12-29-2004 5:58 AM
Check table <b>USR01</b>, field <b>DATFM</b>.
if DATFM = 1, format is DD.MM.YYYY
If you want the path, SYSTEM --> USER PROFILE --> OWN DATA
Regards,
Subramanian V.
12-29-2004 6:03 AM
HI,
MY PROBLEM IS I AM DOING A BDC , IN WHICH THERE IS A DATE ENTRY , HOW DO I CHECK WHETHER THE DATE FROM THE FLAT FILE HAS THE SAME FORMAT AS MY SYSTEM.
REGARDS
ARUN
12-29-2004 6:05 AM
The BDC will be run by some user (say ABC), select the date format from usr01 for ABC and comepare it with the input (from file) and do a conversion if required.
select single datfm into usr01-datfm from usr01 where
bname eq sy-uname .
if wf_datfm eq '1' .
concatenate loc_date+6(2)
loc_date+4(2)
loc_date+0(4)
into wf_date separated by '.' .
condense wf_date .
elseif wf_datfm eq '2' .
concatenate loc_date+4(2)
loc_date+6(2)
loc_date+0(4)
into wf_date separated by '/' .
condense wf_date .
elseif wf_datfm eq '3' .
concatenate loc_date+4(2)
loc_date+6(2)
loc_date+0(4)
into wf_date separated by '-' .
condense wf_date .
elseif wf_datfm eq '4' .
concatenate loc_date+0(4)
loc_date+4(2)
loc_date+6(2)
into wf_date separated by '.' .
condense wf_date .
elseif wf_datfm eq '5' .
concatenate loc_date+0(4)
loc_date+4(2)
loc_date+6(2)
into wf_date separated by '/' .
condense wf_date .
elseif wf_datfm eq '6' .
concatenate loc_date+0(4)
loc_date+4(2)
loc_date+6(2)
into wf_date separated by '-' .
condense wf_date .
endif .
Regards
Raja
12-29-2004 6:21 AM
Hello Arun,
In case of the BDC, you have to know the format in which the date is stored in the file. Let us say that the date in your flat file is stored in the format DD/MM/YYYY.
data: w_flat_file_date(10) value '29/12/2004'.
data: w_temp_date type d,
w_screen_date(10) type c.
w_temp_date+0(4) = w_flat_file_date+6(4).
w_temp_date+4(2) = w_flat_file_date+3(2).
w_temp_date+6(2) = w_flat_file_date+0(2).
write w_temp_date to w_screen_date.
Now, w_screen_date contains the date in the format in which it is displayed on the screen.
Hope this helps,
Regards,
Anand Mandalika.
12-29-2004 6:00 AM
System date format is always YYYYMMDD.
if you want to find out about user specific date format you can get the same from USR01-DATFM
Regards
Raja