cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Substitution does not work

Former Member
0 Kudos

I am trying to use Variable Substitution to dynamically generate the filename but it doesnot work.

Below is the info on my communication channel

Adapter type: File

Transport protocol: NFS

Target directory: /usr/test

File Name Schema: %var1%.txt

Enabled the Variable Substitution:

var1 payload:MT_MLS_IN,1,line,1

Here is my payload:

<nr1:MT_MLS_IN xmlns:nr1="http://mls-clientproxies">

<line>testing</line>

</nr1:MT_MLS_IN>

Am I missing something? Why isnt it writing the file to the filesystem?

Any help is very much appreciated.

Thank you

MLS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

Enabled the Variable Substitution:

var1 payload:MT_MLS_IN,1,line,1

Here is my payload:

<nr1:MT_MLS_IN xmlns:nr1="http://mls-clientproxies">

<line>testing</line>

</nr1:MT_MLS_IN>

is MT_MLS_IN and line at same level if so

then define payload:line,1 only

if they are in hierarchy then you need to do the above.

Thanks

Gaurav

Answers (3)

Answers (3)

Former Member
0 Kudos

I fixed it.

It was a very silly mistake from my side. In the variable substitution (payload:MT_MLS_IN,1,line,1) I was using the sender message type. When I changed it to the receiver message type (payload:MT_MLS_OUT,1,line,1) it worked like a charm.

Bhargava/Dharamveer...thanks for taking time to help me.

--MLS

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Use this thread

Former Member
0 Kudos

My Message type structure is

MT_MLS_IN 1..1

---line 1...unbounded

So line is a subelement of MT_MLS_IN

Any ideas why this isn't working?

I am on PI 7.0 SP14.

Former Member
0 Kudos

Hi

Doesn't look like somthing is wrong

Try removing the _ (underscore) check SAP Note 850694

and Disable Security Checks..

Thanks

Gaurav