Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer file to the server

Former Member
0 Kudos

Hi,

I am using Open dataset to write the file to the server. When I am using transfer command with record length (e.g 450), I see only 255 characters written to the file.

TRANSFER rec TO outfile length 450.

Help...

Thanks

Sanju

7 REPLIES 7

Former Member
0 Kudos

I think you'll find that all of the data was transferred. After writing to the server, read it back into another internal table.

Rob

Former Member
0 Kudos

Hi,

Usually not more than 255 characters are displayed. If you want check the length of the record, then the best way would be to read the record again.

There should not be any problem.

Regards,

Vara

0 Kudos

Hi,

I am writting the file on to the server. My internal table has around 15 fields which makes up more then 255 chars in record length.

Surprisingly, I used it in other program awhile ago which had record length 800 and it worked fine.

Thanks

Sanju

Former Member
0 Kudos

When you say 'I see', how do you see the file? Are you seeing it from AL11, then in that case you will not see the full length of the records. If you are looking at the file from the application server itself, then you should see all of it. Hopefully you 'rec' has text fields.

Give us the code where you are doing the "open dataset", "loop at itab." and "transfer rec..".

Srinivas

0 Kudos

Hi Srini,

I first checked the file in Al11 and then downloaded it using CG3Y to the pc. I opened the file, I didn't see the full length of the record, last few fields were truncated, after 255 chars.

OPEN DATASET v_unix FOR OUTPUT IN TEXT MODE.

loop at itab into rec_filerecord.

TRANSFER rec_filerecord TO v_unix length 450.

endloop.

CLOSE DATASET v_unix.

Thanks, Sanju

0 Kudos

Both AL11 and CG3Y have limitations on their lengths which 256. If you want to read the application server file and download it to your desktop, use the following pseudo logic.

open the server file.

read the records into an internal table(READ DATASET)

download the internal table onto your desktop using GUI_DOWNLAOD.

Srinivas

Former Member
0 Kudos

Hi sanju,

**I am using Open dataset to write the file to the server. When I am using transfer command with record length (e.g 450), I see only 255 characters written to the file.

Please find this refernce similar thread.

You will find the refernce sample code too for the similar reqmt.

Few ways by which u can do the same.

- Try to download the contents using GUI_download, you will surely get all the contents.

-If you are using AL11,you will see only 255 charecters.

-use transaction CG3Y to download this file to your PC and then check

Cheers

Sunny

reward points, if found helpful