cancel
Showing results for 
Search instead for 
Did you mean: 

file adapter

Former Member
0 Kudos

Hi,

Why variable substitution is used?

pls explain with example

Regards,

somenath

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

somenath,

Variable substitution is used when u have to access the payload for some need like, if you have the filename or dirname in the message itself.

to use,

enable the variable substitution, create a variable and specify the XPATH for the particular field then use it in filename/dir as said by others.

regards,

Yuva

Former Member
0 Kudos

Hi somenath,

<b>Why variable substitution is used?</b>

its like alias....whenever u want some variable in source structure to be changed into some other variable u can use this option.u can also do that using adapter specific attribute...

Regrads

biplab

Former Member
0 Kudos

Hi,

Variable substitution allows you to name your target file dynamically with some value in the message payload.

You can also use Adapter Specific Message 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

Pravesh

Former Member
Former Member
0 Kudos

Hi Somenath

Variable substitution is used to get some parameters availables in comm channel comming from desing.

For example, you can use different directory or filenames using this variables.

In a target directory :/%variable%

Or File name scheme : file_%variable%.txt

Kind regards,

Carme

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

***Reward points if helpfull***