Skip to Content
0
Former Member
Nov 19, 2013 at 12:20 PM

Excel value is not coming to internal table

30 Views

hi,

i post my code here. i check every thing . when i upload the excel value is not coming in internal table using this TEXT_CONVERT_XLS_TO_SAP fm oly.

type-POOLS: truxs.
data: it_raw type truxs_t_text_data.
*include bdcrecx1.
data: it_bdcdata type bdcdata OCCURS 0 WITH HEADER LINE.
data: wa_bdcdata type bdcdata.
data:it_bdcmsgcoll type bdcmsgcoll OCCURS 0 WITH HEADER LINE.

types:begin of ty_bank,
banks type banks,
bankl type bankl,
brnch type brnch,
stras type stras,
banka type banka,
ORT01 type ORT01,


* banks(003),
* bankl(015),
* brnch(040),
*
* stras(035),
* banka(060),
* ORT01(035),

END OF ty_bank.

data: it type table of ty_bank,
wa type ty_bank.

PARAMETERS: p_file type rlgrap-filename.
data: g_file type ibipparms-path.

AT SELECTION-SCREEN on VALUE-REQUEST FOR p_file.
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.
*data: i_filename type rlgrap-filename.
* i_filename = p_file.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER = 'X'
i_tab_raw_data = it_raw
i_filename = p_file
TABLES
i_tab_converted_data = it
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
** IF sy-subrc <> 0.
** Implement suitable error handling here
* ENDIF.


IF sy-subrc = 0.
* Implement suitable error handling here
MESSAGE 'UPLOAD SUCCESS' TYPE 'I'.
ENDIF.