cancel
Showing results for 
Search instead for 
Did you mean: 

Error with variable substitution..

former_member203627
Participant
0 Kudos

Hi

I am getting following error message for variable substitution

*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: date_stamp: 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: date_stamp

<?xml version="1.0" encoding="UTF-8" ?>

- <I813_EModMCS_IB_MT>

- <Records>

<ModMod>111</ModMod>

<DesModdcr>222</DesModdcr>

- <Date_Stamp>

<Date_Stamp>20080338</Date_Stamp>

</Date_Stamp>

</Records>

</I813_EModMCS_IB_MT>

date_stamp payload:I813_EModMCS_IB_MT,1,Records,2,Date_Stamp,3,Date_Stamp,1

Would appriciate if you can correct the variable substitution...

Regards

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member190389
Active Contributor
0 Kudos

To reference the element that is in bold in the example, the following expression is used: payload:root,1,e1,1,e2,2

The parser searches for the first occurrence of the root element at the first level. It then searches for the first occurrence of e1 at the second level and for the second occurrence of e2 at the third level. The content of the last element (u201CExample Valueu201D) is set as the value for a specified variable.

<?xml version="1.0" encoding="UTF-8" ?>

<root>

<dummy>

<e1>

<e2>Data_1</e2>

<f/>

<g attr="abc">text</g>

<e2>Data_2</e2>

</e1>

</dummy>

<e1>

<e2>illegal/value</e2>

<f/>

<g attr="abc">text</g>

<e2 attr="fghij">Example Value</e2>

</e1>

</root>

Edited by: Progirl Progirl on Jul 17, 2008 8:04 AM

Former Member
0 Kudos

Hi,

What I had observed earlier is that the Variable Name used in the adapter should not contain upper case letters. I faced similar errors when variable name had upper case letters.

Try having all variable names in lower case. i.e. using date_stamp as variable name should resolve the issue.

Hope this helps.

Regards,

Riyaz

Former Member
0 Kudos

Hi,

Chech the field name in variable substituion.

<Date_Stamp> and you use date_stamp. I beleive it is very much case sensitive.

Thanks

Farooq.

former_member190389
Active Contributor
0 Kudos

Use Date_Stamp with 'D' and 'S' capital

dont write date_stamp before payload ..remove that in variable subs

Edited by: Progirl Progirl on Jul 17, 2008 7:46 AM

former_member203627
Participant
0 Kudos

Offcourse i am not wrtting Date_stamp infront of payload it is a name and from payload it is reference.

Can you please tell me wht will be the reference if i hv done it wrong.

Regards