cancel
Showing results for 
Search instead for 
Did you mean: 

Error in variable substitutionq

Former Member
0 Kudos

Hi guys. I have an IDoc to File Escanrio.

I have to create n File so I have message target in message mapping 1...ounbounded.

The estructure is like this:

Messages (1..1)

-->Message1(1..1)

-


>MDetalle_AutoFactura(1..ounbounded)

-


>PARAMETROS(1..1)

-


>Nombre_Fichero(1..1)

This is my payload:

<ns1:MDetalle_AutoFactura>

u2212

<PARAMETROS>

<Nombre_Fichero>0000301012prueba.dat</Nombre_Fichero>

</PARAMETROS>

u2212

<INICIO_FICHERO>

<Delimitador/>

</INICIO_FICHERO>

u2212

<DETALLE_AUTOFACTURA>

And I using variable substitution in this way:

var : payload:MDetalle_AutoFactura,1,PARAMETROS,1,Nombre_Fichero,1

%var%

Im gettin this error in adapter:

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Caught SAXException while parsing XML payload: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 43, 4f, 42(:main:, row:2, col:112): com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Caught SAXException while parsing XML payload: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 43, 4f, 42(:main:, row:2, col:112)

What's wrong? Is possible to use varible substitution in enchanched mappings?

Edited by: Christian Abad Chico on Apr 26, 2010 10:43 AM

Edited by: Christian Abad Chico on Apr 26, 2010 11:14 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

>>What's wrong? Is possible to use varible substitution in enchanched mappings?

You need to include Messages and Message1 in your Variable substitution parameter.

So ctry changing your variable sub parameter to

var : payload:Messages,1,Message1,1,MDetalle_AutoFactura,1,PARAMETROS,1,Nombre_Fichero,1

Why dont you use ASMA which gives a lot of flexiblity compared to Variable sub?

Regards

Jai

former_member200962
Active Contributor
0 Kudos
Why dont you use ASMA which gives a lot of flexiblity compared to Variable sub?

its a multi-mapping scenario 1:n and hence dynamic configuration wont work....we have to go for variable substitution.

Former Member
0 Kudos

Hi guys

I totally agree. In multimapping scenarios 1..N Dynamic Configuration doesn´t work.

I had an stupid error in content conversion....

Thanks everybody!!!

Former Member
0 Kudos

Hi,

Ur configuration fr ur target payload is absolutely correct.

Now can u please check what exactly the payload u r sending to the target..

RWB>Message Monitoring>Adapter Engine Database

Get the target payload..

Check if the XML is valid or not,,,, and the structure is exactly vt u mentioned here..

If possible put the target payload here..

Babu

Former Member
0 Kudos

This is the target payload:

<ns1:MDetalle_AutoFactura>

u2212

<PARAMETROS>

<Nombre_Fichero>0000301012prueba.dat</Nombre_Fichero>

</PARAMETROS>

u2212

<INICIO_FICHERO>

<Delimitador/>

</INICIO_FICHERO>

u2212

<DETALLE_AUTOFACTURA>

u2212

<CABECERA_1>

u2212

<Espacio_1>

</Espacio_1>

<Nombre_Empresa>COBEGA S.A.</Nombre_Empresa>

<Espacio_2> </Espacio_2>

<Fecha>01/02/2010</Fecha>

</CABECERA_1>

u2212

<CABECERA_2>

<Espacio_1> </Espacio_1>

<Titulo_1>LISTADO DETALLE AUTOFACTURA SIN IMPUESTO</Titulo_1>

<Espacio_2> </Espacio_2>

<Nro_Doc_Referencia>ALCF20100002 </Nro_Doc_Referencia>

<Espacio_3> </Espacio_3>

<Titulo_2>PERIODO</Titulo_2>

<Espacio_4> </Espacio_4>

<Des_AutoFactura>01/02/2010 - 01/02/2010</Des_AutoFactura>

</CABECERA_2>

Edited by: Christian Abad Chico on Apr 26, 2010 11:32 AM

Former Member
0 Kudos

Hi,

I hope that u have copied as it is from target and pasted it here... u juct removed a part of it at the end...

Please make sure that the whole payload is valid...(i mean copy the whole payload and paste in notepad save as .xml and open it now.. it shld open without any errors.)

Please make sure that u r nt giving any extra space or anything jusnk character in variable substitution..

Can u please change it as..

filename : payload:MDetalle_AutoFactura,1,PARAMETROS,1,Nombre_Fichero,1

in parameters %filename%

Babu

Edited by: hlbabu123 on Apr 26, 2010 3:08 PM