2016 Oct 05 12:43 PM
Hi experts,
I am having some problems using this code:
do.
read dataset vg_filenamein into it_upload.
if sy-subrc <> 0. exit. endif.
append it_upload.
enddo.
The point is that after using read dataset sy-subrc = 4. Before of the code above it is done this code:
perform open_dataset using vg_filenamein.
That follows:
form open_dataset using p_dataset.
open dataset p_dataset in text mode ENCODING DEFAULT FOR OUTPUT.
if sy-subrc <> 0.
write: / 'Erro na abertura do arquivo: ', p_dataset.
stop.
endif.
endform.
This form works ok since sy-subrc = 0 after using open dataset. The file that I try to read is in AL11 and the path using from open dataset is correct
as well as the file is not empty and this file is just plain text.
Could you please help me?
2016 Oct 05 12:49 PM
You are opening dataset for output but later you use read command probably that's the reason.
regards,
Bartek
2016 Oct 05 12:49 PM
You are opening dataset for output but later you use read command probably that's the reason.
regards,
Bartek
2016 Oct 05 12:52 PM
There are Two standard Programs.
RC1TCG3Y or RC1TCG3Z
One is for Uploading and other one is for downloading.
First try to download the file by using the above one. give the exact path(file), what you tried in the above program. Then check it. whether the path is wrong or some other reason you can get easily.
Hope you understood.
2016 Oct 05 12:54 PM