12-29-2014 11:27 AM
Hello All,
I am getting one problem while transferring a file to FTP server in .CSV Format using FTP_R3_TO_SERVER .
My internal table contain a Date in format '29-12-2014'. But when a file is transferred to FTP server few date comes in 29-12-2014 (Dash Format ) and
Few date comes with 29/12/2014 (back slash) in my file column. My date field is of string type Date(10)
For Example
01-01-2014
02-01-2014
03-01-2014
04-01-2014
05-01-2014
01/01/2014
02/01/2014
03/01/2014
04/01/2014
05/01/2014.
Please help it is quite urgent.
Points will be rewarded.
12-29-2014 12:50 PM
Use FM KCD_EXCEL_DATE_CONVERT to convert these dates into SAP date format.
12-29-2014 1:15 PM
hi,
1.change your date type to char
2. loop your internal table into a work area
3.replace your date field '/' with '-' Usung REPLACE Keyword
4.append the same to int table
Then Pass your itab to your FM
it will work
Thanks,
Vijay SR
12-30-2014 6:00 AM
Thanks Vijay for your reply
i tried that but still same problem appearing.
CONCATENATE ifinal-edatu+6(2) ifinal-edatu+4(2) ifinal-edatu+0(4) INTO ifinal-edatustr SEPARATED BY '-'.
CONCATENATE ifinal-erdat+6(2) ifinal-erdat+4(2) ifinal-erdat+0(4) INTO ifinal-erdatstr SEPARATED BY '-'.
In my internal table it is coming correct ie 01-01-2014 but when i transfer my internal table to FTP_R3_TO_SERVER it is creating problem.
01-01-2014
02/01/2014
03-01-2014
04-01-2014
05/01/2014
In few fields it is coming with DASH and in few fields it is coming slash.But when i use
SEPARATED BY '/'. all fields are coming with slash on sever.
My requirement is all fields are coming only with DASH between Dates.
12-30-2014 6:17 AM
Hi,
Just check this link i searched in SDN
upload csv files into internal table - Code Gallery - SCN Wiki
Thanks,
Vijay SR