Exception during Variable Substitution

Hi Experts,
I am getting the following error in RWB>Messages Monitoring->Adapter Engine
It is in Production,
Many messages are successful but some messages are failed with this Error
The following is the Error log
Attempt to process file failed with
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(:main:,row:,col:75)"
main:,row:,75 will be changing for every failure message
can any body give me the perfect solution please
Regards
Sankar

Hi,
I have checked the XML payload also there is no problem.
if it has a problem, after rescending also it should not be processed
but it is successfully processed. like this 40% messages are failing every day
please find the different errors carefully and give me the Solution.
Getting different Errors for different messages like below
1.com.sap.engine.lib.xml.parser.parserException:XMLParser:N o data allowed here:(hex) 76,65,72   (:main:,row:1,col:9)
for the same message when the sys tried to resend
parserException:start-tag 'EIT' is different from the end-tag'E1EDP03(:main:,row:1,col:16)
2.com.sap.engine.lib.xml.parser.parserException:XMLParser:Declaration not allowed here:(:main:,row:1,col:6)
for the same message when the sys tried to resend
(:main:,row:1,col:89)
3.com.sap.engine.lib.xml.parser.parserException:XMLParser:Name Expected:0x0.(:main:,row:1,col:0)
for the same message when the sys tried to resend
:No data allowed:(hex)0(:main:,row:1,col:1)
4.com.sap.engine.lib.xml.parser.parserException:XMLParser:start-tag= 'EDI_DC40' is different from the end-tag= 'DOCNUM'(:main:,row:2,col:125)
for the same message when the sys tried to resend
parserException:</expected(:main:,row:1,col:0)
5.com.sap.engine.lib.xml.parser.parserException:XMLParser:</expected(:main:,row:2,col:1788)
when ever the sys tried to rescend the following errors are getting
XMLParser:</expected(:main:,row:2,col:17)
XMLParser:No data allowed here(:main:,row:2,col:96)
XMLParser:No data allowed here(hex)76, 65, 72(:main:,row:1,col:9)
XMLParser:Document is not well-formed:start-tag 'EDI_DC40' is different from end-tag 'DOCREL'(:main:,row:1,col:9)
For all these errors if we resend, the messages are processed successfully
I have checked SMQ1 and even Javaengine also re-started but same problem.
can any body give me the solution
Regards
Sankar

