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 with Writing file into Application Server

Former Member
0 Likes
575

Hi Experts..

I am trying to write a file into application server.

My internal table have about 13 fields..

and after writing it into a appln server..when i try to see the file...

the records are not appearing proper..all the fields are not appearing in the same line..

i mean .. every record is splitted to two lines. not in appearing in single line.

is there any way to increase the displaying space for the records

expecting the reply

Guru.

4 REPLIES 4
Read only

Former Member
0 Likes
544

Hi Guru,

I believe you have used a tab separator between the columns or some other kind of separator.

The application server is just a storage location for your files from where you can download these to your local desktop or use them in other programs/transactions.

When you see the file in the application server itself (AL11), it will seem to be haphazard. But, when you download it to your desktop, you'll see that the data is aligned correctly (if you have used a tab separator between your columns).

You can download the file by selecting the file name -> System -> List -> Save -> Local File.

Try downloading and check.

Thanks,

Dawood.

Read only

0 Likes
544

Hi,

Thanks for your reply...

I used a tab field separator when i download it to a local file

but i didnt use any field separator for application server..

can u guid me to use field separator when i write to appln server.

below is my part of the code..

OPEN DATASET FILE_NAME FOR OUTPUT IN TEXT MODE.

IF SY-SUBRC NE 0.

message e018(znc) with 'Fail to create file ' P_OUTFIL.

EXIT.

ENDIF.

LOOP AT IT_FINAL.

TRANSFER IT_FINAL TO FILE_NAME.

ENDLOOP.

CLOSE DATASET FILE_NAME.

Thanks

Guru.

Read only

0 Likes
544

Hi Guru,

I mean something like this:

types: BEGIN OF ty_download,

field(500) TYPE c,

END OF ty_download.

data: is_download type ty_download.

open dataset part is correct.

when looping, try the below code modifying it according to your requirement:

loop at it_final into is_final.

concatenate is_final-field_a

is_final-field_b

is_final-field_c

is_final-field_d

.

.

.

into is_download-field

separated by cl_abap_char_utilities=>horizontal_tab.

transfer is_download to file_name.

clear: is_final,

is_download.

endloop.

Note: "cl_abap_char_utilities=>horizontal_tab" is the tab separator.

Thanks,

Dawood.

Edited by: Dawood.S.Ghasletwala on Aug 15, 2008 2:13 PM

Read only

0 Likes
544

Hi..

Thanks

I tried it..

and get syntax error class " cl_abap_char_utilities" unknown..

should i define this in my report.. if so how..?

sorry for asking..many queries..

Guru