cancel
Showing results for 
Search instead for 
Did you mean: 

Error in variable Substitution

Former Member
0 Kudos

Hi,

We are trying to use Simple Variable Substitution. Our XI Version is XI 3.0 SP 15.

My Target structure is

Root

Target 0...1

A 0..1

B 0...1

C 0...1

I want to pick the file name from the B.

My Channel has the Following Variable substitution:

payload:root,1,Target,1,B,1

The value for B is set to "test".

I use NFS and Write the target file as myFile%test%.xml.

This gives an error :

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: B: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: B

Any pointers on How to Fix this.

Regards,

Abhishek

C

Accepted Solutions (1)

Accepted Solutions (1)

inigo_sacramento
Participant
0 Kudos

Hi.

I've got this.

MT_TEST

file

root

to get the file or the root from my message type, in variable substitution i make this :

payload : MT_TEST,1,file,1

payload : MT_TEST,1,root,1

So, if you want to get field B from this structure :

Root

Target 0...1

A 0..1

B 0...1

C 0...1

You'll have to put : payload:YOUR_MESSAGE_TYPE,1,Root,1,Target,1,B,1

Bye.

Answers (3)

Answers (3)

former_member206760
Active Contributor
0 Kudos

see that you have used %test% in the channel

but is "test" your variable name ?..it should be your variable name and not content

Giving points is another way to say thanks

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

don't use variable substitution on " XI Version is XI 3.0 SP 15 "

use adapter specific message attributes instead

variable substitution is a thing of a past (before SP14)

Regards,

Michal Krawczyk

former_member181985
Active Contributor
0 Kudos

Check this for the exact usage of Variable Substitution:

[http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm]

Can you post your some sample Target XML.