Variable Substitution with IzForge

Hello,
I'm using IzForge to create an installer for my application. As part of the installation I take in some user input. I then want to update some properties files based on this input. Does anyone know how to do this in IzForge?
Thanks very much,
Ger

Hi,
I solved my problem using Dynamic Configuration to set the FileName and Directory fields in Adapter Specific Configuration. To use Variable Substitution only accept element in XML.
Thanks for all.

Similar Messages

  • Variable Substitution with tag attribute

    Hi,
    is possible to use variable substitution with tag attribute? as follow:
    <root directory="xxx"  filename="yyy">
       <....
    </root>
    using variable substitution for directory : root,1,directory,1
                                                               root,1,filename,1

    Hi,
    I solved my problem using Dynamic Configuration to set the FileName and Directory fields in Adapter Specific Configuration. To use Variable Substitution only accept element in XML.
    Thanks for all.

  • Query reg Variable Substitution with enhanced interface mapping

    Hi All,
      The scenario is IDoc to file using enhanced interface determination (message split based on some conditions) and the output file name should be based on a field value in the  IDoc. So, I've tried using Variable Substitution Option in the receiver file adapter. But it's failing with the error 'com.sap.aii.adapter.file.varsubst.VariableDataSourceException'. 
    My question is does Variable Substitution works with Enhanced Interface Determination? Bcoz the outcome of interface determination is a main and sub payload.
    IDoc Payload
    <?xml version="1.0" encoding="utf-8" ?><HR_HRMD_A07><IDOC BEGIN="Constant"><E1PLOGI SEGMENT="Constant">
    <E1PITYP SEGMENT="1"><E1P0000 SEGMENT="1"><ENDDA>99991231</ENDDA></E1P0000></E1PITYP></E1PITYP></E1PLOGI></IDOC></HR_HRMD_A07>
    Variable Substitution XPATH, which I've mentioned is payload:HR_HRMD_A07,1,IDOC,1,E1PLOGI,1,E1PITYP,1,E1P0000,1,ENDDA,1
    Thanks in advance.
    Regards,
    Joe.

    Hi,
    It was the problem with the capital letters for the variable field. We changed it to small letters, then the issue is resolved.
    Thanks,
    Joe.

  • 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

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

  • 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

  • White lines generateds in a File Adapter when using variable substitution.

    Hi all,
    I have been a problem in File generated by XI, my File Adapter is using variable substitution with reference to a field of my message type. Because it, the files generated has white lines in top of file.
    What can I do to not apears these lines ?
    Thanks

    Regis,
    Try to give a more detailed description of your problem otherwise I don't know who's gonna answer...
    Alexx

  • 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

  • Variable substitution & Seeburger conversion module

    Hi everybody!
    I would like to use the variable substitution in a receiver file adapter to add the order no. (which is contained in the XML file) to the filename.
    In addition I have to convert the XML file to an edifact 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 edifact 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 edifact (=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.
    Kind regards
    Chris

    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

  • Variable Substitution for File Name Scheme

    Hi all,
    Please clarify the following issue.
    I have two source fields
    Transfer Order number  -  0000000222
    Transfer Order line item - 0001
    Both i map it into one target field
    The target field output is  - 0000000222#0001
    I need a file name which starts with ABC <TranferOrderNumber>.txt
    The problem is, when i try to use payload i get output
    (ABC0000000222#0001.txt). The reason is i use the target field which was concatenated. I don't have any target field with only transfer order no.
    Please give me a solution where i would get output
    (ABC0000000222.txt).
    Thanks in advance,
    Jose Augastine

    Hi,
    Other way may be like this ..Create a one more segment in your target structure with field name as Transfer Order No. And populate only this no. And in the Reciever File adapter , in the variable sub, use only this field. But this new segment will come in the file. To avoid this, you can make use of " Cut "  Parameter in the File Content Conversion.
    This will hold good, if you have content conversion-
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    Otherwise, you can think of Bhavesh's suggestion
    Regards,
    Moorthy

  • Variable substitution using attribute

    hi,
    i want to use an attribute of an elemnet in variable substitution.
    i know how to use element in variable substitution and i know that i can use message header attributes
    in variable substitution, but if i create an element with an attribute how do i use it
    (or is there a simple way to map a value in message mapping to  message header attributes)?
    Thanks
    Tomer

    Hi
    Attribute is not supported for variable substitution.
    You can try setting values for the Dynamic configuration and use it
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    Thanks
    Gaurav

  • Retrieve the message put in message header using variable substitution

    hi,
    i am using dynamic configuration to put some information in the message header.is it possible to retrieve the message using variable substitution and if it is possible then how it be done using variable substitution.
    regards,
    Meenakshi

    Variable Substitution does not allow you to read all the messaeg header elements only some of them can be read/ access....for more info on how to read the message header elements refer: /people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean
    From the above blog:
    When using Variable Substitution, only certain standard message header attributes can be used/accessed (e.g. sender_party,
    sender_service, receiver_party, receiver_service, interface_name, interface_namespace, message_id)
    Better use Dynamic Configuration to read the parameters.
    I am wondering why you need to read the message header parameters when you are putting them using Dynamic Configuration.....cant you just get the details from the dynamic configuration UDF itself?
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Dec 10, 2009 1:18 PM

  • White lines generated in a txt File when using variable substitution

    Hello,
    I have a problem with a File generated by XI, my File Adapter is using variable substitution with reference to a field of my message type. I use content conversion as well and the generated file has a white line in top of file.
    How could I avoid this and make the white lines disappear? I was trying a lot of things but I don’t really know how to solve this issue, the following is the data type used:
    <FILE_NAME></FILE_NAME>
    <COMPANY>
         <COMPANY_CODE></COMPANY_CODE>
         <COMPANY_NAME></COMPANY_NAME>
         <ADRESS></ADRESS>
    </COMPANY>
    FILE_NAME is the field I use for variable substitution and COMPANY is declare as 0..unbounded.
    Thanks a lot in advanced,
    Luis

    Hi Jai,
    I have declare the following Content Conversion parameters:
    Recordset Structure: COMPANY
    FILE_NAME.fieldFixedLengths     0
    FILE_NAME.fixedLengthTooShortHandling     cut
    COMPANY.fieldFixedLengths     10,80,10,2,50,30,5,5,2,50,50
    COMPANY.addHeaderLine     0
    COMPANY.endSeparator     'nl'
    But it does not work, I have the same white line in the beginning of the file. Do you have any other suggestion??
    I couldnt find the blog written by Sravya either, could you post the link?
    Thanks a lot,
    Luis

  • Howto give payload for variable substitution

    hi experts,
    I need to add variable after file name.
    So I used variable
    My payload is
    - <ns1:MTI_RCIInterface xmlns:ns1="http://abcd.com/FI_IDOC_XXX_FILE">
    - <RS>
    - <HEADER>
      <H_CODTYPENR>H</H_CODTYPENR>
      <H_IDENT>EDCXQ42</H_IDENT>
      <H_NUMSEQ>00001</H_NUMSEQ>
      <H_DATE>20080613</H_DATE>
      </HEADER>
    I want to use H_IDENT.
    Please suggest what i give in refernce
    I gave
    payload:RS,1,HEADER,1,H_IDENT,1
    pl. help
    Akhil

    if u r using SP12
    then
    Solution to the problem encountered using Variable Substitution with XI-SP12                                        
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12     
    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                                                  
    regards
    chandrakanth

Maybe you are looking for