Skip to Content
avatar image
Former Member

Receiver File adapter scenario output file in AL11 SAP Directory truncated


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?



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 31, 2011 at 09:22 AM


    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.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi RK,

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



  • avatar image
    Former Member
    Aug 31, 2011 at 09:28 AM

    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.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 31, 2011 at 10:18 AM

    Have you set the FileContentConversion in File Adapter?

    How big is the file size lenght?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      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