Skip to Content
avatar image
Former Member

What for type pool TRUX is used

Hi,

I'm new to BDC. Can anyone please tell me what for type pool TRUX is used in BDC programs. What is TRUXS_T_TEXT_DATA. In the function 'TEXT_CONVERT_XLS_TO_SAP' what should be exported for I_TAB_RAW_DATA?

Thanks in advance....

Thanks & Regards,

V.Sriram Kumar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Apr 09, 2009 at 06:41 AM

    TRUCX is just a type pool which will have type definitions.

    truxs_t_text_data an internal table structure of line size 4096,Needs to be passed empty.Its for internal conversion.

    DATA : lw_filename  TYPE rlgrap-filename,    " Filename
             lt_raw_table TYPE truxs_t_text_data,       " Pass empty
             lw_len       TYPE i.
    
    
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_tab_raw_data       = lt_raw_table
          i_filename           = lw_filename
        TABLES
          i_tab_converted_data = <Internal table>         " Table to hold excel data.
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
    
      IF sy-subrc <> 0.
      Message
      ENDIF.                               " IF SY-SUBRC <> 0.

    Regards,

    Gurpreet

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      TRUXS_T_TEXT_DATA pass empty and Data from the excel sheet will appear in the internal table specified in I_TAB_CONVERTED_DATA.

      RLGRAP-FILENAME is for the file path to be use to upload.

      To select the path at runtime use class:

      cl_gui_frontend_services=>open_dialog

      In AT SELECTION-SCREEN ON VALUE REQUEST FRO <Field> EVENT.

      Regards,

      Gurpreet