Skip to Content
0
Former Member
Sep 21, 2007 at 10:30 AM

error ! insert dbtab into from table itab

17 Views

report zdeneme_54.

TYPE-POOLS: truxs.

tables : ztable.

PARAMETERS: p_file TYPE rlgrap-filename.

data : t_datatab like table of ztable with header line.

data : w_datatab like line of t_datatab.

DATA: it_raw TYPE truxs_t_text_data.

  • At selection screen

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

field_name = 'P_FILE'

IMPORTING

file_name = p_file.

***********************************************************************

*START-OF-SELECTION.

START-OF-SELECTION.

break zsirin.

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_file

TABLES

i_tab_converted_data = t_datatab[] "ACTUAL DATA

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.

***********************************************************************

END-OF-SELECTION.

*END-OF-SELECTION.

insert ztable from table t_datatab.

pls solve this problem?