‎2007 Oct 17 8:52 PM
Hi ,
I am importing data from a file in local computer into internal table.
now the date is given in the format 9/12/2007 in the text file . How can I convert this to DATS format which is SAP readable.
thank you
‎2007 Oct 17 8:59 PM
Try out for below FM..
<b>CONVERT_DATE_TO_INTERNAL</b>
Thanks & Regards
ilesh 24x7
‎2007 Oct 17 8:57 PM
Hi,
Please try FM RP_FORMATING_DATE or CONVERT_DATE_TO_INTERN_FORMAT with DTYPE = DATS.
Regards,
Ferry Lianto
‎2007 Oct 17 8:59 PM
Try out for below FM..
<b>CONVERT_DATE_TO_INTERNAL</b>
Thanks & Regards
ilesh 24x7
‎2007 Oct 17 9:09 PM
Check the simple program using offset or you can use FM too.
REPORT Ztest_ytt.
data : v_date(10) type c.
data : v_date1(2) type c,
v_mon(2) type c,
v_year(4) type c.
data v_final(8) type c.
parameters p_date like v_date.
initialization.
p_date = '09/12/2007'.
start-of-selection.
v_date1 = p_date+0(2).
v_mon = p_date+3(2).
v_year = p_date+6(4).
concatenate v_mon v_date1 v_year into v_final." USA Format
write v_final.
Thanks
Seshu
‎2007 Oct 17 9:56 PM
Hi try this logic out !!!!
concatenate it_input_file-doc_date6(4) it_input_file-doc_date0(2)
it_input_file-doc_date+3(2) into it_input_file-doc_date2.
I think this will help you out....
Reward points if helpful.
Thanks
Rajeev