File Receiver Adapter : ASMP Question

Hi all,
My requirement says i need to name my target file like this: <XYZ><YYYYMMDDHHMMSS>
Now i knw that i can achive this via the Adapter Specific msg  parameter but don't know how to proceed.
i have done this so far,
After referin this thread:[Receiver File Adapter - TimeStamp;
In the mapping done a UDF:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = conf.get(key);
String newfilename=SourceFileNamea; //Where a is a string that holds YYYYMMDDHHMMSS+
// change to new file name
conf.put(key, newfilename);
return "";
i have not done anything else apart from this UDF in the design, nothing in the Configuration, Which is why maybe i am not getting the desired result. My recv channel has this in the file name: XYZ
i get a file in the target directory like this: nullYYYYMMDDHHMMSS Don't knw y i get the null @ the beginning and don't know y it overrides the XYZ in the recv adapter File name tab.

Hi Hankovak,
   Please do the following check list:
1. Map to any of the higher level node it can be top most  message type node (eg.MT_Msg1).So that the modified name will be available  on the target side ASMA.
2Check the syntax again by right clicking on the UDF and selecting QUEUE.
3.In the communication channels of both sender and receiver  check the ASMA check box.
4.in the receiver side communication channel give  * asterik in the receiver file name scheme. uncheck the add timestamp as well .your UDF might be using the time stamp from the communication channel reporting Null value in the file name.This will definitely solve your problem
Please refer the follwing blog on ASMA for more clearifications.
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID0406368850DB01026224637153001718End?blog=/pub/wlg/2664
Thanks,
Ram.

Similar Messages

  • Using file receiver adapter with a different user

    Hello.
    I have a simple question (at least I think it is)
    Can I use a file receiver adapter (where the transport protocol is NFS - not FTP)
    so that a different user will access the directory (not the usual SAPServiceSID)?
    I don't see any place for using username and password, and using the FTP protocol is not possible
    because of security reasons.
    Any help Appreciated.

    Hello.
    Thanks for the quick answers.
    I'm sorry for not being clear enough before.
    I have a microsoft network share on a different server then the PI.
    When I use the path:
    server\share
    I manage to successfully put a file via the file receiver adapter, with NFS as the transport protocol.
    However in order to do this, the owner of the share had to give credentials to the user: SAPServiceSID of my PI system
    which is an active directory user.
    The owner wants me to use a local user instead.
    Can this be done with a local user?

  • Dynamic Configuration - Set Directory Path for File Receiver Adapter

    Hi Experts,
    I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf document I want to store in a dynamic directory (depending on the filename). so I have to read the filename out of the dynamic configuration and generate (depending on the filename) a directory for this file. Is that possible without a message mapping? I cannot make a message mapping because the file has the pdf format and should not get changed.
    best regards
    Christopher Kühn

    Hi Gaurav,
    I use the ASMA (respectively the filename) for the sender adapter. After the pdf was imported into XI this filename is in the ASMA.
    But what then??? How can I get this filename with the help of the variable substitution? and if I have this filename I have to change this filename a bit to generate the name / path of the directory.
    Please explain it to me detailled
    Thanks and regards
    christopher

  • Variable Substitution File Receiver Adapter

    Hi,
    I am in the process of implementing a scenario involving the conversion of a .jpg file to .bmp. In my scenario, I'd like to the .bmp file name to be dynamically controlled; therefore, I have used the Variable Substitution option in the File Receiver Adapter.
    In both the File Sender & Receiver comm. channels, I have ticked 'Adapter Specific Messsage Attributes' check-box and selected the 'File Name' option.
    The File Receiver comm. channel also has the following:
    File Name Scheme*: %File_Name%.bmp
    Variable Name: File_Name
    Reference: message:FileName
    Having done the above, I am getting the following error message in Comm. Channel Monitoring:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'File_Name'.: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'File_Name'.
    Would really appreciate your assistance on this.
    Regards,
    Reuben.
    PS: The Sender File Adapter has the

    Hi,
    The full error message is s follows:
    Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:294) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:294) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._Test_Conversion_.setfilename$(_Test_Conversion_.java:61) ... 24 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b]
    11:15:02 End of test
    Reuben.

  • Error in file receiver adapter (Directory does not exist / cannot be create

    I have a NFS reiceiver file NFS adapter with target directory:
    10.128.68.38\arbo2000\UploadPinfos\arbodev
    if I run this line in windows, windows access to this folder.
    Full Error log:
    Receiver Adapter v2123 for Party '', Service 'BS_0000_ARBO_DEV':
    Configured at 2006-04-06 18:08:26 CEST
    History:
    - 2006-04-06 18:08:35 CEST: Error: Message processing failed: Exception: Message processing failed - configuration error in file receiver adapter (Directory does not exist / cannot be created)
    Can somebody help me please??

    Hi Alvaro,
            If your XI server is running on Unix platform then you'll get the access only after mounting 10.128.68.38 this system as a drive. This is equivalent to the windows network mapping.
    Next thing is that once that is done then you can access the path /arbo2000/UploadPinfos/arbodev by mentioning it in your directory path.
    To check whether the above mentioned is the problem then pls do try by doing it with FTP protocol. If it works then for acting as a local directory for NFS you need to mount the drive.
    Cheers
    JK

  • File Receiver Adapter - time stamp in front possible ?

    Hi all together,
    is it possible with the file receiver adapter to add a time stamp in front of the filename?
    f.ex. <timestamp>_SUFFIX.dat
    With file creation mode "use timestamp" and file name scheme
    SUFFIX_.dat it will create
    SUFFIX_<timestamp>.dat     .
    Thanx a lot for your help
    regards
    Hans

    Hi,
    This is not possible in the communication channel, but if you want to add date time stamp on the filename, you can use dynamic configuration. For that you have to write an UDF in the message mapping concatenate the date tme stamp with the filename and extension.
    In the communication channel you need to check on the message attributes so that when the adapter framework is called the filename generated in the message mapping would be used by the adapter. In the communication channel remove the filename and put * in the filename, as filename is one of the mandatory parameters in the comm channel.
    Regards,
    Indranil
    Award points if helpful

  • Xml file in dynamic file name in file receiver adapter

    Hi,
    I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
    The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
    Does anybody have the solution to my problem? thanks in advance

    Thank you Raj for the direction
    The way to do it is :
    1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
    2. Put a "*" on the file name scheme
    3. In IR, create a UDF to set up target file name :
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // set up file name for receiver adapter
    String SourceFileName = conf.get(key);
    conf.put(key, TargetFileName);
    return " ";
    4. Map the above UDF to the header level of the target structure.
    Regards,
    Idi

  • Whats the use of 'Maximum Councurrency' in File Receiver adapter?

    Hi All,
            Whats the use of 'Maximum Councurrency' in File Receiver adapter?
    Xier

    Hello,
    Refer the  below thread and check it out my reply . I gave for JDBC adapter, but the concept is same for File/JDBC.
    Re: JDBC Adapter - One Connection prior to SP20
    Best regards,
    raj.

  • Content Conversion Parameter in File Receiver Adapter

    Hi all,
    I have created one File Receiver Adapter with Message Protocol 'File Content Conversion' and with the following configuration:
    Recordset Structure: Message
    Message.fieldFixedLengths: 1000
    My Message Type is:
    LogErro_MT
      Message (Type: String) (Occurrence: 0..Unbounded) (Details: Min,Max Length: 1000)
    But the file created by it has no data inside it. If I change the Message Protocol to 'File', the content of the file is the XML generated by the Outbound Proxy.
    Would someone can help me?
    Thanks in advance
    Leo

    Hi,
    Please create a data type with
    Records
    Message ---0..unbounded
    and hten MT for the same.
    In the receiver file adapter:
    Recordset Structure: Message
    Message.fieldFixedLengths: 1000
    Please check this weblog for the same:
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    IS this what you are trying to do.
    Regards
    Vijaya

  • Operating system command in file receiver adapter

    Hi,
    How to use the Run Operating system command after message processing option in the parameters tab of the file receiver adapter.
    I am working on a scenario wherein a batch file needs to be invoked after the file is written on the file system.
    So how do i invoke this batch file from the file reciever adapter ( Run Operating system command after message processing ).

    Hi,
    did you see this page?
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm
    it shows all you need to know
    Regards,
    Michal KRawczyk

  • Content Conversion in File Receiver Adapter

    Hi,
    I am doing a Content Conversion in File Receiver Adapter.
    Input to the Adapter is:
    <ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">
         <OrderID>123</OrderID>
         <Quantity>98</Quantity>
        <Price>76.23</Price>
    </ns1:FileResponse_MT>
    Desired output is:  <b>OrderID# Quantity# Price (123#98#76.23)</b>
    I tried to accomplish this with different settings in ‘Recordset Structure’ and ‘Conversion Parameters’ but could not achieve it, every time an empty file is produced.
    Would appreciate any help on this.
    Best Regards,

    Hi,
    Enclose your structure with a parent element like this.
    <ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">
    <parent>
      <OrderID>123</OrderID>
      <Quantity>98</Quantity>
      <Price>76.23</Price>
    </parent>
    </ns1:FileResponse_MT>
    Then give the parameters, it will work.
    parent.fieldSeparator = '#'
    parent.endSeparator = 'nl'
    Regards,
    P.Venkat

  • File Receiver Adapter - Content Conversion

    Dear All,
    We are using <b>DB to file Scenario</b>.We are using File Content conversion to get a File Comma Separated.
    Data is picked up from the DB and our payload before getting in to File adapter is given below.
      <?xml version="1.0" encoding="UTF-8" ?>
         <ns6:AssoInfo_MT xmlns:ns6="urn:NDB2File2DB">
         <AssoInfoList>
          <AssoInfoNode>
           <Name>ABCX</Name>
           <ID>31154</ID>
           <Salary>10000.0</Salary>
          </AssoInfoNode>
         <AssoInfoNode>
           <Name>ASDAS</Name>
           <ID>18978</ID>
           <Salary>10000.0</Salary>
         </AssoInfoNode>
         </AssoInfoList>
      </ns6:AssoInfo_MT>
    In File content conversion we are giving
         <b>AssoInfoNode.addHeaderLine = 0
            AssoInfoNode.fieldSeparator = ,
            AssoInfoNode.endSeparator = 'nl'</b>
    We are getting output as
    <b>ABCX,ASDAS</b>
    But the <b>expected</b> output is
    ABCX,31154,10000.0
    ASDAS,18978,10000.0
    What change we need to do in our File Receiver Adapter configuration.
    Regards,
    Vedavyas

    Hello,
    Test without these 2 options :
         AssoInfoNode.addHeaderLine = 0
         AssoInfoNode.endSeparator = 'nl'
    I think your problem is with the "endSeparator", it is not necessary.
    A new line is created for each new AssoInfoNode automaticaly.
    Regards,
    Chris

  • File Receiver Adapter - Writing Attachments

    Hello Folks,
    i received a SOAP Message with some attachments. Now i want to write these files into a file system.
    No i have seen, that the file receiver adapter has no support for attachments. is there any solution for that?
    Thanks for answers.
    Best regards
    Robert

    Hi,
    I thought of creating files in the target with different format...   i think i understood ur query other way...
    Fine...
    U can do other way..
    Convert ur Attachments to XML first...
    Then Pass this XML to File adapter and recreate the Files in Target file adapter...
    I hope u can do in this way
    Babu

  • File Receiver Adapter

    Hi Guys,
    How can i read a text file using the File Receiver Adapter
    Can anybody help me, please?

    > How can i read a text file using the File Receiver Adapter
    For reading a text file you need to use Sender File Adapter. Receiver File adapter is used to write the file at target directory.
    In order to read the file you have to do File Content Conversion (FCC).
    What is the format of your text file. Is it csv or fixed length file.
    For doing the FCC you can get many bolgs on sdn. If you want just search it.
    Regards,
    Sarvesh

  • File receiver adapter simultaneous access

    Hi@all!
    I'd like to know whether the file receiver adapter ensures that no other process can access the file while the adapter writes the file to disk.
    -THX

    Hi Steffen,
          As of now in XI file adapters there is no file locking concept implemented. The best way will be to use temporary file and then once the file is fully written, file adapter will rename it as per the file name schema provided.
    Hope it is clear..
    Cheers
    JK

Maybe you are looking for

  • Audio tracks go out of pitch then return mysteriously

    Quite a mystery: for some unusual reason I found when I booted my Intel iMac duo core and started Logic Pro 7, then played a project; the audio tracks (vocal's) were out of pitch. I adjusted them using a manual plug in and found a reasonable pitch at

  • How to get the value of combo.

    hello, i am new in jsf so sorry if the question is asked before. in my project i have a jsp page where there is a combo(selectOneMenu). as far as my knowledge a combo is constructed with itemLabel and itemValue. i can get the value of the combo by us

  • Green tint when hooking G4 PowerBook up to LCD projection

    I've been hooking up my G4 to external projection for presentations for a long time and then all of a sudden last week whenever I hooked up to display information to a group the projected image had a green tint. The image always looks fine on my comp

  • Adjustment in Value of Assets acquired two years ago

    Hi I have a scenario and i am wondering anybody can help or guide me. Asset were procured two years back which were acquired through PO. User came back today that they actual asset quantity was 98 instead of 100 and now they want to adjust GR to 98 w

  • User Status change date

    Dear All For an ABAP report , i need to find the table names for date and time of change in the User Status for the Maintenance Order. ( for example from INPR to RETN) I have tried JEST and CRM_JEST tables but couldn't found the correct result. Pl ad