Variable substitution characters in sqlplus

The question mark character - "?" is the substitution for ORACLE_HOME in sqlplus.
What is the substitution character for ORACLE_SID?
Are there any other characters that can be used?
Where I can read about it?
Leonid

bcm@bcm-laptop:~$ cat abc.sh
echo $ORACLE_SID
sqlplus  <<EOF
oe/oe
select '/vol02/orabackup/$ORACLE_SID/expdp' from dual;
exit
EOF
bcm@bcm-laptop:~$ sh -x  abc.sh
+ echo v112
v112
+ sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 23 08:40:14 2010
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Enter user-name:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
'/VOL02/ORABACKUP/V112/EXPD
/vol02/orabackup/v112/expdp
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bcm@bcm-laptop:~$ please mark TREAD as answered

Similar Messages

  • 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

  • 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

  • File-Adapter: Variable substitution form payload XML-attribute

    Hi experts,
    is possible to use XML-attribute-content for variable substitution in file-Adapter?
    extract from XML:
    <?xml version="1.0" encoding="utf-8" ?>
    - <all>
    - <transaction <b>file="filename"</b>>
    - <table name="BPAADDRESS" options="insertIfUpdateFails">
    - <record id="1">
      <hkeycol name="BPAMAINHKEY">0010500345</hkeycol>
      <hkeycol name="USAGE">Invoice</hkeycol>
      </transaction>
    I want to get the value "filename" = attribute file of transaction.
    Is this possible?
    Thanks a lot,
    Florian

    I have done this taking a field from the XML.
    You have to map the location of the field within the XML...
    Taken from:
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
    Variable Substitution (Target Directory/File Name Scheme)
    If you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme. Enter the names of the variables and references in the table.
    &#9679;      Enter each variable that you reference in the Target Directory and File Name Scheme fields without the surrounding percentage sign under Name of Variables in the table.
    The variables can refer to attributes of the message header or elements of the message payload.
    &#9675;       If the variables are to refer to an attribute of the message header, add the prefix message: to the name of the variable under Reference. You can specify the following attributes of the message header:
    sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
    message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
    message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
    For example, if you want to specify the interface name from the message header in the target directory or in the file name scheme, enter message:interface_name as the reference.
    If one of the message attributes contains characters that are not permitted in a file name, for example \, /, :, *, ?, ", <, >, |, then these characters are replaced by an underscore ("_").
    &#9675;       If the variable refers to an element in XML schema, add 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,....
    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.
    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 (“Example Value”) 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>
    &#9679;      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 “..“.

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

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

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

  • Error in Variable Substitution

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

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

  • Problem in variable substitution

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

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

  • Variable substitution in XI (7.0 version).

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

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

  • Variable substitution

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

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

  • Variable substitution error

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

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

  • 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 not working for dynamic file name in Receiver File CC

    Hi Experts,
    I am doing the scenario of Proxy sender to File receiver and my purpose is to Create the text file
    as per the filename available in Source Message payload.
    I am using the Variable Substitution method for this as shown below.
    Source Message Structure:-
         <Row>            -
    having Cocurence 1.1
             <Filename>     -
    having Cocurence 1.1
             <Item>            -
    having Cocurence 1.Unbounded
              <Field1>
              <field2>
             <Item>
             <Item>
              <Field1>
              <field2>
                <Item>        
         <Row>
    Target structure is same as the source structure and i have mapped the Filename field of the Source
    with the Target structure Filename.
    In ID the following is the File receiver CC Configuration.
    File Name Scheme:- %Dyn_filename%
    In Advance tab, I have selected the Enable option and added one row as Variable name %Dyn_filename%
    and Reference as payload:Row,1,Filename,1
    In testing I am getting the Error as 'variable Dyn_filename is not found in Message payload'.
    Please suggest me.
    Regards,
    Jagesh

    Hi Pooja,
    Hi Pooja,
    Thanks for your valuable reply..
    I  tried with the same. but still Filename is appearing in Output file.Giving you some details regarding my Receiver File Configuration settings.
    Target Message Type:-
              <MT_Target_Struct>
                    <Row>----
    1.1 occurence
                            <Filename_test>----
    1.1 occurence
                            <ITEM>----
    1.unbounded occurence
                                  <Field1>
                                  <Field2>
                            <ITEM>
                            <ITEM>
                                  <Field1>
                                  <Field2>
                            <ITEM>
                    <Row>
              <MT_Target_Struct>
    Recordset structure:-  Row,Filename_test,ITEM
    Row.fieldSeparator----
    >'nl'
    Filename_test.fieldFixedLengths----
    >0  (Zero)
    Filename_test.fixedLengthTooShortHandling----
    >Cut
    ITEM.fieldSeparator----
    >,
    ITEM.endSeparator----
    >'nl'
    I want only ITEM node to be written in the output file.
    Please suggest.
    Regards,
    Jagesh

  • 'Variable Substitution' error - Expected numeric element index

    Hello everyone!
    I'm using the 'variable substitution' property in XI to replace the filename of the output file to a value in the message payload.
    Here are the parameters I provided:
    File Name Scheme: %filename%.xml
    Variable Name: filename
    Reference: payload:ORDERS05,1,recordset,1,IDOC,1,E1EDK02,BELNR,1
    I'm getting this error in the adapter engine:
    Caught exception while initializing variable substitution engine: Cannot parse pseudo-path for variable substitution: 'filename': Expected numeric element index, got 'BELNR': For input string: "BELNR"
    Can anyone tell me what this means, and how I can fix this problem?
    Thanks in advance!
    Glenn

    Yup, raj! it's IDOC to file.... I did what you asked but I'm now getting this error:
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
    any idea what it means?
    Kind regards,
    Glenn

  • Variable Substitution not working correctly?!

    Hello all,
    perhaps some of you faced the same problem. It depends on the variable substitution in XI (PI).
    We have got an IDOC - FILE szenario. As far everything is working fine. The XML is created correctly.
    Now we want to get two fields from the payload to use both in our receiver file adapter as filename.
    The IDOC is a standard ORDRSP.ORDERS05.
    (1) The first field is the "job number" and located in the IDOC element: E1EDK01
    (2) The second field ist the "purchase order number" and located in the IDOC element: E1EDK02
    The fields are both named BELNR (and here seems to be a problem).
    To use the variable substitution we did as it is described in help.sap.com and used the following path to get the variables from the payload:
    (1) variable name: aufnr  ;  reference: payload:ORDERS05,1,IDOC,1,E1EDK01,1,BELNR,1
    (2) variable name: bstnr  ;  reference: payload:ORDERS05,1,IDOC,1,E1EDK02,1,BELNR,1
    these two variables "aufnr" and "bstnr" we want to use in our filenameschema. So we wrote the following for the schema:
    Ordrsp_%aufnr%_%bstnr%.xml
    The effect is that both variables always contain the same value, the value of "bstnr".
    Strange is that, if we delete one substitution i.e. (2) "aufnr" contains the correct payload value. It seems he overwrites the value of "aufnr" with the value of "bstnr" because of the same name in the IDOC structure (BELNR).
    Has anyone any idea what to do?
    Many thanks and kind regards,
    Steven
    PS: Of course points will be rewarded for helpfull answers. :o)

    Thank you for your answers!
    But there are several Problems using a dummy field in an IDOC structure. We have got a naming convension so that we can't create an IDOC-like structure named ORDRSP.ORDERS05.
    But perhaps I am thinking to complex and there is an easier way to add a dummy field to an IDOC structure.
    Could you perhaps also suggest a solution for that dummy field problem?
    Many thanks and kind regards,
    Steven

