cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver File adapter scenario output file in AL11 SAP Directory truncated

Former Member
0 Kudos

Hi,

My receiver file adapter has generated a XML file which is written to the SAP AL11 directory. When I view the file in AL11 as well as when I download the file from AL11 to my desktop and view it, I find that the file is truncated where in the last record is present but incomplete.

Could someone please tell me why this happens?

Regards,

S

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Have you set the FileContentConversion in File Adapter?

How big is the file size lenght?

Former Member
0 Kudos

Hi,

No, I am not using File Content Conversion. I am writing a plain XML file and the size of the file is not much. It is just 959 bytes.

Cheers,

S

Former Member
0 Kudos

Hi,

Regarding the partial file generation:-

Unfortunately, the J2EE 1.3 technology the File Adapter is
built upon does not support file locking. This limitation affects
the File Adapter's operation. Depending on whether the JRE
implementation for the operating system under which the adapter
runs uses mandatory file locking or advisory file locking,
opening a file that is currently being written to by another
process will fail or not.
If opening the file fails, no problem exists and the adapter will
try to open the file each poll interval until it succeeds.

However, if opening the file is not prevented by the operating
system, the adapter starts to process the file although it is
still being modified. Since XI 3.0 SP11 / PI 7.0 there is a
parameter named "Msecs to Wait Before Modification Check" in the
advanced settings of the File Sender channel configuration to
work around this issue. This setting causes the File Adapter to
wait a certain time after reading, but before sending a file to
the Adapter Engine. If the file has been modified (which is
basically determined by comparing the size of the read data with
the current file size of the input file) after the configured
interval has elapsed, the adapter aborts the processing of the
file and tries to process the file again after the retry interval
has elapsed.

If this option is not available for the settings you would like
to use, the following algorithm (to be implemented in your
application) may be used to ensure that the File Adapter only
processes completely written files:

-  Create the file using an extension, which does not get
   processed by the File Adapter, e.g., ".tmp"

-  Write the file content

-  Rename the file to its final name, so the File Adapter will
   notice its existence and pick it up

Thanks,

Atul

Former Member
0 Kudos

Hi S,

If the file is big, you may not be able to view the whole file in AL11. You may use the tcode CG3Y to download the file from SAP filesystem to your desktop and view the whole file.

If your file is in PI, you may use the function module ARCHIVFILE_SERVER_TO_CLIENT. But be cautious when using this FM as this is has limitation on the number characters for the file path.

Regards,

Jenny

Former Member
0 Kudos

Hi Jenny,

I tried using TCODE "CG3Y" but it says the TCODE does not exisit. Could you please adivice if the TCODE is correct?

Cheers,

S

Former Member
0 Kudos

Hi S,

Yes, that is the correct transaction code. It is a transaction code used in SAP used to download files from SAP systems.

But I am not sure if this is existing on all versions of SAP.

KR,

Jenny

Former Member
0 Kudos

Hi Jennilyn & S,

CG3Y works in SAP ECC system not in PI system

Former Member
0 Kudos

Hi,

If you have choosen option as 'create temporary files' at the receiver side then some times you may face this kind of problem, try to choose 'Direct mode' means create target file directly without any temp file and then check it.

Thanks,

RK

Former Member
0 Kudos

Hi RK,

The write mode in my receiver file adapter is already set to "Directly". Yet my output file is getting truncated.

Cheers,

S