06-02-2006 5:52 AM
Hi,
how to get user setting date format or if we are uploading a file having date in some other format then how to get the sap user seeting date format
thanks
06-02-2006 5:57 AM
Hi Bobby,
Have you looked this FM <b>DATUMSAUFBEREITUNG</b>?
or you can check table <b>USR01</b> for field <b>DATFM</b>.
SELECT SINGLE DATFM
FROM USR01
INTO (V_DATFORMAT)
WHERE BNAME = SY-UNAME.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
06-02-2006 5:57 AM
Hi bobby,
1. We need not worry about user settings
of date format if we follow these two things.
2.
a) Upload in a date type variable
always in the format YYYYMMDD
b) If this value, goes directly into some
table, then use the same variable
c) if we want to use this date in some BDC,
then
a) take another variable of dt(10) type c.
b) write orgdate to dt.
c) now use this new variable dt
(note : Write will always write
as per the current users settings
to the variable dt)
regards,
amit m.
06-02-2006 6:00 AM
You can use
CONVERSION_EXIT_SDATE_INPUT AND CONVERSION_EXIT_SDATE_OUTPUT to convert to respective format.
INPUT will convert to the internal format of SAP and OUPUT will convert to user's default format.
Regards,
Ravi
Note :Please mark the helpful answers