Application Development and Automation 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: 
Read only

Problem in open dataset

Former Member
0 Likes
1,375

Hi,

I want to display 361 characters per line in Application server.I have used open dataset.But only 255 characters are coming per line.Others are not visible.

Here is my coding.

  • Opening the file for output in text mode

OPEN DATASET p_afile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0.

g_flg = c_x.

MESSAGE s000 WITH text-004 p_afile text-005.

"Error in opening file for output

LEAVE LIST-PROCESSING.

ENDIF.

LOOP AT t_output INTO w_output.

TRANSFER w_output TO p_afile.

ENDLOOP.

  • Closing the file

CLOSE DATASET p_afile.

IF sy-subrc NE 0.

g_flg = c_x.

MESSAGE s000 WITH text-006 p_afile."Error in closing file

LEAVE LIST-PROCESSING.

ENDIF.

Any useful pointers will be highly appreciated.

Regards,

J.Jayanthi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
903

The data in the file will be conserved but it is displayed in 255 characters.

Try to read the file back into the internal table and see the contents.

6 REPLIES 6
Read only

Former Member
0 Likes
904

The data in the file will be conserved but it is displayed in 255 characters.

Try to read the file back into the internal table and see the contents.

Read only

Former Member
0 Likes
903

Hi jayanthi,

1. w_output

What is the length of this variable ?

2. want to display 361 characters per line in Application server

How can u display on application serveR?

regards,

amit m.

Read only

Former Member
0 Likes
903

Hi,

How exactly are you identifying thatit is 255 chars.

Are you seeing in AL11 or reading back the file.

If you are seeing in AL11 then it shows only 255 chars regardless of data in file.

Thanks & Regards,

Ankur

Read only

Former Member
0 Likes
903

REPORT  ZTEST_AL11.

data: begin of itab occurs 0,
      char(361),
      end of itab.
 data: char(26).

char = 'abcdefghijklmnopqrstuvwxyz'.
concatenate char char into itab-char.
concatenate itab-char char into itab-char.
concatenate itab-char char into itab-char.
concatenate itab-char char into itab-char.
concatenate itab-char char into itab-char.
concatenate itab-char char into itab-char.
concatenate itab-char char into itab-char.
concatenate itab-char char into itab-char.
concatenate  itab-char char into itab-char.
concatenate  itab-char char into itab-char.
concatenate  itab-char char into itab-char.
concatenate  itab-char char into itab-char.
concatenate itab-char char into itab-char.
append itab.
data: p_file like RLGRAP-FILENAME value './TEST123.txt'.
open dataset p_file for output in text MODE encoding default.
if sy-subrc = 0.
loop at itab.
transfer itab to p_file.
endloop.
endif.

The above code works , and it is showing 361 chars data in al11.

please check it once.

regards

vijay

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
903

Hi,

Actually I can see only 255 characters in AL11.But the data is there in that Application server.

But Vijay,could you explain is there any settings needed to see the entire(361 characters) in AL11?

Message was edited by: Jayanthi Jayaraman

Read only

0 Likes
903

Hi,

Datas in the Application server file can only be viewed upto 255 Characters and not more than that even more than 255 characters are stored.

But the whole length of the file exists in application server and this can be verified by downloading the file from the Application server by writing a program.

This problem has appeared to me earlier and I used to download the file, where the whole length of the file Exists.

Regards,

Anbu