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

Writing to application server

Former Member
0 Likes
1,452

Hi ,

I have an internal table which has a string of length 600.

I have many records in it which have to be moved to appl server .

open dataset path for output in text mode.

loop

transfer

endloop

close dataset

the file is moved but when i check thru al11 i see truncated values .

1. if i do a read dataset for input .. i retrieve the complete string .

2. BUT if I save file from application server to desktop. I get truncated file.

How do i handle this case. ultimately the file will be retrieved by the second way.

COuld someone help in this regard

Thanks

Neelima

Hi,

Although we are not able to see the full line contents in transaction AL11, but if we download the data, we will get the full data. Contents won't be truncated.

Award points if you agree with me.

Cheers,

Ganesh N

13 REPLIES 13
Read only

Former Member
0 Likes
1,405

hi,

How r u saving ur file from application server to desktop??

r u doing FTP or coding or that

Read only

suresh_datti
Active Contributor
0 Likes
1,405

Hi Neelima,

You have to use the Transaction CG3Y to download from Application Server to Presentation Server.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
1,405

Do you mean that you want to save the output from AL11 to the PC? If so, it will be truncated.

You could write it to the ap server, then retrieve and download it to the PC, but a better solution would be to simply download the internal table directly to the PC.

Rob

Read only

0 Likes
1,405

Neelima,

You can try using the function module:

ARCHIVFILE_SERVER_TO_CLIENT.

Good luck.

Please close the issue with appropriate points if helpful.

Venu

Read only

Former Member
0 Likes
1,405

Hi

Thanks for replying.

As of now I dont know what is the method the users are going to use to extract file from application server to PC.

I have just to dump the file into application server .

Transaction CG3Y does not help as this downloads a truncated file .

internal table : begin of it_download

str(500)

end of it_download

Isnt it possible to write a file to appln server which has a string of length 500 ?

Read only

0 Likes
1,405

it can write till 255 characters i guess

Message was edited by: chandrasekhar jagarlamudi

Read only

0 Likes
1,405

The file has the correct length. Both transactions you are using to display or download truncate the data.

Rob

Read only

0 Likes
1,405

Hi Neelima,

Try to save it as a .htm file & open it in a browser.

Regards,

Suresh Datti

Read only

0 Likes
1,405

You can try this:


REPORT ztest.

DATA: BEGIN OF itab OCCURS 0,
        field(600),
      END   OF itab.
DATA: dsn(100) VALUE '/usr/sap/xfr/FIS/testtxt'.

OPEN DATASET dsn FOR INPUT.

DO.
  READ DATASET dsn INTO itab-field.
  IF sy-subrc = 0.
    APPEND itab.
  ELSE.
    EXIT.
  ENDIF.
ENDDO.

CALL FUNCTION 'GUI_DOWNLOAD'
     EXPORTING
          filename     = 'c:temptestn.txt'
     TABLES
          data_tab     = itab.

Rob

Read only

0 Likes
1,405

u can write only 255 characters to application server ,

i had tested that.

data:str(500).

do 19 times.

concatenate str 'abcdefghijklmnopqrstuvwxyz' into str separated by

space.

enddo.

may be if u want length of 500 , write the data to 2 files in application server , and then combine into one internal table finally

&----


*& Report YCHATEST *

*& *

&----


*& *

*& *

&----


REPORT YCHATEST .

data:str(500).

do 19 times.

concatenate str 'abcdefghijklmnopqrstuvwxyz' into str separated by

space.

enddo.

open dataset '/usr/sap/DR1/DVEBMGS00/work/cha' for output in text mode

encoding default.

open dataset '/usr/sap/DR1/DVEBMGS00/work/cha1' for output in text mode

encoding default.

transfer str+0(255) to '/usr/sap/DR1/DVEBMGS00/work/cha'.

transfer str+255(245) to '/usr/sap/DR1/DVEBMGS00/work/cha1'.

close dataset '/usr/sap/DR1/DVEBMGS00/work/cha'.

close dataset '/usr/sap/DR1/DVEBMGS00/work/cha1'.

*delete dataset '/usr/sap/DR1/DVEBMGS00/work/cha'.

open dataset '/usr/sap/DR1/DVEBMGS00/work/cha' for output in text mode

encoding default.

transfer str to '/usr/sap/DR1/DVEBMGS00/work/cha'.

close dataset '/usr/sap/DR1/DVEBMGS00/work/cha'.

this write only 255 characters ,

Read only

Former Member
0 Likes
1,405

if this program is not executing in background then use function module CLPB_EXPORT.. in the loop where you transfer, also append to the itab of this function module. when the program finishes, just open a notepad and ctrl+v.. you will see your data..

Basically u are moving your itab to clipboard..

Good luck

Sudhakar

Read only

Former Member
0 Likes
1,405

Hi,

Although we are not able to see the full line contents in transaction AL11, but if we download the data, we will get the full data. Contents won't be truncated.

Award points if you agree with me.

Cheers,

Ganesh N

Read only

0 Likes
1,405

THANKS GANESH ,

I absolutely agree with you . Though the complete file is not seen but the file is written to the application server . This can be confirmed after the file is read back from the application server .

Neelima