TEXT_CONVERT_XLS_TO_SAP

Hi all,
  I am using FM TEXT_CONVERT_XLS_TO_SAP to upload excel to internal table. I have two date fields in excel. The FM is throwing an error  "Enter a valid Date(example, 28.02.2008) ".
    I gave date in the excel like this format only. even then am getting the error.Plsss help me..
Points will be rewarded,
thanks in advance,
praveena.

Hi,
      U should enter the date in this format only                        ( MMDDYYYY)  . For example, give like 11252007 in ur excel. Dont put any dot or slash in between the date.  It will work correctly.
Reward points if helpfil
Regards,
Shanthi
Edited by: Shanthi on Feb 28, 2008 8:36 AM

Similar Messages

  • Error-while  executing  Standard FM 'TEXT_CONVERT_XLS_TO_SAP'

    Hi Gurus,
    I'm using  Standard FM 'TEXT_CONVERT_XLS_TO_SAP'   ,
    while  executing i got an Error " Error generating test Frame'
    Description:
    Error generating the test frame
    Message no. FL819
    Diagnosis
    The system could not generate a syntactically correct test frame for function module TEXT_CONVERT_XLS_TO_SAP. You therefore cannot test the function module using the test environment. You have probably used an ABAP feature in the interface definition that is not yet supported in the test environment.
    The error message is:
    "OF" expected after "TABLE".
    System Response
    Procedure
    Check whether you can change the interface of the function module so that it is possible to generate the test frame. If this is not possible,you will have to write your own utility for testing the function module.
    Procedure for System Administration

    hai siva..
                 iam sending a sample prg. check it out.
                 it will be helpful for U to solve the problem.
    type-pools : truxs.
    types : begin of ty_tab,
             f1(10) type c,
             f2(10) type c,
             f3(10) type c,
            end of ty_tab.
    data : wa_tab type ty_tab,
           lt_tab like standard table of wa_tab.
    data : i_tab_raw_data type truxs_t_text_data.
    data : fnam type ibipparms-path.
    parameter : p_fnam type rlgrap-filename.
    at selection-screen on value-request for p_fnam.
    call function 'F4_FILENAME'
    importing
       file_name           = fnam
    p_fnam = fnam.
    start-of-selection.
    call function 'TEXT_CONVERT_XLS_TO_SAP'
      exporting
        i_tab_raw_data             = i_tab_raw_data
        i_filename                 = fnam
      tables
        i_tab_converted_data       = lt_tab.
    loop at lt_tab into wa_tab.
    write :/ wa_tab-f1, wa_tab-f2.
    endloop.

  • Problem with date format using TEXT_CONVERT_XLS_TO_SAP

    I'm using fm TEXT_CONVERT_XLS_TO_SAP to upload an xls file.
    I've the following problem the date in the spreadsheet is 01.01.2010 the result in the internal table after using the fm is 01.jan.2010. What must i do to get 01.01.2010 in the internal table?
    My setting in sap for the date format is DD.MM.YYYY

    Hi,
    What is type and size of your internal table field? Covert your excel column to text field. Now it is of type date i hope.
    Best option is, always have the value in excel in YYYYMMDD (SAP standard format) and internal table field as of type sy-datum.
    After uploading use WRITE TO statement to a character variable to convert the date as per user settings. Your current logic may not work if the date setting is different.
    Thanks,
    Vinod.

  • Incorrect decimal places in function "TEXT_CONVERT_XLS_TO_SAP"

    When I upload a excel file into inner table used function "TEXT_CONVERT_XLS_TO_SAP".
    The type of inner table field is "P"(decimals 2),and the value of corresponding field in excel is "0.77",but it become "77.00" in inner table after upload.
    Then I debug the function "TEXT_CONVERT_XLS_TO_SAP".
    After read excel file,the value in temporary table is ".77",and convert to variant which is type p in form "parse_table_line" of include "LTRUXF01".
    There isn't note which is solved this problem although I search in SAP's support website long time.
    Appreciate your help.
    Thanks.

    Pranav Mandelia wrote:
    Hi Zhang,
    >
    > When you save the excel file, follow the steps mentioned and then try uploading:
    >
    > 1. Select the entire worksheet by clicking on the top left cell
    > 2. Right click and from the context menu select Format Cells
    > 3. In the number tab - category column, select text.
    > 4. Save the excel and upload this file.
    >
    > Also, disable all macros, if any and specify the MS Office version (2003/2007).
    >
    > Regards,
    >
    > Pranav.
    Thank you very much,Pranav.
    You are right.
    It converted right when the number in excel field is text format,
    But I think the function should run well although it's in number format.
    Maybe I should use another function to upload txt file next time:)

  • Problem with FM 'TEXT_CONVERT_XLS_TO_SAP'

    Hi All,
    I want to get the data from an excel file using the FM 'TEXT_CONVERT_XLS_TO_SAP'.
    I have writtten the code as follows:
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
        i_line_header              = 'X'
        i_tab_raw_data           = it_raw
        i_filename                 = pa_file            " File path
      TABLES
        i_tab_converted_data       = i_final       " Final internal Table
    EXCEPTIONS
       conversion_failed          = 1
       OTHERS                     = 2.
    I am getting the values in the fianl internal table(i_final) but only for the items. I also want to get the header values.
    Can you please suggest me how to get the header values.
    Thanks & Regards,
    Vivek

    Hi in this method this FM uploads only items not the column names.
    use the following FM for ur requirement.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = P_file
          i_begin_col             = '0001'
          i_begin_row             = rowbgn1
          i_end_col               = '0028'
          i_end_row               = rowend1
        TABLES
          intern                  = it_exload
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Regards,
    Ajay

  • TEXT_CONVERT_XLS_TO_SAP uploading Zero Bytes of data

    Hi Guys,
                I am uploading an Excel data file.with GUI_Upload then next i am executing this FM but i am geetin 0 Bytes of data when data is there in the excel sheet.here is the codew
    START-OF-SELECTION.
        g_file = p_file.
        g_tab = cl_abap_char_utilities=>horizontal_tab.
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename                = g_file
            has_field_separator     = space
          CHANGING
            data_tab                = itab_text
          EXCEPTIONS
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            not_supported_by_gui    = 17
            error_no_gui            = 18
            OTHERS                  = 19.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
          EXPORTING
      I_FIELD_SEPERATOR          = ','
       I_LINE_HEADER              = 'X'
            i_tab_raw_data             = itab_text
            i_filename                 = p_file
          TABLES
            i_tab_converted_data       = it_file[]
       EXCEPTIONS
         conversion_failed          = 1
         OTHERS                     = 2
                                     can anybody tell me how to get the data rom Excel file based on the above logic?
    Thanks,
    Gopi.

    Hi Gopi,
    We can use the Function module  TEXT_CONVERT_XLS_TO_SAP  to read the Excel file into the internal table. From this internal table you can fill the target internal table. 
    Do not need to use CALL METHOD cl_gui_frontend_services=>gui_upload.
    just declare ur internal table with fields use above function module. u dont need to give field separator while uploading data from excell file.
      report  zvenkat-upload-xl  no standard page heading.
    "Declarations.
    "types
    types:
          begin of t_bank_det,
            pernr(8)  type c,
            bnksa(4)  type c,
            zlsch(1)  type c,
            bkplz(10) type c,
            bkort(25) type c,
            bankn(18) type c,
          end of t_bank_det.
    "work areas
    data:
          w_bank_det type t_bank_det.
    "internal tables
    data:
          i_bank_det type table of t_bank_det.
    " selection-screen
    selection-screen begin of block b1 with frame title text_001.
    parameters p_file type localfile.
    selection-screen end of block b1.
    "At selection-screen on value-request for p_file.
    at selection-screen on value-request for p_file.
      perform f4_help.
      "Start-of-selection.
    start-of-selection.
      perform upload_data.
      "End-of-selection.
    end-of-selection.
      perform display_data.
      "Form  f4_help
    form f4_help .
      data:
            l_file_name like  ibipparms-path  .
      call function 'F4_FILENAME'
        exporting
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = 'P_FILE'
        importing
          file_name     = l_file_name.
      p_file = l_file_name.
    endform.                                                    " f4_help
    "Form  upload_data
    form upload_data .
      type-pools:truxs.
      data:li_tab_raw_data type  truxs_t_text_data.
      data:l_filename      like  rlgrap-filename.
      l_filename = p_file.
      call function 'TEXT_CONVERT_XLS_TO_SAP'
        exporting
          i_tab_raw_data       = li_tab_raw_data
          i_filename           = l_filename
        tables
          i_tab_converted_data = i_bank_det
        exceptions
          conversion_failed    = 1
          others               = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " upload_data
    " Form  display_data
    form display_data .
      data: char100 type char100.
      loop at i_bank_det into w_bank_det .
        if sy-tabix = 1.
          write w_bank_det.
          write / '------------------------------------------------------------'.
        else.
          write / w_bank_det.
        endif.
      endloop.
    endform.                    " display_data
    I hope that it solves ur problem.
    Regards,
    Venkat.O

  • Error while file upload by FM "TEXT_CONVERT_XLS_TO_SAP"

    HI all,
    I need to upload an excel file to SAP system ,for the same i am using the FM TEXT_CONVERT_XLS_TO_SAP in following way.
    TYPE-POOLS truxs.
    DATA: lv_raw      TYPE truxs_t_text_data.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
           EXPORTING
                i_field_seperator    = 'X'  "is an .xls file
                i_line_header        = 'X'  "has a header line
                i_tab_raw_data       = lv_raw
                i_filename           = v_file
           TABLES
                i_tab_converted_data = etd_itab
           EXCEPTIONS
                conversion_failed    = 1
                OTHERS               = 2.
    But i get sy-subrc = 1,which is conversion error.
    The structure of the etd_itab is same as the excel file ,even the field names are same ,still i wonder why should the conversion error been encountered .
    Am i missing on anything ?
    Please comment.
    Thanks,
    Swati

    Hi ,
    The structure of my excel file and the data is as follows
    PO_NO           Item      Div     Material                    Vend        PO_Date              PO Bal.
    4400000001      10     C     SVC-PART-01     BCCS     2006.10.29     12
    4500000348      10     L     BA41-00383A     BCCS     0     
    Following is the program flow
    TYPES :   BEGIN OF        gt_etd      ,
               po_no                LIKE   ekpo-ebeln,
               item                 LIKE   ekpo-ebelp,
               div                  LIKE mara-spart,
               material             LIKE kondd-smatn,
               vend                 LIKE   ekko-lifnr,
               po_date              LIKE   ekpo-aedat,
               po_bal               LIKE   ekpo-menge,
              delivery_date           LIKE   ekes-eindt,
              END OF gt_etd.
    DATA: etd_itab TYPE STANDARD TABLE OF gt_etd WITH HEADER LINE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pcfile.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_filename     = '.xls'
                def_path         = 'C:\'
                mask             = ',.txt;.xls,.txt;.xls.'
                mode             = 'O'
                title            = ' '
           IMPORTING
                filename         = pcfile
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
    IF pcfile IS INITIAL.
        WRITE: / 'SELECT UPLOAD FILE !'.
      ELSE.
        MOVE pcfile TO v_file.
      ENDIF.
    *ETD file upload
      CLEAR: lv_raw, etd_itab[].
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
           EXPORTING
                i_field_seperator    = ' '  "is an .xls file
                i_line_header        = ' '  "has a header line
                i_tab_raw_data       = lv_raw
                i_filename           = v_file
           TABLES
                i_tab_converted_data = etd_itab
           EXCEPTIONS
                conversion_failed    = 1
                OTHERS               = 2.
    Please advice ,why am i getting conversion error.
    Thanks a lot .

  • TEXT_CONVERT_XLS_TO_SAP FM is throughing an error

    Dear Friends,
    I am uploading a xls file into internal table using TEXT_CONVERT_XLS_TO_SAP.
    The file strusture is as below.
    Row1: Customer City
    Row 2: Customer City
    Row2: 2000001 ABD
    My requirement is to skip the first two row details, as they are just the field titles and i need not consider the first two row's.
    I should pick the data from Third row onwards which is actual data.
    I have to use this TEXT_CONVERT_XLS_TO_SAP FM only.
    I have passed the 
    i_line_header            =  'X'
    in the function module it is deleting only one header hower to remove the other header what i have to do , because the FM is throughing an error  conversion_failed.
    Please help me .
    Thanks
    madhuri

    Hi,
    You can do it as follows:
    TYPE-POOLS:truxs.
    DATA:li_tab_raw_data TYPE  truxs_t_text_data.
    DATA: BEGIN OF i_tab OCCURS 0,
           fld1(6) TYPE c,
          END OF i_tab.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
      I_LINE_HEADER              =
        i_tab_raw_data             = li_tab_raw_data
        i_filename                 = 'C:\temp\test1_xls.xls'
      TABLES
        i_tab_converted_data       = i_tab
    EXCEPTIONS
      CONVERSION_FAILED          = 1
      OTHERS                     = 2
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    LOOP AT i_tab.
      IF sy-tabix EQ 1 OR sy-tabix EQ 2.  "for first 2 rows
        CONTINUE.
      ENDIF.
    ENDLOOP.
    Or you can use following FM
    ALSM_EXCEL_TO_INTERNAL_TABLE
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    exporting
    filename = file
    i_begin_col = 1
    i_begin_row = 3         "to start from 3rd row
    i_end_col = 2            "depends on # of col's
    i_end_row = 65000
    tables
    intern = iexcel
    exceptions
    inconsistent_parameters = 1
    upload_ole = 2
    others = 3.
    Thanks,
    Vikram

  • TEXT_CONVERT_XLS_TO_SAP error

    Hi friends i am using the following
    FM
    FORM GET_MAT_FROM_SPREAD .
        CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_FILE2
        TABLES
          i_tab_converted_data     = i_spreadsheet[] .   "ACTUAL DATA
      EXCEPTIONS
         conversion_failed        = 1
         OTHERS                   = 2.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDFORM.                    " GET_MAT_FROM_SPREAD
    i_spreadsheet is an int table
    I_SPREADSHEET TYPE STANDARD TABLE OF T_MATERIAL,
    and t_material is as follows
    YPES:
           BEGIN OF T_MATERIAL,
              INDEX(3) TYPE C,
              MATNR TYPE MARA-MATNR,   "Material Number
              MENGE TYPE MSEG-MENGE,
              MEINS TYPE MARA-MEINS,   "Base Unit of Measure            
            MAKTX TYPE MAKT-MAKTX,   "Materialdescription             
            MATKL TYPE MARA-MATKL,   "Material group
              WGBEZ60 TYPE T023T-WGBEZ60,"Material grp Desc.
           END OF T_MATERIAL,
    i am using an excel sheet vth same data as above
    eg:Item     Item Number     Qty     U/M          Description
    1     1000000093     12     EA          BATTERY LITHIUM 3.6V A/B 1770XY-B
    2     1000000094     42     EA          BATTERY F/PLC5 PROCESSOR A/B
    but i am getting the following error
    Error during conversion - field type conflict (see long text)
    desc:
    Diagnosis
    The sending and receiving fields have conflicting types. The receiving field has type P. Value Qty was supposed to be transferred to this field, but this conflicts with the type definition for the receiving field.
    The incorrect field is field 1 of the receiver structure. Record 7 of the input file contains an error.
    System response
    Conversion to the SAP format is terminated.
    Procedure
    Correct the data in the input file.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Mar 12, 2008 3:19 PM

    Hi venkat,
    befor i kept comments for exceptions so i got that error
    now i used
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_FILE2
        TABLES
          i_tab_converted_data     = i_spreadsheet[]   "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF SY-SUBRC = 0.
      ENDIF.
    OK, I got the first item to upload to bid, but not the remaining.
    Bid Invitation
    Item
    Basic Data
    1
    D
    I
    1
    Normal
    1
    Material
    1E+09
    BATTERY L
    00/00/00
    0:00:00
    00/00/00
    00/00/00
    *00
    EA
    USD
    1E+09
    Bid Invitation
    Item
    Basic Data
    2
    D
    I
    2
    Normal
    1
    Material
    BATTERY F
    00/00/00
    0:00:00
    00/00/00
    00/00/00
    *00
    EA
    USD
    Bid Invitation
    Item
    Basic Data
    3
    D
    I
    3
    Normal
    1
    Material
    Cable t89
    00/00/00
    0:00:00
    00/00/00
    00/00/00
    *00
    EA
    USD
    Edited by: sukruthi raj on Mar 12, 2008 8:37 PM

  • Error in using FM TEXT_CONVERT_XLS_TO_SAP

    hi all,
    i am using FM  'TEXT_CONVERT_XLS_TO_SAP ' to upload the excel into my internal table , but i am getting below error -
    Error during conversion - field type conflict
    The sending and receiving fields have conflicting types. The receiving field has type P. Value BCTR1 was supposed to be transferred to this field, but this conflicts with the type definition for the receiving field.
    The incorrect field is field 1 of the receiver structure.
    BCTR1 is the value of Material field which has the data type of char18 in the table.
    and i have declared my internal table also with the same structure of table.
    please help me on this.
    Edited by: shweta gupta on Feb 16, 2012 9:03 AM

    table structure is below -
    z_table -
    MANDT     MANDT     CLNT     3
    KUNNR     KUNNR     CHAR     10
    MATNR     MATNR     CHAR     18
    INV_PER     ZZSV_INVPER     DEC     5
    MAX_ORD_QTY     ZZSV_MOQ     QUAN     15
    ETD_DAYS     ZZSV_ETD_DAYS     INT4     10
    BUS_ST_DATE     ZZSV_BUS_ST_DT     DATS     8
    BUS_END_DATE     ZZSV_BUS_END_DT     DATS     8
    DIS_FLAG     ZZSV_DIS_FLG     CHAR     1
    ERDAT     ERDAT     DATS     8
    ERZET     ERZET     TIMS     6
    ERNAM     ERNAM     CHAR     12
    UDATE     AEDAT     DATS     8
    UTIME     CDUZEIT     TIMS     6
    UNAME     CDUSERNAME     CHAR     12
    and in my program i declared the table like below -
    i_data type standard table of Z_table.
    using the function module like below -
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
            EXPORTING
            I_FIELD_SEPERATOR          =
            I_LINE_HEADER              = 'X'
              i_tab_raw_data             = i_raw
              i_filename                 = v_file
            tables
              i_tab_converted_data       = i_data
          EXCEPTIONS
            CONVERSION_FAILED          = 1
            OTHERS                     = 2

  • TEXT_CONVERT_XLS_TO_SAP in background job schedule giving error

    Hi Experts,
    I used TEXT_CONVERT_XLS_TO_SAP to upload excel data. it is working fine in forground.
    As large volume of data is there, I sheduled it in back ground using SM 36/ SM37.
    data is not getting uploaded. I closed the excel file...still it is not getting uploaded. internal table contains no data.
    Can any one help me on this....
    Regards,
    apuri

    Hi kiran,
    he function modulw which u r using is GUI function module.
    Gui function module will not work in background jobs.
    Thanks,

  • TEXT_CONVERT_XLS_TO_SAP getting error, need help!

    Good day, everyone!
    I am using FM TEXT_CONVERT_XLS_TO_SAP to read in an Excel file.  However, I am getting an error, and the error information I'm displaying isn't helping me much.  I'm using the widely-found sample code for this FM that is on this forum.  Here's my error routine after the FM call:
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    The problem is that this information isn't helpful to me.  When I run it, I get this:
    "Error during conversion - field type conflict (see long text)"
    There are values in the sy-msgv fields, but aside from one value being a value from my Excel spreadsheet, I don't know what the others mean.  I've searched and can find no documentation for this FM.  Also, I don't know how to "see long text."
    Can anyone help?  Points awarded for all helpful answers.
    Thanks!!

    Hi venkat,
    befor i kept comments for exceptions so i got that error
    now i used
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_FILE2
        TABLES
          i_tab_converted_data     = i_spreadsheet[]   "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF SY-SUBRC = 0.
      ENDIF.
    OK, I got the first item to upload to bid, but not the remaining.
    Bid Invitation
    Item
    Basic Data
    1
    D
    I
    1
    Normal
    1
    Material
    1E+09
    BATTERY L
    00/00/00
    0:00:00
    00/00/00
    00/00/00
    *00
    EA
    USD
    1E+09
    Bid Invitation
    Item
    Basic Data
    2
    D
    I
    2
    Normal
    1
    Material
    BATTERY F
    00/00/00
    0:00:00
    00/00/00
    00/00/00
    *00
    EA
    USD
    Bid Invitation
    Item
    Basic Data
    3
    D
    I
    3
    Normal
    1
    Material
    Cable t89
    00/00/00
    0:00:00
    00/00/00
    00/00/00
    *00
    EA
    USD
    Edited by: sukruthi raj on Mar 12, 2008 8:37 PM

  • Error generating Function Module 'TEXT_CONVERT_XLS_TO_SAP'

    Hi All,
    When i am executing the FM 'TEXT_CONVERT_XLS_TO_SAP' i am getting the error Error generating the test frame.
    Can you please tell me how to execute the FM.
    Thanks & Regards,
    Vivek Agarwal

    Hello...
                   Iam sending a sample code.
                   Hope it will helps U how to deal with FM :  TEXT_CONVERT_XLS_TO_SAP.
    TYPE-POOLS : TRUXS.
    TYPES : BEGIN OF TY_TAB,
             F1(10) TYPE C,
             F2(10) TYPE C,
             F3(10) TYPE C,
            END OF TY_TAB.
    DATA : WA_TAB TYPE TY_TAB,
           LT_TAB LIKE STANDARD TABLE OF WA_TAB.
    DATA : I_TAB_RAW_DATA TYPE TRUXS_T_TEXT_DATA.
    DATA : FNAM TYPE IBIPPARMS-PATH.
    PARAMETER : P_FNAM TYPE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAM.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
       FILE_NAME           = FNAM
    P_FNAM = FNAM.
    START-OF-SELECTION.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
        I_TAB_RAW_DATA             = I_TAB_RAW_DATA
        I_FILENAME                 = FNAM
      TABLES
        I_TAB_CONVERTED_DATA       = LT_TAB.
    LOOP AT LT_TAB INTO WA_TAB.
    WRITE :/ WA_TAB-F1, WA_TAB-F2.
    ENDLOOP.
    But my suggestion is why cant you use FM : ALSM_EXCEL_TO_INTERNAL_TABLE
    instead of TEXT_CONVERT_XLS_TO_SAP.
    The performance can be improved much by ALSM... FM.
    Thanks and Regards
    Sekhar.C

  • Use of i_tab_raw_data parameter in FM ''TEXT_CONVERT_XLS_TO_SAP''

    Hello Experts,
    I have usesd above Fm in my program and passing i_tab_raw_data parameter as blank.
    But don't know the reason of passing i_tab_raw_data parameter.
    Can some1 suggest why do we need to pass this param / blank......
    Thanks,
    Anoop Bhandari

    Hi,
    It is part of the fixed parameter interface of the functions : SAP_CONVERT_TO_*_FORMAT where * can be CSV,XML,TXT,XLS.
    It is used only in SAP_CONVERT_TO_TXT_FORMAT.
    The parameter interface is kept same for all such FMs to maintain central logic and dynamicity, therefore it is found in SAP_CONVERT_TO_XLS_FORMAT although never used there.
    Regards,
    Ashish

  • FM TEXT_CONVERT_XLS_TO_SAP Code Page

    Hello,
    I have a problem with above function module.
    I am using it for an upload from my laptops hard disc and it is working fine for Office 2003 and 2007 Excel files. From another work place it does not work. The system interprets several characters as CR and instead of the 5 records in the file we got 76 or more. That laptop is connected via Citrix and files can not be uploaded directly from the work place hard drive. But I think the main problem is the code page of the GUI or the GUI version. How can I determine the code page and will it fix the bug.
    As alternative I tried method GUI_UPLOAD as well as obsolate FM WS_UPLOAD. Both of them destroy the file also on my laptop.
    Is there any idea?
    Thank you for your time.
    Regards
    Norbert

    Be careful with CITRIX . Perhaps the Excel language is different from your windows language. CITRIX has a language and Windows another.
    In our company we have a problem with the spanish and english languages because Excel has differents decimals separators.

Maybe you are looking for

  • Data recovery after water damage

    Is it possible to recover data from an iPhone after water damage, regardless of whether the phone is salvagable?

  • External Hard drive freezing machine after indexing

    Hi guys, So i think i figured out what my problem is, it seems that when my western digital (my passport)  hd is plugged in, it begins to index it (shud this happen each time) once it finishes finder becomes unresponsive and a reboot is required? wha

  • HTC Rhyme phone can't set up exchange activesync account

    I am having difficulty having my e-mail set up on my phone. It was working properly two days ago, and all of sudden it stopeed to sync. I thought it was because of my account, so I deleted it from the phone, and trying to set it up again. I received

  • WLAN and N80

    Hi! I just bought my new N80 on monday and was very excited about the WLAN feature. (That was the main reason I had when compared to N73) But.. When I came home and should try the WLAN feature the phone only returned "Internal WLAN Error". If I tried

  • Installing the Documentation !?

    Hello all, I've just recently upgraded my java developers kit (from 1.4.2_08 to 1.5) as well as my netBeans IDE (from 5.0 to 5.5) However, I don't think that I have the documentation installed correctly beacuse in my old netbeans version I could cont