Skip to Content
avatar image
Former Member

FileName Dynamically Changed

Hi guys,

I've a simple question....something that it's bothering me for a while.

In a scenario where I've got a file receiver, and where I want to build the filename based on the content of a field from my message, isn't it as simple as:

1. Enable Variable substitution on the sender channel

2. Create a variable and place it the reference to the message payload.

3. Define the filename as %variable%.xml

If this is the procedure, than I get the error on the adapter engine:

MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header.

Well, if I mark the FILENAME option on the adapter specific properties from the sender channel, I don't get the upper error. This gets me really confused...Why isn't enough to mark on the receiver channel? But then, if the sender is marked, I get the sender filename on the receiver filename... weird.... :S

Related to the UDF, it's not necessary to create any, since I don't need to access the filename from the original message, right?

Can you guys explain me this awkward situation?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Dec 10, 2007 at 06:25 PM

    >>1. Enable Variable substitution on the sender channel

    you need to enable Variable substitution on receiver side not on sender side.

    you are mixing up Adapter specific message attributes and variable substitution.

    though both server pretty much the same purpose,ASMA can be considered as an advanced form of Variable substitution and it gives you better control over adapter attributes.

    to name your files based upon some value of the payload simply use variable substitution and don't do anything with ASMA.

    1. Enable Variable substitution on the <b>Receiver</b> channel

    2. Create a variable and place it the reference to the message payload.

    3. Define the filename as %variable%.xml

    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi

    Thanx

    Aamir

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Aamir,

      Sorry for my delayed answer...You were right about unmarking the specific attributes.

      Thanks, Problem solved, points rewarded 😊