Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format not Coming Correctly when Using FTP_R3_TO_SERVER

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

Use FM KCD_EXCEL_DATE_CONVERT to convert these dates into SAP date format.

Former Member
0 Kudos

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

0 Kudos

Thanks Vijay for your reply

i tried that but still same problem appearing.

CONCATENATE   ifinal-edatu+6(2ifinal-edatu+4(2)   ifinal-edatu+0(4) INTO ifinal-edatustr SEPARATED BY '-'.

CONCATENATE   ifinal-erdat+6(2)   ifinal-erdat+4(2ifinal-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.


Former Member
0 Kudos

Hi,

Just check this link i searched in SDN

upload csv files into internal table - Code Gallery - SCN Wiki

Thanks,

Vijay SR