2008 Jun 25 6:32 AM
Hi,
iam having a flat file which i need to upload to the tables . in that file i have date fields. right now my user has given the date in yyyymmdd format . in production the format may be yyyymmdd or ddmmyyyy.
so whatever the format they provide in flat file i want to find the year month and date .so iam not able to use offset to find the year month and date. is there any function module which converts any format of date to yyyymmdd format.
Thanks,
Rose.
2008 Jun 25 6:37 AM
2008 Jun 25 6:37 AM
Hi,
you can set mask the date in text elments.
and also you ve one function module as
CONVERT_DATE_TO_INTERN_FORMAT
to convert the date as you like internally.
PS: Do award points if helps
2008 Jun 25 6:39 AM
hi,
in whatever format u give to the screen field it will interpret the value into the internal format of the system
thus it is not required to change the date as per the system using offset and length but use conversion-exit
there are many conversion-exits go to se37 and find out the conversion_exit for converting the date into internal format.
if u are not able to find it reply me
reward points if useful
2008 Jun 25 6:41 AM
Hi,
Try the FM 'CONVERT_DATE_TO_INTERNAL'.
CONVERT_DATE_TO_EXTERNAL Conversion: Internal to external date (like screen conversion)
CONVERT_DATE_TO_INTERNAL Conversion: External to internal date (like screen conversion)
Regards,
SB
2008 Jun 25 6:42 AM
hi,
try this
Parameter: in_date(10) type C.
Data : out_date(10) type C.
CALL FUNCTION 'CONVERSION_EXIT_PDATE_INPUT'
EXPORTING
input = in_date
IMPORTING
OUTPUT = out_date
.
write : out_date.
Reward if useful
Regards,
Vasuki
2008 Jun 25 6:42 AM
2008 Jun 25 6:43 AM
Hi
Just Follow the below procedure.
data : wf_year(4) TYPE C,
wf_month(2) TYPE C,
wf_date(2) TYPE C,
ws_date(8) TYPE C,.
clear: ws_date,
wf_year,
wf_month,
wf_date.
ws_date = wa_master-budat. (Input fotmat date)
wf_year = ws_date+0(4).
wf_month = ws_date+4(2).
wf_date = ws_date+6(2).
concatenate wf_year wf_month wf_date into ws_date.
Now the ws_date will have the contents as per your required format..if you want to change the concatenation order also u can change.
Thanks and Regards,
Arun Joseph
2008 Jul 04 10:09 AM
Hi camila phyrose,
I don't think so there exist such a function module which covert any date format ( 13.01.2008 01.13.2008 13 JAN 2008 13th Jan 2008 13 Jan 08 ....etc etc...) to yyyymmdd...
Refer below similar thread for detailed information...
Hope it will solve your problem
Thanks & Regards
ilesh 24x7