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

Similar Messages

  • 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

  • Blank Lines at end of file when using Variable Substitution in File Adapter

    Hi all,
    I'm using variable substitution in a File Adapter, it's refers an element of message, like:
    filename    payload:MESSAGE_INTERFACE,1,FILENAME,1
    The variable substitution is working right, but it's append a BLANK LINE at end of file.
    Anyone knows how to solve this problem ?
    Thanks in advance.

    Hi Regis,
    I suppose you're using content conversion?
    if so try adding
    <b>endSeparator</b> = '0'
    to your last element
    this will delete the default line break at the end
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Reciever File Adapter - Temp File Name Scheme using Variable Substitution

    How can I create a temporary file that uses variable substitution? 
    We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter.  So two independent files are merging into a single file.  We are not using the "Append" setting.
    We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name. 
    Using variable substitution we created a msgid variable.  When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id.  We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
    Any Ideas?
    Thanks,
    Matt

    HI Matthew,
    Why are you adding the message id into the temporary file??
    I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
    Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
    So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
    Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
    I hope this helps.
    Cheers
    Dhwani

  • 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

  • Used variable substitution to substiture the field 'date' in file name

    Hi gurus
    I have used variable substitution to substiture the field 'date' (dd/MM/yyyy/hh/mm/ss) in the file name so when empty payload (a valid xml ) is generated by Message mapping then the communication channel is failing by showing the following error
    File processing failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during
    variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload
    : date
    As of now the business is not getting effected as the business scenarion needs only customer master data at the reciever side But when ever there is no custmer master data in the sourse side the message mapping is generating an empty payload and the communication channel is failing ( so it is an internal issue and is there any way which could solve the both (ie the business must not get effected and as well the communication channel must not fail)
    any coments on this will be higly apreciated
    thanks and regards
    sandeep

    Hi Sandeep -
    Yes If you use the Variable substitution from the payload , that perticular field has to be generated in the target structure.
    To handle this You can do the following:
    Sourcefield --->exists -> IfThenElse-->TargetField
    Where     SourceField>exists(node function)-> If
                   SourceField -
    >Then
                   CurrentDate(Date Function)----->Else
    Hope this will help !!
    Regards.
    Jeet.

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • Using Variable Substitution

    Hi Im new to XI and Im testing a simple file to file scenario by using Variable Substitution method.
    PFB the input payload of my scenario:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:INF94145_Emp_Input_MT xmlns:ns0="http://infosys.com/xi/projects/adidas/n2">
    - <Employee>
    - <Details>
      <Name>A</Name>
      <ID>1</ID>
      <Designation>SE</Designation>
      <Salary>123456</Salary>
      <DOJ>24-02-2008</DOJ>
      <Other />
    - <Address>
      <City>Asd</City>
      <ZIP>505001</ZIP>
      <Country>India</Country>
      </Address>
      </Details>
      </Employee>
    - <Employee>
    - <Details>
      <Name>B</Name>
      <ID>2</ID>
      <Designation>SE</Designation>
      <Salary>123456</Salary>
      <DOJ>24-02-2008</DOJ>
      <Other />
    - <Address>
      <City>Asd</City>
      <ZIP>505001</ZIP>
      <Country>India</Country>
      </Address>
      </Details>
      </Employee>
      </ns0:INF94145_Emp_Input_MT>
    I  used the variable substitution feature of Receiver File adapter to get the Output file name as one of the Field value from payload(Employee name in this case).
    Now my question is can I be able to get the output files based on employee names.i.e.,for two employee details I should get two out files and for n employee details I should get n output files.
    Can anyone tell how  the above scenario could be done.
    Thanks for your help.
    Regards,
    Prajwal

    Hi,
    I have used multi mapping and I tested the same and is working fine when I test in TEST tab present in mapping.
    My scenario is a file to file and also I used same fields in input and output DT(datatype) for understanding purpose.
    My input data type is as follows:
    - <ns1:INF94145_Emp_Input_MT xmlns:ns1="http://infosys.com/xi/projects/adidas/n2">
    - <Employee>
    - <Details>
      <Name>A</Name>
      <ID>1</ID>
      <Designation>qw</Designation>
      <Salary>122</Salary>
      <DOJ>2-22-2222</DOJ>
      <Other>asasa</Other>
    - <Address>
      <City>asdsada</City>
      <ZIP>12</ZIP>
      <Country>dsada</Country>
      </Address>
      </Details>
      </Employee>
    But when coming to END to END testing I'm getting an error in IE as follows:
    <SAP:Code area="MAPPING">GENERIC</SAP:Code>
      <SAP:P1>Split mapping created no messages</SAP:P1>
    Can anyone say what i have to do to overcome this problem.
    Thanks and regards,
    Prajwal

  • 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

  • ORA-04054 : using variable substitution for the database link name

    Hi,
    I need to use variable substitution for the database link name.
    Here is my command :
    declare
    GET VARCHAR2(50);
    begin
    select OIA_GET_DESIGNATION into GET from INFODRI.OMA_IN_ARTICLES;
    for rec in (select * from [email protected]_GET_DESIGNATION)
    LOOP
    dbms_output.put_line('TEN_CODE vaut : '||rec.ten_code);
    END LOOP;
    exception
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERREUR ORACLE DETECTEE : '||rec.OIR_CUR);
    DBMS_OUTPUT.PUT_LINE('Message Erreur : '||SUBSTR(SQLERRM,1,245));
    :crd := -1;
    end;
    When I run this programm, I receive the error :
    ORA-04054: database link REC.OIA_GET_DESIGNATION does not exist
    When I replace :
    for rec in (select * from [email protected]_GET_DESIGNATION)
    by :
    for rec in (execute immediate 'select * from tensions@'||rec.OIA_GET_DESIGNATION)
    I receive the error :
    PLS-00103 : Encountered the symbol "IMMEDIATE" while parsing.
    What can I do to resolv my problem ?
    Regards,
    Rachel

    What is the name of the DB Link and the name of the object you are selecting
    from?
    I find it easier to create a view on the remote object then use that in selects.
    e.g,
    Link Name = MyLink
    Object_name = Addr_Loc
    create or replace VIEW Rem_Addr_Loc AS
    select * from addr_loc@mylink;
    In the code I then use the view
    begin
      for C_Rec in (select * from Rem_Addr_loc)
      loop
         dbms_output.put_line('Rec: '|| C_Rec.Col1);
      end loop;
    end;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • PI 7.1 receiver SOAP adapter using https

    Hi all,
    In PI 7.1 receiver SOAP adapter using https, what are the configurations necessary in PI box?
    Certification, and key store values, security etc etc
    -Michael.

    >
    Michael Johnson wrote:
    > I did n't find anything related to 7.1 version
    Some leads are provided by help: http://help.sap.com/saphelp_nwpi71/helpdata/EN/56/992d4142badb2be10000000a1550b0/frameset.htm
    Regards,
    Abhishek.

  • Error data file is empty in standard Copy package

    Hi,
    We have an appset that consists of four applications and we can't successfully run Data Manager Copy package in one of them. It launches the following tasks: Dump, Convert (execution fails in this step with error "Data file is empty") and Load. SSIS configuration in BIDS is defined by default and we haven't set any parameter.
    We have figured out this error appears when we select any member of a dimension in "COPYMOVEINPUT" prompt except for Time dimension. Previously there was a custom Copy package based on standard BPC and it only filters by Time dimension. Perhaps this error is related to application configuration to run custom package.
    We show code:
    INFO(%TEMPFILE1%,%TEMPPATH%%RANDOMFILE%)
    INFO(%TEMPFILE2%,%TEMPPATH%%RANDOMFILE%)
    TASK(DUMP,APPSET,%APPSET%)
    TASK(DUMP,APP,%APP%)
    TASK(DUMP,USER,%USER%)
    TASK(DUMP,FILE,%TEMPFILE1%)
    TASK(DUMP,SQL,%SQLDUMP%)
    TASK(DUMP,DATATRANSFERMODE,2)
    TASK(CONVERT,INPUTFILE,%TEMPFILE1%)
    TASK(CONVERT,OUTPUTFILE,%TEMPFILE2%)
    TASK(CONVERT,CONVERSIONFILE,%CONVERSION_INSTRUCTIONS%)
    TASK(LOAD,APPSET,%APPSET%)
    TASK(LOAD,APP,%APP%)
    TASK(LOAD,USER,%USER%)
    TASK(LOAD,FILE,%TEMPFILE2%)
    TASK(LOAD,DATATRANSFERMODE,4)
    TASK(LOAD,DMMCOPY,1)
    TASK(LOAD,CLEARDATA,%CLEARDATA%)
    TASK(LOAD,RUNTHELOGIC,%RUNLOGIC%)
    TASK(LOAD,CHECKLCK,%CHECKLCK%)
    Any variables as %CONVERSION_INSTRUCTIONS% aren't defined. Is it a system constant?
    Thanks.

    Hi Roberto,
    Thanks for having a look at my question.
    We're using .act files to upload data from SAP BW into SAP BPC.
    This is the content of  .act file that I'm trying to upload:
    ACTUAL
    1
    1
    GCN.CZN,2621.LC_.EUR,100.5000
    GCN.CZN,2621.TC_.CZK,7050.0000
    Transformation file looks like:
    Conversion files are:
    Time:
    Category:
    Entity:
    Counterpart:
    RCCinterco:
    IntercoCurr:
    Transcurrency:
    In case of any other info needed, please let me know.
    Thanks a lot in advance,
    Wai Yee Kong

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

  • FTPs connection error:When using Variable substitution for Directory path

    Hi
    I am transferring data from BI to xml file via PI: Here a Client proxy from BI sends the data to PI and the PI FTPs the XML file to a remote location. For FTP I am using FTPs SSL connection.
    It was working fine untill I used Variable susbstitution to determine Directory path dynamically. I am using this because different xml files are intended to goto the different locations.
    I did the variable substitution like this:
    Target Message Structure:
    ---> Target Directory: %var1%
    <?xml version="1.0" encoding="UTF-8" ?>
    <MT_BI_EXTRACT_FILE>
      <Header>
         <Directory>/Customer</Directory>
    </Header>
    <Detail>
    </Detail>
       </MT_BI_EXTRACT_FILE>
    And in the variable substitution I am doing it this way
    payload:MT_BI_EXTRACT_FILE,1,Header,1,Directory,1
    And the error I am getting is:
    Attempt to process file failed with Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    Exception caught by adapter framework: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    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 when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure.
    Does anybody have some Idea of this ??
    Regards
    Naina

    Hi,
    I guess the problem is not with Variable Substitution..
    Error when getting an FTP connection from connection pool:
    So its a connection problem..
    Also check the option Disable Security check and try again...
    Try to check again if the interface is executing properly without Variable substitution and let us know..
    Babu
    Edited by: hlbabu123 on Jan 7, 2011 2:46 PM

Maybe you are looking for

  • Credit Check on Sale Order

    Dear Friends, Right now the credit check is on Delivery Order. It displays error message when doing PGI for Gross Value (Price + Tax). Now I want to do it for Sale Order Level. I did all changes according to the following; but on sale order the error

  • CS5 not printing actual size

    I'm using CS5 Extended. I have a canvas size of 8.4x10.95 that I print on 8.5x11 portrait paper. The Scale to Fit Media checkbox is unchecked, and the Scale field is 100%. The printer dialog is set to borderless. When printed, the image seems to be e

  • How can I list my iphoto library by file name only?

    How can I list my iphoto library by file name only?

  • Spring integration documentation

    Hi, I wonder whether it is foreseen to better document Kodo/Spring integration, especially in a J2EE environment (accessing JDO-based DAO from SLSBs) ? I have downloaded the Spring integration example, but it is far from the usual Solarmetric quality

  • Failed to initialize my custom LoginModule

    Hello, I just developped a loginmodule. I also tried with several examples I found on the forum (thanks for this help). When I start Tomcat Th constructor of the LoginModule is successfull but Tomcat stops before the call of the initialize method. I