Multiple Scenes problem

Hello all,
Currently i'm writing a game and i need to change the scene (or stage??): between the
welcome scene, the game scene, level-change scene etc...
Now, maybe i'm doing it in the wrong way, but what i did so far, is that i wrote a very simple scene manager that handle MyScene classes (which extends Scene) and everything works fine... except for one thing: objects that i expected to be deleted when no one has references to them anymore, are
apparently NOT being deleted
It looks like running Timelines are not cleared or even stopped, even if no one refers to them and the scope where they were created is just "dangling" in the air.
What i did, is to explicitly clear the obsolete scene's content (content=null) and all "nullify" all it's members. It helped with the objects - but the timelines still
running. i can, of course, explicitly stop the timelines, but i feel that all the C++ style manual deletion is not exactly the right way to do it.
What am i doing wrong?
Thanks!
Edited by: dharmax on Sep 7, 2009 7:30 AM

i think i found out the root of the problem (it's just a theory):
1. When a timeline instance is created, it may have two owners (two entities that reference it): one is the general runtime context and the optional second, is the object within which it was created.
2. Now, the timeline also reference the object within which it was created. Thus, as long as the timeline instance exists, that object will also live.
3. Even if the scene where the objects where originally placed in is gone, these objects will live as phantoms, held by virtually circular referencing (virtual, because the timeline is still associated with the general runtime context).
Conclusion: maybe it is a feature, but to me it looks like a mis-feature: having the general runtime context as one of the timeline's owner.
Proposed solutions:
- Option A: the active scene or stage should take the general context's job as the parent of the timeline
- Option B (maybe better): if a timeline was created within the scope of another object - this object should be its soul owner.
In my specific application, i found no solution except doing it brute force and i don't like unclean code...

Similar Messages

  • Combining .fla files with multiple scenes

    I understand how to combine a simple flash file into another,
    but my problem is the files I am trying to combine have multiple
    scenes. How would I do this?

    I'm doing a short 20 second animation that I've developed in
    4 different chunks. Now I'd like to string them all together into
    one big project, but I have no idea how.
    Help!

  • Multiple scenes not working on any computer except my own.

    HI everyone,
    I try to run a swf or html file of my fla file and it only works on my machine but not on my laptop. I have the latest flash player installed but it still doesn't work.  Can anyone advise. My laptop works for single scenes swf and html but not for multiple scene file.
    Aron

    it just sits there and nothing moves or comes on when I hit the play button in my application.  I have tried running a swf file through firefox and an html publications of my file but they don't seem to work on my lap top except for on the original computer I created the app on.
    Could you or anyone please tell me if these links work http://dl.dropbox.com/u/307778/Gemoro%20BovoMetzia%2023b-1-9%20Scenes.html
    http://dl.dropbox.com/u/307778/Gemoro%20BovoMetzia%2023b-1-9%20Scenes.swf
    Thanks for your help
    Aron

  • Using a function in multiple scenes

    I have a .fla project being created under CS4, using
    ActionScript 3.0, that consists of multiple scenes.
    In the code attached to the first scene, I define some
    functions that are used as methods on buttons:
    function MouseDown(TheKey:Object):void
    TheKey.alpha=0.6;
    function MouseUp(TheKey:Object):void
    TheKey.alpha=1.0;
    function AlphaPoint6(event:MouseEvent):void
    MouseDown(event.currentTarget);
    function AlphaonepointO(event:MouseEvent):void
    MouseUp(event.currentTarget);
    And I use a couple of the functions as EventListener methods
    on buttons
    Key1.addEventListener(MouseEvent.MOUSE_DOWN,AlphaPoint6);
    Key1.addEventListener(MouseEvent.MOUSE_UP,AlphaonepointO);
    So far so good.
    Then, I create a second scene in which I have some other
    buttons.
    When I try using the same functions as eventlisteners on
    these buttons, in the code for the second scene:
    Key11.addEventListener(MouseEvent.MOUSE_DOWN,AlphaPoint6);
    Key11.addEventListener(MouseEvent.MOUSE_UP,AlphaonepointO);
    then, I get the error messages
    1120: Access of undefined property AlphaPoint6
    1120: Access of undefined property AlphaonepointO
    BUT, if I try declaring these functions again with the script
    of the second scene, I get the error message
    1021 Duplicate Function definition
    So, I seem to be stuck between a rock and a hard place. On
    the one hand, when the compiler parses the second scene, it
    believes those functions are defined (as it is not happy if you try
    defining them again). On the other hand, the compiler does not
    think they are defined. as it considers them to be undefined
    properties.
    Does anyone have an idea about how to resolve this conumdrum?

    One option is to not use scenes. Just take what you have as
    scenes and either place them in the one timeline, or convert them
    into movielcips. In my own design work, I have never used scenes.
    When I first encopuntered them via someone else's design, I
    immediately disliked them because it meant I had to search thru
    inobvious places to find things that needed to be revised. Other
    folks that help in these forums have their own reasons for
    promoting not using scenes... troublesome, unreliable, outdated,
    etc

  • Multiple Inheritance problem persists in Interfaces

    Hi,
    I tentatively made a program and found that multiple inheritance problem of C++ persists even with interfaces. Although this is definetely a special case but I want to know what is this problem known as( i know that this is perhaps known as diamond problem in C++). And is there a way out of this thing.
    interface one
         int i=10;
    interface two
         int i=20;
    interface z extends one,two
    public class xyz implements z
         public static void main(String [] a)
         System.out.println(i);
    }O/P
    D:\Education\Java\JavaStudyRoom\Applets>javac xyz.java
    xyz.java:16: reference to i is ambiguous, both variable i in one and variable i
    in two match
    System.out.println(i);
    *^*
    *1 error*
    Thanks for replying

    suvojit168 wrote:
    I tentatively made a program and found that multiple inheritance problem of C++ persists even with interfaces. Although this is definetely a special case but I want to know what is this problem known as( i know that this is perhaps known as diamond problem in C++). And is there a way out of this thing. This is not the so called diamond inheritance problem. What you have here is an ordinary name clash. And as has been noted you can resolve it by qualifying which constant you're referring to, like
    System.out.println(one.i);
    For the diamond inheritance problem to apply both the one and the two interfaces would need to inherit a common ancestor (that's how the diamond is formed). Furthermore the common anscestor would need to carry implementation which would then be inherited two ways, once via one and once via two. This is the diamond inheritance problem Java is avoiding by allowing single inheritance of implementation only.
    P.S. My previous post was posted my mistake.

  • SP10 - multiple approver problem with CUP

    We have SP10 (patch 1) in our development system and cannot move forward to production because of a real show stopper.  I have currently reported this to SAP thru an OSS message (and it is in development) but would like to know if anyone else is having this issue with SP10.  (this happened even before applying patch 1)
    We have multiple approvers when creating NEW users or CHANGING users in CUP.  We have it configured to allow just one of the approvers to approve before going on to the next stage.  Since we put in SP10, CUP is requiring ALL approvers to approve the request before going on to the next stage.  We get the following message when one of the approvers approve the request:  Request no: 5020. is approved, pending for other Approvers. 
    I've seen this reported for UAR and SOD but not for CUP.  In fact, there is a fix for UAR in Patch 1 of SP10.  I applied this patch but it hasn't fixed the CUP issue.  I also don't have the issue when rejecting a CUP request, or when approving it through the configuration --> Request --> Administration screen (what I consider the Back-door since only security administrators get the configuration area).
    Thanks for your input.
    Peggy

    Christian,
    I totally agree with you.
    The good news is.... We installed SP11.1 and the multiple approver problem is fixed. 
    We have decided to leave our production system at SP8 until this system settles down a bit.  Of course, this means we can't use many of the new fixes and features (such as UAR).  We use our sandbox system to apply new support packs and do very rigorous testing.  And our DEV system is at SP8 too.
    Good Luck.
    Peggy

  • L430 multiple driver problems (ultranav and others)

    Hello,
    I have multiple driver problems with my newly purchased L430.
    1) After hibernate the UltraNav driver randomly stops working. This means that the settings are grayed out and my old settings aren't applied. Sometimes the mouse pad and track ball also stop working after hibernate.
    2) The hardware mute button and hibernate don't like each other as well. After resuming from hibernate with the mute button on the sound doesn't work anymore. Rebooting only helps if you have disabled the mute before rebooting.
    3) The intel usb 3.0 driver can't be installed unless you want a lot of bluescreens.
    I do have the newest drivers and BIOS (2.54).

    It's ok my friend,  I just hope I will be able to help.
    Now to the problem. The thing that worries me the most and the reason I asked you to contact a Lenovo Repair Center, is the blue screens with the Intel Usb 3.0 installation. If the driver is correct this should not happen and most of the times it signifies a pure hardware problem, not a software one. Really, it just should not happen, period!
    So please, before anything else, download and boot with a Linux Live cd, any distro you like (e.g. Linux Mint, Fedora, etc). Better choose a 64bit version. It's one way of determining if you're facing a hardware problem with the usb 3.0 ports.
    The information you give is very useful and more or less complete, but I would like to also know the model of your SSDs, both the 2.5'' and msata.
    Meanwhile, you can check either with the Linux Live cd or with Memtest86+ your ram. This does not seem to be a memory problem but it would be nice if we could exclude it from the suspects list. Many - if not most - of these problems are multifactorial and we cannot leave anything to chance..
    Cheers!
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    This will help the rest of the Community with similar issues identify the verified solution and benefit from it.

  • Is there a way to make multiple Scene Menus?

    I am using Premiere Elements 8.0 to make a DVD of different slideshows. I was wondering if there is a way to make multiple Scene Menus from a single Main DVD Menu. I want to be able to link to a second scenes menu not connected to the first one, almost like a Deleted Scenes or Special Features option on a DVD.
    Thanks for all the help!!

    Not directly in PrE. The Menu Sets are designed to automatically generate the necessary Scene Menus, based on the DVD Markers, and linked from the Main Menu.
    One can use an authoring program, like Sony's DVD Architect to do what you want. One would Export/Share the Timeline, and then Import that into DVD Architect.
    There are some tutorials, and also a link to Steve Grisetti's book on Sony DVD Architect on the Muvipix site.
    Hope that this helps, and good luck,
    Hunt

  • Sound in multiple scenes

    How do I get a single audio clip to play through multiple scenes in a flash project?

    Hi Marie,
    Using Actionscript would allow greater control as Ned suggests, but even otherwise you should be able to play and control your audio clip through multiple scenes.
    Can you please elaborate what exactly you wish to do and where are you getting stuck. In general, an audio with Sync property set as Event or Start plays across scenes as well.

  • Multiples scenes?

    Hello,
    I need to do an application with multiples scenes but i don't know how to change the scenes ? Thanks.
    Edited by: CristianKhalil on Apr 20, 2010 7:47 PM

    You can find a simple example in [Next-back button wizard|http://forums.sun.com/thread.jspa?threadID=5432368].

  • Multiple scene interface in javafx

    Hi,
    How can i achieve multi scene interface under single stage with common menu bar in javafx ?
    i.e,multiple scenes should change in single stage and Menu bar should be common for every scene.
    I am using javafx scene builder to build Gui’s.

    i believe the answer is that Adobe is following Windows Programming User Interface Guidelines, that Microsoft itself doesn't always follow.

  • Scene Problem

    I am just beginning in Flash and am using CS4. I am creating
    a rather long SWF with a total of 9 scenes in it. Each scene has
    multiple sound files and videos within it. While doing a "Test
    Movie" I ran into a problem I have been unable to resolve. The
    scene has about 10 layers with a soundtrack that works great when
    you do a "Test Scene". But the moment you do a "Test Movie" the
    sound track in that scene starts playing 2 scenes early. All the
    other scenes are working correctly and thier sound tracks start and
    stop like they should. I have replaced the soundtrack with
    different sound files, deleted the sound file, saved and then
    reimported to library then created a new layer then added the sound
    file. I have done this with several sound files within the same
    scene, but still for some reason the soundtrack starts playing
    about 2 scenes early. Has the scene corrupted or is there some way
    to keep this from happening. The sound tracks are all streamed and
    I have the same setup on all the soundtracks and all others seem to
    work fine. I have tried action script to stop and start the
    sound...and this works great as long as you do a "Test Scene"...but
    when its a "Test Movie" the soundtrack starts playing 2 scenes
    early again. Anyone know what I may have done wrong or if there is
    anything I can do to resolve this?
    Thanks in advance

    Well I did a little experiment to check to see if in fact the
    scene had corrupted and it seems to me it has. When I intially
    created the problematic scene it was actually in the scene 3
    position. I moved on and did a few other scenes past it. Then came
    back finished it up and then decided I wanted a couple of scenes in
    front of the problem scene. So I inserted 2 scenes before the
    problem scene. This made it basicly scene 5 instead of scene
    3...position wise. I moved the problematic scene back to its
    original position and everything works fine. If I move the problem
    scene to say scene 2 it works fine...if I move it to scene 1...it
    works fine...but if I move it past the scene 3 position...say to 4
    or 5 or 6 or 7 or 8 or 9....It starts messing up. Since I need this
    to work flawlessly I think at this point I will eat it and rebuild
    the scene by deleting it and recreating it...hoping that this may
    cure the problem.-----EDIT---I deleted the scene...inserted a new
    scene and only inserted the sound file and it does the same
    thing...starts playing 2 scenes early at exactly where the deleted
    scene was starting. Guess Ill try the preloader now.

  • Outlook Sync - Multiple Calendar Problem

    (I am not sure whether this belongs in this Forum or would be more appropriately directed to my Device (Curve 8900) forum or Desktop Software.  Please advise or re-direct if that is the case.)
    I am having a sync issue with Outlook, and it revolves around the issue of having multiple calendars on the Device, each of which is associated with an e-mail address.  I understand this has been a relatively common question; however, although I admittedly may be looking in the wrong place, I have yet to come across a comprehensive solution.
    I understand how to switch the "default" e-mail associated with scheduling items on the calendar, and I believe I'm correct in thinking that this is what syncs with Outlook.  I've noticed that when I try switching the default, Outlook wants to delete all other appointments which are NOT associated with that device calendar.
    So I guess my specific questions are:
    1) Is there a way to have Outlook sync with ALL calendars on the device, i.e. not just the default?  It's easy enough to make all appointments from here on out with a single account & have that be the one that syncs; however, it doesn't seem possible to do that without having Outlook want to delete all other appointments.
    2) Is there a way to change the associated email/calendar for events on the Device?  When I open an event, I can see which email/calendar it is but I don't know how to *change* it -- I only seem to have a choice when scheduling new events.
    If either of these was an option, I think that would solve my problem -- I could either go through the device & convert everything to the default email/calendar & everything would be there upon sync, OR Outlook would just pick up everything from all calendars when I sync.
    I don't understand why it's so complicated to have everything in one place!
    Thanks in advance to those willing to share their wisdom & advice in this matter.
    mbw 

    I was going to post that article but you beat me to it.  
    I believe this is the only way to accomplish this on a BlackBerry
    If someone has been helpful please consider giving them kudos by clicking the star to the left of their post.
    Remember to resolve your thread by clicking Accepted Solution.

  • MULTIPLE ITEM PROBLEM IN VL31N BDC

    hI FRIENDS ,
        I AM POSTING A BDC OF TRANSACTION VL31N ,ie FOR SCHEDULE AGREEMENT INBOUND DELIVERY.I CREATE A FUNCTIONAL MODULE OF THE SAME AND CALL IT FROM AN ASP PAGE,IN THAT THERE IS PO NUMBER 5500000986 WHICH HAS TWO ITEMES 62 AND 95 RESPECTIVLY OF SAME MATARIAL NUMBER R010230123041002 AND DIE NUMBER 2304P,NOW THE PROBLEM IS THIS BDC IS WORKING WHEN THERE IS ONLY ONE ITEM BUT GIVES AN ERROR "CANT CREAT INBOUND DELIVERY FOR PO NO ...' WNEN IT HAS MULTIPLE ITEM.WHAT SHOULD I DO ? I ALSO USED LOOP BUT IT ALSO DOSENT WORK AS IT WILL ADD ALL OPEN QTY OF PO 986 AND UPDATE AGAINST ITEM NO 95.
    CODE IS AS FOLLOWS:.........
    FUNCTION y_synie_bdcinbdly.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(CTU) LIKE  APQI-PUTACTIVE DEFAULT 'X'
    *"     VALUE(MODE) LIKE  APQI-PUTACTIVE DEFAULT 'N'
    *"     VALUE(UPDATE) LIKE  APQI-PUTACTIVE DEFAULT 'L'
    *"     VALUE(GROUP) LIKE  APQI-GROUPID OPTIONAL
    *"     VALUE(USER) LIKE  APQI-USERID OPTIONAL
    *"     VALUE(KEEP) LIKE  APQI-QERASE OPTIONAL
    *"     VALUE(HOLDDATE) LIKE  APQI-STARTDATE OPTIONAL
    *"     VALUE(NODATA) LIKE  APQI-PUTACTIVE DEFAULT '/'
    *"     VALUE(EXTNID) LIKE  MAKT-MAKTG
    *"     VALUE(VENDORNO) LIKE  LFA1-LIFNR
    *"     VALUE(PONUMBER) LIKE  EKKO-EBELN
    *"     VALUE(ITEMNUMBER) LIKE  LIPS-VGPOS
    *"     VALUE(MATERIAL) LIKE  MAKT-MAKTG
    *"     VALUE(DLYQTY) LIKE  LIPS-LFIMG
    *"     VALUE(BTCHNO) LIKE  LIPS-CHARG
    *"     VALUE(POSLR) LIKE  EKES-EBELP OPTIONAL
    *"  EXPORTING
    *"     VALUE(SUBRC) LIKE  SYST-SUBRC
    *"     VALUE(INDELYNO) LIKE  SY-MSGV2
    *"     VALUE(MSG1) LIKE  SY-MSGV1
    *"     VALUE(MSG2) LIKE  SY-MSGV2
    *"     VALUE(MSG3) LIKE  SY-MSGV3
    *"     VALUE(MSG4) LIKE  SY-MSGV4
    *"  TABLES
    *"      MESSTAB STRUCTURE  BDCMSGCOLL
    *"      ERRTAB STRUCTURE  YSYNERRMSGS
    *"      INDLYTAB STRUCTURE  YSYN_QTYTAB
    Updated by ANAND SYNISE 19.1.2007
      DATA: BEGIN OF bdctab OCCURS 0.
              INCLUDE STRUCTURE bdcdata.
      DATA: END OF bdctab.
      DATA: datenow(10) TYPE c,
            fldvar(30)  TYPE c,
            fldno       TYPE i,
            flditoc(6)  TYPE c,
            qty(13)     TYPE c.
      DATA maxposnr LIKE lips-posnr.
      DATA testposnr TYPE posnr.
      DATA itemnoint TYPE i.
      CONCATENATE sy-datum6(2) '.' sy-datum4(2) '.' sy-datum+0(4) INTO datenow.
      CLEAR bdctab.
      REFRESH bdctab.
      PERFORM open_group      USING group user keep holddate ctu.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '4007'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'RV50A-VERUR_LA'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '/00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-LIFNR'.
           bdctab-fval = vendorno.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LV50C-BSTNR'.
           bdctab-fval = ponumber.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-VERUR_LA'.
           bdctab-fval = extnid.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=MKAL_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIKP-BLDAT'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=POPO_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-POSNR(01)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '0111'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'RV50A-PO_MATNR'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = 'WEIT'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-PO_MATNR'.
           bdctab-fval = material.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=POLO_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-POSNR(01)'.
           APPEND bdctab.
    *ADDED BY ANAND ON 22-01-2007
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval =  ITEMNUMBER .     "ITEMNUMBER = LIPS-VGPOS
           APPEND bdctab.
    ************ENDED***********************
    ADDED BY MILIND 19.01.2007
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval =  poslr .
           APPEND bdctab.
    *    ENDED * *
       CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LIPS_SELKZ(01)'.
           bdctab-fval = ''.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '/00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-CHARG(01)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
          QTY = INDLYTAB-DLYQTY.
            qty = dlyqty.
           bdctab-fnam = 'LIPSD-G_LFIMG(01)'.
           bdctab-fval = QTY.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIPS-CHARG(01)'.
    *     BDCTAB-FVAL = INDLYTAB-BTCHNO.
           bdctab-fval = btchno.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=SICH_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-MATNR(02)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
      CALL TRANSACTION 'VL31N' USING bdctab MODE 'N'  MESSAGES INTO messtab.
      subrc = sy-subrc.
      PERFORM close_group USING     ctu.
      CLEAR bdctab.
      REFRESH bdctab.
      IF sy-subrc EQ 0.
        indelyno = sy-msgv2.
      ENDIF.
      LOOP AT messtab.
        MOVE: messtab-msgid TO errtab-msgid,
              messtab-msgnr TO errtab-msgnr,
              messtab-msgv1 TO errtab-msg1,
              messtab-msgv2 TO errtab-msg2,
              messtab-msgv3 TO errtab-msg3,
              messtab-msgv4 TO errtab-msg4.
        APPEND ERRtab.
      ENDLOOP.
      LOOP AT errtab.
        SELECT SINGLE text FROM t100
          INTO errtab-errmsg
          WHERE msgnr EQ errtab-msgnr AND arbgb EQ errtab-msgid
          AND sprsl EQ sy-langu.
        MODIFY errtab.
      ENDLOOP.
    ENDFUNCTION.

    Hi,
    Check this code:
    REPORT Z_CUSTOMER_UPLOAD .
                  D A T A         D E C L A R A T I O N S                *
    DATA:BEGIN OF IT_CUSTOMER OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_CUSTOMER.
    DATA:BEGIN OF IT_success OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_success.
    DATA:BEGIN OF IT_error OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_error.
    DATA: L_INDEX TYPE SY-TABIX.
    DATA:IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    IT_DATA TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    ERROR MESSAGE TABLE
    DATA:IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : C_S TYPE C VALUE 'S',
            C_E TYPE C VALUE 'E'.
    *DATA: IT_SUCCESS LIKE IT_CUSTOMER OCCURS 0,
         IT_ERROR LIKE IT_CUSTOMER  OCCURS 0.
    DATA : V_RECTOT TYPE I,
            V_RECERR TYPE I,
            V_RECSUC TYPE I.
                  S E L E C T I O N  -  S C R E E N                      *
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER        : P_FILE LIKE RLGRAP-FILENAME .
    SELECTION-SCREEN : END OF BLOCK B1.
               A T  S E L E C T I O N  -  S C R E E N                    *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    to get F4 help for p_file
      PERFORM F4_FILENAME USING P_FILE.
                S T A R T   O F   S E L E C T I O N                      *
    START-OF-SELECTION.
    Uploading data from flat file into it_tab
      PERFORM BDC_UPLOAD USING P_FILE.
      PERFORM PROCESS_DATA.
      PERFORM POPULATE_BDC.
                E N D  O F   S E L E C T I O N                           *
    *END-OF-SELECTION.
    PERFORM DISPLAY_REPORT.
    *&      Form  F4_FILENAME
          text
         -->P_P_FILE  text
    FORM F4_FILENAME USING    P_P_FILE.
    DATA:L_FILE TYPE IBIPPARMS-PATH.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = L_FILE .
       P_P_FILE = L_FILE.
    ENDFORM.                    " F4_FILENAME
    *&      Form  BDC_UPLOAD
          text
         -->P_P_FILE  text
    FORM BDC_UPLOAD USING    P_P_FILE.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = P_P_FILE
        I_BEGIN_COL                   = 1
        I_BEGIN_ROW                   = 1
        I_END_COL                     = 8
        I_END_ROW                     = 1000
      TABLES
        INTERN                        = IT_DATA
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " BDC_UPLOAD
    *&      Form  PROCESS_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM PROCESS_DATA.
    SORT IT_DATA BY ROW COL.
      LOOP AT IT_DATA.
    CASE IT_DATA-COL.
    WHEN 1.
    IT_CUSTOMER-KUNNR   = IT_DATA-VALUE.
    WHEN 2.
    IT_CUSTOMER-VKORG   = IT_DATA-VALUE.
    WHEN 3.
    IT_CUSTOMER-VTWEG   = IT_DATA-VALUE.
    WHEN 4.
    IT_CUSTOMER-MATNR   = IT_DATA-VALUE.
    WHEN 5.
    IT_CUSTOMER-KDMAT   = IT_DATA-VALUE.
    WHEN 6.
    IT_CUSTOMER-MEGRU   = IT_DATA-VALUE.
    WHEN 7.
    IT_CUSTOMER-LPRIO   = IT_DATA-VALUE.
    WHEN 8.
    IT_CUSTOMER-ANTLF   = IT_DATA-VALUE.
    APPEND IT_CUSTOMER.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    " PROCESS_DATA
    *&      Form  POPULATE_BDC
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_BDC.
    DATA:L_COUNTER TYPE N,
             L_STRING TYPE STRING.
    LOOP AT IT_CUSTOMER.
    AT NEW KUNNR.
    CLEAR L_COUNTER.
          L_INDEX = SY-TABIX.
          READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_dynpro      using 'SAPMV10A' '0100'.
    perform bdc_field       using 'MV10A-KUNNR'
                                  IT_CUSTOMER-KUNNR.
    perform bdc_field       using 'MV10A-VKORG'
                                  IT_CUSTOMER-VKORG.
    perform bdc_field       using 'MV10A-VTWEG'
                                  IT_CUSTOMER-VTWEG.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    L_COUNTER = L_COUNTER + 1.
        CLEAR L_STRING.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-MATNR(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                            IT_CUSTOMER-MATNR.
    CONCATENATE 'MV10A-KDMAT(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using     L_STRING
                                     IT_CUSTOMER-KDMAT.
    CONCATENATE 'MV10A-MEGRU(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using   L_STRING
                                    IT_CUSTOMER-MEGRU.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *-- For Page down in Call Transaction Mode
        IF L_COUNTER = 14.
          CLEAR L_COUNTER.
          PERFORM BDC_DYNPRO      USING 'SAPMV45A' '4001'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                                '=P+'.
        ENDIF.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-SELKZ(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                              IT_CUSTOMER-SELKZ.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SELE'.
    perform bdc_dynpro      using 'SAPMV10A' '0300'.
    perform bdc_field       using 'MV10A-KDMAT'
                                  IT_CUSTOMER-KDMAT.
    perform bdc_field       using 'MV10A-LPRIO'
                                  IT_CUSTOMER-LPRIO.
    perform bdc_field       using 'MV10A-ANTLF'
                                  IT_CUSTOMER-ANTLF.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/EBACK'.
    at end of kunnr.
    READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    CALL TRANSACTION 'VD51' USING IT_BDC MODE 'A' UPDATE 'S'
          MESSAGES INTO IT_MESSAGES.
          CLEAR IT_BDC.
          REFRESH IT_BDC.
    ENDAT.
      IF NOT IT_MESSAGES[] IS INITIAL.
        PERFORM FORMAT_MESSAGE.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    " POPULATE_BDC
    *&      Form  bdc_dynpro
          text
         -->P_0273   text
         -->P_0274   text
    FORM bdc_dynpro USING    VALUE(P_0273)
                             VALUE(P_0274).
    IT_BDC-PROGRAM = P_0273.
    IT_BDC-DYNPRO = P_0274.
    IT_BDC-DYNBEGIN = 'X'.
      APPEND IT_BDC.
      CLEAR IT_BDC.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
          text
         -->P_0278   text
         -->P_RECORD_KUNNR_001  text
    FORM bdc_field USING    VALUE(P_0278)
                           VALUE(P_0279).
    IT_BDC-FNAM = P_0278.
      IT_BDC-FVAL = P_0279.
      APPEND IT_BDC.
      CLEAR IT_BDC.
    ENDFORM.                    " bdc_field
    *&      Form  FORMAT_MESSAGE
          text
    -->  p1        text
    <--  p2        text
    FORM FORMAT_MESSAGE.
    DATA: L_MSG(100).
      LOOP AT IT_MESSAGES.
      READ TABLE IT_CUSTOMER INDEX L_INDEX.
        CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
                  ID        = IT_MESSAGES-MSGID
                  LANG      = SY-LANGU
                  NO        = IT_MESSAGES-MSGNR
                  V1        = IT_MESSAGES-MSGV1
                  V2        = IT_MESSAGES-MSGV2
                  V3        = IT_MESSAGES-MSGV3
                  V4        = IT_MESSAGES-MSGV4
             IMPORTING
                  MSG       = L_MSG
             EXCEPTIONS
                  NOT_FOUND = 1
                  OTHERS    = 2.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        write:/ l_msg.
      ENDLOOP.
    ENDFORM.                    " FORMAT_MESSAGE
    reward if helpful,
    keerthi

  • XML multiple targets problem

    there is an example in oracle warehouse builder user's guide how to load xml file into multiple tables (1:N relationship).
    Let's have an xml file:
    <orders>
    <order>
    <id>1</id>
    <items>
    <item>
    <product>a</product>
    </item>
    </items>
    </order>
    </orders>
    but what if one day you get an xml file where an order has no items:
    <orders>
    <order>
    <id>10</id>
    </order>
    </orders>
    I get an error message: ORA-20011: Error occurred while loading source XML document into the target database object XXX . Base exception: No rows to modify -- the row enclosing tag missing. Specify the correct row enclosing tag.
    What I want is to load in order table one row, and no rows in items table.
    The xsl for this small example that makes a problem looks like (the rest is like in oracle warehouse builder user's guide example in C appendix):
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <ROWSET>
    <xsl:for-each select="orders/order/items/item">
    <ROW>
    <ORDER_ID>
    <xsl:value-of select="../../id"/>
    </ORDER_ID>
    <PRODUCT>
    <xsl:value-of select="product"/>
    </PRODUCT>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    </xsl:template>
    </xsl:stylesheet>

    Sounds like you've missed some tag from the files.
    For XML processing I would look at leveraging XDB, see the post here;
    http://blogs.oracle.com/warehousebuilder/2007/09/leveraging_xdb.html
    Cheers
    David

Maybe you are looking for

  • GL_SECURITY_PKG Performance

    Hello all, I hope you can help.. I'm trying to report on a table from a data warehouse and i've hit problems.. Performance Problems and GL_SECURITY_PKG.validate_segval is to blame. Using disco admin i've created a custom folder based on the following

  • Embedded Flash video makes links stop working

    I have a strange problem. I embedded a flash FLV video file into Dreamweaver site and I published it. All the links in my site works fine as long as I do not look at the video page more than twice. If I keep going back to look at the video page, some

  • Sum amount - Positive and negative

    How do I have a select statement that sum up all the negative and positive values into 2 serperate column? sth like this: SELECT sum(amount) as negative, sum(amount) as positive FROM account_table WHERE customer_id = 111;Here is how the output look l

  • How do  I get an iPhoto slide show onto the web?

    Aloha: I made a slide show in iPhoto 8.0 with 31 pictures and background music. It works great in iPhoto and I can export it to Quicktime 7.3 and it also works great there. The file size is about 119 megs, so I would like to get it on the web for dis

  • Can you link to text?

    Hello again... Okay, here's the scoop: I'm building some websites which will be expanding in size over the coming months and years. Right now I have a footer with copyright info, it's text controlled ny an external style sheet. Works lovely. So let's