cancel
Showing results for 
Search instead for 
Did you mean: 

sender file name in mapping

former_member745782
Active Participant
0 Kudos

hello everybody,

i'm working with SAP XI 3.0.

I have a interface file->XI->rfc

I want map the input filename on output field.

It's possible? how can i retrive this data? maybe a UDF in graphical mapping?

thanks

Alex

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

1. Enable the Adapter Specific Message Attributes in Sender File CC and select filename option.

2. Use the below UDF to read the source file name and return it.

String filename    = "";

DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");

filename = conf1.get(key1);
conf1.put(key1,filename);
return filename;

3. Map the UDF return to the target field.

~SaNv...

0 Kudos

Hi, Good day.

My question is around the source file. My requirement entails :-

1. The filename of the source file to be written into a target XML file

2. The target XML along with the source file need to be zipped and FTP'd

3. There is no other mapping requirements from the source file to the target file, except needing the filename.

On point 3 do I need to define the source file in ESR and to then use this in my target file generation? Wished to avoid that as i dont have any need for the source data.

Thanks.

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos
former_member745782
Active Participant
0 Kudos

thanks to both!