cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Variable Substitution (Receiver File Adapter)

Former Member
0 Kudos

Hi,

I am facing problem in the variable substitution in receiver file Communication channel. My expected file name is A_C.xml; but my actual output filename obtained is C_C.xml for the below example target file:

<ProductionSch>

<CustomField>

<value>

<ValueString>A</ValueString>

</value>

</CustomField>

<CustomField>

<value>

<ValueString>B</ValueString>

</value>

</CustomField>

<CustomField>

<value>

<ValueString>C</ValueString>

</value>

</CustomField>

</ProductionSch>

I have used the following parameters in the file communication channel:

File Name Schema: %var1%_%var2%.xml

Variable Substitution:

Variable Name Reference

var1 payload:ProductionSch,1,CustomField,1,value,1,ValueString,1

var2 payload:ProductionSch,1,CustomField,3,value,1,ValueString,1

When I try using either of the one in the file name schema and the corresponding variable reference in the variable substitution I am getting the correct output filename as A.xml or C.xml. However, when I give either of the one variable in file name schema and both the variable references in the variable substitution I am getting only C.xml as per the example file.

Can any of you suggest me where I am wrong or any other suggestion which I can try?

I cannot use dynamic configuration as I am using multimapping. Multiple file names cannot be generated using dynamic configuration.

Regards

Sowmya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Sowmya,

refer you to this [Note 1581988 - Variable Substitution option does not work properly|https://service.sap.com/sap/support/notes/1581988] (2011.05), as SAP says " when there is more than one variable using the same name as the last element, File Adapter does not select the correct one.... ".

regards.

Mickael

Former Member
0 Kudos

Thanks Mickael,

I will try some other work around for this scenario.

Regards

Sowmya

Former Member
0 Kudos

HI Sowmya,

read the oss note. solution is inside: it's a sap bug with just a correction patch to apply (not a SP upgrade).

Mickael