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: 

Downloading files to application server

Former Member
0 Kudos

Hi,

I have an internal table in which one line item is of length 467 chars. When i am downloading the contents from this internal table to apps server the length is getting truncated i.e. all the fields were not getting downloaded. I am opening the file in text mode and transferring the field contents into a string separated by space and transferring the same to application server file.

Any help will be appreciable.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Do you use the addition "LENGTH" with the transfer statement?

<b>Transfer "DataObject" to "Filename" length lf_len.</b>

The length of the data object to be written is defined by lf_len, where lf_len can be either a constant or a variable.

If lf_len is shorter than the data object, the system truncates the object on the right.

Btw, did you open the file in <b>TEXT MODE</b>?

Former Member
0 Kudos

Hi Sayantan,

Are you viewing the file in AL11. If you are you will not be able to view the complete length of the file and it might actually be all there.

Regards,

Chester

0 Kudos

Yes, I am viewing the file from al11. Is there any other way to view the same?

Plz let me know.

0 Kudos

Hi Sayantan,

If the file is not enormous download it your PC with transaction CG3Y and view with notepad.

Regards,

Chester

0 Kudos

Hi,

Download the file using transaction CG3Y and view it in notepad or word or excel depending upon the file extension.

Reward points if the answer is helpful.

Regards,

Mukul

Former Member
0 Kudos

before writing data into application server we have to CONDANCE all fields and then CONCATENATE all fields then u have to transfer all fields into application server here i am sending sample code for that.

CLEAR wa_text-tline.

DATA:

werks(4),

ebeln(10),

ebelp(5),

menge(16),

xblnr(16),

shkzg(1),

mblnr(10),

bwart(3),

lfbnr(10),

bldat(8).

werks = wa_mdocs-werks.

ebeln = wa_mdocs-ebeln.

ebelp = wa_mdocs-ebelp.

menge = wa_mdocs-menge.

xblnr = wa_mdocs-xblnr.

shkzg = wa_mdocs-shkzg.

mblnr = wa_mdocs-mblnr.

bwart = wa_mdocs-bwart.

lfbnr = wa_mdocs-lfbnr.

bldat = wa_mdocs-bldat.

CONDENSE:

werks,

ebeln,

ebelp,

menge,

xblnr,

shkzg,

mblnr,

bwart,

lfbnr,

bldat.

CONCATENATE

werks

ebeln

ebelp

menge

xblnr

shkzg

mblnr

bwart

lfbnr

bldat

INTO wa_text-tline SEPARATED BY c_tab.

ENDFORM. " con_fields

test it in ur system.

after wrinting all fields into application server u can download into to system by using <b>CY3Y, CG3Z</b>

<b>reward me a points if it is use full answer.</b>

praveen