cancel
Showing results for 
Search instead for 
Did you mean: 

Rename the file in Reciever side

former_member182412
Active Contributor
0 Kudos

Hi Experts,

I am doing file to file interface, i have done the interface without mapping, i have done only configuration with dummy interfaces, but the problem is i need to change the file name in reciever side.

With mapping i can able to rename the file with UDF by help of dynamic configuration, but the file structure is always not same in sender side, the sender side they will place different types of files with different structures.

so can anyone suggest me can we rename the file without mapping???

if we want do the mapping how can we do it for different types of structures (Different files)???

Your answer will be rewarded.

Praveen.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

One option is to generate the same file name from sender to receiver just by enabling ASMA File name property on both sender and receiver adapter for this you dont need to have mapping...

HTH

Rajesh

former_member182412
Active Contributor
0 Kudos

Hi

I want read the file name from source and rename it and send it to reciever, which means if the source file name is 311MasterData.csv i need to take out the first 3 letters and send the file name as MasterData.csv, will it this possible???

Edited by: Praveen Kumar on Aug 11, 2010 12:19 PM

former_member200962
Active Contributor
0 Kudos
will it this possible???

Yes it is possible.

1) Enable ASMA in Sender Channel for File Name

2) In your Message Mapping have a UDF which will be for firstly reading the Source FileName (311MasterData) and then for putting the File Name as MasterData....UDF easily available on SDN.....once you read the source File Name perform Substring function (in UDF itself)

3) Enable ASMA for File Name in receiver channel.

Regards,

Abhishek.

Former Member
0 Kudos

>

> Hi

>

> I want read the file name from source and rename it and send it to reciever, which means if the source file name is 311MasterData.csv i need to take out the first 3 letters and send the file name as MasterData.csv, will it this possible???

>

> Edited by: Praveen Kumar on Aug 11, 2010 12:19 PM

Go through this thread

from this thread use the UDF code and just change the substring part as per your need..

Former Member
0 Kudos

Hi Praveen

Without Mapping is not posible at least you make a module.

Active the ASMA values for sender side , on receiver adapter with the module take out the first 3 letters from source file name.

former_member182412
Active Contributor
0 Kudos

Hi

I did exactly what you mentioned in this thread, but sender side they will place 3 different filenames with 3 different structures, so i achieved for one file with content converion, so i need to do 3 different mappings and 3 communication channels right?? is there any way to achive this writing adapter module????

Answers (3)

Answers (3)

prateek
Active Contributor
0 Kudos

Try using DynamicConfigurationBean as shown

/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean

Regards,

Prateek

Former Member
0 Kudos

Hi Praveen,

In the receiver adapter, you can specify the name for the file.

Else you can use the ASMA properties.

Thanks,

former_member200962
Active Contributor
0 Kudos

Setting the ASMA parameters using Adapter Module can be an option....remember seeing a similar discussion on SDN.