Save object in memory

Hi all,
i have to save an instance in memory because i need the information later.
The Programm goes like this:
1) Get instance1
2) call sap-classes and methods
3) create instance2
4) Call function to show instance2
5) Start BDT functions. And at this point i loose my information about instance1
how can i write the instance1 into "global memory" for accessing all data all the time?
Thanks
stefan

Hi Stefan,
If you want to save an instance of a class in memory, you can use persistent classes.
Generally ABAP programs work with data and objects that are valid at
runtime. They are transient i.e. temporary and disappear when program ends.
To store this data permanently and independently of the program context,
i.e. persistently,  it must be stored in the database. This means instances of
global classes can be written to database tables.
Persistent Services in ABAP Objects can be used to write the current attribute
values of objects defined as persistent to associated transparent tables.
On request, these values can  be imported from the tables and assigned to an
object previously defined as persistent.
To use persistent services for objects, their types must be created as
persistent classes in Class Builder.          
Send me your mail ID so that I can pass you a document on creation of persistent classes.
Award points if found useful.
Regards
Indrajit.

Similar Messages

  • Save a big memory object to fi

    Hi, in my App, I have a image which may be as big as 8M bytes. I would like to save it to a file to iphone local disk. I know I can make it to NSObject (or NSData?). My questions is how can I set the path of this file.
    thanks,
    ff

    Can anyone show me some code about how to save a big memory to iphone local storage and read it back?
    Thanks,
    ff

  • How can i save object in file ?

    For example I have some object in the memory, and i want to save it on the disk, and after i'm going load this object in memory and work with him...How can i do it ?
    May be I must use JavaSpaces technology (but i don't enought knows this) ?
    Please help me.
    [email protected]

    Serializing an Object:
    try
    ObjectOutputStream myOutput ObjectOutputStream(new FileOutputStream("objects.out"));
    myOutput.writeObject("Hello! How are you on this very fine day?");
    out.close()
    catch(IOException e)
    System.err.println("Doh! You're probably writing to a file that you don't have permissions to access!");
    catch(ClassNotFoundException e)
    System.err.println("You should only get this if you're using some strange reflection stuff, or just try to output something that doesn't exist.. I don't really know why the compiler wouldn't catch this error instead otherwise");
    Getting that object back:
    try
    ObjectInputStream inObjects = new ObjectInputStream(new FileInputStream("objects.out"));
    String myObj = (String)in.readObject();
    System.out.println(myObj);
    Pretty simple. If you want to be more practical, and store more than one type of object in that file, you can use relfection:
    -Jason Thomas.

  • Reading Lots of Objects into Memory

    I need to read thousands of fairly large objects from an object database to the point that the JMV memory runs out.
    A solution is to: read, use and discard as opposed to loading all the objects into memory at once -pretty simple but I want to do it right. I have a general idea on how to implement the approach but I need your help in locating some reading materials, code snipplets and/or best practices.
    Thanks!

    If you're using thousands of objects you might look into the Flyweight Pattern (depending on what these objects are and what state they have). You might also look into increasing the amount of memory available to the JVM via that -Xms switch.
    Aside from that, if you reuse the same reference name (variable name)(s) you'll allow the Garbage Collector to recover that memory.
    Good Luck
    Lee

  • Compare system state (number and types of objects in memory)

    We have 2 exactly identical servers running our application talking to the same database.
    When some obejct from server 1 is deleted, a message is passed to server 2 to delete the object from its cache too.
    Forget the database, I want to design a testing system which compares the system-state (number and type of live-objects) in memory for server 1 and server 2 after the operation and the message, and reports any discrepancy.
    Any ideas ?

    Are you trying to debug a distributed cache implementation?
    If you want to inspect the state of your application on multiple servers creating a JMX bean might be a solution.
    http://java.sun.com/developer/technicalArticles/J2SE/jmx.html

  • How to remove the Object from memory.

    Hello.
    Flash file that i made with Flex Builder uses memory too
    much.
    Look at the next example source code.
    var testCan:Canvas = new Canvas();
    this.addChild(testCan);
    this.removeChild(testCan);
    testCan = null;
    but just memory usage still goes up, is not freed instantly.
    so if i load the large flash files on my web browser,
    after 5 munites or something, the web browser is down.
    How to remove the object from memory immediately without
    delay?

    It's all about the Garbage Collector ..
    There is a nice write up here :
    http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html

  • How to export & import interface type data object to memory

    Hi experts,
    My greetings to all.
    we have came across a situation where we need to pass interface type data object to memory
    and import same from memory.
    DATA context TYPE REF TO if_timecontext.
    its not possible with regular export statement.
    is their any other way to do it?
    Thanks in advanced,
    Sudhir

    Thank you saurabhmani & sandra.
    @ saurabhmani : i tried assigning object context to memory (field-symbol) and exporting it to memory, but got runtime error.
    @sandra : XML serialization & shared object concept sounds intresting but as you already checked that interface IF_TIMECONTEXT is missing the required IF_SERIALIZABLE_OBJECT interface.
    Istead of exporting context data object to memory we tried different approch and it worked out for our requirement
    Regards
    Sudhir

  • Object allocations, memory and UINavigationController

    I'm having a problem with object allocations
    Is it possible to release/remove a view from a navigation controller stack when I click on the back button on my navigation controller? I wish to get rid of the view I just left (the one disappearing to the right of the screen). The problem is that the next time I navigate to the same view lots of new objects are allocated, and none of the old ones are released.
    In the tableView:didSelectRowAtIndexPath: method I initialize a new view controller for the view I want to push to the stack and assign it to a property. The problem is that the old view seems to continue to exist in the navigation controller stack, because it's never released according to the "object allocation" section in Instruments, thus the amount of allocated objects and memory just grows and grows as I click back and forth in my navigation controller.
    For example, if I click on a cell in the first table view (which displays a second view) and then click on the back button and then click on the first cell again, the second view and all of its objects are created again, but the previous instance of this view seems to still exist somewhere in the navigation controller stack.
    What's the best way to solve this?
    Here's some of the code in the "tableView:didSelectRowAtIndexPath:" method:
    self.categoryController = [[CategoryViewController alloc] init];
    self.categoryController.category = category;
    [self.navigationController pushViewController: self.categoryController animated:YES];
    Each time this code is executed tons of new objects are allocated, but the objects allocated by the previous CategoryViewController are not released.

    Thanks you so much for the great article!!
    cotton.m!!
    I can cheat on my assignment again, haha!
    strange
    Stepwise Refinement :|
    http://forum.java.sun.com//thread.jspa?threadID=5206258

  • Can i save app. to memory card.

    how can you save applications to memory card...when you choose option move to memory card...the application move from phone to phone internal sd(sd 0)...not external memory card.am i donig something wrong.

    Read here as already brought up in the forum many times.
    http://discussions.nokia.com/t5/Nokia-X/how-to-install-apps-and-games-to-external-memory/td-p/262110...
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • How to save OTF to Memory using E_PRINT_PO?

    HI All,
    How to save OTF to Memory using this FM: ME_PRINT_PO.
    Please let me know.
    Ashok

    No, it should be there, becos inside that FM this fm is also calling, SAVE_OTF_TO_MEMORY. but it is calling in Enhancement point. im not able to put the break point there. i think that code is not executing.
    im getting this error: Breakpoint not set since enhancement ISAUTO_SCH_EMM_SAPLMEDRUCK is switched off.
    Please help me on this.
    Ashok..

  • Save objects in ATG

    Save objects in ATG:
    Hi,
    I was recently being interviewed for an ATG job which involved custom development. I was asked to describe the development that I did. When I mentioned that I used RQL to persist data in repository items, the interviewer broke in with "RQL?" I said "yes RQL" and then there was a long silence. She then replied "why would you use RQL? in ATG you just save objects" I don't know what she is referring to, can anybody explain what she meant?

    Yes, there are different methods that can be called to persist your changes.
    - MutableRepository.updateItem() is called to update an existing items and is used in conjunction to MutableRepositoryItem.setPropertyValue()
    - MutableRepository.createItem() followed by MutableRepository.addItem() is called to create a new item
    - MutableRepository.removeItem() is called to delete and existing item

  • How to save object to SQLite?

    Hi,
    I am confusing with this.
    How to save object (instance of class) to SQLite and read the
    object back to Flex?
    Thanks
    Mark

    SQLite is a relational database, not an object-oriented
    database, so you can't just spit an object into it without
    translation. You
    could serialize it with JSON or XML and store that in a
    column, but then you're giving up most of the benefit of a proper
    database engine. It's best to flatten the object yourself into the
    database structure. How you do that, exactly, depends on your
    object structure(s).
    So, if you have an object like this:
    var foo:Object = { bar: 'qux', bletch: new Date(), farbly: [
    42, 69 ] };
    you probably need two tables to represent it: a main "foos"
    table (a collection of foo objects) and a separate "farblys" table
    to hold the array elements. This separation of arrays out into a
    table of their own linked to the original table is called
    normalization.
    Normalization will be covered in any decent tutorial book on
    SQL databases. You'll need to get one to best understand how to
    utilize SQLite, or anything like it. I got a lot out of
    The
    Practical SQL Handbook. I doubt that it covers SQLite
    specifically. I have an older edition, so I can't check, but the
    current edition was released about the same time that SQLite was,
    and SQLite took some time to get noticed. The
    SQLite Documentation
    will fill in the gaps. The main thing to beware of is that SQLite
    doesn't support all the advanced things you will read about in a
    general SQL book.
    If you don't want to mess with all this object-relational
    mapping and normalization stuff, and you don't have much data to
    store, you might look into Flash Local Stored Objects (LSO), also
    called "Flash cookies". The runtime has a default limit of 100 KB
    of data per application. The advantage of LSOs is that you can use
    them like any other ActionScript object, and Flash handles the
    storage details for you. It's great for configuration data and
    small bits of user data.

  • Exception Thrown when trying to save object to disk

    Alright,
    So I've got an object that looks like this
    private class InputData implements Serializable {
                public String name = "";
                public String condition = "";
                public String value = "";
                public String[] productTypes = new String[]{};
                public String[] ticketStates = new String[]{};
                public String fieldName = "";
                public String startDate = "";
                public String endDate = "";
                public String dateRange = "";
    ............................It has two constructors and overrides the toString() method. I'm trying to save it to a file with the following
    private void saveSearchesToDisk() {
                File f = new File(SAVED_SEARCHES_DIR, SAVED_SEARCHES_FILE);
                InputData[] data = ...
                try {
                    FileOutputStream fos = new FileOutputStream(f);
                    ObjectOutputStream oos = new ObjectOutputStream(fos);
                    oos.writeInt(data.length);
                    for (int i = 0; i < data.length; i++) {
                        oos.writeObject(data);
    oos.flush();
    oos.close();
    fos.close();
    }catch(FileNotFoundException e) {
    e.printStackTrace();
    catch(IOException e) {
    System.out.println(e.getMessage() + " hi hi hi hi");
    e.printStackTrace();
    I'm getting this exception, and I have no idea why???
    java.io.NotSerializableException: com.sun.java.swing.plaf.windows.XPStyleAny ideas?

    I think you are misunderstanding something.
    The reason why the outer members are being serialized, or attempted to be serialized, is because of the inner object's hidden link to the outer object. So the outer object is reachable from the inner object, and the outer data members are reachable from the outer object. There is no hidden link from the inner object directly to the outer object's members if that's what you're talking about. So there is no need for the notation you are talking about and so it doesn't exist.
    So the question remains, do you want the outer object serialized or not?

  • Releasing Objects from memory-Performance improvement

    First Javafx was excellent in coding on UI rapidly. We did a image application and it was fine with some small memory tweaking pending. Since we have binded variables from static file to all objects, i think the memory of objects removed or deleted is not getting released. Is the there any way to unbind or destroy the objects which are binded. I think the the next release of Javafx will have a better performance.Any ideas or suggestions will help us to improve the performance drastically. Any help on this regard is highly appreciated. Thanks in advance.

    Thanks Keap for your reply. Since we have used bind extensively, let me tell scenario the where we have used binding. We used a static class in javafx. Many variable in static class has been binded to javafx objects. Since the variable of javafx objects are binded to stastic varaibles, i doubt even after after not using the objects they are in the memory, because of the binding reference. since i dont have control of the static file scope, the objects are in memory and the app throws out of memory after sometime.We came forward with solution ie to use the conditional binding. I need other experts comments before proceeding as it needs lot of refactoring. I like to know whether the following statement
    "var a = bind if (condtion) c else d" (note: c is a variable in static class eg MainStatic.c)
    will deattach the binding of "a"with the the static file variable.
    As this issue blocking, we need a solution to improve it. Any help on this would be highly usefull.
    Thanks in advance

  • I have a 5300 but nothing saves to the memory card...

    I've just bought a 5300 with a 2gb memory card, but all the music & pics i put on it seems to save to the phone & not the card. Have only got about 5 mp3's on it & says memory is full! Does anyone know how to fix this???? Thanks!!

    Whenever you transfer anything,just use the DATA STORAGE(Drag&Drop Facility)not the Nokia Mode.
    CHeeRios!

Maybe you are looking for

  • How do I get the number of new RSS articles to show in the bookmark bar?

    I have Apple as one of my Bookmarks in my Bookmark bar. On my eMac at school, whenever there was a new Apple Hot News article, I would get a number next to my Apple that would let me know there was new Apple News. I can't figure out how to set that u

  • Additional firewire port needed for Canopus

    I have always used a Canopus to change analog video as I download onto my Mac G5 for video editing in iMovie. I recently replaced one that quit on me and now new one is not working right. Both analog and digital lights stay on, rather than one or the

  • Syncing with iCal not workin

    I just got a new Macbook and I'm trying to sync my blackberry calendar with iCal. I think I chose the wrong option when I first loaded the Desktop Manager program.  I should have chose "merge" and I chose the other option instead.  Now I can't get an

  • Incorrect Developer Key

    Hi All, I am using a Sneak Preview version (minisap) of NSP SAP NetWeaver 7.0/2004s (SP9 and higher). I am logged into the system with user name BCUSER. Now, I am trying to rename a program which I installed with 'se38'. I am getting the following er

  • SAP BW project brief

    Hi gurus would anybody please advise me the structure of BW project team and the steps the team needs to go thro while implementing the BW in the organisation already having SAP installed? Also advise the relation between technical and functional doc