‎2007 Sep 05 2:45 PM
Hi All,
I am working on an Upload program. In that they have used the file type as 'DAT'.
My doubt is whether <b>'GUI_UPLOAD'</b> supports <b>'DAT'</b> filetype or not.
Bacause, while uploading the tool, I am getting '<b>Invalid file type error</b>'.
can anyone let me know the reason this issue.
Thanks & Regards,
Paddu.
‎2007 Sep 05 2:48 PM
Hi,
It supports 'DAT' & 'ASC' both files.
Try the follwoing code:
DATA: v_file type string.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
has_field_separator = 'X'
TABLES
data_tab = it_invc
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.
<b><REMOVED BY MODERATOR></b>
Ashvender
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 05 2:48 PM
Hi,
It supports 'DAT' & 'ASC' both files.
Try the follwoing code:
DATA: v_file type string.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
has_field_separator = 'X'
TABLES
data_tab = it_invc
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.
<b><REMOVED BY MODERATOR></b>
Ashvender
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 05 2:50 PM
Yes it does support DAT file type, please read the function documntation for usage
‎2007 Sep 05 2:56 PM
GUI_UPLOAD does not support DAT file types.Instead use ASC or BIN
‎2007 Sep 05 2:58 PM
Hi Paddu
while we update the data from a file , that file should be in .txt format.
It shows error while the file is in .dat format. txt file contain the ascii data or text which is supported. But .dat may contain both text or binary data. so it is not supported.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 05 3:05 PM
Hi Paddu,
gui_upload <b>does not</b> support <b>DAT</b> format.
It should be either <b>ASC</b> or <b>BIN</b>.
For reference check Function Module Documentation.....
<b><REMOVED BY MODERATOR></b>
Best Regards,
Ram.
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 05 3:18 PM
<b>GUI_UPLOAD does support "ASC", "BIN" & "DAT" Filetypes.</b>
details regd filetypes:
'BIN'
A binary representation of the internal table is read from the file.
No conversion or interpretation is carried out. Usually, this produces
meaningful results only if the internal table consists of a single
column of type 'X'.
'DAT'
The components of the internal table are filled from the file. If the
table contains more than one column, the entries in the file must be
separated by tabs. Conversion exits are not carried out.
For the different data types, the following applies:
I or N or P or F
The numbers must be formatted according to the decimal representation
defined in the user settings.
D
The date must be formatted according to the date format defined in the
user settings.
T
The time must have format hh:mm:ss.
'ASC'.
The components of the internal table are filled from the file. Only data
types of fixed length are allowed. The data must be contained on the
file in its entire length.
refer from the documentation of gui_upload from tcode se37.
regards,
srinivas