Maybe you are looking for

  • Can't start CS5 64-bit in Windows 7

    Can't seem to find an exact fix for this problem. I reinstalled Windows 7 (64-bit version), and of course had to reinstall all applications. Verified I'm running Win7-64 bit, but now when I launch Photoshop CS5-64 bit, I only get an error message tha

  • Print the archived data to the sap printer

    Hi ,    I have the requirement to get the archived output document and to print the document to sap printer ( it may not connected to the local pc) .   i got the PDF file from the archived document by FM 'ARCHIV_GET_CONNECTIONS' and got the PDF data

  • Material ledger production start up

    Dear expert, we are working on a project that has two main objectives: 1) now the customer is using the mtv 103/105 and we want to move to the 101 2) now the customer is using a custom 'medium price calculation' and we have to activate the material l

  • Question about multiple classes and Linked Lists

    Lets say you have 4 classes: LinkedList which is the main class, Node, Card, and Hand. im not putting any constructors yet The card class keeps track of a card such as a king of diamonds: public class Card { string suit; string rank; the node class h

  • HT6312 I don't understand why you are holding our documents captive!

    How can you NOT make it backwards compatible!  I prefer not to install the latest IOS (as we've seen what happens, with the last IOS update)  before I am comfortable with the update. This is irresponsible and not customer friendly.  Basically I am S.