Similar Messages

  • Error during Variable Substitution

    Hi Experts,
    Pls go through the errors
    I am getting the following error in RWB>Messages Monitoring->Adapter Engine
    It is in Production,
    Many messages are successful but 40% messages are failed with this Error
    The following is the Error log
    Attempt to process file failed with
    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(:main:,row:,col:75)"
    main:,row:,75 will be changing for every failure message
    I have checked the XML payload also there is no problem.
    if it has a problem, after rescending also it should not be processed
    please find the different errors carefully and give me the Solution.
    Getting different Errors for different messages like below
    1.com.sap.engine.lib.xml.parser.parserException:XMLParser:N o data allowed here:(hex) 76,65,72 (:main:,row:1,col:9)
    for the same message when the sys tried to resend
    parserException:start-tag 'EIT' is different from the end-tag'E1EDP03(:main:,row:1,col:16)
    2.com.sap.engine.lib.xml.parser.parserException:XMLParser:Declaration not allowed here:(:main:,row:1,col:6)
    for the same message when the sys tried to resend
    (:main:,row:1,col:89)
    3.com.sap.engine.lib.xml.parser.parserException:XMLParser:Name Expected:0x0.(:main:,row:1,col:0)
    for the same message when the sys tried to resend
    :No data allowed:(hex)0(:main:,row:1,col:1)
    4.com.sap.engine.lib.xml.parser.parserException:XMLParser:start-tag= 'EDI_DC40' is different from the end-tag= 'DOCNUM'(:main:,row:2,col:125)
    for the same message when the sys tried to resend
    parserException:</expected(:main:,row:1,col:0)
    5.com.sap.engine.lib.xml.parser.parserException:XMLParser:</expected(:main:,row:2,col:1788)
    when ever the sys tried to rescend the following errors are getting
    XMLParser:</expected(:main:,row:2,col:17)
    XMLParser:No data allowed here(:main:,row:2,col:96)
    XMLParser:No data allowed here(hex)76, 65, 72(:main:,row:1,col:9)
    XMLParser:Document is not well-formed:start-tag 'EDI_DC40' is different from end-tag 'DOCREL'(:main:,row:1,col:9)
    For all these errors if we resend, the messages are processed successfully, if i select more messages then it won't be processed.
    I have checked SMQ1 and even Javaengine also re-started but same problem.
    I have checked payload message with above errors but there is no problem.
    can any body give me the solution
    Regards
    Rajan

    Avoid posting duplicate thread,
    Exception during Variable Substitution
    Regards

  • How to acces the filename from Message Header during variable substitution

    Hi,
    We need to access the attribute filename from Message Header during Variable Substitution.We are able to access the following attributes of Message Header
    sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
    message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
    message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
    For example, if we want to specify the interface name from the message header in the target directory or in the file name scheme, we enter message:interface_name as the reference.
    In the same way i need to access the filename which we get in the Message Header(which we get in the Message Header when we check the Adaptor specific message properties and filename in sender CC).Any suggestions on the same
    Thanks and Regards,
    Bhargav
    Message was edited by:
            bhargav gundabolu
    Message was edited by:
            bhargav gundabolu

    Hi Bhargav,
    Use this UDF to retreive the file name from the Dynamic Configuration Payload in the mapping.
    getFileName(UDF) -
    > Filename(node in the target structure).
    public String getFileName(Container container)
       //write your code here
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Create a node in the target structure top hold the filename returned by the UDF.
    Now your payload will have the filename along with the actual data.
    U can use the variable substution now as u use for the other data in the payload since the filename is now a part of your payload.
    Regards
    San

  • Error during variable substitution: idoc to file

    Hi Friends,
    I have a got a issue which is Idoc to file scenario.
    Iam getting the following error.
    Attempt to process file failed with 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_processing
    Could you please tell me waht could be the reason for the same?
    as per my analysis, I observed that the field date_processing has been declared

    Hi Sandeep ,
    If the variable ’date_processing’ refers to an element in XML schema, Please check  if you have added  the prefix payload: to the information under Reference.
    The reference then comprises a pseudo path description in the form of a comma-separated list with the schema namea,na,nameb,nb,....
                Where namea,nameb,... corresponds to the element name and na,nb,... corresponds to the occurrence of the element name at the respective level in the document.
    The description begins at the root of the document and ends at the respective element.
    Also please check
    Re: Variable substitution
    Regards,
    Jyoti

  • Security Violation during PATH Variable Substitution

    Hi -
    I' m trying to write a file with the receiver file adapter by the variable substitution feature from SP12 on.
    Whereas the %filename% variable works fine, I get for the %path% variable an exception in the adapter engine, whenever I'm trying either
    - to use an absolute path like "/tmp" or
    - composed pathnames like "tmp/test" (that are based on $XIHOME/j2ee/cluster/server0)
    Non-composed pathnames like $XIHOME/j2ee/cluster/server0/tmp by setting %path% to "tmp" work also.
    Any clue?
    I'm on AIX on SP12.
    Here is the exception:
    java.text.ParseException: Security violation encountered during variable substitution: Content of variable path is not safe
    Thanks.
    Stefan

    Hi Stefan,
    did you check the flag 'Disable Security Checks' in the communication channel?
    Regards
    Stefan

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts,
    We are on PI 7.0, SP14.
    We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when certain condition does not exists in source message so in the message payload filename element will not exists in such condition and file will be empty and we should not create file.
    Parameter in the communication channel for Handling empty message is "Ignore".
    Does anyone knows how to handle this scneario. We don't want to default any file name in the message mapping if source file name element does not exists.
    We are following getting error in the Adapter engine.
    MP: Exception caught with 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: file: 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: file
    Thanks
    MP

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • Variable Substitution File Receiver Adapter

    Hi,
    I am in the process of implementing a scenario involving the conversion of a .jpg file to .bmp. In my scenario, I'd like to the .bmp file name to be dynamically controlled; therefore, I have used the Variable Substitution option in the File Receiver Adapter.
    In both the File Sender & Receiver comm. channels, I have ticked 'Adapter Specific Messsage Attributes' check-box and selected the 'File Name' option.
    The File Receiver comm. channel also has the following:
    File Name Scheme*: %File_Name%.bmp
    Variable Name: File_Name
    Reference: message:FileName
    Having done the above, I am getting the following error message in Comm. Channel Monitoring:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'File_Name'.: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'File_Name'.
    Would really appreciate your assistance on this.
    Regards,
    Reuben.
    PS: The Sender File Adapter has the

    Hi,
    The full error message is s follows:
    Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:294) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:294) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._Test_Conversion_.setfilename$(_Test_Conversion_.java:61) ... 24 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b]
    11:15:02 End of test
    Reuben.

  • Error file adapter with variable substitution in PI 7.31

    Hello,
    I'm trying to create a file with a dynamic name, based on the payload of the message.
    We're trying to create a filename with the bold content in the name %batchId%.xml. The subtitution we use is
    payload:batch,1,batch-info,1,id,1
    <ns1:batch xmlns:ns1="http://www.atosworldline.com/archivingPortal/receivers">
    - <ns1:batch-info id="test" isTest="true"> 
    <ns2:sender-identifier xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">String 2</ns2:sender-identifier>  
    <ns2:nb-elements xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">3</ns2:nb-elements>  
    <ns2:batch-integration-mode xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">String 4</ns2:batch-integration-mode>  
    <ns2:creation-datetime xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">1999-05-31T13:20:00Z</ns2:creation-datetime>  
    </ns1:batch-info>
    - <ns1:receivers> 
    - <ns1:receiver> 
    <ns1:id>String 5</ns1:id>  
    <ns1:action>String 6</ns1:action>  
    <ns1:contact-details />  
    - <ns1:tokenSets> 
    - <ns1:tokenSet startDate="1999-05-31T13:20:00Z" endDate="1999-05-31T13:20:00Z"> 
    - <ns1:token> 
    <ns1:tokenvalue>String 7</ns1:tokenvalue>  
    </ns1:token>
    - <ns1:token> 
    <ns1:tokenvalue>String 9</ns1:tokenvalue>  
    </ns1:token>
    </ns1:tokenSet>
    - <ns1:tokenSet startDate="1999-05-31T13:20:00Z" endDate="1999-05-31T13:20:00Z"> 
    - <ns1:token> 
    <ns1:tokenvalue>String 11</ns1:tokenvalue>  
    </ns1:token>
    - <ns1:token> 
    <ns1:tokenvalue>String 13</ns1:tokenvalue>  
    </ns1:token>
    </ns1:tokenSet>
    </ns1:tokenSets>
    </ns1:receiver>
    </ns1:receivers>
    </ns1:batch>
    The following error is shown, when processing the message through the receiving fileadapter.
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: 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: batchId
    kind regards,
    Pieter

    AFAIK - Variable substitution does not support attributes. It only support the elements. (- <ns1:batch-info id="test" isTest="true">)
    May be you can go with dynamic configuration instead of variable substitution.

  • SFTP Variable substitution error.

    Hi,
    my scenario is file to sftp fcc.
    I have successfully configured the modules and able to put the ouput fcc file inthe target sftp directory,
    But when implementing variable substitution i am facing issues getting error as
    Error: com.aedaptive.sftp.adapter.exception.VariableSubstitutionException : Error during variable substitution: the following variable was not found in the message payload: var1
    This is the input file:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:M_SFTP_FCC xmlns:ns0="http://xyz.com/pisandbox/testudf">
       <Detailed>
          <MFG_Name>XYZ</MFG_Name>
          <Model_Number>1234</Model_Number>
       </Detailed>
       <Header>
          <Order_No>345</Order_No>
          <Date_of_File>12122012</Date_of_File>
       </Header>
    </ns0:M_SFTP_FCC>
    Variable substitution decleration was:
    var1     payload:M_SFTP_FCC,1,Detailed,1,Model_Number,1
    i need to use the Model_NUmber.
    getting followng error in Comm channel monitoring --> Audit Log
    Unable to write message into file. com.aedaptive.sftp.adapter.exception.VariableSubstitutionException: Error during variable substitution: the following variable was not found in the message payload: var1
    Unable to find where the error is when i configured through file adapter its working fine.
    Thanks,
    --Kishore.

    HI,
    your variable declartion is perfect, can you please check the below points,
       1.To specify variables in the target directory and file name scheme, they must be enclosed by % characters.
       2.variable name is case sensitive, can you give only lower case instead of giving upper case.
       3. Model_Number is giving same as per the message type.
    Please look below link.
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
    An interesting usage of Variable Substitution in XI
    regards,
    ganesh.
    Edited by: ganesh.nijampudi on Dec 7, 2011 4:51 AM

  • Problem with variable substitution.

    Hello,
    I asked this before but now I want to change the question focus.
    I have scenario from IDOC to XML file.
    The scenario is digital invoice for our company in Mexico and I end this scenario with java mapping that I import from SAP marketplace.
    Now I have request to add to the XML file name the content of the field "<ODN_NUMBER>" from the XML data.
    I try to use with variables substitution.
    My payload is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ZINVOIC02>
    - <IDOC BEGIN="1">
    - <EDI_DC40 SEGMENT="1">
    <TABNAM>EDI_DC40</TABNAM>
    <MANDT>400</MANDT>
    <DOCNUM>0000000006599015</DOCNUM>
    <DOCREL>700</DOCREL>
    <STATUS>30</STATUS>
    <DIRECT>1</DIRECT>
    <OUTMOD>2</OUTMOD>
    <IDOCTYP>INVOIC02</IDOCTYP>
    <CIMTYP>ZINVOIC02</CIMTYP>
    <MESTYP>INVOIC</MESTYP>
    <STDMES>ZEDI</STDMES>
    <SNDPOR>SAPDEV</SNDPOR>
    <SNDPRT>LS</SNDPRT>
    <SNDPRN>DEV400ECC</SNDPRN>
    <RCVPOR>SAPDEV</RCVPOR>
    <RCVPRT>LS</RCVPRT>
    <RCVPFC>LS</RCVPFC>
    <RCVPRN>MX_INV</RCVPRN>
    <CREDAT>20100118</CREDAT>
    <CRETIM>075931</CRETIM>
    <SERIAL>20100118075931</SERIAL>
    </EDI_DC40>
    - <E1EDK01 SEGMENT="1">
    <CURCY>USD</CURCY>
    <HWAER>MXN</HWAER>
    <WKURS>10.55530</WKURS>
    <ZTERM>0090</ZTERM>
    <KUNDEUINR>ACH971209KRA</KUNDEUINR>
    <BSART>INVO</BSART>
    <BELNR>0100017295</BELNR>
    <BRGEW>0.045</BRGEW>
    <GEWEI>KGM</GEWEI>
    <FKART_RL>LR</FKART_RL>
    <RECIPNT_NO>0000012977</RECIPNT_NO>
    <FKTYP>L</FKTYP>
    - <Z1EDK01 SEGMENT="1">
    <XML_VERSION>2.0</XML_VERSION>
    <ODN_PREFIX>A</ODN_PREFIX>
    <ODN_NUMBER>1883</ODN_NUMBER>
    <DATE_TIME>2009-11-01T17:05:10</DATE_TIME>
    <DOC_SUB_TOTAL>4.22</DOC_SUB_TOTAL>
    <DOC_DISCOUNT>3.00</DOC_DISCOUNT>
    <DOC_TOTAL>1.40</DOC_TOTAL>
    </Z1EDK01>
    And the xml that I create is:
      <?xml version="1.0" encoding="utf-8" ?>
    - <Comprobante xmlns="http://www.sat.gob.mx/cfd/2" version="2.0" serie="A" folio="1883" fecha="2009-11-01T17:05:10" sello="NxZCWU8hMJMiEc2fSZafpS81Z9rUScbBotvJ8lcW76GGpmcD2lFyAV7DlNQKecYMnQJnwMVoHfGjzhpFJrjLuRcyqU3nOnH1mE1JMxY/MjLkal0Ybo2aRKCorQxx+F/Vy5ucvyeDDFAt2gx0PeHJhFS3tJ6ssc6nryz3iUr8c=" noAprobacion="49806" anoAprobacion="2009" formaDePago="Pago en una sola exhibiciףn" noCertificado="00001000000100891274" condicionesDePago="90 DAYS FROM BILL OF LADING" subTotal="4.22" descuento="3.00" motivoDescuento="Customer DiscountCustomer Discount" total="1.40" tipoDeComprobante="ingreso">
    - <Emisor rfc="NMS940324RY6" nombre="Netafim Mexico S.A. de C.">
      <DomicilioFiscal calle="Leibnitz" noExterior="20" noInterior="901" colonia="Anzures" localidad="Mexico city" municipio="Miguel Hidalgo" estado="Distrito Federal" pais="Mexico" codigoPostal="11590" />
      </Emisor>
    - <Receptor rfc="ACH971209KRA" nombre="AGRICOLA 5 HERMANOS SA DE CV">
      <Domicilio calle="JUAN DE LA BARRERA NO 1249 NORTE" localidad="COL. CHAPULTEPEC" municipio="CULIACAN" estado="Sinaloa" pais="Mexico" codigoPostal="80040" />
      </Receptor>
    -     <Conceptos>
    I try to use with this variable:
    payload:ZINVOIC02,1,IDOC,1,E1EDK01,1,Z1EDK01,1,ODN_NUMBER,1
    I received in RWB the error:
    Attempt to process file failed with 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: var_filename
    Thank you in advance for your help
    Elad

    But my target is looks very strange:
      <?xml version="1.0" encoding="utf-8" ?>
    - <Comprobante xmlns="http://www.sat.gob.mx/cfd/2" version="2.0" serie="A" folio="1883" fecha="2009-11-01T17:05:10" sello="NxZCWU8hMJMiEc2fSZafpS81Z9rUScbBotvJ8lcW76GGpmcD2lFyAV7DlNQKecYMnQJnwMVoHfGjzhpFJrjLuRcyqU3nOnH1mE1JMxY/MjLkal0Ybo2aRKCorQxx+F/Vy5ucvyeDDFAt2gx0PeHJhFS3tJ6ssc6nryz3iUr8c=" noAprobacion="49806" anoAprobacion="2009" formaDePago="Pago en una sola exhibiciףn" noCertificado="00001000000100891274" condicionesDePago="90 DAYS FROM BILL OF LADING" subTotal="4.22" descuento="3.00" motivoDescuento="Customer DiscountCustomer Discount" total="1.40" tipoDeComprobante="ingreso">
    - <Emisor rfc="NMS940324RY6" nombre="Netafim Mexico S.A. de C.">
      <DomicilioFiscal calle="Leibnitz" noExterior="20" noInterior="901" colonia="Anzures" localidad="Mexico city" municipio="Miguel Hidalgo" estado="Distrito Federal" pais="Mexico" codigoPostal="11590" />
      </Emisor>
    - <Receptor rfc="ACH971209KRA" nombre="AGRICOLA 5 HERMANOS SA DE CV">
      <Domicilio calle="JUAN DE LA BARRERA NO 1249 NORTE" localidad="COL. CHAPULTEPEC" municipio="CULIACAN" estado="Sinaloa" pais="Mexico" codigoPostal="80040" />
      </Receptor>
    I need to add folio field
    Elad

  • Error in Variable Substitution

    Dear All,
    Result Payload:
    <ns1:MT_Level1 xmlns:ns1="http://test.com">
    <Header>
      <Separator>,</Separator>
    </Header>
      <Detail>
      <FileNumber>30</FileNumber>
      <LinkToNextLevel />
      <Expansion1>0</Expansion1>
      <Expansion2>0</Expansion2>
      <Expansion3>0</Expansion3>
      <Expansion4>0</Expansion4>
      </Detail>
    <Detail>
      <FileNumber>30</FileNumber>
      <LinkToNextLevel />
      <Expansion1>0</Expansion1>
      <Expansion2>0</Expansion2>
      <Expansion3>0</Expansion3>
      <Expansion4>0</Expansion4>
      </Detail>
      <FileNode>
      <FileName>test.txt</FileName>
      </FileNode>
      </ns1:MT_Level1>
    I want to use "File Name" in the "File Node" node for my variable substitution.
    In the configuration:
    File Name Scheme = %filename%
    Variable = filename
    reference = payload: Messages, 1, Message, 1, MT_Level1, 1, FileNode, 1, FileName, 1
    Note: I'm using multimapping (1 to N).
    File Name path is /ns0:Messages/ns0:Message2/ns1:MT_Level1/FileNode/FileName ( from right click in the file name --> copy path).
    I got following error:
    "Attempt to process file failed with 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: filename"
    Please advise!
    Best Regards,
    Victor.

    Dear All,
    My problem is solved!
    The issue is because I don't put the interface mappings sequence as the same sequence as the message mappings sequence. Hence the structure name that i put in the variable substitution all are not match with the structure name in the payload even though all have the file name element.
    So what i did is i have to reorder the sequence of my message mappings to be the same sequence as the interface mappings sequence.
    Thanks for all that trying to help!
    Appreciated it guys.
    BTW, for the variable reference it's correct that i no need to put message and message2 as the reference.
    payload:MT_Level1,1,FileNode,1,FileName,1 will do.
    Best Regards,
    Victor.

  • Problem in variable substitution

    Hi experts,
    I need help for a strange problem:
    I have a proxy to file scenario in which I create an xml file; I need to use a field of the mapping to create filename.
    In Receiver CChannel I have used variable substitution, but in message monitoring I got this error:
    Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: 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: Folio: 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: Folio.
    FileName Scheme is: DM65_%Folio%.xml
    In variable substitution I have used this reference:
    Folio =    payload:MT_MexicanElectronicInvoice_MyFirm,1,CABFAC,1,Folio,1
    This is the payload of the message that ends in error:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_MexicanElectronicInvoice_MyFirm xmlns:ns0="urn:MyFirm-EDICOM:MexElectronicInvoice">
    - <CABFAC>
      <IdLabel>CABFAC</IdLabel>
      <Version>3.0</Version>
      <Folio>2100000003</Folio>
      <FecHac>16-11-2011 17:11:17</FecHac>
      <FPago>Advance payment</FPago>
      <Subtotal>9.976,00</Subtotal>
      <TotalFac>11.568,16</TotalFac>
    What is the problem? wrong reference?
    thanks
    Fabio

    Hi,
         Everything looks fine.
    Make sure that there is no extra space after your "%Folio%" under the Variable Substitution.
    Make sure that "Adapter Specific message Attributes" is unchecked in the CC.
    You can do a change in message mapping to create a header field<occurence: 1> map to a constant and call it in var substitution.
    As Mickael suggested above make sure using only lowercase on your variant name  %folio% instead of %Folio%.
    For 1:N muti-mapping with variable substition go through the below links:
    Re: 1: N File Scenario..
    Using Variable Substitution
    i hope it will help you.
    regards,
    ganesh.

  • Variable substitution in XI (7.0 version).

    Maybe you could give us a short hint regarding an error we are getting during the variable substituion in an outbound file adapter.                                                                               
    How can we specify a namespace in the variable substituion?
    Without namespace this is working well, but we don't know how to specify the namespace.   
    We get this error essage: #2006-03-17 15:29:07 CET: Message processing failed: Error during      
    variable substitution:com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: FileName                                                                               
    Here comes our file:                                                   
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns1:GMPluTxn xmlns:ns1="http://sap.com/xi/GMStoreConnectivity">
    <GMFileHeader>                                            <StoreNumber>0000002101</StoreNumber>                     <FileName>PluTxn</FileName>                                     </GMFileHeader>                                            <UpdateType>1</UpdateType>                                <PLU>000000000000610733</PLU>                             <RetailPrice>0.99</RetailPrice>                           <QuantityDescription>BX</QuantityDescription>             </ns1:GMPluTxn>                                          
    We set the flag 'enable variable subsitution' and specified the filename
    variable as follows:                                                 
    FileName payload:ns1:GMPluTxn,1,GMFileHeader,1,FileName,1                                                                               
    The FileName variable is used in the File Name Scheme field:           
    %FileName%.asc 
    Thanks in advance.

    Give it like this and see if it works
    FileName payload:GMPluTxn,1,GMFileHeader,1,FileName,1

  • Variable substitution

    Maybe someone can give me a short hint regarding an error we are getting during the variable substitution in an outbound file adapter.
    How can we specify a namespace in the variable substituion?
    Without namespace this is working well, but we don't know how to specify the namespace.
    We get this error essage: #2006-03-17 15:29:07 CET: Message processing failed: Error during
    variable substitution:com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: FileName
    Here comes our file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns1:GMPluTxn xmlns:ns1="http://sap.com/xi/GMStoreConnectivity">
    <GMFileHeader> <StoreNumber>0000002101</StoreNumber> <FileName>PluTxn</FileName> </GMFileHeader> <UpdateType>1</UpdateType> <PLU>000000000000610733</PLU> <RetailPrice>0.99</RetailPrice> <QuantityDescription>BX</QuantityDescription> </ns1:GMPluTxn>
    We set the flag 'enable variable subsitution' and specified the filename
    variable as follows:
    FileName payload:ns1:GMPluTxn,1,GMFileHeader,1,FileName,1
    The FileName variable is used in the File Name Scheme field:
    %FileName%.asc
    Thanks in advance.

    Hi Malika,
    Do not mention ns1 in the variable substitution.
    Why you need to mention the namespace in the variable substitution ?
    Just Mention GMPluTxn,1,GMFileHeader,1,FileName,1
    Like this.
    If you want to get the output file name with namespace, then try to get the namespace as part of your payload(i.e part of your message type ). Then if you don;t want it in the Output file, you can cut it using cut option of File Receiver Adapter.
    For more-
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    Regards,
    Moorthy

  • Variable substitution error

    Hello All,
    Below is my source structure:
    <Messages>
       <Message1>
           <MT_BILL>    (0...*)
              <RECORD> (1....*)
                 <FILENAME>  (1...1)
    If using variable substitution for the filed FILE NAME which is in the source structure.
    This is the declaration I used in channel:
    payload:MT_BILL,0,RECORD,1,FILENAME,1
    But i am getting this error in channel monitoring
    DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var
    Can anyone help me here
    Regards,
    Moorthy

    Hi Dasika,
    In variable substitution we use the receiver message type path.
    Please map the required source field to any of the field at the reeiver side and use variable substitution.
    For 1:N muti-mapping with variable substition go through the below links:
    Re: 1: N File Scenario..
    Using Variable Substitution
    Regards,
    Pranav

Maybe you are looking for