File sender channel - file name "null"

Hi all,
I am designing a scenario where I am reading 2 files from 2 different senders, and these 2 messages are fed to a multi mapping in BPM, which creates a single target message. I need to read the name of only one of the two source files and populate it in one field of the target message.
I have read some blogs and forum threads about how to access the file name from the sender file channel. It calls for turning on the adapter specifc parameters in the channel and writing the following UDF (taken from Michal's blog #2664) -
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return  ourSourceFileName;
After doing all this, I am getting file name as "null". Can someone pls let me know the cause for this ? My concern is since I want to read only one file name, so I have updated only that specific file sender channel for adapter specific attributes.
Regards,
Shankar

Hi Raj,
I checked the ASMA for second channel also, but no luck
I can see both the files names in their respective messages in SXMB_MONI under node 'Dynamic Configuration'. But the two messages enter the multi-mapping within BPM (where I have put trace to print the file name as per above code), the value is shown as "null".
1) Is this file name access is possible only in simple scenarios ?
2) Also, is the file receiver mandatory ? I have email receiver in my scenario.
Any clues ?
Regards,
Shankar

Similar Messages

  • Mass change in file sender channel.

    Hi,
    I want to do change in all my file sender channel and want to add following parameter.
    Parameter Name : clusterSyncMode
    Parameter Value : lock
    I have approx 300 file sender channel.
    So is ther anything by which I can perform mass change at the same time and can add parameter to it ?
    Please suggest if anything like this.

    You can change the parameter as a Service Property, applying to all communication channels at once. Please check the note below (for 7.1+, you must change it on NWA instead of VisualAdmin)
    [ Note 1259515 - 'clusterSyncMode' is available as service property|https://websmp230.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1259515]

  • File Sender channel polling successfully  but not picking the files.

    Hi All,
                    Can any one please provide any SAP Note  Or any Alert mechanism for the  File Sender channel in case where the XI channel in polling successfully at a particular folder from Source System  but not picking the files. Thanks in Advance for the solution.

    Hello,
                  If you want to know the reason for failure in picking up the file ,You can check the MessagingSystem monitoring for the reason behind failure.
    http://host:httpport/MessagingSystem/monitor/monitor.jsp
    For Alert may be you can follow prateek instructions.
    HTH
    Rajesh

  • File Sender Channel

    Hi,
    I have a job running which copies a file from remote server to my PI server. I have a file sender channel which picks up this file send it for further processing.
    Is there a way to make sure that the file sender channel reads the file only after it has completely been  copied from the remote server assuming that we dnt know what is the maximum time it could take to write the file.

    Two options,
    1. The script should write the file having set the indicator as read only. Only after it writes the file completely the read only option should be removed.
    the option ●      Process Read-Only Files (for transport protocol File System (NFS)) should be disabled
    2. Use this option,
    Advanced Mode
    To specify additional parameters in the adapter configuration, set the Advanced Modeindicator.
    ●      Msecs to Wait Before Modification Check
    Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.
    This parameter is not available if you have selected File Content Conversion as the Message Protocoland then made an entry under Recordsets per Message that splits an input file into several messages.
    Note
    This parameter is applicable only for the File adapter. If you enter a value in this field when configuring the sender FTP adapter, it will have no effect.
    All above solutions will work only if its NFS and not FTP

  • MDM lookup parameters from File Sender Channel

    Hi SDNers,
    In my current assignment I am required to make an SAP MDM lookup in a JAVA Mapping to fetch certain details to further process the message.
    Currently the MDM server details along with user id and password are maintained in a properties file.
    During Migration from Development to Quality or from Quality to Production Environment this properties file needs to be changed and the mapping needs to be reimported individually in each environment.
    I want to avoid this cumbursome task of changing the properties file and re importing the Java Map on each environment.
    Is there any way to mention the following 3 parameters in the Sender Channel itself (in my case it is FIle Channel)
    Server IP Address, User ID, Password? so that the Java Map at runtime can access these parameters from the channel, as each environment will have different channel.
    I don't know if I can use ASMA or Additional Parameters for achieving this.
    Regards,
    Gautam Purohit

    Hi Michal,
    Can you please elaborate this?
    I need to give parameters like;
    mdm.repository.host=Development_Server
    mdm.repository.name=Development_Rep
    for all three environments.
    How can I achieve this using Value Mapping?
    Regards,
    Gautam Purohit

  • Sender Channel - File Archiving - No Create Target Directory option

    Hello,
    We are getting an error because our Sender channel is always trying to create the target directory when saving a file in our archive location. 
    Using a Receiver Channel the option "Create Target Directory" exists, so I can disable that option.  Is there a way to disable that option on a Sender Channel when archiving?
    Thanks,
    Matt

    Reviewing the settings available from Help.sap.com says:
    "Configure Sender File Adapter"
    Under Processing Mode, specify what is to happen to files that have been processed successfully.
    u25CB       Archive
    u25A0       To add a time stamp to the file name, select Add Time Stamp.
    The time stamp has the format yyyMMdd-hhMMss-SSS. The time stamp ensures that the archived files are not overwritten and it enables you to sort them according to the time that they were received.
    u25A0       Enter the name of the Archive Directory.
    I do not see anything in here that helps clear up this issue.
    Also, I have given a target directory.  The problem is it still tries to create that directory. 
    Thanks,
    Matt

  • Multiple Files as attachments in File Sender Channel

    Hi All,
    I am trying a scenario where i need to pick all files in a folder and zip them at once. The name of the ZIP file can be anything, but names of the files in the zip file should not change.
    Example : sample_il0.csv, sample_il1.csv, sample_il2.csv, sample_il3.csv.
    now the Zipped file can be any thing. Like completezip.zip. But in the completedzip.zip should have these sample_il0.csv, sample_il1.csv, sample_il2.csv, sample_il3.csv files.
    The condition is the names of the files should not be changed in the Zipped file. Zipped file name can be anything. This is much like selecting all files at once and right click and zip them at once on windows.
    For this i am using additional files option in sender file adapter and payloadzip bean.
    It is creating resultant completezip.zip file and this zip file has 4 files namely MainDocument, sample_il1.csv, sample_il2.csv, sample_il3.csv.
    Everything is good except MainDocument . Here i am  expecting sample_il0.csv file.
    <SOAP:Body>
    - <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink">
    - <sap:Payload xlink:type="simple" xlink:href="cid:payload-d33190d134c811e1b0861606dd288802sap.com">
      <sap:Name>MainDocument.zip</sap:Name>
      <sap:Description />
      <sap:Type>Application</sap:Type>
      </sap:Payload>
    - <sap:Payload xlink:type="simple" xlink:href="cid:payload-d33190d234c811e1cb7a1606dd288802sap.com">
      <sap:Name>sample_il1.csv</sap:Name>
      <sap:Description />
      <sap:Type>ApplicationAttachment</sap:Type>
      </sap:Payload>
    - <sap:Payload xlink:type="simple" xlink:href="cid:payload-d331b7e034c811e1c7dc1606dd288802sap.com">
      <sap:Name>sample_il2.csv</sap:Name>
      <sap:Description />
      <sap:Type>ApplicationAttachment</sap:Type>
      </sap:Payload>
    - <sap:Payload xlink:type="simple" xlink:href="cid:payload-d331b7e134c811e192371606dd288802sap.com">
      <sap:Name>sample_il3.csv</sap:Name>
      <sap:Description />
      <sap:Type>ApplicationAttachment</sap:Type>
      </sap:Payload>
      </sap:Manifest>
      </SOAP:Body>
    Here my question is how to change MainDocument.zip to sample_il0.csv  as shown in the below.
      <sap:Name>MainDocument.zip</sap:Name>
      <sap:Description />
      <sap:Type>Application</sap:Type>
    If i am able to bring above as below, then i think, everything will work fine.
      <sap:Name>sample_il0.csv</sap:Name>
      <sap:Description />
      <sap:Type>Application</sap:Type>
    How to change the obligatory name of main payload ?
    Best Regards,
    Subbu

    I somehow think you have complicated the scenario with modules and additional files. You could have zipped the file at sender using some script and then made a simple file transfer.
    For your question, I don't think you can change the name of MainDocument. It is the name of the first picked file which seems to be converted into MainDocument.
    Regards,
    Prateek Raj Srivastava

  • File Sender channel stopped polling on FTP site

    Dear all,
    We have many file to Idoc interfaces running in production and all are they good.
    Yesterday we faced one issue, one of the interface's sender communication channel stopped polling and didn't picked the files from FTP.
    There was no error on communication channel monitoring and it is green.
    We stopped & started the channel then started picking the files. But this is not usual behavior of file adapter.
    We found one SAP Note 1083488, according to this note, we are in the latest SP level( PI 7.0 SP 14). So not required to apply this patch my case.
    What should i do to not to face next time
    Regards

    Hi Bhavana,
    Check the below Q & A.....
    >> Q: After configuring a large amount of File Adapter sender channels, the J2EE Engine becomes very slow and some services start to block. How can I solve this issue?
    A: Up to and including XI 3.0 SP13 each File Adapter sender channel permanently consumes a J2EE application thread. To solve this issue, increase the number of configured J2EE application threads using the SAP J2EE Engine Config Tool ("cluster-data" -> "Global server configuration" -> "managers" -> "ApplicationThreadManager" -> "MaxThreadCount").
    Starting with XI 3.0 SP14 / PI 7.0 application threads are allocated on demand by the File Adapter and returned to the thread pool after it has finished the polling sequence, so thread shortage situations will typically occur much more rarely than with earlier SPs.
    Also as said by Other SDN'ers check the locks.
    Thanks,

  • Issue with archiving in file sender channel

    Hi Experts,
    We have configured a file to  ABAP proxy scenario in our production PI  7.0 system. the  file sender  communication  channel  is configured to perform " file content conversion"    and archive the  source file  after it is processed successfully.
    Recently , the sender channel stopped archiving the files.  but it is processing them.
    we need the source files to be archived.  i do not see any  related error  in XI logs and default trace files . also it is not a problem with disk space on file system either.
    can you please let me know  how the issue can be resolved.
    Thanks.
    -Kaushik

    Hi
    Make sure that you have selected processing mode Archive
    Try by Checking Add Time stamp  check box.
    Check the Archive File path in correct format
    or put archive file in diffrent folder from which selecting file.

  • Received File send with file name to destination side

    Hi All,
    Here I have used FILE adapter in Receive location and WCF-BasicHttp adapter in send ports.
    Requirment is should be able to send the file name also along
    with the file to destination from BizTalk.
    No orchestrations in this project. DynamicSendPassThru sendport. Please find the below screenshot for send port properties.
    How can i fix this please assist me on this.
    Thanks & Regards,
    Vasu

     Hi Osman,
    below code is custom pipeline code. and what code and where can i add the code.
    regarding send the file with file name from BizTalk to OutBound transport location.
    Please assist me on this.I'm not aware coding part. 
    publicMicrosoft.BizTalk.Message.Interop.IBaseMessageExecute(Microsoft.BizTalk.Component.Interop.IPipelineContextpc,
    Microsoft.BizTalk.Message.Interop.IBaseMessageinmsg)
                System.Diagnostics.
    Debug.WriteLine("Inside
    SendFileRenameWithDate Pipeline",
    "SLNG.BizTalk");
    IBaseMessageContextmessageContext = inmsg.Context;
    // if the transport type is file for outbound, then change the add in the date in the file name.
    stringadapterType = (string)inmsg.Context.Read("OutboundTransportType",
    "http://schemas.microsoft.com/BizTalk/2003/system-properties");
    // The file name in the file adapter must contain '%SourceFileName%', e.g. CB_%SourceFileName%.xml
    if(adapterType ==
    "FILE")
    // Retreive the file name from the message context
    //object obj = messageContext.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
    //string customSendFileName = obj.ToString();
    //System.Diagnostics.Debug.WriteLine("FileName:" + customSendFileName, "SLNG.BizTalk");
    // Append with date in ddMMyyyy_HHmmss format
    stringcustomSendFileName =
    if(string.IsNullOrEmpty(DateFormat))
                        customSendFileName =
    DateTime.Now.ToString("yyyyMMdd_HHmmss");
    else
                        customSendFileName =
    DateTime.Now.ToString(DateFormat);
                    System.Diagnostics.
    Debug.WriteLine("FileName:"+
    customSendFileName, "SLNG.BizTalk");
    // Write back with new file name to the message context
                    messageContext.Write(
    "ReceivedFileName",
    "http://schemas.microsoft.com/BizTalk/2003/file-properties",
    customSendFileName);
    //if (messageContext.IsPromoted("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties")
    == false)
    //    messageContext.Promote("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties",
    customSendFileName);
    //messageContext.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", customSendFileName);
                System.Diagnostics.
    Debug.WriteLine("Going
    off SendFileRenameWithDate Pipeline",
    "SLNG.BizTalk");
    returninmsg;
            #endregion
    Thanks & Regards,
    Vasu

  • File Sender Adapter - File overwritting in the Archiving folder

    Hello Experts,
    I am doing File sender to proxy Receiver Async Scenario.
    In File Sender adapter, i am using the Archiving option by spacifying the
    Archiving path.
    Files are picked up and archiving happen successfully.
    Problem is: - once the File is picked up and archivied into the Archiving location
    If end user again rectifies some data in the same file and place it in the source directory
    then i am getting the following error in RWB Commu. channel monitoring.
    Failed to archive file 'File1.TXT' as '/Input File location/File1.TXT' after processing. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 File not renamed.  File already exists.  You may delete the existing file and then rename.u2019 For details, contact your FTP server vendor.
    I know this is because of File sender adapter is trying to archive the file with the same name(File1.txt) in the archiving location.
    My Question: - Is there any option to allow the File sender Adapter for overwritting the
    File in the archiving location.
    Thanks & Regards
    Jagesh

    check if there is proper rights to over write files in the archive folder.
    The problem seems to be that the rights/authorization is not there. Else the adapter usually overwrites files in the archive folder unless you use the timestamp option.
    Archive
    Files that have been successfully processed are moved to an archive directory.
    u25A0       To add a time stamp to a file name, select the Add Time Stamp indicator.
    The time stamp has the format yyyMMdd-hhMMss-SSS. The time stamp ensures that the archived files are not overwritten and it enables you to sort them according to the time that they were received.
    u25A0       Under Archive Directory, enter the name of the archive directory.
    u25A0       If you want to archive the files on the FTP server, set the Archive Files on FTP Server indicator. If you do not set the indicator, the files are archived in the Adapter Engine file system.

  • File sender adapter:FILE to IDOC without BPM, can't see in SXMB_MONI.

    Hi all
    I have a FILE - XI - IDOC Async scenario without BPM.
    I configured FILE sender adapter and IDOC receiver adapter. I made a mapping to transfer file data to the structure of IDOC.
    Now when i am trying to load the file using command prompt, i cud see nothing in the monitoring. Whereas if i go to the communication channel monitoring of runtime workbench, i saw that CC is polling correctly and was reading the file also.
    And also wen i saw in the processed folder which i mentioned in the CC configuration for the ARCHIVE DIRECTORY, i saw that file got transferred to the folder also.
    I don't understand why i cant see anything in the monitoring.
    Could anybody help me to rectify the problem. Is there anything i m missing ?
    Regards
    Naina

    Rajesh/Amar
    TCode:: SXMB_ADM->Integration engine configuration->specific configuration->runtime
    Trace_Level = 3 then you can get all MONI PIPELINE Steps also
    I did this change but cudn't see anything in SXMB_MONI.
    This is how i have configured my process:
    http://wiki.sdn.sap.com/wiki/display/XI/FiletoMultipleIDOCSplittingwithoutBPM
    But instead of IDOC splitting i have simple FILE - XI -IDOC scenario.
    I have configured everything exaclty the same way it is mentioned here. But for me the process is not visible at all.
    I can't even see the first request message in the monitoring.
    This is the message i can see in the communication channel monitoring:
    2010-05-24 09:07:41 Success Channel CC_*: Entire file content converted to XML format
    2010-05-24 09:07:41 Warning Channel CC_*: Empty document found. Proceed without sending message
    2010-05-24 09:07:41 Success File "/xyz/ABC.txt" archived after processing
    Is there any problem with the file and that could be the reason it cant convert the file to the request message MT_REQUEST and thus am not able to see anything in monitoring.
    help me guys....this is a simple process and i m stuck...its frustrating
    Regards
    Naina

  • File sender to file receiver scenario

    Hi,
    I need to move a file (any type) from an FTP server to another file server as-is (no mapping) via XI.
    What would be the quickest way to achieve this? Is doing anything in the IR avoidable since there is no mapping required?
    Regards,
    Rex

    I double checked the parameters..evrything looks fine.
    I donno why the adapter is not picking up the file. But my other file adapters are working fine.
    The parameters are as follows.
    (x) Sender () Receiver
    Adapter type: File
    Transport Protocol: File system (NFS)
    Msg Protocol: File
    Adapter Engine: Integration Server
    Src Directory: D:\XIDemo\Send
    File Name:    Pick_up.txt
    QoS: Exactly once
    Poll interval: 600
    Processing mode: Test
    Processing sequence: By Name
    File Type: Text
    The adapter is in active state.
    I deleted the initial adapter and created again, still not result
    Whats wrong here?
    thx
    praveen

  • File Sender : Multiple File being picked

    Hi All
    I have a scenario where I have multiple files in a directory . I have set the option to Processing Parameters to be EOIO and poll interval to be 60 seconds.
    The processing sequence is by Name.
    This File sender triggers a BPM. What I see is that when the File sender polls the directory. If ther are  multiple files, they get picked up at the same time and as many BPM are started.
    I would like it to work pretty much in a serial format where it picks up only one file triggers the BPM. When the BPM is done it can trigger the next file.
    How can I do this ??
    Regards
    Aju Paul

    Hi Aju,
    I have come across such scenarios...but not ones wer you have files wid same names in the same path wid almost same time stamps:)...well, d time stamp format can be specified upto milli seconds!...
    Will you be able to give some kind of an "advanced selection for the source file"-this option is available in the ftp adapter..here's the link to the documentation(just in case u haven't come across it earlier):-
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Regards,
    Sushumna

  • File Sender Adapter - file pick up

    We have a scenario, where we are picking up files from an ftp directory. Before we pick up the file - say .xml file, we have to make sure that there is .FIN file.
    How can we achieve this?
    reg

    Hi,
    you could write a module to do the check. Find more information in the blog
    Adapter Module to stop processing of duplicate file (FTP
    Location) sandeep jaiswal
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID1375690450DB01837587727037552414End?blog=/pub/wlg/9664
    Best regards,
    Erik Hubers

Maybe you are looking for