Skip to Content
0
Feb 28, 2006 at 12:04 PM

Problem: The same filename from a sender to a receiver file adapter - SP14

40 Views

Blog : /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

My Problem:

The thing works for me and i am able to get my input files name as my output file name. But one thing i noticed is that in my target message, the field where i have mapped the code it always returns the value "null" but finally when the file is created i get the required result.

My input file name is input.txt and i get the same name in my output file too.

In sxmb_moni if i check DynamicConfiguration link i see the following

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Response

-->

- http://sap.com/xi/XI/Message/30">

http://sap.com/xi/XI/System/File" name="SourceFTPHost">10.25.116.98:21

http://sap.com/xi/XI/System/File" name="Directory">/input/test

http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20060228T112200Z

http://sap.com/xi/XI/System/File" name="FileType">bin

http://sap.com/xi/XI/System/File" name="FileName">input.txt

http://sap.com/xi/XI/System/File" name="SourceFileSize">770

</sap:DynamicConfiguration>

But when i check my mapped field i see

....

....

<field3>BodyC</field3>

<keyfield>02</keyfield>

<field5>BodyE</field5>

<field6>BodyF</field6>

</Body>

- <Trailer>

<keyfield>03</keyfield>

<b><field2>null</field2> -> Null value instead of input.txt</b>

</Trailer>

</ns0:MT_Putfile>

The code i have used to map the field2 of the trailer is the following ....

<i>DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileType");

String valueOld = conf.get(key);

return valueOld; </i>

Any clues ?