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.

Similar Messages

  • Error with variable substitution..

    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

    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

  • 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

  • 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

  • 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

  • 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 error in Prod- Urgent

    Hi Friends
    I transported my objects from dev to production and one of my scenario started giving this error .
    Please guide
    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: store: 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: store.

    this error is beacuse the variable substution which is specified in the rceiver file adapter is failling....
    ROOT cause:
    goto the receiver file adapter of the interface you have moved into PRD...you will c the filename somethinglike this
    %var%.txt...below you will c a variabel substuition screen
    var payload:..........
    check the foeld which is refering from the target strcuutre...the data is not coming into this field of variable substuition...so it is thorwoing this error.....
    this is considering the variable substution path is right? i belive it is right since you haev omved this to PRD from Devlopment...if this was working in development...check the data is coming in that field.
    wehen you did a tranposrt into PRD you went to the change list did u edit the rceiver adapter mandatory fields according to the PRD envinorment? dd u also make sure the variabel substution is not touched when you did this?

  • 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.

  • Error while using the variable name "VARIABLE" in variable substitution

    Hi Experts,
      I am using variable substitution to have my output filename set as a payload field value. It is working fine when I am using the variable name as fname, subs etc but channel goes in error when I am using the variable name as "VARIABLE". This is probably a reserved word but i would like to know where i can find a detailed documentation on this. Say things to note / restrictions while using variable substitution.
    This is the error in the channel:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: java.text.ParseException: Variable 'variable' not found in variable substitution table: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Variable 'variable' not found in variable substitution table
    Thanks,
    Diya

    Hi Zevik,
    Thanks for the reply. The output file is created correctly by merely changing the variable name to something else and hence the doubt.
    Below is the configuration:
    Variable Substituition
    VARIABLE    payload:interface_dummy,1,Recordset,1,Header,1,field1,1
    Filename schema : TEST_%VARIABLE%.txt
    Output xml structure:
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:interface_dummy xmlns:ns="http://training.eu.unilever.com">
    - <ns:Recordset xmlns:ns="http://training.eu.unilever.com">
    - <Header>
      <identifier>HDR</identifier>
      <field1>001</field1>
      <field2>001</field2>
      <field3>R</field3>
      </Header>
    - <Detail>
      <identifier>A</identifier>
      <field1>000000002</field1>
      <field2 />
      <field3>Doretha.Walker</field3>
      </Detail>
    I thimk my configuration is correct as it is working correctly with the variable name change, However, maybe i missed something !

  • Error: Variable not found in variable substitution table

    Hi,
    I am getting following error in file adapter receiver communication channel.
    error:Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Variable 'file' not found in variable substitution table
    <b>variable substitution values:</b>
    Variable name: File
    reference       :payload:MT_DC_Recr,1,Target,1,Filename,1
    file name scheme : %File%.txt
    <b>inpu file:</b>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_DC_Send xmlns:ns0="http://urn:psr/ff/DC">
       <Source>
          <Filename>dat1</Filename>
          <Record>
             <Name1>123</Name1>
             <Name2>abc</Name2>
             <Name3>XYZ</Name3>
          </Record>
       </Source>
    </ns0:MT_DC_Send>
    Regards,
    Srini

    Hi varun,
    This is the error i am getting now..
    Could not process due to error: 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
    what i am trying to get is reading filename from the message payload.
    Reg,
    Srini

  • 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

  • Variable substitution error while using Seeburger module parameter

    Hi Freinds,
    I would like to use the variable substitution in a receiver file adapter to add the invoice no.
    (which is contained in the XML file) to the target filename.
    In addition I have to convert the XML file to an X12 EDI format using the seeburger module "localejbs/CallBicXIRaBean".
    As soon as this entry is made in the modules the following error message occurs:
    "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) 53, 4f, 48(:main:, row:1, col:3)"
    My problem is that the conversion from XML to X12 EDI is done before the variable substitution is started.
    That`s why the reference for the variable is no longer valid as the file is already converted to a X12 EDI (=flatfile) format.
    If I disable one of the two steps (either 1:1-mapping or variable substitution) the other step runs properly.
    Has anybody an idea how to solve this topic?
    Is it possible to specify the variable substitution as module?
    If this is possible I could solve it by just reordering the two steps in the module chain.
    Regards
    Venkatesh

    Use Dynamic Configuration Bean to set this value. You have to use this well before "localejbs/CallBicXIRaBean".
    Check SAP note : 974481 for more information.
    Blog: [/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean|/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean]
    Second Approach if the above approach doesnt work.
    Use Dynamic Configuration concept in UDF to set the filename under message Mapping.
    Thanks,
    - Gujjeti.
    Edited by: Praveen Gujjeti on Feb 25, 2009 11:25 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

  • 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

Maybe you are looking for

  • This 'MooV' file is damaged or unsupported

    I know this is a common issue that is happening with a lot of people. I have mov files that show this moov file is damaged or unsupported when I try to play them on after effects. The problem is that it works when I use it on another computer at scho

  • Solution for some iPod/iTunes problems...

    If you are having one or more of the following problems, Windows may be confusing iPod with a network drive or hard drive and may exhibit strange behavior, like: -iPod does not show up in iTunes or as disk in Windows Explorer -iPod does not show up a

  • Call Oracle Function from ASP++++!

    I have a lot of Oracle function in packages and i would like use it in my ASP pages. With Oracle procedure it's all right. Sample like this set cn = Server.CreateObject("ADODB.Connection") connString = "Provider=MSDAORA.1;Data Source=<>;User ID=<>;Pa

  • Error message 00349

    Hi, I have an error message 00349, "Field BSEG-MWSKZ. does not exist in the screen SAPMF05A 0302" and KI(235) Account 6002100 requires an assignment to a CO object The messages is occur while I am try to perform a IDoc for intercompany billing with a

  • HT1937 I have an iphone 5 and it was perfect but these days the touch is not working like it used to before, anyone has a clue why?

    I have an obsession toward apple's products and i never had a problem with any product! But i don't knownwhat happened suddenly to my iphone 5 it keeps pausing and stop working for moments or clicking something i didn't put my fingers on it and i tho