Skip to Content

Excel FM 'TEXT_CONVERT_XLS_TO_SAP' Open Excel app on running.

Hi All,

I'm doing an Excel upload using FM 'TEXT_CONVERT_XLS_TO_SAP' in my program.

When I fill selection-screen parameters and then run the program, then Excel application opens up (no blank sheet/test data but just the application opens up).

Can you please help in this regard?

Thanks,

Venkat

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Aug 26, 2015 at 09:53 AM

    Hi venkat ,

    First Row always should be header or blank. From second row onwards only you have to give values.

    with regards,

    siva.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 26, 2015 at 09:55 AM

    Hi venkat use below code,

    DATA : LV_FILE TYPE RLGRAP-FILENAME.

    PARAMETERS P_FILE TYPE IBIPPARMS-PATH OBLIGATORY.
    PARAMETERS: C_MODE LIKE CTU_PARAMS-DISMODE DEFAULT 'A'.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.


    *BREAK-POINT .

    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = 'P_FILE'
    IMPORTING
    FILE_NAME = P_FILE.


    START-OF-SELECTION.


    LV_FILE = P_FILE.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    * I_FIELD_SEPERATOR = 'x'
    I_LINE_HEADER = 'X'
    I_TAB_RAW_DATA = IT_RAW
    I_FILENAME = LV_FILE
    TABLES
    I_TAB_CONVERTED_DATA = It_vk11[]
    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.

    Message was edited by: sivakumar M

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 26, 2015 at 10:15 AM

    Hi Venkat,

    Have you passing selected file path in FM. What is you selection screen parameter?

    You have to call 'TEXT_CONVERT_XLS_TO_SAP' FM with file_name (i_filename) and i_tab_raw_data and i_tab_raw_data (if header requires).

    here i_filename should contains the excel file with full path and i_tab_raw_data will be as empty internal table (TYPE STANDARD TABLE OF tv_blob.).

    If you share you code, then it will be easy to understand the cause of error.

    regards,

    Praveer.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.