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: 

Problem with line size

Former Member
0 Kudos

Hello,

I am trying to get .Txt file from presentation server and each line-size has lenth 1225.

But ABAP editer has limit upto line-size 1023.

and i want to store same file from presentation to application server but after line-size 1023 the other data is not displaying.

is there anyother way for this ?

7 REPLIES 7

Former Member
0 Kudos

Hello Kinjal,

It does not matter.

Declare one variable like String ,this will contains the all data from text file ( each line 1225 charcters).

Just upload it to Application server,here you can't see the complete data since ABAP Editor issue.

for testing purpose ,

Copy the file Application server to local file and see the file data now .

Thanks

Seshu

0 Kudos

Hi Seshu,

Same thing i did before.

I was getting file from presentation to itab and while i was seeing to normal output it was not displaying all data but while i was downloading again into Presentatin server i can see all records.

But while i am passing to application server , i an faceing the same problem.i cant see in output and even in .Txt file .

0 Kudos

Okay,for displaying purpose then you need to use ferry Logic,if you want to upload it to some other location then it is okay but those data not visible but data should be available.

Try to build ferry logic.

Thanks

Seshu

0 Kudos

Is there any other function module which store data onto Application server using internal-table ?

0 Kudos

Check the following code :

parameters: d1 type localfile default

'/usr/sap/TST/SYS/Test.txt'.

data: begin of itab occurs 0,

field1(20) type c,

field2(20) type c,

field3(20) type c,

end of itab.

data: str type string.

constants: con_tab type x value '09'.

start-of-selection.

itab-field1 = 'ABC'.

itab-field2 = 'DEF'.

itab-field3 = 'GHI'.

append itab.

itab-field1 = '123'.

itab-field2 = '456'.

itab-field3 = '789'.

append itab.

open dataset d1 for output in text mode.

loop at itab.

translate itab using ' # '.

concatenate itab-field1 itab-field2 itab-field2

into str

separated by con_tab.

translate str using ' # '.

transfer str to d1.

endloop.

close dataset d1.

Thanks

Seshu

ferry_lianto
Active Contributor
0 Kudos

Hi,

The max line-size is 1023.

If you have more than 1023 then you need to split the line into multi lines for display purposes.


loop at itab.
 write: / itab(1000),
        / itab+1000(225).    
endloop. 

Regards,

Ferry Lianto

ferry_lianto
Active Contributor
0 Kudos

Hi,

You need to use OPEN DATASET, TRANSFER and CLOSE DATASET statements.


OPEN DATASET V_FILENAME FOR OUTPUT IN BINARY MODE.

LOOP AT ITAB.
  TRANSFER ITAB TO V_FILENAME.
ENDLOOP.

CLOSE DATASET V_FILENAME.

Regards,

Ferry Lianto