Unloading BufferedImage from memory

I'm doing a program loading a lot of large BufferedImages (100+) this is too much for the memory so i keep loaded only the active ones and unload the others. i just call image=null so that the garbage collecter knows it may be deleted but however i still get MemoryOutOfBound exceptions. This can be fixed by calling System.gc often and pausing with Thread.sleep but this is ridiculous coding - if my program runs on a faster or slower machine than mine the sleep duration values may be too long or too short!
can i just manually delete the image like i could do in C++? or at least is there a way i could know when the garbage collector is done?? checking the free memory amount seems to give unprecise results too.

errr... sorry i don't know how to do thisNot to be rude or anything, but I politely suggest you learn how.
See JPurify (or is it just purify?) there's something like this for java
Also Macromedia JProbe. You can get a free test profiler off of their website

Similar Messages

  • Unload widgets from memory (iPhone 6 16Gb - iOS 8.0.2

    Hi guys,
    I'm still getting acquainted with my new iPhone, and when I look at the processes running, I notice several widgets that I know I'll never use (Stocks is one of them).
    I'd like to know how to unload them from memory, and prevent them from loading again if/when I need to restart my phone.
    Ideas, anyone?

    If you get someone to reply to you, please let me know too. I have the similar problem. Thanks.

  • How to unload QTVR from memory?

    I have 15 QTVR movies in an external cast. Each is loaded
    from a Flash button menu to a QT sprite(2) using 'showvideo', and
    replaces the movie currently loaded to the sprite. Is there a way
    to unload the previous QT from memory before the new one loads?
    Here is the lingo for the 'showvid' function
    on showvideo myvid
    --** myvideo show
    go to "showvid"
    put myvid
    put "before :"&sprite(2).member.name
    sprite(2).member=member(myvid)
    updatestage
    sprite(2).node = 129
    sprite(2).member.directtostage=1
    put "After :"&sprite(2).member.name
    end
    Thanks Brian

    Hi Brian,
    Please try the
    unload
    function
    HTH

  • How to unload MC from memory?

    While running my app I need to create and kill MCs rapidly.
    Now I use "stage.removeChild(...);" Is this method removes created
    clip from memory, or they still stuck somewhere and eat my precious
    memory until it runs out and hang player?

    There is only mention I've found that's the removed MC must
    not have any other reference to it, then it will be placed in GC
    and disposed of. So the other question appears: How to monitor MC's
    references? Some times it's really hard to keep in mind all of data
    structure of an application. So, is there a way to get referrers
    from an Object?

  • Flex Can Not Unload Applications From Memory! QED

    Hi,
    at work we are trying to load and unload Flex Applications from a long standing shell application. We have studied the appropriate documentation, especially this
    http://livedocs.adobe.com/flex/3/loading_applications.pdf
    but we have found that Flex simply will nor release memory once used, no matter how simple the flex application. I have put a couple of posts on my blog about it
    http://www.dz015.com/?p=139
    http://www.dz015.com/?p=166
    In particular the second post seems to highlight what I would consider to be a bug.
    What do other people think.
    Has anybody out there successfully loaded and unloaded flex applications from within a shell application over a long period of time?
    Conrad

    Styles can pin an application or module in memory in 3.x versions of Flex but this has been fixed in Flex 4. There are other things that can cause memory leaks. Probably the easiest one to run into, especially with a shell application, are leaks caused by resource bundles.
    If a sub-application or module uses components that use ResourceBundles that are not used by the main application, those resource bundles will get registered with the ResourceManager and pin the first instance of the application or module. You can use the -compiler.keep-generated-actionscript compiler option to see which resource bundles the module and main application are using. The resource bundles are listed in the "compiledResourceBundleNames" object of the info() function. You can force the main application to have those additional resource bundles by adding the resource bundle metadata to the main application. For example, to add the "controls" resource bundle, you would add to the main application MXML file: <mx:Metadata>[ResourceBundle("controls")]</mx:Metadata> If you are loading your resource bundles as modules, make sure the resource modules have completed loading before loading the module that is being pinned.
    More information about leaks is available here: http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html
    -Darrell

  • How to create TYPE_INT_RGB BufferedImage from memory pixels

    Hello
    Using this code, I can make BufferedImage out of memory pixel array, but it is of TYPE_INT_ARGB type and I want it to be TYPE_INT_RGB
    How can I do it ?
    here's my code:
    int [] pixels=new int[width*height];
    Databuffer dataBuffer1 = new DataBufferInt (pixels, width*height);
    int [] masks = {0xFF0000, 0xFF00, 0xFF, 0xFF000000};
    SampleModel sampleModel = new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT, width, height, masks);
    WritableRaster writableRaster1 = Raster.createWritableRaster (sampleModel, dataBuffer1, null);
    ColorModel color_model = ColorModel.getRGBdefault ();
    BufferedImage  bufImage1=new BufferedImage (color_model,writableRaster1,false,null);

    Question 1
    To create a multipage tiff you use the method TIFFEncodeParam#setExtraImages. The method takes an iterator. I'm not sure if there is a built in way to append pages to an already existing file, but in theory you can read from the already existing file as needed (when iterator#next is called) and write to a temporary file, before replacing the existing file with the temporary one. So you'll still have to read the existing file, but you don't have to keep all the images in memory.
    If you switch to core java's ImageWriter/ImageReader api and get [JAI-Imageio|https://jai-imageio.dev.java.net/binary-builds.html] (which has a TIFF ImageWriter plugin) then you can insert images into an already existing file. Presumably the TIFF ImageWriter appends directly to the file.
    Question 2
    The only thing special about a BufferedImage is that it has exactly one raster at (0,0) and it's guaranteed to have a color model. RenderedImages may have more than one raster and are not guaranteed to have a color model. But if your RenderedImage does have a color model, then you get rgb data from it the same way a BufferedImage does,
    colorModel.getRGB(raster.getDataElements(x, y, null));There are other ways, but this is the most generic.

  • Version 5.0 will not unload itself from memory when I close it. This results in not being able to open FF later unless I manually go and close the application in Windows task manager. Any ideas as this is getting very frustrating.

    I have this issue on 3 computers that were just updated with FF 5.0. When I close FF, the application "Firefox.exe *32" remains in memory. Trying to open FF again later greets me with the error that FF can't open because another instance of FF is already running. Previous versions did unload completely and never caused this issue..

    I found the culprit. Norton Internet Security added an add-on to FF called Symantic IPS 2.0 which is causing FF 5 not to close properly. I have no idea what it is for but FF works properly again with it disabled.
    For reference, that add-on worked fine with FF 3.x as well as FF 4.x. It just doesn't seem to like FF 5.0.

  • Remove / unload external swf file(s) from the main flash file and load a new swf file and garbage collection from memory.

    I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
    This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/Down3()"
    import nl.demonsters.debugger.MonsterDebugger;
    var d:MonsterDebugger=new MonsterDebugger(this);
    stage.scaleMode=StageScaleMode.NO_SCALE;
    stage.align=StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, resizeHandler);
    // loader is the loader for portfolio page swf
    var loader:Loader;
    var loader2:Loader;
    var loader3:Loader;
    var loader1:Loader;
    //  resize content
    function resizeHandler(event:Event):void {
        // resizes portfolio page to center
    loader.x = (stage.stageWidth - loader.width) * .5;
    loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    /*loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;*/
    addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
    function onEnterFrame(ev:Event):void {
    var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
    loader = null;
    loader = new Loader();
    loader.name ="carousel1"
    //adds gallery.swf to stage at begining of movie
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requesterb);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    // stop gallery.swf from duplication over and over again on enter frame
    removeEventListener(Event.ENTER_FRAME, onEnterFrame);
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent):void {
    // re adds listener for contact.swf and about.swf
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
    var requester:URLRequest=new URLRequest("carouselLoader.swf");
        loader = null;
    loader = new Loader();
    loader.name ="carousel"
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    removeChild( getChildByName("about") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of gallery.swf
    MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    function Down1(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    var requester:URLRequest=new URLRequest("contactLoader.swf");
    loader2 = null;
    loader2 = new Loader();
    loader2.name ="contact"
    loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader2.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader2);
    loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    function Down3(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    var requester:URLRequest=new URLRequest("aboutLoader.swf");
    loader3 = null;
    loader3 = new Loader();
    loader3.name ="about"
    loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader3.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader3);
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    removeChild( getChildByName("carousel") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
    stop();

    Andrei1,
    Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
         loader.unload();
         loader2.unload();
         loader3.unload();
    I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
         function killLoad():void{
         try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
         loader.unload(); loader2.unload(); loader3.unload();
    I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly?  Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
    ---- Here is my updated code ----
    // variable for external loaders
    var loader:Loader;
    var loader1:Loader;
    var loader2:Loader;
    var loader3:Loader;
    // makes borders resize with browser size
    function resizeHandler(event:Event):void {
    // resizes portfolio page to center
         loader.x = (stage.stageWidth - loader.width) * .5;
         loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
    //adds gallery.swf to stage at begining of moviie
         Down();
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent = null):void {
    // re adds listener for contact.swf and about.swf
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
         var requester:URLRequest=new URLRequest("carouselLoader.swf");
         loader = new Loader();
         loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader.load(requester);
         } catch (error:SecurityError) {
         trace(error);
         this.addChild(loader);
         loader.x = (stage.stageWidth - 739) * .5;
         loader.y = (stage.stageHeight - 500) * .5;
    // sure this is not the best way to do this - but it is unload external swfs
         loader.unload();
         loader2.unload();
         loader3.unload();
    // remove eventlistner and prevents duplication of gallery.swf
         MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         function Down1(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         var requester:URLRequest=new URLRequest("contactLoader.swf");
         loader2 = null;
         loader2 = new Loader();
         loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);    
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader2.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader2);
         loader2.x = (stage.stageWidth - 658.65) * .5;
         loader2.y = (stage.stageHeight - 551.45) * .5;
    loader.unload();
    loader2.unload();
    loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         function Down3(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         var requester:URLRequest=new URLRequest("aboutLoader.swf");
         loader3 = null;
         loader3 = new Loader();
         loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader3.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader3);
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
         loader.unload();
         loader2.unload();
         loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
         stop();

  • Unload an external dll from memory

    Hello friends,
    we are currently trying to resolve the following problem:
    A vendor supplied dll has certain problems that can probably only be solved by unloading the dll from memory. This happens naturally when the application quits. But we need to reset it at run time. Is it possible to tell windows and/or labview to remove the dll from memory, so that it is being reloaded with the next call?
    Best regards
    Matthias

    Hello Matthias,
    LabView unloads the DLL when the VI that uses this DLL is unloaded. This happens when the application quits or when you close LabView. However you could use the VI-Server technology to dynamically load the VI using the dll. This has the advantage, that you could unlaod the VI after you used it, and so the DLL would be unloaded, too. YOu can check the developer zone on www.ni.com, if you are not familiar with the VI-Server technology.
    Hope this helps!
    Andre

  • Way to unload FM group from memory

    hi experts,
    Is there any way to remove fm group from memory and reload it into memory mannual in the components of the fm group?
    I set up a workflow and create a fm group to work for the workflow. A task in workflow calls a BO's method which calls a fm of the FMgroup for a user dialog. The user dialog screen belongs to the same fm group.
    But I found in business workplace(SBWP), when the previous workitem completed , that is, the user finish his screen, the FMgroup is not removed from memory. I think it is because the calling program, the business workplace, didn't end. So I wonder is there any way to remove the fm group from memory mannaully?
    thx!

    In Java who unload objects of memory is the Garbaga Collection.
    But we can help the G.C. doing the object eligible to be unload. For example.:
    class InfoData{
    class A{
    public static InfoData id = new InfoData();
    ... do something with id ...
    public void aMethod(){
    id = null; //do the static object elgible to be collected by G.C. !!!
    }

  • Removing or destroying an ABAP program from memory

    Hello!
    Is there a command to kill, unload, remove or destroy a previously called ABAP program from memory? Let me explain what I'm trying to do:
    I'm doing some WM developments and I use the function L_TO_CONFIRM to confirm transfer orders. This function belongs to function group L03B (program SAPLL03B) and eventually it makes external  calls to subroutines belonging to program SAPML03T.
    If my Z program calls this funcion, the SAPLL03B program is responsible for loading SAPML03T into memory and everything works fine. The loaded programs list (on the debugging menu) are like this:
    No     Program          Group with
    52     SAPLL03B       
    78     SAPML03T      52
    This is also what I get if testing L_TO_CONFIRM from SE37, where it also works.
    But I wanted to reuse some subroutines from SAPML03T on my Z program, so I call something like this:
    PERFORM set_quit_icon(sapml03t) ...
    This call happens before the function call, so SAPML03T gets loaded by my Z program first, and stays on the memory. The list of loaded programs then looks like this:
    No     Program          Grouped with
      1     ZWMO_023
    27     SAPML03T       1
    So after calling the external subroutine in SAPML03T, I do some more coding and finally call the function L_TO_CONFIRM. Inside this call, my list looks like:
    No     Program          Group
      1     ZWMO_023 => My Z program
    27     SAPML03T       1
    28     SAPLL03B       
    So SAPML03T is grouped with my Z program and not SAPLL03B as it would be if I hadn't called the external subroutine first.
    Now, the problem:
    Since SAPML03T and SAPLL03B apparently share some global data (at least global workarea/table LTAK), in a normal call (SAPML03T)LTAK gets filled by a select statement and instantly (and somewhat inexplicable from what I new until now) (SAPLL03B)LTAK also gets filled by the same data. Well, I've only seen stuff like this with field-symbols but this is not the case. I would bet this two workareas would always be in fact two different workareas, but during the straight function call they are not. They are the same (I wish I could find their pointer addresses (like C++ stuff) to prove they were the same, but I couldn't). But if I call the external subroutine first and SAPML03T gets loaded, then I do have two different LTAKs and that's where I have problems, because L_TO_CONFIRM was coded considering this single workarea thing and when I have two, it doesn't work.

    Yes, I tought about that.
    As a matter of fact, just last week we had another global memory issue in a costing user-exit and we tried solving it with a STARTING NEW TASK. This initialy solved our problem, but this command leads to the opening of a new gui session, and when running this cost calculation procedure in the background, a short dump COMMUNICATION FAILURE was raised, probably because of the lack of a SAP GUI link. We then used DESTINATION 'NONE' and this solved the problem (I think it also opens a new LUW).
    Also my WM problem is on a Z application that will be running under SAP Console, and I don't think opening a new GUI session with STARTING NEW TASK under SAP Console will work. I should try it anyway. - edited: I just remebered I did this a couple years go and it works
    I could use DESTINIATION 'NONE' in this case too, since the funcion module is RFC-enabled already. There are a few ways to solve the problem (which is already solved by the way). My main question still is about removing a whole program from SAP memory through ABAP commands.
    Thank you very much!

  • Play Media from memory, like a byte[]

    Hi,
    I'm using three media classes in tandem to stream and play a media file locally as shown below. The problem is my file is encrypted for security (in addition to normal encoding like avi). If it isn't encrypted, I can easily stream it. When it is encrypted I have to decrypt to a temp directory first, but this defeats the security.
    Is there any way to decrypt the Media as it streams?
    Alternatively, is there a way to play it completely from memory?
    I was able to do something similar with the ImageView class by creating an Image object from a BufferedImage via the toFXImage function of the SwingUtils package which allowed me to show the Image from memory. Anything similar for video?
        var media : Media = Media {
            source: filePath
        var player : MediaPlayer = MediaPlayer {
            media: media,
            autoPlay: true
        var box : MediaView = MediaView {
            mediaPlayer: player
        }

    I am also interested in be able to do something like this. Bump.

  • Problem with BTE and FI-parking- no data from memory ID to ABAP

    Hi Experts,
    I have a scenario in Business Workflow where I want to catch the data(BKPF & BSEG) after SAP transaction processing - event is to change parked FI-document with FBV2. I´m trying to use BTE to receive the data after processing transaction.
    All BTE steps seems to be activated - because I can debug my functions when processing FBV2 - but I cannot reach any data into my coding after processing.
    I have created my project in BF24:
    ZXXX Testing: WF-memory ID
    I have also linked few FI-events to my BTE interface funtion in BF34:
    00001130 ZXXX ZXXX_FIPP_CHANGE_BTE
    00002213 ZXXX ZXXX_FIPP_CHANGE_BTE
    00002217 ZXXX ZXXX_FIPP_CHANGE_BTE
    My BTE function ZXXX_FIPP_CHANGE_BTE is as following:
    DATA: memid(15) VALUE 'ZXXX_2217'.
    *Initialize
    CLEAR: t_vbkpf,
    t_vbsegs.
    FREE MEMORY ID 'ZXXX_2217'.
    *Backtracking of BTE
    EXPORT t_vbkpf
    t_vbsegs
    TO MEMORY ID memid.
    ENDFUNCTION.
    I have also created funtion to call FBV2:
    data: memid(15) value 'ZXXX_2217'.
    CALL TRANSACTION 'FBV2'.
    *Import memory of BTE
    IMPORT t_vbkpf
    t_vbsegs
    FROM MEMORY ID memid.
    *Free memory id
    FREE MEMORY ID memid.  
    When I set a breakpoint to both of the functions and I execute FBV2 I reach the breakpoints. Problem is that the data is not passed from memid 'ZXXX_2217' into function after FBV2(this syntax: IMPORT t_vbkpf t_vbsegs FROM MEMORY ID memid.)
    What could be missing. So both functions are called but NO DATA is passed from memory ID to my internal tables? This seems to be a problem with memory ID´s. Also in my BTE function ZXXX_FIPP_CHANGE_BTE I receive a sy-subrc value 4 when executing syntax "FREE MEMORY ID 'ZXXX_2217'. ".
    All hints appreciated,
    Jani

    Hi Ramki,
    I must be frustrating You with these stupid questions... You have already supported me hugely to get more famailiar with BTE. For example not to commit in BTE etc. Big thanks for that!
    In all cases when I have tested my project in BF24 has been always active; and yes I have changed the pre. posted document always to trigger the BTE.
    I still have a problem. I copied all customizing and coding into other system - with same dissapointing results. Let me describe this once more:
    <b>My entry in BF24:</b>
    <i>Product:                 ZBE
    Text:                       Jani testing
    RFC destination:
    Active:   </i>               X
    <b>My entry in BF34:</b>
    <i>Event:                   00002214
    Product:                    ZBE
    Ctr:
    Appl:
    Function module:            ZBE_BTE</i>
    <b>My BTE function:</b>
    <i>  DATA: memid(15) VALUE 'ZBE_BTE2214'.
      DATA: t_vbkpf LIKE fvbkpf OCCURS 0 WITH HEADER LINE.
      FREE MEMORY ID memid.
      EXPORT t_vbkpf TO MEMORY ID memid.</i>
    <b>And the function ZBE_BTE_EXECUTE where I call FBV2:</b>
    <i>  DATA: memid(15) VALUE 'ZBE_BTE2214'.
      DATA: t_vbkpf LIKE fvbkpf OCCURS 0 WITH HEADER LINE.
      CALL TRANSACTION 'FBV2'.
      IMPORT t_vbkpf FROM MEMORY ID memid.
      FREE MEMORY ID memid.</i>
    When I process my function ZBE_BTE_EXECUTE - and I have added a breakpoint into ZBE_BTE - for FBV2 call <b>it does not reach the breakpoint</b> in ZBE_BTE at all! This occurs when using event linkage 00002214! And I do execute a real change to parked document.
    But if I change the entry in BF34 to be linked for event 00002217 or 00002218 process reaches my breakpoint in BTE function ZBE_BTE! But in these cases also, it does not import the data after transaction call in function ZBE_BTE_EXECUTE. When I continue debugging the coding in BTE function ZBE_BTE further into SAP-coding, I can see that my internal table t_vbkpf is filled. But when I leave SAP-coding when FBV2 is completed and return to ZBE_BTE_EXECUTE - where t_vbkpf should be filled from memory id - t_vbkpf is empty!
    Again as a conclusion in this system:
    For BTE event 00002214 this locig does not work at all. For events 00002217 and 00002218 it does get activated, but does not bring any data from memory ID into my abap. Strangest this is that I use absolutely same kind of coding that You.
    Can You see if I have to fill those empty fields( Ctr. & Appl.) in my BF34 customizing? Or is some other customizing action missing?
    Br,
    Jani

  • Import  from Memory id is not working

    Hi All,
    In the program SAPF110V for Tcode : F110 , I have written an enhancement where when user clicks printout button then a popup will come which will ask for whether date should be printed in the check or not. for this i have used FM : POPUP_TO_CONFIRM . here i am exporting the value if user clicks no (value is 2 for NO).
    exoprt statemnt written :
    export l_v_answer from l_v_answer to memory ID 'ANS'.
    In the driver program for check printing i am importing the value .if value = 2 then i am clearing the date that has to be printed in the check.
    import stmt :
    Import l_v_answer to l_v_answer from memory ID 'ANS'.
    however the value is not getting imported here.
    not able to find the reason why the value is not getting picked with import. please let me know the solution.
    Thanks,
    Preethi.

    called program
    REPORT  ZTEST7.
    selection-screen begin of block b1.
    parameters: a like mara-matnr.
    selection-screen end of block b1.
    types: begin of tp_sel_tab.
          include structure zstr2.
    types: end of tp_sel_tab.
    data: t_sel_tab type standard table of tp_sel_tab with header line.
    data: w_t_sel_tab type tp_sel_tab.
    *call screen 9100.
    start-of-selection.
    select ernam from mara into corresponding fields of table t_sel_tab where matnr = a.
    export t_sel_tab to memory id 'ZTEST7'.
    loop at t_sel_tab into w_t_sel_tab.
    write:/ w_t_sel_tab-ernam.
    endloop.
    calling program
    REPORT  ZTEST8.
    *types: begin of tp_sel_tab.
         include structure zstr2.
    *types: end of tp_sel_tab.
    data: begin of t_sel_tab occurs 0,
          ernam like mara-ernam,
          end of t_sel_tab.
    data: begin of sel_tab occurs 0,
          ernam like mara-ernam,
          end of sel_tab.
    *data: t_sel_tab type standard table of tp_sel_tab.
    *types:  begin of tp_sel_tab1,
           ernam like mara-ernam,
    end of tp_sel_tab1.
    *data: sel_tab type standard table of tp_sel_tab .
    data: w_sel_tab type zstr2.
    submit ztest7 with a = '000000000000000939' and return.
    import  sel_tab = t_sel_tab from memory id 'ZTEST7'.
    loop at sel_tab into w_sel_tab..
    write:/ w_sel_tab-ernam.
    endloop.
    please reward points

  • Report output from memory to internal table (corresponding fields)

    How can we pick any standard report output such as
    RM07DOCS on to memory and from memory to an internal
    table.Here by internal table ,i do not mean of type c
    containing complete report but data should go from output to corresponding fields of internal table structure of whom is defined as same of the output.

    SUBMIT rfbila00 AND RETURN
         EXPORTING LIST TO MEMORY
        WITH sd_ktopl-low = ' '
         WITH sd_bukrs IN  s_bukrs
         WITH sd_prctr IN s_prctr
         WITH bilavers =  p_fsv
         WITH bilaspra =  'EN'
         WITH bilbjahr =   p_fyear
         WITH b-monate IN s_per
         WITH bilvjahr = v_cfyear
         WITH v-monate = l_per
         WITH bilagvar = P_LAYOUT
         WITH bilagrid = 'X'
         WITH bilabkon = '2'
         WITH bilagkon = '3'
         WITH bilasumm = '0'
         WITH bilavart = '1'
         WITH bilaskal = '3/0'.
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = t_list
        EXCEPTIONS
          not_found  = 1.
      REFRESH t_ascii.
      CALL FUNCTION 'LIST_TO_ASCI'
        TABLES
          listasci           = t_ascii " list converted to ASCII
          listobject         = t_list
        EXCEPTIONS
          empty_list         = 1
          list_index_invalid = 2
          OTHERS             = 3.
    u will get the output in t_list...u have to split as per ur requir......
    this will help u.....
    Reward IF...........
    Regards
    Anbu

Maybe you are looking for

  • USR user defined field in OIM design console in not visible

    Hi all, We have OIM setup in the environment and wanted to add some custom attributes for USR user defined field definition. When I open the User Defined Field Definition tab, I could not see USR form. When I tried to export specific users from OIM j

  • Cant accese my n9 Nokia Account :(

    Hi I am in abit of a jam here. I just did a full software reset on my new N9, and now I cant accese a new my Nokia Account from the phone I did set it up before the software reset and it worked superb...... After the reset all the includet apps are s

  • Alv input feild drop down

    hi all,   i want a <b>drop down</b> list in the <b>ALV GRID</b> input field, but i hv no idea for it can anybody gave me some idea or sample program for that, thanks in advanced chetan vishnoi Message was edited by: chetan vishnoi

  • Animation Alpha in 16:9

    I am trying to export a 16:9 FCP sequence in Animation Alpha to use in Motion. I did a chroma key with a 3rd party filter, and can't get the alpha channel to "send to" Motion. Can someone who already knows how to do this just tell me how to get the a

  • Photo stream don't work

    I've update MacBook Pro, iPhone 3GS & iPad 2 to latest version. I'ver enable photo stream on all device. but i never success transfer any photo. i take photo on iPhone or iPad, it won't show on photo stream folder and upload to iCloud. i drag photo t