cancel
Showing results for 
Search instead for 
Did you mean: 

'TEXT_CONVERT_XLS_TO_SAP' FM is not coverting proper date format.

Former Member
0 Kudos

Hello Experts,

'TEXT_CONVERT_XLS_TO_SAP' FM is not coverting proper date format.

In my Excel file date format is (Eg: 31.12.2015) when am trying to upload in to SAP it’s raising exception as “Enter valid date 31/12/2015”

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

  EXPORTING

*   I_FIELD_SEPERATOR =

*   I_LINE_HEADER  = 'X'

    i_tab_raw_data = it_type

    i_filename     = p_file

  TABLES

i_tab_converted_data = t_upload[]

  EXCEPTIONS

    conversion_failed = 1

    OTHERS            = 2.

  IF sy-subrc NE  0.

    MESSAGE ID sy-msgid

            TYPE sy-msgty

            NUMBER sy-msgno

            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  ENDIF.

Kindly suggest,

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Amit_Rajput
Explorer
0 Kudos

Hi Santosh,

This FM takes the date format of you PC date settings.

Kindly change your PC date settings Control Panel-> Region and Language -> Format tab -> Additional Settings button -> Date tab -> Short date field. Change the date format and keep the same date format in the excel file you uploading.

Thanks,

Amit