cancel
Showing results for 
Search instead for 
Did you mean: 

'Variable Substitution' error - Expected numeric element index

Former Member
0 Kudos

Hello everyone!

I'm using the 'variable substitution' property in XI to replace the filename of the output file to a value in the message payload.

Here are the parameters I provided:

File Name Scheme: %filename%.xml

Variable Name: filename

Reference: payload:ORDERS05,1,recordset,1,IDOC,1,E1EDK02,BELNR,1

I'm getting this error in the adapter engine:

Caught exception while initializing variable substitution engine: Cannot parse pseudo-path for variable substitution: 'filename': Expected numeric element index, got 'BELNR': For input string: "BELNR"

Can anyone tell me what this means, and how I can fix this problem?

Thanks in advance!

Glenn

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Glenn,

Is it IDOC to File Scenario? Are u writing the IDOC to file ? Can u try this ORDERS05,1, BELNR,1

raj.

Former Member
0 Kudos

Yup, raj! it's IDOC to file.... I did what you asked but I'm now getting this error:

MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header

any idea what it means?

Kind regards,

Glenn

justin_santhanam
Active Contributor
0 Kudos

Glenn,

Are u doing Dynamic Configuration, I mean are u populating these values using UDF?

raj

justin_santhanam
Active Contributor
0 Kudos

Glenn,

The error seems like you are using Dynamic Confguration. Please note that Dynamic Configuration and Variable Substitution are different approaches to achieve dynamic file name. Hence don't combine them together.

raj.

Former Member
0 Kudos

Hi Raj,

I don't think I've activated dynamic configuration since I never created a UDF to populate the filename scheme. I really don't know why that's the message in the error logs. 😛

I'll give it another try...

Thanks!

Glenn

Answers (3)

Answers (3)

Former Member
0 Kudos

Resolved the issue guys! I just ticked the 'Disable Security Checks'

Thanks for your replies!

Glenn

Jitendra_Jeswan
Contributor
0 Kudos

Try with this Hope this helps:

payload:ORDERS05,1,IDOC,1,E1EDK02,1,BELNR,1

Reward points if found helpful

Former Member
0 Kudos

Try the following

Variable Name: filename

Reference: *payload:ORDERS05,1,recordset,1,IDOC,1,E1EDK02,1,BELNR,1

Former Member
0 Kudos

Hello Guru,

I tried that already but I got the same error.

Any other suggestions?

Warm regards,

Glenn