09-12-2007 7:53 AM
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.
09-12-2007 9:43 AM
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>?
09-12-2007 9:47 AM
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
09-12-2007 9:53 AM
Yes, I am viewing the file from al11. Is there any other way to view the same?
Plz let me know.
09-12-2007 10:09 AM
Hi Sayantan,
If the file is not enormous download it your PC with transaction CG3Y and view with notepad.
Regards,
Chester
09-12-2007 10:10 AM
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
09-12-2007 10:38 AM
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