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.

Similar Messages

  • 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

  • Filename in J2SE Adapter with Variable Substitution

    Hello,
    Within the J2EE receiver fileadapter (and ftp) from SP13 it is possible to compose the target filename and directory based on the payload of a message using variable substitution.
    I wonder if it is also possible to use variable substitution with the J2SE fileadapter. For this it is not documented but i thougth that the same java libraries are used for the J2EE an J2SE file-adapters.
    Aybody??
    Really Nobody??
    Message was edited by: Emile Hermans

    Hello,
    the J2SE Adapter does not support variable subsition. Therefore we created our own class which gets called from the main SAP XI class "XMB2FileProcessor.class" wich is in the jar "aii_msg_adapter.jar". In your own class you can do what ever you need to chane the file name. In the configuration you can set your own parameter to search the payload for a string you want to replace. We also had to come up with our own timestamp, e.g. file2005-11-10 which SAP does not let you do, only the full timestamp is possible.
    One other nice thing is that you can develop our JAVA class local and test it with your local J2SE Adapter Engine on you PC before you deploy it.
    Steps to do:
    1. JAD the SAP class
    2. Put a call in the SAP class
    3. Compile the class
    4. Put the class back in the archive
    5. Create your own class
    6. Create a jar file for it
    7. Put the jar file in the tech_adapter directory
    8. Change the run_adapter start cmd to include your jar file
    It works great, the only issue is if you patch the J2SE engine you have to do step 1 to 4 again but that should it very easy to do.
    Cheers
    Stefan

  • Dynamic target directory with variable substitution

    Hi everyone.
    I'm trying to save a file in a folder with receiver adapter.
    This folder is determined in runtime and passed to the adapter with variable substitution. My problem is that in RWB i get a error like this : 'Content of variable XXXXX is not safe'
    Does anybody have done a variable substituion for output directory receiver file adapter?
    Regards,
    Inigo.

    Hi,
    Check this links,
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Regards,
    Phani

  • 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

  • Issue with Variable Substitution

    Hi,
    We have a scenario where we need to use the data from Payload for further processcing of the messeges.The payload looks like the one given below.
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_NOTIFICATION xmlns:ns1="http://WM_ERRHAND"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <PROXYRESPONSE>
      <STATUS>YES</STATUS>
      <NAMESPACE>WM_INVOICE</NAMESPACE>
      <INTERFACENAME>MI_INVOICE_MOORE_ACK_IN</INTERFACENAME>
      <PROXYNAME>ZXIII_MI_INVOICE_MOORE_ACK_IN</PROXYNAME>
      </PROXYRESPONSE>
      </ns1:MT_NOTIFICATION>
    In adapter, for variable substitution we have specified as below:
    payload:MT_NOTIFICATION,1,PROXYRESPONSE,1,NAMESPACE,1
    but getting an error "Message processing failed: Error during variable substitution: java.text.ParseException: Variable 'namespace' not found in variable substitution table"
    Is the variable that we have declared is right or is there anything we have missed out. Any helpful answers will be rewarded
    Thanks and regards,
    Ram.

    Hi Ram,
    The substitution looks fine.
    Did you read this,
    <i>To disable the check the adapter performs for the element data, set the Disable Security Checks indicator.
    Otherwise, the adapter checks whether the element data contains characters that could lead to security risks in the file system environment. The check includes the characters “/“, “\“, and “..“.</i>
    Try seleting this option and checking the same.
    Regards,
    Bhavesh

  • File Adapter with Content Conversion

    Hi -
    I am trying to convert a Flat file which has data as
    firstnamelastnamecompanyName
    Now i have created a message type which has a root name as Contact and its children are FirstName,LastName,Company.
    And in the configurator i have created a file adapter with the content conversion, but being very new to XI i have never used a file adapter with content conversion.  This is what i have in my Content Conversion Parameters.Please correct my code.
    Document Name      ::   MT_Contact
    Document Namespace ::   http://venkat
    Document Offset    :: <i>i did not enter anything here</i>
    Recordset Name     ::   RootNode(i gave this name just like that,,, Should it be something from the IR??
    Recordset NameSpace:: <i>i did not enter anything here</i>
    Recordset Structure::   Contact (this is the name in my IR
    Recordset Sequence ::  Ascending
    Recordsets per Message :: Contact,* (Can someone explain what should be given here)
    Then in the bottom in the name value pairs i have given
    Contact.fieldNames   =   FirstName,LastName,Company
    Contact.fieldSeparator = #
    When i am using the above configuration the error i am getting in RWB is Error: Conversion initialization failed: Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Format error in 'xml.recordset' argument: incomplete structure (name,number) pairInvalid 'xml.recordsetsPerMessage' value 'Contact,*' found
    I am very new to XI and i am unable to understand what exactly each field means in the file adapter when the content coversion is used. Can someone take the pain of explaining them.
    Thank you
    Venkat

    Hi,
    Use the following to create an XML strucutre like this,
    <MT_CONTACT>
    <CONTACT>
    <FirstName> </FirstName>
    <LastName> </LastName>
    <CompanyName> </CompanyName>
    </CONTACT>
    <MT_CONTACT>
    DocumentName : MT_TEST
    DocumentNamespace : Yournamespace
    RecordserName : record
    RecordsetStructure : CONTACT,1
    In the table,
    ignoreRecordsetName  : true
    CONTACT.fieldNames : FirstName,LastName,CompanyName
    CONTACT.fieldSeparator : #
    Go through the links suggested by moorthy and also these blogs to understand content conversion better,
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    Regards,
    Bhavesh

  • Sender File Adapter with file conversion

    Hi guys,
    I’m using a Sender File adapter with file conversion. The message to be processed has a structure with fixed lengths and in your content are some values that needs to be ignored.
    An example:
    value1  <b>value2</b>  value3…
    I want to ignore <b>value 2</b> but I can’t find a parameter for that! Do I need to define dummy fields on my data type and ignore those fields during mapping? Or there is a specific parameter for that?
    Thanks in advance,
    Ricardo.

    hi,
    there always is another way:)
    you can import the whole line to one field
    and cut it inside the adapter module
    (then you can define start and stop of the substring that you need to use)
    but of course it's not standard even though it's quite easy to achieve in java
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Using File Adapter with Logical Name

    I am creating a file adapter with Logical name. Apart from giving the Logical name is there any other configuration that I am suppose to do on the Web Logic before I start using it?
    Thanks in Advance.

    After configuring the file adapter, all you need to do is , give the path as a value for the logical name which you have created earlier. That you can do on the file adapter property inspector. There is no need to do anything on the server level. Lemme know
    Thanks,
    N

  • File Adapter with Conversion - XML with Hierarchy?

    XI 3.0 (SP9)
    We are using the inbound file adapter with conversion to convert a flat file that has header and line items.  I would have thought that the data type should have been setup something like this:
    <data type>
    <header>
      <item>1</item>
      <item>2</item>
    </header>
    </data type>
    Our flat file looks like this:
    H12345
    I12345
    We have only been able to configure the file adapter to bring in the data like this:
    <data type>
    <header></header>
    <item>1</item>
    <item>2</item>
    </data type>
    What is the proper way to inbound data through a file adapter that has structure conversion like this?
    Do all of the elements get put under the root node, or is there a way to build structure?
    Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
    Thanks
    Peter

    Not quite sure what you want to get, as the flatfile and xml structure does not contain the same values.
    However, I will try to give you an example:
    Your flat file looks like this:
    H12345
    I12345
    If the first row is header and the next is a line, then you need to specify the fila adapter with the following:
    Document name = datatype
    Recordset name = recordset
    Recordset structure = header,1,item,*
    Recordsets per message = *
    Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
    Keyfieldname = id
    header.fieldFixedLengths = 1,5
    header.fieldNames = id,number
    header.keyFieldValue = H
    header.lastFieldsOptional = Yes
    item.fieldFixedLengths = 1,5
    item.fieldNames = id,number
    item.keyFieldValue = H
    item.lastFieldsOptional = Yes
    This will create something like this:
    <datatype>
    <recordset>
    <header>
    <id>H</id>
    <number>12345</number>
    </header>
    <item>
    <id>I</id>
    <number>12345</number>
    </item>
    </recordset>
    </datatype>
    Hoever, if both rows are "item" rows , then you need to specify the file adapter with the following:
    Document name = datatype
    Recordset name = header
    Recordset structure = item,*
    Recordsets per message = *
    Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
    item.fieldFixedLengths = 1,5
    item.fieldNames = id,number
    item.lastFieldsOptional = Yes
    This will create something like this:
    <datatype>
    <header>
    <item>
    <id>H</id>
    <number>12345</number>
    </item>
    <item>
    <id>I</id>
    <number>12345</number>
    </item>
    </header>
    </datatype>
    Q: Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
    A: Yes!
    Good luck!

  • How to use File Adapter with hierarchial Structure?

    Hi,
    How to use File Adapter with hierarchial Structure like..
    Data:
    --Header Details:
    Line Item Details:
    Data
    Bcoz I am getting a Flatfile in a hierarchial way as shown below.
    Header Details :1
    Line Item a
    Line Item b
    Header Details :2
    Line Item c
    Line Item d
    Kishore

    Hey Kishore,
    In order to create a structure you need to use the file with convertion mode on the sending communication channel of the file adapter.
    check the link for the needed configuration paramters.
    If the structure is more complexed you can use the Contetnt master(CM) from itemfield which allows to ceate XML file from complex flat files and more.
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm">File sender adapter</a>
    If you have any question i'll be more than happy to assist.
    Nimrod Gisis

  • Acknowledgement from receiver file Adapter with out BPM

    Hi Gurus,
    I am trying to get Acknowledgement from Receiver file Adapter with out Using BPM.
    Here is the scenario. I am sending files from different Sender Adapters. There is only one target that is File Adapter. After each successfull and failure transaction I need an Acknowledgement that needs to trigger another receiver adapter and send the the file name and timestamp to that file.
    Hope this is a complicated scenario. Please help me.
    Thanks,
    Kevin

    from sap note 821267
    6. Acknowledgements
        * Q: Does the File Adapter support acknowledgements?
        * A: You need to distinguish system acknowledgements (indicating that a message has been received by the target system) and application acknowledgements (indicating that the message has been successfully processed by the application on the receiver side).
               The receiver of an XI message will only send an acknowledgement back to the sender if the sender has requested one. However, the File Adapter has no functionality that relies on the receipt of an acknowledgement, so it never requests one.
               On the other hand, if a File Adapter Receiver receives a request to send an acknowledgement, it will do so for a system acknowledgement request. Application acknowledgements are not supported at all as the File Receiver has no way to determine if the written file has been correctly processed by the back-end application, which is what a positive application acknowledgement would imply.
    this means that your requirement is ideally not possible without a BPM

  • Error: File adapter dynamic directory not safe with subdirectories

    Hi,
    I'm using variable substitution to determine the destination directory for my RFC->File scenario
    In my RFC I have a tag called <PATH> that contains the full target path. If that path doesn't have subdirectories the variable substitution works perfect, for example:
    <PATH>directory1</PATH>
    Then in File adapter I have %var1% with the value of PATH and it works.
    But if I want to add subdirectories on the path, for example <PATH>directory1/subd2/subd5</PATH> the solution doesn't work.
    That's the error that I get:
    Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Security violation encountered during variable substitution: Content of variable var1 is not safe: directory1/subd2/subd5
    How can I access to that directory?

    Hi Marshal,
    From help.sap:
    To disable the check the adapter performs for the element data, set the Disable Security Checks indicator.
    Otherwise, the adapter checks whether the element data contains characters that could lead to security risks in the file system environment. The check includes the characters u201C/u201C, u201C\u201C, and u201C..u201C.
    Carlos

  • 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

  • Problem with Variable Substitution Receiver Adapter

    Hi,
    I need to use a dynamic filename so I'm using the variable substitution in my receiver adapter. BUT, the filename can't appear in the file. So i used this blog in reference --> Solution to the problem encountered using Variable Substitution with XI-SP12
    The PROBLEM is I still get and extra blank line in the file. How can I eliminate this extra line?
    Thanks in advance.
    Using XI 7.0

    Hi Gaurav,
    Data Type:
    Lines
       Line
    Config
       FileName
    XML - example:
    <?xml version="1.0" encoding="utf-8"?>
    <nr1:MT_TP_TipoCambio_Detalle_ECC_Req xmlns:nr1="urn:erplatam/tipocambio:tp:ecc">
    <Lines>
    <Line>USDSOL0000000000003.10000013-09-200813-09-2008V</Line>
    </Lines>
    <Lines>
    <Line>USDSOL0000000000002.50000014-09-200814-09-2008V</Line>
    </Lines>
    <Config>
    <FileName>SIGMA_TCSAP_F081031.DAT.TXT</FileName>
    </Config>
    </nr1:MT_TP_TipoCambio_Detalle_ECC_Req>
    Output - File, has 3 lines should have only 2:
    USDSOL0000000000003.10000013-09-200813-09-2008V
    USDSOL0000000000002.50000014-09-200814-09-2008V
    FCC parameters:
    RecordSet Structure: Lines,Config
    Lines.fieldSeparator 'nl'
    Lines.endSeparator 'nl'
    Config.fieldSeparator 'nl'
    Config.endSeparator 'nl'
    Thanks in advance!

Maybe you are looking for