cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to retreive the FileName in the mapping

Former Member
0 Kudos

Is there any way to retreive the FileName and so that I can use that in my mapping. This is FILE2RFC scenario with NO BPM.

I am using the adapter specific message attributes in the file sender CC.

Thanks,

Ravi

null

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Michals Blog helped...Thanx for your replies.

Former Member
0 Kudos

HI,

As explained above you can have the dynamic file name from mapping, also see the below links

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2

Dynamic configuration payload - https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html

Dynamic folder - in payload

Regards

Chilla

Former Member
0 Kudos

Hi,

Just adding with Satish, do no forget to mark the check box "File Name" under "Adapter Specific Identifers" in sender file communication channel.

Regards,

Jai Shankar

Former Member
0 Kudos

hi jai shankar

" mark the check box "File Name" under "Adapter Specific Identifers" in sender file communication channel."

pls tell me where should i look for this "adapter specific identifiers" in the commn channel??

i can see something like "adapter specific message attributes"....are u talking about that.

Message was edited by:

sudeep

Former Member
0 Kudos

Sudeep,

Yes. When you check the check box "adapter specific message attributes", you will get some properties with check box options. Here you need to check the check box "File Name". This ensures, the file name is added to the SOAP Header as an attribute. You can view the same in SXMB_MONI.

Regards,

Jai Shankar

Former Member
0 Kudos

HI,

Yes

adapter specific message attributes, select this check box and select the File name check box in reciever comm chann.

see the below link also

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

Regards

Chilla

Former Member
0 Kudos

Yes you can retreive it. Create an simple user defined function in the mapping and use the following code.

Imports: com.sap.aii.mapping.api.*;

Parameter: String filename

Paramter: String filename;

filename = fileName + ".DAT";

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

conf.put(key, filename);

return filename;

Or

Just do whatever mentioned in this weblog:

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

---Satish