Cretaing a new adapter using the existing file adapter

Hi,
Is it possible to create a new adapter type copying the existing file adapter. That is I want to create a new adapter type for example "FNFS" and use the same module callsapadapter which is used in the File adapter. So that this new adapter type "FNFS" functions like the File adapter,
What are the actions I need to perform to acheive this.
Thanks in advance.

what will be the significance of that?
I think if you need some extra functionality then Development of Custom Module is enough.
/people/john.ta2/blog/2006/12/20/to-create-or-not-to-create-an-sap-xi-adapter
Thanks
farooq.

Similar Messages

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

  • When I open iTunes on my new computer using the .itl file, and using the same external drive holding the songs, all of the songs I added to iTunes up to a certain date have broken links, while none of the songs have broken links on the old computer.

    I want to open the  iTunes library on my new laptop with all the playlists and stuff I built on the old computer. I have all my music on an external drive. I have copied the .itl file from the old computer and opened it on the laptop, and it has all the playlists, but all of the songs that were added to iTunes up to a certain date have broken links. What am I doing wrong?

    Moving library files around while leaving the data in the same place usually presents no problems. Moving the data around independently from the library usually breaks things. With Windows machines all you should need to do is make sure that the same drive letter is being used on the new system as with the old. If that is not possible you need to get your library into a portable layout before moving it between systems.
    Typical layout of iTunes folders:
    When the media folder is inside the main iTunes folder as shown above then the library is portable. Typically with a split library the iTunes Music or iTunes Media folder (everything inside the red outline) is moved to a different drive by choosing a new locaton for it and then consolidating.
    To make the library portable again you need to copy the library files and album artwork folder into the parent folder of the media folder so that the nested relationship is recreated. (BTW If your media isn't already inside your designated media folder then you will also need to consolidate the files that are outside of it, before you copy the library files.) You can then use the hold-down-shift-when-starting-iTunes method to open the library file in that parent folder. Once the library has been opened, tested and closed you are most of the way there.
    The iTunes window inherits its title from the folder holding the library files so, unless you created a folder called iTunes to hold the media folder, iTunes may now have an unexpected title when you run it. The parent folder can be renamed as iTunes, and the library opened again. Alternatively, if the parent folder is at the root of the drive, or has other data which you wish to leave in place, you can create a new top level folder called iTunes and move the library files, album artwork and media folders into it before opening and testing the library again.
    If the library doesn't work after any step simply reverse it by undoing a move or rename or opening the previous set iTunes Library.itl file.
    If all has gone well then the library is now portable. Once you've migrated the data to a new system you can copy the library files back to their usual internal location if you find that having them on the external drive affects performance...
    tt2

  • Email attachment name in sender mail adapter to the receiver file adapter

    HI ,
    Ths is regarding email to file scenario. I am trying to create file (in rceiver file adapter) with the same name as the email attachment that i read from mail sender adapter. I want ro use adapter module for this. I could find from blogs that there is module - GetAttachmentName - available that i can use for this in sender mail adapter.
    Can you please let me know what whetehr i neeed to mention any module key and parameters for this.
    I assume , i need to do following steps :Please confirm.
    1. i can use this module - after payload swap module and before standard mail adapter module in sender mail adapter
    2. select ASMA option in advanced tab in sender mail adapter
    3. In receiver file adapter select ASMA option in advanced tab in sender mail adapter
    4. Also select file name option in ASMA in sender mail adapter
    Thanks,
    Vamsi

    Hi Vamsi,
    your scenario is also described here: Re: sender mail adapter - attachment name
    If you use the Module getAttachmentName, which is described here,
    http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
    your scenario should work as you described it.
    You just need to make sure that the Attachment Name that you read in the first place, is mapped to the Filename Attribute of the
    Fileadapter (http://sap.com/xi/XI/System/File/FileName).
    regards,
    Daniel

  • HT3965 I have an ipod with itunes loaded on it.  I bought a new iphone 5C and want to set it up.  It wants me to create a new account.  Should I create a new account or use the existing ipod account?

    I have an ipod with itunes and apps loaded on it.  I bought a new iphone 5c and want to set it up.  It wants me to create a new account.  Should I create a new accountor use the existing ipod account?

    If you want you're apps and content on you're iPhone then use you're existing account. If not then create a new account.

  • How to add new fields to the DME file in F110

    Hi,
    We have a requirement add new fields to the file that is used in  F110.
    .I did go in to DMEE transaction but I hae no idea how to add new fileds to the existing file.
    Can anybody please help me in resolving the issue.
    Thanks
    Venkat
    Edited by: Venkat R on Jun 8, 2009 8:45 AM

    Hi,
    There is no function module for that, We have created our own function module and attached to that field.
    Refer the below code. This will fetch the document number.
    DATA: lwa_item   TYPE dmee_paym_if_type,
            l_fpayp   TYPE fpayp,
            l_fpayhx TYPE fpayhx,
            first_flag TYPE c,
            lv_lifnr   TYPE lifnr,
            voucher_id TYPE string,
            voucher TYPE string,
            invoice_id TYPE belnr_d,
            voucher_len1 TYPE i,
            voucher_len TYPE i.
      TYPES:
      BEGIN OF lt_regup,
            xblnr TYPE xblnr1,
            belnr TYPE belnr_d,
      END OF lt_regup.
      DATA: lt_regup TYPE STANDARD TABLE OF regup,
            lv_regup TYPE regup.
    Hope this helps.
    Raja.A
    Edited by: Raja.A on Feb 16, 2011 7:17 PM

  • How do I best integrate existing laptops for a new server?  Can I use the existing home folders on the laptops and make them into Network Users?

    How do I best integrate existing laptops for a new server?  Can I use the existing home folders on the laptops and make them into Network Users?

    Yes it will work.  I've done it for a few users in my small office.  As with anything, there are quirks that you may or may not experience.  Most quirks are app-related, due to app developers hard-coding absolute paths into their apps for things like temp files (Photoshop).  Strategies for resolving these sorts of quirks can be found via google.  You would probably have seen these quirks already when using server-based home folders for your kids.  If you haven't noticed them, then you're probably fine.
    The tech note you cited should be fine.  It doesn't explicitly say so, but you'll need to enable ssh on your server, at least temporarily, so you can upload your home folder to the server using scp, rsync, etc.  Don't try to copy the files up to the server via Finder.
    Once all your files are transferred to the server and in the right place, make sure to chown them on the server, so they are owned by the userID you created for yourself on the server.
    As with anything this involved, make a good backup of your laptop first.
    Note I have one user that isn't too happy with the responsiveness of the periodic mobile home syncing.  She has about a decade of e-mail in her home folder, probably 50 to 100 emails per day, many with attachments.  Mobile home syncing takes a long time to check and sync this huge tree of itty-bitty files, eevn with server-side file tracking turned on.  The other users are happy.
    The nice thing about mobile home syncing is that when a user "graduates" to an age where they've earned their own laptop, you can change them from a server home user to a mobile home user, with a minimum of fuss.  Also, if you lose or break a laptop, you can add a new replacement laptop to your network, and pull-down a replica of the home folder from the server, with almost no downtime.

  • My daugther' iphone id under my wife's email and now all music and pictures are attached to that id.  Wife now has an ipad and looking at using the existing id for set up? Would like to establish new id for daughter and not lose or share music/photos?

    My daugther' iphone apple id is under my wife's email and now all music and pictures are attached to that id.  My wife now has an ipad and I am looking at using the existing id during set up?   Thus, I would like to establish new apple id for daughter, associated to her email account, however I do not want to lose or share her music/photos, nor share with my wife's id.  Is this possible, or is it best just to establish a new id for my wife, and then change the email address associated with the existing apple id?

    well if you establish a new apple id for your wife that would be best unless you email all of the existing photos to your email and then when you have established a new id then you log into your email on the new id and save all of your pics onto it by pressing on tthe pic for about 5-8 seconds then options will come up and you press the save to my album ..as for the music if you can copy and paste, through computer, the songs then awesome!

  • I set up my new computer using the apple ID i always use, and then later migrated all my files from my old mac book to the same new one, but under a different user (same ID). how do i consolidate the two users on my new mac book?

    i set up my new computer using the apple ID i always use, and then later migrated all my files from my old mac book to the same new one, but under a different user (same apple ID). how do i consolidate the two users on my new mac book?

    Well if you use the Finder Go menu to Computer, a window opens up double click on your boot drive and then on Users folder, open the other user folder and open Public and drop your files into DropBox
    When you do this it will copy them and change the permissions and user assigned to it, so log into the other user and place them into your respective normal folders.
    Once you have all your files over and don't need the old user, use System Preferences > Accounts to delete it if you wish, however it's good two Admin accounts on the machine in case something bad happens in the other. Some people for security reasons on use a Standard account for most uses and a emergency Admin account.
    One can still do most Admin things in Standard user.

  • How to process a text file (mail attachment) using the sender mail adapter?

    Hi guys,
    Is it possible to process mail attachments using the sender mail adapter? Let's say I have a structured text file (attachment) which needs to be mapped and sent to target system.
    Post please any thoughts or experience.
    Thanks,
    Olian

    Hi Olian,
    Have a look at these helpful links -
    1. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05&overridelayout=true
    2. http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
    3. http://help.sap.com/saphelp_nw70/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Regards,
    Sunil Chandra

  • I am trying to create mobile pages using the steps file new new document page from sample mobile starters jquery mobile (cdn).  When "page from sample" is selected, the subsequent options are not available.  This seems like a silly question, but how do I

    I am trying to create mobile pages using the steps file>new>new document>page from sample>mobile starters>jquery mobile (cdn).  When "page from sample" is selected, the subsequent options are not available.  This seems like a silly question, but how do I acquire these options?

    You can get the latest jQuery Mobile Themes directly from jQuery Mobile's web site.
    https://demos.jquerymobile.com/1.1.0/docs/api/themes.html
    Or roll your own with ThemeRoller
    http://themeroller.jquerymobile.com/
    Nancy O.

  • File Adapter Overwriting the output files

    Hi All,
    I´m using a File Receiver Adapter to write flat files on to an FTP. Same Communication Channel is used for all types of output files (As per the business requirement the file name(
    MzOutput.txt) shud b same for Deliverz orders, Purchase orders etc...). The receiver legacz szstem reads one file at atime and deletes it. So if i´m writing a Deliverz Order File, i have to wait until the file MzOutput.txt gets deleted and then i have to write the next file using the same name. in order to acheive this, i had used a module processor which waits until that MzOutput.txt gets deleted. Mz problem is
    As there are ´n´ no of orders waiting in the queue, if at 12:14:00 the MzOutput.txt gets deleted, then two threads which check for the existance of the MzOutput.txt file finds nothing and tries to write at same time. as a result, first file got overwritten by the second file.
    I dint check the indicator OverwriteExisting File in the CC configuration.If i use two different CC channels to write the same file, it is giving FTP Exception which is true.
    I´m loosing few deliveries as a result of the above case. Can anzone please help me out in this regard?
    Thnx in Advance
    Anil

    Hi Anil,
    Why dont you write the files with 'Add time stamp' option on for the file name and then the third party/legacy system to read the files in the order which they were created.?
    Another option will be to write these files into a folder with these Add time stamp option/counter option and make a shell script check the folder for the MzOutput.txt file exists in the folder from where the third party/legacy system reads the file and once it has deleted the existing file, then ur files shud be moved in the order in which they were written n the temporary folder.
    This will avoid the queue of messages in the adapter engine.
    Cheers
    JK

  • Have tried to copy ratings over to a new computer using the export playlist function and this fails... can anyone suggest why?

    have tried to copy ratings over to a new computer using the export playlist function and this fails... can anyone suggest why?

    Because ratings don't travel with the files or the playlist.
    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
    tt2

  • Can I use the same wall adapter to charge my ipad and my ipod

    Can I use the same wall adapter to charge my ipad and my ipod touch

    No offense, but that's nice. I heard I was wrong and that what I said didn't make sense, so I simplified it. If I'm wrong, fine, but you have no reason to be such a *****. You never explained why I was wrong and you were right, so how am I or anyone else suppose to know that for sure? Then I tell you my source, and you insult me some more and then ask for my background, which as for this area goes, I already gave you. I worked at an Apple store for Christmas and was told by someone on the Genius team to tell customers not to charge iPads via iPhone chargers, as they had been known to fry the adapter or in one weird case, the actual outlet. Now I could see the outlet blowing be a bunch of other contributing factors, and not directly associated with the charger. However, the topic arose when a customer came in because her iPhone wall adapter didn't seem to be working, but wasn't that old, and admitted to charging her iPad with it. Why would I NOT believe that?
    And my DEEPEST apologies on commenting on old threads. I know how vital that is to existance and what an inconvenience it is to EVERYONE else. I'll be honest, I wasn't checking dates as I assumed suggested posts with like one answer near the top of the list were newer.
    Fine, I did something foolish, but I still win as I'm not either of you heartless ****** with nothing better to do than Internet harass others. Congratulations on your existences.

  • Instead of using the make file can you build nirlpk.sys using MS WDK 8.0 on VS2012?

    After downloading the NI nimhddk_windowsWDM-2 and -1
    Instead of using the make file I built nirlpk.sys using MS WDK 8.0 on VS2012
    I copied the source files out of the dir /nirlpk to the MS template for WDM drivers
    It built after turning warnings as errors off.
    After uninstalling the NI_DMX driver I tried to install the RLP driver that consisted of nirlp.inf and nirlpk.sys
    I got this message:
    Windows found driver software for your device but encounted and error while attempting to install it.
    PCI-6602 RLP WDM
    Driver is not intended for this platform
    Is the nirlp.inf file correct for loading on Windows 7 64 bit?
    Any ideas?

    I have now altered the example along lines
    suggested by ghaneman*, who pointed out that
    a trusted application did not need to use the
    FileOpenService/FileContents just to get an
    InputStream.
    * Mentioned on 'File associations / sandboxed app.'
    http://forum.java.sun.com/thread.jspa?threadID=785224
    The altered code is..
    /** Load a file into the editing area.
    @param path A string representing the path to the desired file. */
    public void loadFile(String path) {
        // first try as if this were a trusted application..
        if (!path.equals(".")) {
            try {
                FileInputStream inputStream = new
                    FileInputStream(path);
                loadFile(inputStream);
            } catch (Exception e) {
                // we do not have trust, use the FileOpenService
                loadFileByFileService(path);
        } else {
            // we only have a directory, use the FileOpenService
            loadFileByFileService(path);
    public void loadFileByFileService(String path) {
        try {
            if (fileOpenService==null) {
                fileOpenService = (FileOpenService)ServiceManager.
                    lookup("javax.jnlp.FileOpenService");
            fileContents = fileOpenService.openFileDialog(path, xtns);
            // the user may have cancelled the action..
            if (fileContents!=null) {
                loadFile( fileContents.getInputStream() );
        } catch(UnavailableServiceException use) {
            use.printStackTrace();
        } catch(IOException ioe) {
            ioe.printStackTrace();
    }If the user launches the trusted version, and
    selects 'always trust' for the (self signed)
    certificate, the end user can thereafter double
    click a file and see it appear in the application's
    editing area with no further user interaction.

Maybe you are looking for

  • How Can I make a slide button1 autoslide another slidebutton2 to false if S.B.2 is True??

    Hi all How Can I make this Work! Look at my VI example. The VI runs, and the I start to switch the Integrating slide to true. and the random data can be seen in the Peak And Volume indicators. Then if I swith the Flow/Temp slide to True (Temp) and th

  • Creation of a billing document from an idoc

    Dear all, I'd want to find a soulution for the following scenario: The need is to create automatically an accompany invoice when a good issue is posted. I think that a possible solution should be: -an output type linked to the delivery document (gene

  • My speakers are making a stuttering noise and the mouse is flickering   random software glitches

    Hi as soon as I boot my speakers are making a stuttering noise unless I turn them down to nothing. this noise will continue while I work if I turn my speakers up. But if I watch or listen to anything the noise is gone. The mouse flickers and links on

  • Case when then not working

    In my database, two variable ID and time (varchar2) are there. I want to populate another variable using case when then by putting below conditon to convert like this But its not working. Can anyone help me if time =1 day then '1 Day' time > 2 days a

  • Why won't Mountain Lion install on my MacBook Pro?

    Ok, so I've just bought Mountain Lion from the app store for my 2010 13 inch MacBook Pro, it's been downloaded, and now I'm trying to install it. It takes me to the first page, I accept the software license agreement and all that, choose that I want