FORM cargar_tabla_desde_archivo
USING p_ls_path TYPE string
CHANGING p_ltd_aspirante TYPE STANDARD TABLE
p_lc_rpta TYPE c.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_ls_path
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = p_ltd_aspirante
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
p_lc_rpta = 'F'.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
p_lc_rpta = 'T'.
ENDIF.
ENDFORM.
No comments:
Post a Comment