Friday, August 28, 2009

Code snippet for ALSM_EXCEL_TO_SAP

DATA : l_file TYPE rlgrap-filename,
row TYPE i VALUE 1,
p_ifile type rlgrap-filename value 'c://documents and setting/input.xls',
t_tab type standard table of alsmex_tabline
col TYPE i VALUE 1,
rowsize TYPE i VALUE 4000,
columno TYPE i VALUE 40.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_ifile
i_begin_col = col
i_begin_row = row
i_end_col = columno
i_end_row = rowsize
TABLES
intern = t_tab
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
Write : / ,'Load failed'.
ENDIF.

No comments:

Post a Comment