cancel
Showing results for 
Search instead for 
Did you mean: 

2 files are getting delivered to FTP server

r_s_kulkarni11
Participant
0 Kudos

Hi All,

My scenario is Idoc to File and we have encountered a problem where 2 files are getting created for 1 Idoc sometimes.

Ideally it should create only 1 file from 1 Idoc but sometimes it is creating 2 files, in our scenario we using ICO.

The file is created with name FD_Timestamp and the 2 files which are created are with 2 different timestamps

Can you please comment on this?

Regards,

Rahul Kulkarni

Accepted Solutions (0)

Answers (2)

Answers (2)

sendhil_kumar
Active Participant
0 Kudos

Hi Rahul,

Can you check your mapping, If the mapping is such a way that it creates Multiple Files.

Refer to this blog, it speaks about creating multiple files from single idoc. Check if such mapping is used in your interface.

One IDOC to Multiple Files sending to Multiple folders of the FTP using single Communication Channel...

--

Sendhil

RaghuVamseedhar
Active Contributor
0 Kudos

Rahul,

What are the differences between two files (content, file-name)?

Do you see anything which is not normal in IE and AE?

Message ID in PI is same for both files?

r_s_kulkarni11
Participant
0 Kudos

Hello Raghu,

Only file name is different as our file name convention is FD_Timestamp.

nothing abnormal in IE and AE.

Message ID identification is really difficult to get as thousands of messages are flowing and we have retention period of 1 day.

azharshaikh
Active Contributor
0 Kudos

Hi Rahul,

Sounds strange....I would suggest:

1. Check if you have another Interface / CC that is writing the file in same dir.

2. Check if the Cache is Up-to-date

3. If same error persists, I would suggest you to delete the existing ICO and create a New one (with slightly different/new Receiver CC name).

Regards,

Azhar

former_member184720
Active Contributor
0 Kudos

How did you confirm that one message in PI is creating two files? Did you compare the files?

Do both of them have the same IDOC number?

Did you check in ECC for that time stamp to see how many IDOC's of that message type were delivered to PI? (we02)

r_s_kulkarni11
Participant
0 Kudos

Hello Hareesh,

In my further analysis I found that only 1 message is creating 2 files, I know it is strange.

The scenario goes as below -

The receiver channel is trying to create a file on FTP server as - write to FTP server "XX" directory - "XX" , file  - FD_Timestamp1

now there is an error on channel  -

Transmitting the message to endpoint <local> using connection IDoc_AAE__http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error occurred while connecting to the FTP server "XX": java.lang.IllegalStateException: Error during STOR/APPE epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 426 Unexpected reply codeConnection closed; transfer aborted.

Exception caught by adapter framework: Error during STOR/APPE epilogue: com.sap.aii.adapter.file_.ftp.FTPEx: 426 Unexpected reply codeConnection closed; transfer aborted.



and then after some time there is again a retry and now the connection and everything is successful and now the file is sent to FTP server but with a new time stamp - FD_Timestamp


According to my understanding at first time when there is an issue the file (FD_timestamp1) should not have been sent to FTP server and only the second file should be sent.


But the FTP server has received both the files and they contains same data.

Can you please let me know if there is any solution available to avoid this issue?


Regards,

Rahul Kulkarni

former_member184720
Active Contributor
0 Kudos

What is the write that you have configured in the channel? You should use "use Temporary file" option

r_s_kulkarni11
Participant
0 Kudos

Hello Hareesh,

I am using write mode - Directly..... so is it the permanent solution to avoid this issue?

Regards,

Rahul Kulkarni

former_member184720
Active Contributor
0 Kudos

>>>so is it the permanent solution to avoid this issue?

I can't guarantee that but just to let you know

Possible reason for that error :

  • Your target system may have tried reading/processing that file while PI channel was still writing it.
  • PI channel lost connection while transferring the file

In any of the above cases, If you use temp file option

  • Channel creates a temp file first and then transfer the data into it
  • It renames to the actual filename only when the file content is completely transferred.

You should always have one target file. So may be you can change your configuration and see if that fix your problem permanently.