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.

Similar Messages

  • Text  variable   replacementpath  with   key, attribute, name  then what

    text  variable   replacementpath  with   key, attribute, name  then  what  are the changes in my report in quary designer

    The XML 1.0 spec does not allow elements or attribute names to include spaces in the names.
    See: http://www.xml.com/axml/axml.html
    for a nice annotated version of the spec.
    [Definition:] A Name is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits, hyphens, underscores, colons, or full stops, together known as name characters. Names beginning with the string "xml", or any string which would match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or future versions of this specification.

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

  • Extract function not working with tag attributes

    Hi all,
    I have an xml document stored in the db as an xmlType. I am trying to use the extract function to retrieve values. The extract will work fine on tags without attributes. Any tags with attributes or tags beyond the tags with attributes will not be accessible.
    <tag1>
    <tag2>hi</tag2>
    <tag3 att="hello">bye</tag3>
    <tag4> hi again </tag4>
    </tag1>
    In the example above I can extract tag2 values but not tag3 or tag4 values.
    here is my select statement
    works
    select e.xmlval.extract('/tag1/tag2').getStringval()
    from test_xml e;
    does not work
    select e.xmlval.extract('/tag1/tag2/tag3').getStringval()
    from test_xml e;
    does not work
    select e.xmlval.extract('/tag1/tag2/tag3/tag4').getStringval()
    from test_xml e;
    Any ideas?

    Hi all,
    Found the issue. The problem was that I was not specifying the second argument to the extract function.
    The tag attribute that I was not handling was xmlns="".
    I used this atttribute as the second argument in the extract function and now I am off and running.
    Hope this helps someone.
    Cheers

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

  • 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

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

  • 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

  • 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

  • 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

  • HOW TO ACHIEVE THE Variable Substitution THROUGH MODULE BEAN

    Hi All,
    i know the variable substitution for getting the one the value from the payload.
    how can we achieve same thing through using the module been. below screen for your reference.
    help us module bean for variable substitution.
    Regards,
    Kesava

    Hi,
    refer the below link..
    http://scn.sap.com/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean
    Regards
    srinivas

  • 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

Maybe you are looking for

  • Hot synch old Zire 72 with new Treo Pro

    Can anyone tell me how to do this? Post relates to: Treo Pro T850 (Sprint)

  • Should I upgrade RAM?

    I have a 800 MHz G4 iBook with 640 MB of RAM running OS 10.3.9. It is a month or two shy of three years old. The computer (my first Mac) is still in great shape and works fine for nearly everything I do. However, when I do things like import a video

  • Pie Chart - Have no link and stop cursor from changing.

    Hi, I have a simple pie chart (flash) with the query: select      NULL link,      rag.meaning,      count(wp_id) from ...... For this particular chart I do no want a link from the pie chart to another page so I have defined the link as NULL. This wor

  • Having trouble Installing OS on New Hard Drive

    I just tried to Install OS X on my new Seagate Momentus 7200.3 HD with the install disk that came with my new MBP. When I get to the prompt where it asks where you would like to install OSX no drive location is showing up. Can anyone help me? Thanks!

  • Triggering Output Type

    Hi,        I have a report program which displays all the delivery. If select a delivery and press a print button (customized one), then the delivery has to be printed. I am using BAPI_LIKP_PROCESS_MSG_DIRECT to print the delivery. Now the problem is