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 Trasfer Dataset

Former Member
0 Likes
1,831

Hi All,

I am trying to send some data into application server. The file contains a field of length 435 characters. But when i am tranfering i can see only 248 characters in the file(in application server).

Is this is a limitation or am i doing any thing wrong..!!

I am sending data in text mode. and also specified the length.

<u>my coding:</u>

<b>open dataset LOGFILE_GOR for output in text mode encoding default.

loop at lt_upload into ls_upload.

transfer ls_upload to LOGFILE_GOR length 435.

endloop.

Close dataset LOGFILE_GOR.</b>

While i am writing using write statements i can see the all data(435 characters). But when i am transfering i can see only first 248 chars.

Please give some suggitions how to fix this.

Thanks in advance.

Srini

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,298

Hi Srini,

I dont think this is an error. Are you viewing the file in AL11? This display only shows the first 256 characters but all the characters are actually preserved.

Just read it back to your internal table from the file and check it again. YOu must find it there.

Check the similar thread :

Regards,

Wenceslaus.

11 REPLIES 11
Read only

Former Member
0 Likes
1,299

Hi Srini,

I dont think this is an error. Are you viewing the file in AL11? This display only shows the first 256 characters but all the characters are actually preserved.

Just read it back to your internal table from the file and check it again. YOu must find it there.

Check the similar thread :

Regards,

Wenceslaus.

Read only

0 Likes
1,298

Hi Wenceslaus,

I downloaded the file(from menu) to flat file and checked, but still i can see only first 248 chars only.

Srini

Read only

0 Likes
1,298

Hi Srini,

Just read the file into the internal table. Set a break-point and see the contents of the table. It is just a limitation of the file view, but I dont think the file contents will get truncated.

Regards,

Wenceslaus.

Read only

Former Member
0 Likes
1,298

HI Srini,

**Is this is a limitation or am i doing any thing wrong..!!

Yeh srini there is a limitation that u can view upto 256 character only .

The best way to check is just download that file and then see it contents , u will get all the data (435 char).

Hope this will help you.

Cheers

Sunny

Read only

Former Member
0 Likes
1,298

Hi,

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

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

Hope it helps.

Regards,

Shashank

Read only

0 Likes
1,298

Hi Shashank

The transaction : CG3Y not available in BW(I am working on BW). Is there any other way i can check the files...??

my doubght is if this is AL11 limitation, i am downloading the file into flat file from menu.(System->list->save->localfile).

<b> why cant i see the entire data in flat file..??</b>

Actually we have to send the data to some non-sap systems, for that i am creating these flat files(files will go to users directly from application server).

So just want to make sure all the data is available in the file.

when non-sap systems reading these files how they will see the data....?? entire data or upto 248 or 255 chars..!!

Regards

Srini

Read only

0 Likes
1,298

Hi,

You can write a simple program if CG3Y is not available.

This program will read the file from app server and transfer it to internal table and then use GUI_DOWNLOAD to download this file to your PC.

However, there is no problem in the code written by you to transfer the file to app server and hence there is no reason for truncation of the file.

I have faced the same situation....

I checked it via CG3Y, and i was able to see the complete file.

The Non SAP system will see the complete data, no need to worry.

Regards,

Shashank

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,298

Hi,

In AL11 you can see only 255 characters.

In a separate program,use open dataset...to read the file from application server and then use GUI_DOWNLOAD to write it in system.

This will definetely work.

Read only

Former Member
0 Likes
1,298

Hi Srini,

try downloading the file to AL11 and check it , then you can see every thing. but if you see in AL11 you can see upto 250 chars only i guess.

Regards

Vijay

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,298

Hi,

Just change the file name[and fields inside t_input according to your program] and copy paste the code.Kindly reward points by clicking the star on the left of reply,if it helps.

data : g_data(1000),

G_DELIM TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

DATA: BEGIN OF T_INPUT OCCURS 0, " Flat file data

f1(10) TYPE C,

f2(15) TYPE C,

f3(400) TYPE C,

END OF T_INPUT.

data : begin of t_output occurs 0,

f(425),

end of t_output.

OPEN DATASET '/sapio/ANIR0000.TXT' FOR INPUT IN TEXT MODE ENCODING

DEFAULT.

IF SY-SUBRC = 0.

DO.

READ DATASET '/sapio/ANIR0000.TXT' INTO G_DATA.

IF SY-SUBRC = 0.

SPLIT G_DATA AT G_DELIM INTO T_INPUT-f1 T_INPUT-f2

T_INPUT-f3 .

IF SY-SUBRC = 0.

APPEND T_INPUT.

CLEAR T_INPUT.

ELSE.

  • MESSAGE E001 WITH TEXT-012 G_AFILE1.

ENDIF.

ELSE.

EXIT. "After reading last Record

ENDIF.

ENDDO.

ELSE.

  • MESSAGE E001 WITH TEXT-013 G_AFILE1.

ENDIF.

append lines of t_input to t_output.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'C:/tmp/test.txt'

filetype = 'ASC'

write_field_separator = 'X'

TABLES

data_tab = t_output

EXCEPTIONS

file_write_error = 1

no_batch = 2

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

OTHERS = 22.

Read only

Former Member
0 Likes
1,298

Hi Srinivas,

I have a problem similar to the one you had. I tried downoading the file through CG3Y, but that doesnt seem to work. Did you problem get resolved? If so, Can you please tell me what you did to solve the problem.

Thanks in advance!!!

Prasuna.

PS: Find the Code below. (I canv see 672 characters in debug mode in my internal table)

<b> DATA : BEGIN OF WT_FIC OCCURS 0,

ZONE(672) type c,

END OF WT_FIC.

OPEN DATASET FILE_NAME FOR OUTPUT IN TEXT MODE.

IF SY-SUBRC EQ 0.

LOOP AT WT_FIC.

TRANSFER WT_FIC TO FILE_NAME length 673.

ENDLOOP.

ENDIF.

CLOSE DATASET FILE_NAME.</b>