cancel
Showing results for 
Search instead for 
Did you mean: 

Add Counter to File name when using Tran Protocol as FTP

Former Member
0 Kudos

Hi There,

Was wondering if there was any way to achive the same "Add Counter" functionality used for File names in Reciever file adapter when we are using FTP as the transport protocol, this option is only provided in NFS,

My requirement is ..

Write files using counter on to ftp..

say if three files already exists on the ftp server with names ...fname001, fname002 and fname003

then the next time a file is written it should have a file name fname004 else fname001 if no file exists.

Any help would be greatly appreciated

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

No such standard functionality is available in communication channel...

But you can try customizing ur scenario in one of the following ways...

Case 1: If a field in source data carries the information regarding the sequence.

You can map this value ( Directly .. or using some transformation ) in some temporary field in the target and then use a Variable substitution at the receiver communication channel.

Case 2. If the source file name carries the sequence information. then you can enable the Adapter specific settings in the Sender communication channel , and then get the information of the source file name using the Container object in the mapping. Then assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.

Case 3 : If Case 1 and Case 2 are not applicable ... then you have to use a Ztable to store the sequence number , a function module to fetch the number , and then use a UDF in which you will implement the RFC call logic.Then the same process .... assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.

BR,

Sushil.

SudhirT
Active Contributor
0 Kudos

Hi Sunil,

Check if this is the same case

Thanks!