2006 Nov 17 8:34 AM
Hello,
I want to upload data in a text file to an internal table. Can any one tell me what FM i can use for this(other than WS* FMs)? and what params i need to pass.
Thank you,
Sharan
2006 Nov 17 8:36 AM
Hi Sharan,
Use gui_upload.
For Sample Programs Check this :
<a href="http://www.sapdevelopment.co.uk/file/file_uptabpc.htm">http://www.sapdevelopment.co.uk/file/file_uptabpc.htm</a>
<a href="http://www.iconet-ltd.co.uk/sample_entry.php?id=28">http://www.iconet-ltd.co.uk/sample_entry.php?id=28</a>
Regards,
Raghav
Hello,
I want to upload data in a text file to an internal table. Can any one tell me what FM i can use for this(other than WS* FMs)? and what params i need to pass.
Thank you,
Sharan
2006 Nov 17 8:36 AM
Hi Sharan,
Use gui_upload.
For Sample Programs Check this :
<a href="http://www.sapdevelopment.co.uk/file/file_uptabpc.htm">http://www.sapdevelopment.co.uk/file/file_uptabpc.htm</a>
<a href="http://www.iconet-ltd.co.uk/sample_entry.php?id=28">http://www.iconet-ltd.co.uk/sample_entry.php?id=28</a>
Regards,
Raghav
2006 Nov 17 8:36 AM
you can use GUI_UPLOAD.
you need to pass the file name, file type and the table which will hold the uploaded data.
Regards,
ravi
2006 Nov 17 8:37 AM
Sharan,
for tab limited files..
DATA : lv_filename TYPE string.
UPload Local excel file
Upload Production Version file
CLEAR lv_filename.
lv_filename = p_file1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_filename
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
dat_mode = 'X'
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = it_master
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
.
-Anu
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |