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: 

Application Server : File writes only 255 characters

Azeemquadri
Contributor
0 Kudos

Hi Friends,

I am trying to writes data to application server file .

My line size is 1100 charqacters.

When I use open dataset for output in text mode encoding default

and transfer contents to file.

I am only able to write contents upto 255 characters.

Whatever is beyond that I do not see it in AL11.

Is there a way to write more than 255 characters.

I tried CG3Y to view files but it also shows only 255 characters.

Please help.

1 ACCEPTED SOLUTION

vinod_vemuru2
Active Contributor

Hi,

When u download the data using CG3Y give

Transfer format for data as BIN instead of ASC. It will show u all the data.

Also cross check whether u have transfered more than 255 characters or not in debug mode.

Thanks,

Vinod.

9 REPLIES 9

vinod_vemuru2
Active Contributor

Hi,

When u download the data using CG3Y give

Transfer format for data as BIN instead of ASC. It will show u all the data.

Also cross check whether u have transfered more than 255 characters or not in debug mode.

Thanks,

Vinod.

0 Kudos

Hi ,

How do I check in debugger how many bytes are getting.

transferred.

I Also tried with BIN in CG3Y but still 255 characters only.

0 Kudos

Hi,

Just find the string length.

In 4.6C version there is a limit of 1500 characters i. e. U can transfer max of 1500 characters in a single transfer. For that we applied below solution. Check this it may help u.


  l_len = strlen( p_data ).
  DO.
    IF l_len LT 1500.
      TRANSFER p_data+l_offset(l_len) TO p_file.
      MOVE 0 TO l_len.
    ELSE.
      TRANSFER p_data+l_offset(1500) TO p_file.
      SUBTRACT 1500 FROM l_len.
      ADD 1500 TO l_offset.
    ENDIF.
    CHECK l_len EQ 0.
    EXIT.
  ENDDO.

p_data has the content to be trasfered of around 6000 characters and the length is dynamic.

Also download the data using CG3Y with BIN to .txt file and see.

If problem is still there then paste ur code of OPEN DATASET, TRANSFER statements.

Try to open the file in TEXT MODE.

eg: OPEN DATASET l_file IN TEXT MODE.

Thanks,

Vinod.

Edited by: Vinod Reddy Vemuru on Jul 25, 2008 12:34 PM

0 Kudos

Thanks.

Saving the file as .TXT did it .

0 Kudos

Hi Vinod,

Even I am facing the same problem when writing file to application server which has more than 255 char length.

I have changed my coding as given by you.

But the problem is When downloading the file from application server, the data for one record should be in one line ,if it is more than 255 chars it is splitted into 2 rows( its not word wrap). But this should not happen .

Please suggest me with a solution

Thanks,

Gowri

0 Kudos

Don't use CG3Y! It doesn't support download of longer rows. Use GUI_DOWNLOAD, which will transfer 1024 bytes during download.

0 Kudos

Hi ,

I am downloading the file from al11 ( System> List> local file).

Thankyou

Gowri

GauthamV
Active Contributor
0 Kudos

hi,

use this function module.

C13Z_FRONT_END_TO_APPL .

0 Kudos

Hi Gautham,

I am not using front end. My data is from ABAP program which I need to put on the application server.

I am only seeing data up to 255 characters when i view the file in AL11. I do not know if the rest of the data is getting transferred or not.