Empty File at Target Directory

Hi Experts,
I am dealing with file to file scenario, where file is being posted to the target directory depending upon the condition, which is mentioned in Java Mapping. The Java Mapping is tested and is successfull. But, the problem is PI is generating file with 1KB (only one space) ain the alternate folder(where it shouldn't go depending upon the condition).
The folder is having no space constraint and the file size is just 2KB.
Empty file handling mode has been set to ignore. still its being generated
Please suggest.
Thanks & Regards,
Sushama

Hi Suraj,
Here  it goes::
for(int b=0;b<itemLineList.getLength();b++){
                         Node itemLineDetails = itemLineList.item(b);
                         NodeList itemLineDetailList = itemLineDetails.getChildNodes();
                         for(int c=0;c<itemLineDetailList.getLength();c++){
                              Node ItemDetailsNode = itemLineDetailList.item(c);
                              if(ItemDetailsNode.getNodeName().equalsIgnoreCase("MetaData")){
                                        NodeList ItemDetailsList = ItemDetailsNode.getChildNodes();
                                        status = checkIteminMDM(ItemDetailsList.item(1).getTextContent());
                                        if (status){
                                             getTrace().addInfo("in update");
                                             populateCreateorUpdateHashMap(ItemDetailsNode,"update");
                                        else{
                                             getTrace().addInfo("in create");
                                             populateCreateorUpdateHashMap(ItemDetailsNode,"create");

Similar Messages

  • File in target directory?

    Hi Friends,
    The audit log says that the message is delivered but i cannot find the file in target directory.Does this indicate that the file is picked by the receiver system,if yes then once the file is picked the file is deleted from the target directory?
    Note-The "file construction mode" is set as create.
    Regards,
    Suresh.

    Hi Suresh
    Check for the SXMB_MONI as suggested above if you have success message.
    Moreover
    ,if yes then once the file is picked the file is deleted from the target directory?
    When the audit log says message delivered it will be delivered to target directory.
    Now if your scenario is file to file message can be deleted from source directory and not from target directory.
    Thanks
    Gaurav

  • Date and Time in Sender File Adapter Target Directory

    Hi there,
    is there a way of using Date and Time from XI to the Target Directory naming? To use variable substitution some fields of the message had to contain that date and time information, which is not our case.
    For filename you can use "add time stamp" option, but and for target directory?
    Thanks and regards,
    Henrique.

    > <i>Do you have further information on how to perform
    > this with shell commands?</i>
    > >> You need to write a shell script. This script will
    > add the date/time stamp into the folder in the target
    > system. This shell script is executed from the File
    > adapter. So once the file is written into the target
    > directory, then it will rename the directory.
    Hi there, Moorthy
    We've tried to write that shell script that you mentioned, but now we have a few doubts on how to make it create the proper directory.
    In the file adapter, my target directory is "/%var1%/%var2%/", where %var1% and %var2% are variable substitutions, referencing data which comes from the payload. Now, I need the shell script to append "/<Year>/<Month>/" in the target directory. But where to archive the script? If it stays in the root directory, than how to make it create "/<Year>/<Month>/" folders inside a directory which is variable (/%var1%/%var2%/)?
    Is there a way of passing %var1% and %var2% as parameters for the shell script?
    Thanks a lot,
    Henrique.

  • File Adapter: Target directory does not exist

    Hi All,
    Using RFC to File Scenario.
    While processing in File adapter, i get following error for the target directory.
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Target directory '
    *********************\Out' does not exist and cannot be created.
    Although I am able to use the same target directory on my local machine.

    I think FTP user didnt have suffiecinet otherrization to create directory in FTP, check once again Directory format entered is correct.
    if you have phycial access to FTP then create one folder and enter the same in File channel and push one message and let us know the result.
    Regards,
    Raj

  • Changing File Adapter target directory - container bounce required?

    I edited USPSshipment.wsdl in the FulfillmentESB project to reflect my desired target directory (/home/oracle/usps_ship instead of C:\temp) and then re-registered the project with ESB.
    The registration completed normally, and I verified that the edited USPSshipment.wsdl file exists in the deploy and content directories in the ESB home. Also, checking the WSDL file from the ESB console showed the new value.
    However, until I bounced the OC4J_soa container, order submissions continued to use the C:\Temp target. After I bounced the container, the next order submission went to the desired /home/oracle/usps_ship.
    What is the expected cacheing behavior here? Is there a programmatic way to clear the cache after an ESB deploy. It is too restrictive if I have to bounce the whole container serving ESB and BPEL (perhaps many processes and ESB adapters) just to make a change in one particular project.
    Thanks.

    Using the SOA Demo, FulfillementESB project ~
    Example: Immediate reflection of change w/o further action
    If I change the Shipment router filter criteria (Fulfillment_Shipment.esbsvc) to cut at say $750 instead of $500, then re-register FulfillmentESB with OrderBookingIS, JDeveloper reports:
    Registration of Services Successful
    Fulfillment Shipment Updates
    The next submitted order follows the new criteria (e.g. a $600 order goes out USPS).
    Example: Change not reflected in runtime, until OC4J container restarted
    If I change the target physical directory of the USPS Shipment file adapter (USPSShipment.wsdl), then re-register FulfillmentESB with OrderBookingIS, JDeveloper reports:
    Registration of Services Successful
    However, the next submitted orders continue to be written to the previous target physical directory. Checking the value of the re-deployed USPSShipment.wsdl at the ESB host filesystem and through the ESB console shows the updated value, but the old copy is being actually used to process the message.
    Restarting the OC4J container, causes the updated USPSShipment.wsdl to be referenced for messages submitted thereafter.
    -Todd
    Message was edited by:
    tbeets

  • Unable to Receive the File into Target Directory Using FTP

    Hi All,
    Here I Did Simple File-File Scenario With FTP.
    Iam Able to Pick the File From the FTP Location And File has been Deleted From Source Location ( Set the Processing Mode as Delete ).
    Unable to See the Pipeline Steps in Moni, But Able to Se the Success Message With the Inbound Payload only.
    Also chked with the comm. channel of sender and receiver, where the sender shows the message process details but not the receiver comm. channel.
    Regards
    Giri

    You Did the right thing in communication channel that u selected the IS.
    Hi
    Just check out if you sending the correct parameters and also check out the payload you sending and check out in SXMB_MONI for you message that after success wat is the payload and match with your input.
    Rather, for input check, In IR, get the XML data from ur Message Mapping and then save it to your inbox that is input directory.
    Also check out the permission of Output directory and also check the configuration of sender and reciver communication channel.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • Dynamic file naming when downlaoding the file to target directory

    Dear friend,
    My requirement is in the Adapter type File, File Name has to be dynamically generated. (i.e., each time the file name will be different according to the input name from the IDoc field). Can someone help me in this regard ???
    Thanks in advance,
    Jose Augastine

    Hi,
    The dynamic filename generation concept is as follows.
    In your filename field. just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    If you have any clarifications, do get back,
    Regards,
    Bhavesh

  • Unable to  convert the file name in Target directory

    Dear Experts,
    Currently iam facing a problem with some files.my interface is a File to file .As per the interface the sender will pick the flatfiles from source directory which the file name was BNP_NE201.txt once my file reached to target directory the name of the file willrenamed as VENDOR_Payment.NE201 automatically  for this they have done some OS level script in receiver communication channel of the first interface which we have added "un operating system command after message processing" in processing parameters tab.again one more sender comm channel wil pick the file from first target directory which is having naming  convesion of "VENDOR_Payment.NE201 " and post it to target. all the two interfaces are file to file (NFS) . for a parctuclar day files has been posted to 1 st target directory and the receiver communication channel is not yet convert the file names bcz of that the second communication channel can't able to pick the files from target directory. for some times that is working fine and some times it is unable to convert.
    from our side i check every thing .could you please suggest me the way to approch
    Reagrs,
    Kiran tanuku

    >> for a parctuclar day files has been posted to 1 st target directory and the receiver communication channel is not yet convert the file names bcz of that the second communication channel can't able to pick the files from target directory. for some times that is working fine and some times it is unable to convert.
    You need to wait until the file is converted. After when it is converted then the second interface sender communication channel will pick the files.
    What do u mean by unable to convert?
    Is it unable to do the content conversion? if so then check the data as you said that it sometimes it works fine.
    > The best approach is to change the name of the file in the receiver communciation channel instead of using a script.
    Thanks,

  • Moving file from Target to Archive Directory

    Hi All,
    My Scenario is that we have a .txt file in Target directory in SAP PI (AL11) and when an arching Script is run this file is moved from Target folder to Archive Folder and also uploaded in R3.
    Now the requirement is that the file is transffered from Target to Archive folder without being processed.Now the user want the file back in Taget folder from Archive Folder also user also wants to know who has run the Script.
    Please let me know how to put file back from Archive to target folder and check the log as who Run the Script.
    Regards,
    Nidhi

    Hi Nidhi,
    I think i am not getting your question
    >>when an arching Script is run this file is moved from Target folder to Archive Folder and also uploaded in R3.
    Now how the script is run? using OS commands of File adapter or by some other means
    >>Now the user want the file back in Taget folder from Archive Folder also user also wants to know who has run the Script.
    For getting it back in Target folder, you can manually copy it. Also to see who has done this you need to check how the scripts run. If it runs as a standalone one then you need to see whether in the system you have some log files of the run. If file adapter runs this scripts then check the Communication channel monitoring log (BTW it if was File communication channel which invoked this Scripts then the message would have sent to PI. Need to recheck that too)
    Regards
    Suraj

  • Placing the file in UTF-8 format in Target Directory

    Hi Experts,
    Can any one please tell me how to place a file in Target Directory by PI in UTF-8 format.
    It is a file to file PassThrough (no IR part) scenario and in receiver File Adapter I have used File Encoding as UTF-8
    but still PI is not placing the file in UTF-8 format in the Target Directory.
    Are there any modules by which the files are converted to UTF-8 format.
    Can anyone please help me out.
    Thanks and Regards,
    Prajwal

    Hi,
    Please let me know if I need to change the TransferMode,File Type and FileEncoding in both sender and receiver channel.
    I tried the below settings but still the file is not being placed in UTF-8.
    Sender CHannel:    TransferMode         Text
                                   FileType                  Text
                                   FileEncoding            UTF-8
    Receiver Channel    TransferMode         Binary
                                     FileType                  Text
                                     FileEncoding           tried with UTF-8 once and tried with blank
    Can any one throw some light here.
    Thanks and Regards,
    Prajwal

  • Message attachment - place in target directory

    Hi,
    The message comes to XI as an attachment.
    This message has to be placed in target directory by configuring Receiver File adapter using FTP protocol.
    How to configure the adapter to place an attachment file in target directory.
    Regards,
    Anil.

    hi Anil,
    The message comes to XI as an attachment.
    how will it come as an attachment, do you mean Sender Mail adapter?
    Regards,
    Karna...

  • Restrict processing empty files

    hi,
    hi,
    I don't want to proceesing empty files to target.iam using XI 3.0 with service pack 9.how to handle it.
    thanks

    Hi,
    you can handle it using Adapter modules....
    if you have SP Greater than 14 then you can handle it in the adapter configuration itself...........
    Stop Creation of an Empty File from File Adapter Using Module                         
    Thanks,
    Madhu

  • Process 0kb empty file and deliver to target directory

    Hello Experts,
    We had a requirements to process an empty file handling and send it to the receiver/target directory. We had configured to "Process Empty File" Handling and “Write Empty File. The 0KB file polling successfully and archived to the directory with empty payload, but the message output was never created/sent to the target directory. In smxi_moni error message displayed:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">CANNOT_READ_PAYLOAD</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Unable to read payload from the message object</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Since this is an empty file, there are no mappings involved.  Is there a way to that we could check for 0kb file? If it is empty file, we want to pass/place the empty file to the target directory and if it is not empty, we want the message to process in the standard way.

    Hi David,
    "Since this is an empty file, there are no mappings involved. "
    do you mean you didnt do the mapping at all cos it is empty file ?
    though it is empty file still you need to do the mapping as usually,but when you check the option process the empty file both in sender and receiver adapter ,then it will process even an empty file comes.if you dont check these options and you get an empty file during the process then the mapping will fail.
    in real time you don't know which one is empty file right,but her you know cos you are placing empty file.
    I think you got to do all the steps you do in eneral for a scenario and top on that you have to check process empty file in both sender and receiver adapters,but you may not see the payload in SXMB_MONI.
    but search in SDn you get lot stuff.

  • How to populate target directory from the source XML in Receiver File Adap?

    Hi All,
    Our scenario is IDoc - XI -(Receiver File adapter) File. Is it possible to populate complete "Target Directory" from the source XML message??
    Lets say we added field to maintain target directory in Idoc structure and some how populated value to it, then grab this target directory from the IDoc-XML and pass in Comunication Channel. I think its possible through Variable Substitation ...just want to make sure and if sombody has done the similar scenario their inputs would be great.
    Thanx
    Navin

    Hi,
    Please see the belowlinks
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios
    Re: Dynamic  File Name for Receiver File Adapter
    Variable Substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    try with adapter specific
    Example code...
    String newfilename="";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // Get Sourcefilename
    String oldfilename=conf.get(key);
    //extract first 3 chars of source filename
    newfilename=oldfilename.substring(0,2);
    //get the date
    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
    dateformat.format( new java.util.Date() );
    //append sourcedateL
    newfilename=newfilenamedateformat"L";
    // determine if prod/ dev / qa
    map = container.getTransformationParameters();
    senderService = (String) map.get("SenderService");
    if(senderServcie.equald("Prod"){
    newfilename=newfilename+"P";
    // change to new file name
    conf.put(key, newfilename+".tmp");
    Change it according to your requirement
    Regards
    Chilla..

  • Target Directory in File Receiver Adapter

    Experts,
    I am trying for a scenario (File to File) and I am not sure if the target directory is a directory in XI server or my local machine. I used HTML client to send the message to the adapter. Also if any of you could give clear idea about source and target direcory without pointing to any weblog, I would greatly appreciate it. As I have tried every weblog available with a word File in it.
    Thanks
    Thilothama

    Thilothama,
    I've seen your previous posts and you never assigned any points. People in the forum spend their valuable time answering questions.
    I request u to reward the people who have replied to your posts. IF u consider that the replies have helped u , u can assign,
    2 points -- helpful
    6 points -- very helpful
    10 points -- problem solved..
    If u are not able to see the assign point s button refer to this thread...
    Unable to award points
    regards
    Shravan

Maybe you are looking for