2007 May 24 7:37 AM
hi,
I have one doubt on data transferring.
I have got the path where i have to place the text file.
I have written the coding OPEN dataset and transfer data set.
But the file is not not replacing in the path.
But i have tried to retrieve data from that path again by using open dataset and read dataset.
I am getting exact data what ever i am sending data as text file.But only the thing is that file is not replacing in that path.
Why it is not placing the file when i am sending?
if any one knows the solution pls guide me.
This is urgent requirement.I need help.
Regards,
lokesh.
2007 May 24 7:41 AM
Hi,
Try tocdes CG3Z or CG3y for ur requiremetns there is one option to overwrite u can use call transaction with SET parameter id.
Jogdand M B
2007 May 24 7:39 AM
2007 May 24 7:39 AM
2007 May 24 7:43 AM
Hi,
yes i have written the close dataset also.
when ever i am transferring it is going i think so.
why i am saying like this means again i am reading that file means from that file data is reading.
But only the thing is that file is not placing in that path.
Regards,
lokesh.
2007 May 24 7:46 AM
Look at this sample and compare
*Open file
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT gt_file INTO gs_file.
TRANSFER gs_file TO p_file.
ENDLOOP.
CLOSE DATASET p_file.
2007 May 24 7:40 AM
2007 May 24 7:41 AM
Hi,
Try tocdes CG3Z or CG3y for ur requiremetns there is one option to overwrite u can use call transaction with SET parameter id.
Jogdand M B
2007 May 24 7:50 AM
Else try this fm
p_file_tmp TYPE string.
p_file_tmp = p_file. " generates type error if p_file used
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = p_file_tmp
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = gt_file
FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.