cancel
Showing results for 
Search instead for 
Did you mean: 

variable substitution

Former Member
0 Kudos

hi all,

could anyone give m,e some explanation on variable substitution.

regards

Joshi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Variable substitution in short: This allows you to name your target file dynamically with some value in the msg payload.

P.S: Try Adapter Specific Msg attributes instead of Variable sub. It allows you better control.

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

Regards,

Jai Shankar

Former Member
0 Kudos

Jai is right... it is basically a good way of naming your file or directory dynamically at runtime.

You should note though that as standard you can only take values from the target/inbound payload.

You cannot take values from the source

Former Member
0 Kudos

HI,

Variable substitution :

When you specify the target directory and file name schema, you now have the option of setting variables and defining them in a table. The variables are replaced by elements from the XML structure at runtime.

Contrary to the description in the documentation, you cannot yet replace with attributes from the XI message header. Do not use the prefix during variable substitution

http://help.sap.com/saphelp_nw2004s/helpdata/en/8e/464442c1a1c253e10000000a1550b0/content.htm

Also see the below links to use the dynamic variable substitution

/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system

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

/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

Regards

Chilla

Former Member
0 Kudos

Hi! Nice info there!

But i'm wondering where i can find something about variables substitution using payload's attributes instead of elements.

Thanks in advance

Former Member
0 Kudos

Hi,

Could anyone tell me whether it is possible to specify some condition while using the values in the message payload for variable substitution?

Eg: var1 = Payload:<MT_name>,1,<field_name>,1

If Node 1 exists; then pick the value of <field1> from Node1; else pick <field1> from Node2

I just want to pick a file from a filesystem and write it to a filesystem. While writing I need the Filename to be of specific format. There is no message mapping in between; so I dont want to use a MM just for this condition.

Experts, Please help.....

Thank you

Regards,

Smitha

former_member335553
Active Contributor
0 Kudos

Hi

Refer this weblog for the variable substituion method.

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

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