03-23-2007 9:15 AM
03-23-2007 9:17 AM
Hi,
Please check the code below:
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gv_file
filetype = 'ASC'
has_field_separator = gc_x
TABLES
data_tab = gt_dummy
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 NE gc_zero_num.
MESSAGE e006.
ENDIF.
Check if the input file is blank
IF gt_dummy[] IS INITIAL.
MESSAGE i007.
LEAVE LIST-PROCESSING.
ENDIF.
Regards
Kannaiah
03-23-2007 9:17 AM
Narendra,
You can upload data by using
1. BDC
2.LSMW
pls. reward ifuseful...
03-23-2007 9:17 AM
Hi Narendra,
You can use the BDC method, where you use the <b>GUI_UPLOAD</b> FM to upload the data from Legacy to SAP System.
Other than this, you can also use the BAPI FM to do the same.
Hope this resolves your query.
Reward all the helpful answers.
Regards
03-23-2007 9:18 AM
hi,
use the following funtion modules ..
gui_upload to upload
regards