Skip to Content
avatar image
Former Member

Date Format not Coming Correctly when Using FTP_R3_TO_SERVER

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Dec 29, 2014 at 12:50 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2014 at 01: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.


  • Dec 30, 2014 at 06:17 AM

    Hi,

    Just check this link i searched in SDN

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

    Thanks,

    Vijay SR

    Add comment
    10|10000 characters needed characters exceeded