Problem with headerline in OO   again     -  other thread was locked  -

Problem with headerline in OO  
Hello,
I've the problem that I cannot give values from an inertnal table to
an variable because the itab has no headerline, because in oo it is not possible.
Here the coding:
structure in se11 ZACTIVITYIF with components:
DESCRIPT
CATEGORY
PRIORITY
OBJECT
DATE_FRO
DATE_TO
TIME_FRO
TIME_TO
CONT_NO
LANGTEXT
STATUS
OO-Coding:
DATA: lt_itab TYPE TABLE OF zactivityif.
DATA: itab TYPE zactivityif.
Loop at dbtab
itab-status = '005'.
APPEND itab TO lt_itab
endloop.
set variable for bapi
lss_text-tdline = lt_itab-langtext. <= here I get error: no tablerwith headerline
How can I fill an internal table in OO or how can I fill this variable lss_text-tdline ?
Any ideas ?
LANGTEXT is type TLINE
I calling bapi for creating an activity
Sorry for this double thread -the other was locked however.
Thanks G

The other one was locked because handling internal tables without header lines is extremely basic .
Read the documentation, search the forum search the web.
Or if your question is not as basic as it seems, post a new one with a better explanation.
Locked again
Rob

Similar Messages

  • Problems With PrE 8 - Split From Other Thread

    GEAtkins (Glenn) posted some info on his system into another THREAD. He posted a lot of good information on his system and also on some diagnostics, that I asked for. For anyone, who wants to see his info and a complete statement of his problems, please see the link above. It's a well-detailed post, and he's been quick to furnish the requested data. It's being reviewed now, but would also like for others to review it too, as there might be additional ideas.
    I do not want to pollute that other thread with work on Glenn's issue, or drag it on a tangent, so I'd appreciate that anybody with input on Glenn's problems post to this thread. I will be doing so, as soon as the review of the diagnostics is done. I also did not want to re-post all info provided here, so please just link and read.
    I hope that this will be beneficial to Glenn and not interfere with another thread requesting reports on how PrE 8 runs on others' systems.
    Thanks,
    Hunt

    Glenn, it appears that you have 3x HDD's, 1x = 250GB, 2x = 350GB. Are these 3x physical HDD's, and not partitions?
    How are these HDD's allocated? I see that D:\ is nearly full. How is this drive, especially, used?
    I hope that you do not mind my calling in an expert on this, but I knew that Harm would find more things, than I would. First, his eyesight is better than mine, and he's also smarter! [plus most people say he's also better looking, than I am.]
    To distill my recs., and I think most of Harm's:
    Look into static Virtual Memory management in Windows. Up the size of the Page File. Around 2 - 2.5x installed RAM works well for NLE work.
    There are some Processes that can probably removed from Startup. iTunes Helper is one of those. When doing an editing session, I strongly recommend not having any on-line presence, and then freeing up resources, for that session, by turning OFF some of your security functions. Then, using a Process manager, like EndItAll, to eliminate those Processes, that are not needed. Even on my workstation, for all but the most simple edits, I do this routinely. It is easy, and one can come back and turn those on manually, or just re-boot, and they'll all be loaded.
    Also, please let me know about your I/O sub-system, i.e. your HDD's. The main questions are above.
    Harm and I are pretty much in agreement that there should not be any conflicts with your NLE and audio-editing programs. I have most on my workstation, plus many more audio-editing programs (just not Sony). I have no issues doing so. I believe that all were installed after PrPro, and I've seen no priority issues with any CODEC, or modules. All runs fine, so I do not think that there would be a conflict there. I have observed that Adobe, CyberLink and Magix all seem to play very well together, at least in my installation.
    Good luck,
    Hunt
    PS - Harm, thank you so much for your time and your report. I know that your efforts will help Glenn, and I appreciate your input, as always. Thanks! The next bottle of Montrachet is on my tab, OK?
    [Edit] One last question: regarding the SearchIndexer, do you have Windows' Indexing turned on for your HDD's? That program can not only rob resources, but will "lock" your Folders, while it tries to do its thing. It can be useful for .DOC, .TXT, etc. files, but for AV files, and especially the large working files that any NLE generates, it cannot extract any useful info, yet it will try, and try. Every time that a file is changed, like your PREL file, or those working files, it'll run in and "lock" that file, while it tries to extract info from it - every time. It can be turned OFF in your My Computer>[Drive Letter]>Properties panel. In XP, one can determine it's indexing by folders, so one could leave it ON for say your .DOC folder. I do not know how finely you can tune it in Vista, or Win7. I keep it OFF for all HDD's, and a Search is not much slower. Remember, it cannot extract useful data from the AV, or working files, no matter how many times it tries, so all it's doing is hogging resources and "locking" files, that your NLE needs and changes all the time.
    Message was edited by: the_wine_snob - Added [Edit]

  • Problems quicksorting my linkedlist (extention from other thread)

    Ok so now that I've got my concepts down I went to do a sort method and I'm having problems with my sort method. (the previous thread with my actual class is http://forum.java.sun.com/thread.jspa?messageID=10222048)
    Here is the sort method. Can anyone help me figure out what I'm doing wrong? (for reference..I'm getting a NullPointerException somewhere)
    public WordList sort()
              Node pivotNode=head;
              remove(head.data);
              WordList small = new WordList(br);
              WordList big = new WordList(br);
              Node first = head;
              while(first!=null)
                   if(first.data.compareTo(pivotNode.data)<0)
                        small.add(first.data);
                   else
                        big.add(first.data);
                   first=first.next;
              big.addToFront(pivotNode.data);
              small = small.sort();
              big = big.sort();
              while(big.head!=null)
                   small.add(big.head.data);
                   big.head=big.head.next;
              return small;
         }

    remove(head.data);
    Node first = head;
    if(first.data.compareTo(pivotNode.data)<0)Looking at those statements in order, I see the possiblity for a problem with null.
    Wouldn't first.data be null?
    Edited by: Newworld20 on Apr 24, 2008 3:42 PM

  • Why I had no problems with the VZW employees and other people have?

    I think that most people who cannot resolve problems with the VZW have an attitude problem.
    Wise saying:  you can get more with honey than with vinegar.
    Since I “upgraded” my old Samsung Sway to a new Samsung Intensity III, in the past three weeks I spent many hours dealing with the VZW store employees, customer service reps, and tech support people. The phone was replaced two times, and I had no problem getting the replacements.
    The third phone did not working how I expected.
    Today I called VZW customer service and said I don’t need anymore trouble shooting and I wanted find a resolution, which will be satisfactory to both of us. After a short conversation with a customer service rep, I was connected with a tech support. I told him that I don’t need any more trouble shooting on the Samsung Intensity III because I already spent HOURS doing that on three devices.
    We spoke about what the VZW could offer me, about replacements with different phones, etc. Our conversation ended with me offering the resolution that could satisfy me, which was to keep this phone and my account will be credited for the $30.00 “upgrade” fee and I will buy Samsung Sway on eBay. NO PROBLEM. 
    My account was credited and I was advise about the ESN number and activation.
    Why I had no problems with the VZW employees and other people have? The answer is simple. I did not have attitude when I was spoke to them.
    So if you want the problem to be resolved, put your anger in you pocket before you start the conversation. You can say that you are angry, frustrated, etc like I did, but add that you understand that this is not their fault that the manufactures makes a crap phones.

    Yes, you are right. I lost my upgrade. Also, it’s true that I could buy the phone on eBay… if I knew then what I know now. In the past, I never had problem with any of my phones. Doing an upgrade with the VZW was a normal thing for me. I didn’t expect that Samsung Intensity III would be a junk phone.  My last upgrade was 4 years ago. I had $50.00 ‘new every two’ credit on my account, which was used for an upgrade.  I lost the $50.00 credit paying for Samsung Intensity III. Sometimes we learn from our mistakes or from a bad experience. Three weeks ago I did not know that I could buy a phone on eBay and activate with VZW without paying $30.00.
    Samsung Sway is coming from …eBay – keep your fingers crossed for me.

  • Premiere Pro CS5: please help problem with importing a file error output "there was an error decompressing audio or video"

    please help problem with importing a file error output "there was an error decompressing audio or video"

    this is related to what adobe program/version?

  • Hi, i am using iphone4s.. 2 days ago i had a problem with wifi.. button greyed out, it was suggested to keep phone in freezer, worked temporarily and i updeted to ios7.1 but still facing same problem.. wht to do? cant afford to throw off :/ huhh..

    Hi, i am using iphone4s.. 2 days ago i had a problem with wifi.. button greyed out, it was suggested to keep phone in freezer, worked temporarily and i updeted to ios7.1 but still facing same problem.. wht to do? cant afford to throw off :/ huhh..

    well, you know how it is - glitches that usually resolve with a hard reset etc
    then a restore. then a factory restore....then ..... nothing fixes so I try the next step with apple online - fill out my serial number and find it is a couple of weeks out of date - and then with the holidays who has time to get to the apple store? this is my second 4s handset as it is - first one the glass cracked from L to R without any impact/damage etc - they changed it out automatically because it's a 'known fault' apparently - so technically, this handset is only 6 months old - but warranty is from original purchase date -
    never imagined it would turn out to be a warranty issue with the phone - and hey maybe when I get a chance to go to the apple store they'll be sympathetic, but I won't be able to get there till at least Jan 4th as it is. On the other hand, another iOS update might resolve the issue - but how long till that release? at the moment I'm having to use my old 3gs for wifi and 4s for phone!!!

  • Problems with Creative Cloud storage (again!)

    I am having problems when uploading files to Creative Cloud storage. Some of the files go - some don't, and are flagged 'Unable to Sync'. I have had this problem for some time and have stopped using CC sync, but I thought I would give it another go the other day, and still no luck. The files that are reported as being a problem seem fine - no issue with the names, or anything that I can see.
    I spent almost an hour on the phone to technical support about this issue about a week ago and the guys I was speaking to (I kept being pushed on to someone else) didn't seem to have any idea. They just kept going through all my security questions and then put me on hold whilst they asked someone more knowledgeable. They would then come back on and pass me to someone else (more security questions) until eventually the last guy I spoke to said he didn't know the answer and an Adobe representative would contact me in 24 to 48 hours. Not a very impressive turn around for customer support - even less so since it is now a week later and still no call. Let's face it. I'm not going to get a response from Adobe.
    As a test, I tried uploading the same files to DropBox. Not very technical perhaps, but I just reasoned that if there were problems with one system, they should show up on the other. Imagine. They uploaded to DropBox no problem.
    So the technical fix is forget Creative Cloud storage and use DropBox. Okay, you have to pay for a reasonable amount of storage, but if you depend on your files for your business, it's worth it.
    I'm worried though. I'm a big fan of Adobe, and have been using their products for years but am getting concerned that, should I have any problem with any of their CC products their support will be minimal (if I'm lucky) or non-existant (as seems more likely).
    As a little extra comment, I have emptied out my CC Storage files (and the archived files) and yet the CC system still says I have 528MB stored - although there is nothing there. I had this once before and the Adobe technical guy reset the system - but it's back!
    HOLD THE FRONT PAGE! I just opened my CC storage in a browser and tried to drag and drop the troublesome files directly. And it worked! So maybe the problem is with the CC app. (I have tried uninstalling and re-installing it numerous times). So dragging and dropping is a fix, but not very practical since you cannot drag and drop folders, so you have to create all the folders in the browser version and then drag the files as required.
    Anyone got any ideas?
    iMac with OS X 10.9, 3.4 GHz Intel Core i7, 16GB RAM

    Woah - Ok so sometimes it's the simplest answer we overlook -- HOW TO MOVE YOUR FILES FROM COMPUTER TO ADOBE CLOUD -- EASILY
    (for windows users)
    1 - Start menu
    2 - Go to Computer - OS ( C:)  - Users  - "Your Name"
    3 - You should see here - the folders you need - Creative Cloud Files - and also - My Docs, My Pics, etc -- The app will not allow this task - windows will
    4 - Right click on the source folder - (Pics, docs)
    5 - Select copy
    6 - Right click on Creative Cloud Files
    7 - Select Paste
    This will transfer all files in that library to the Adobe Cloud folder and allow them to be synced to the cloud
    Hopefully this will save some folks the Head - desks it caused me.

  • Problem with Checkbox that disables/enables other components.

    Hi
    As I show in the title, I have problems with a checkbox that enables/disables another components (three exactly).
    I have done the follow:
    1.- Set property "AutoSubmit" true in the SelectOneChoice
    2.- Set "Disabled" property true or false depending if the SelectOneChoice is selected or not
    (#...selectBooleanCheckbox.value?false:true})
    3.- Set the Partial triggers to the SelectOneChoice in the three components.
    CASE 1: The SelectOneChoice is unmarked. The three components appears disabled and when I mark the SelectOneChoice, this components appears enabled. The thing works ;)
    CASE 2: The SelectOneChoice is marked. The three components appears enabled and when I unmark the SelectOneChoice, the components continue enabled. They don't disable until I press the submit button.
    how can i make that the components appears disabled when i unmark the checkbox?
    i try with de ChangeValueListener, but it only works where the SelectOneChoice changes from unmarked to marked.
    thanks!

    I think the problem is, when the value is null the checkbox return with the selected state, b'coz u r
    returning the checkbox (as it is). so pl'z try with below code (ADDED).
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus,
    int row, int column){
    if(value != null){
    Boolean booleanValue = (Boolean)value;
    setSelected(booleanValue.booleanValue());
    else /// ADDED
    setSelected(false);/// ADDED
    return this;
    Nediaph.

  • The problem with the strings Convert each other

    Hello all,
      Could you help me to solve the following problem using LV7.1? Thank in advance.
      How can I convert a string of "hexadecimal value" with Normal display style to other string of " the same hexadecimal value" with Hex display style?
    Best regards,
    Evan_Lv  

    Hi Evan,
    look at the attachment
    At the moment there is no error checking (any characters other than (0-9|A-F|a-f) will give an error; only even number of chars is converted). You can do the error checking as an exercise on your own!
    Message Edited by GerdW on 08-21-2007 09:08 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    HexString.vi ‏22 KB

  • Problems with coverage and signal in other countryw

    Hi, I am out of my country, I am traveling, and I have problems with coverage, the signal is not stable it come and go.
    I have a Europe plan active with my operador, and with my previous Arc S, I dont have this problem.
    Any solution ? Other people with this problem??
    Regards

    Please do let us know how you go. LTE coverage is still quite new and even non-existent in many places and as such this can certainly cause the problems you are facing.
    What are your thoughts about this forum? Let us know by doing this short survey.
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • Problems with itunes 5 download-causing other problems

    I am having some problems with my itunes 5 download. It really messed up my Mac. Not only do not have itunes, Quicktime & Reason are not working either . ALL of the icons just bounce one time, (freeze) and then I have to force quit. I tried to upgrade to QT 7 but more of the same problems. Seems like since I started trying to upgrade, I'm killing my home studio. I can use any advice. I have tried many shut down and reboots and have reinstalled itunes 5 and Quicktime 7. I am unsure if I installed itunes 5 incorrectly or correctly the first time because I could not find very clear instructions. Please Advise! Thanks so much!!!!!!

    If I were you, I'd first try just re-installing Quicktime 6.5.2 using the re-installer. Then do the thing with the Digidesign Core Audio Setup:
    It will take care of the Quicktime problem, but not the ITunes problem. Re-Installing ITunes will not solve this. You must go to your Digidesign Folder and enter your Digidesign Core Audio Setup then remove ITunes. At this point ITunes should work fine.
    Maybe re-installing QT 6.5.2 will help with Reason, too.
    best,
    charlie

  • Problem with animation and separate CPU intensive thread.

    Hi All,
    I'm in the process of writing a Java chess game with a computer AI. I've got everything working except for the animation of the computer making its move. Sometimes it works, sometimes it doesnt.
    Here's the problem:
    After the computer has finished deciding what move to make (CPU intensive - using standard Minimax w/ Alpha Beta pruning), the thread terminates passing the move to the animation thread (implemented using javax.swing.Timer). My delay is set to 50. But the multiple calls to repaint() in the Timer thread all get collapsed into one (they somehow get bunched up) causing a major display glitch!
    Sometimes this happens, sometimes it doesnt. I wanted to know if i could write some kind of wait function to wait until the CPU is free to process quick repaint() requests so that my animation can look descent all the time.
    Thanks for any help.
    jairam at ecf dot utoronto dot ca

    In the javax.swing.Timer class is a method called
    setCoalesque(boolean) (I think I spelled that wrong, but you will find it)
    By default the Timer class does exacltly what you mentioned, it merges multiple events into one when the application is too busy. Call setCoalesque(false) to receive all the events from the Timer.

  • Duplex problem with inline card "WAN0" again

    Hi,
    We got duplex problem again "new site" for the inline port WAN0, LAN0 is ok.
    We have tried crossover and straight through cable, without any look still 100/ half duplex.
    The PTT router int fa0/0 have been to 100/full and auto/auto still 100 half in the WAE.
    The WAE have been in 100/full, no link or auto/auto link but 100/half.
    What can be the problem, as we have this issue with most of our 574 and 274, the 674 have have no problem at all?
    Below are some output from the WAE and router.
    PTT router:
    #sh ver
    Cisco IOS Software, 1841 Software (C1841-SPSERVICESK9-M), Version 12.4(6)T7, RELEASE SOFTWARE (fc5)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2007 by Cisco Systems, Inc.
    Compiled Thu 29-Mar-07 03:29 by khuie
    ROM: System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)
    Router uptime is 5 weeks, 1 day, 5 minutes
    System returned to ROM by power-on
    System restarted at 08:09:29 GMT Sun Aug 15 2010
    System image file is "flash:c1841-spservicesk9-mz.124-6.T7.bin"
    Cisco 1841 (revision 7.0) with 116736K/14336K bytes of memory.
    Processor board ID FCZ112411HV
    2 FastEthernet interfaces
    1 Serial interface
    1 Serial(sync/async) interface
    1 Channelized E1/PRI port
    DRAM configuration is 64 bits wide with parity disabled.
    191K bytes of NVRAM.
    63488K bytes of ATA CompactFlash (Read/Write)
    Configuration register is 0x2102
    #sh int fa0/0
    FastEthernet0/0 is up, line protocol is up
      Hardware is Gt96k FE, address is 001b.d5ab.3fc8 (bia 001b.d5ab.3fc8)
      Internet address is 10.252.105.12/22
      MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
         reliability 255/255, txload 1/255, rxload 1/255
      Encapsulation ARPA, loopback not set
      Keepalive set (10 sec)
      Half-duplex, 100Mb/s, 100BaseTX/FX
      ARP type: ARPA, ARP Timeout 04:00:00
      Last input 00:00:00, output 00:00:00, output hang never
      Last clearing of "show interface" counters never
      Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
      Queueing strategy: fifo
      Output queue: 0/40 (size/max)
      5 minute input rate 103000 bits/sec, 89 packets/sec
      5 minute output rate 625000 bits/sec, 93 packets/sec
         110094543 packets input, 2604076581 bytes
         Received 10013739 broadcasts, 0 runts, 0 giants, 0 throttles
         21 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 watchdog
         0 input packets with dribble condition detected
         110416771 packets output, 4153304953 bytes, 0 underruns
         149371 output errors, 113762 collisions, 149376 interface resets
         0 babbles, 149940 late collision, 0 deferred
         0 lost carrier, 0 no carrier
         0 output buffer failures, 0 output buffers swapped out
    From the WAE:
    #sh interface inlineport  InlineGroup 1/0/wan
                                         ^
    % Invalid input detected at '^' marker.
    ZAJOPWAAS01#sh interface inlineport  1/0/wan
    Device name        : eth4. Bypass master interface.
    Packets Received   : 59466951
    Packets Intercepted: 50007028
    Packets Bridged    : 10002103
    Packets Forwarded  : 44722188
    Packets Dropped    : 69
    Packets Received on native      : 0
    Active flows for this interface : 0
    Ethernet Driver Status
    Type:Ethernet
    Ethernet address:00:E0:ED:11:E5:A8
    Maximum Transfer Unit Size:1500
    Metric:1
    Packets Received: 59466909
    Input Errors: 0
    Input Packets Dropped: 0
    Input Packets Overruns: 0
    Input Packets Frames: 0
    Packet Sent: 64238956
    Output Errors: 116996
    Output Packets Dropped: 0
    Output Packets Overruns: 0
    Output Packets Carrier: 116996
    Output Queue Length:100
    Collisions: 182840
    Base address:0x5000
    Flags:UP BROADCAST RUNNING MULTICAST
    Link State: Interface is up,line protocol up
    Mode: autoselect, half-duplex, 100baseTX
    1#sh ver
    Cisco Wide Area Application Services Software (WAAS)
    Copyright (c) 1999-2010 by Cisco Systems, Inc.
    Cisco Wide Area Application Services (WAAS-UNIVERSAL-K9) Software Release 4.2.1
    (build b38 Jun 16 2010)
    Version: oe574-4.2.1.38
    Compiled 20:44:26 Jun 16 2010 by damaster
    Device Id: 00:26:55:ad:cd:04
    System was restarted on Mon Aug 30 16:48:52 2010.
    The system has been up for 2 weeks, 6 days, 17 hours, 52 minutes, 10 seconds.
    Jan Rockstedt

    Hi Jan,
    If you are connecting Router to WAN0_0 port, you should use cross-over cable under most of the circumstances and unless you are using all gig interfaces on both sides. This will avoid any hardware limitations due to non-Auto-MDIX supported hardware.
    Cisco strongly recommend that you do not use half-duplex connections on the WAE or on routers, switches, or other devices.
    You will find more information here: Cabling
    http://www.cisco.com/en/US/docs/app_ntwk_services/waas/wae/module/inline/installation/guide/17880fru.html#wp39911
    Further, there is a possibility that the interface on Router / WAE inline adapater / cable might be bad. I would suggest following in that case.
    1. Using a new cross-over / stright cable. if the issue continues, proble lies on the interface sides.
    2. Using a different port on router. if the issue continues, problem is with WAN0_0 port of WAE.
    3. Try connecting wan0_0 port to another switch / router to see if it negotiates at full duplex. If it still continues at half duplex, there is an issue with WAN0_0 port most probably.
    4. Try connecting secondary gig port or WAN0_1 port to same router interface. If the issue continues, problem may be with router FA0/0 interface.
    If you find that issue is with either router / WAE inline interface, please open a TAC case for RMA.
    Hope this helps.
    Regards.
    PS: If this resolves your issue, please mark this as Answered.

  • Problems with a bluetooth mouse and others operating systems

    Hello, I have an error related to bluetooth devices.
    I have on my Mac mini apart from Mountain Lion, a Linux distribution.
    Steps to follow to find the error:
    1. - Connect a bluetooth mouse to Mountain Lion and set it up.
    2. - Reset the mini, start with Linux and also configure the mouse.
    Now the mouse works fine on Mountain Lion and Linux.
    Start again with Mountain Lion, you will see that the mouse does not work, but the system has added and configured.
    That mistake I've seen for the first time in Snow Leopard, Lion has continued and now with Mountain Lion.
    The only way to fix it is to connect a USB mouse, remove the Bluetooth mouse and add it again.
    The configuration fails again when using the mouse in Linux.
    Tested on another Mac (Mac-Pro) with the same result.
    (I tested it with a Dell BT Travel Mouse and a Magic Mouse)
    Regards

    First, excuse my poor english
    It's not offend, but I understand that at the time that Linux is off, and OSX is on, is OSX which is not able to work with the mouse.
    I do not know what is the reason for which the operating system is not able to operate the mouse, even if it is paired and authorized.
    The system also says that the mouse is working properly, when it is obvious that it is not.
    Moreover, the Bluetooth preference pane is completely slowed and functioning incorrectly.
    And finally, to comment that the mouse works properly on Linux after having done in OSX ..., which shows that the problem is OSX.
    If I open this post is for someone to try and investigate.
    Would be nice if Apple released a patch as it is clear that something is not working well in OSX.
    What I did not expect was to listen that having a Linux through the middle, there is no problem.
    regards

  • Help: Problem With Seperate Arrays Overwriting Each Other!

    Hi,
    I have this function that randomly allocates free time to coursework blocks. This method works because I have tested numerous times and it always prints of different allocations of time every time its called.
    The problem that I have is that I have this method that called this method twice to store each different call within a separate ArrayList.
    When I make the first call the block are assigned to the array fine. But when I called it a second time to store the next result within a separate Array the first Array result are overwritten . Any body have any idea why this is happening, I have asked numerous friends and even my supervisor and he can't find anything wrong with it. Any help would be very helpful...
    Code:
    public ArrayList<CourseworkTimeBlock> courseworkAllocation(ArrayList timetable, ArrayList<CourseworkTimeBlock> cCourseworkBlocks){
              // Calculates and stores the free "time blocks" that can be used
              // to allocate coursework.
              ArrayList<Integer> freeTimeBlocks = new ArrayList<Integer>();
              freeTimeBlocks = freeBlocks(timetable);
              Random random = new Random();
              ArrayList<CourseworkTimeBlock> courseworkTimeBlocks = new ArrayList<CourseworkTimeBlock>();
              for(int i = 0; i < cCourseworkBlocks.size(); i++){
                   int allocateTo = -100;
                   int randomPoint = 0;
                   CourseworkTimeBlock courseworkBlock;
                   courseworkBlock = cCourseworkBlocks.get(i);
                   while(allocateTo < 0){
                        randomPoint = random.nextInt(freeTimeBlocks.size());
                        allocateTo = freeTimeBlocks.get(randomPoint);
                   courseworkBlock.setBlockAllocated(allocateTo);
                   courseworkTimeBlocks.add(courseworkBlock);
                   freeTimeBlocks.set(randomPoint, -1 );
              for( int i = 0; i < courseworkTimeBlocks.size(); i++){
                   System.out.println("CW: " + courseworkTimeBlocks.get(i).getBlockAllocated());
              return courseworkTimeBlocks;
         }These are the calls I make in a separate method:
    ArrayList<CourseworkTimeBlock> courseworkTimetableOne = new ArrayList<CourseworkTimeBlock>();
    ArrayList<CourseworkTimeBlock> courseworkTimetableTwo = new ArrayList<CourseworkTimeBlock>();
             courseworkTimetableOne = courseworkAllocation(fixedTimetable, courseworkBlocks);
             courseworkTimetableTwo = courseworkAllocation(fixedTimetable, courseworkBlocks);Edited by: ChrisUK on Mar 1, 2008 9:11 AM

    ChrisUK wrote:
    Thanks for the reply.
    In terms of the:
    courseworkTimetableOne = courseworkAllocation(fixedTimetable, courseworkBlocks);
    courseworkTimetableTwo = courseworkAllocation(fixedTimetable, courseworkBlocks);They are both supposed to pass in the fixedTimetable object, the reason being is that this is a timetable and is passed through in order to find it "free time" blocks.
    The courseworkTimetableOne and courseworkTimetableTwo are just different representations of how the coursework time blocks could be allocated to that given fixedtimetable. You're calling the same method with the same parameters, so both references are going to point to the same object. It's the same as if you just replaced the second line with courseworkTimetableTwo = courseworkTimetableOne.
    You've got two references pointing to the same object.
    The fact that you do this first:
    ArrayList<CourseworkTimeBlock> courseworkTimetableOne = new ArrayList<CourseworkTimeBlock>();
    ArrayList<CourseworkTimeBlock> courseworkTimetableTwo = new ArrayList<CourseworkTimeBlock>();means nothing. You create the two new ArrayLists, but then this
    courseworkTimetableOne = courseworkAllocation(fixedTimetable, courseworkBlocks);
    courseworkTimetableTwo = courseworkAllocation(fixedTimetable, courseworkBlocks);gets rid of them. The new ArrayLists you just created are lost.
    Remember when you assign to a reference variable such as courseworkTimetableOne =, all that does is copy a reference so now courseworkTimetableOne is pointing to the same object that whatever is on the RHS is pointing to.
    If you want two different lists, then either courseworkAllocation should make a copy of its internal list and return that, or else the caller should do it.
    >
    By the way what does "SSCCE" mean?[http://mindprod.com/jgloss/sscce.html|http://mindprod.com/jgloss/sscce.html]
    [http://homepage1.nifty.com/algafield/sscce.html|http://homepage1.nifty.com/algafield/sscce.html]

Maybe you are looking for

  • Java version in EBS

    Hi All,           I am planning to upgrade java version on EBS instance.Windows clients want to upgrade java to 7.           EBS - 12.1.3             DB - 11.2.0.3             OS -  RHEL 5 64bit           Please find the out put "TXK Technology Inven

  • Macbook Pro Not Connecting

    Well, explain to me this, the MBPs will not connect to my external network drive.  Yesterday everything was fine, but now nothing.  My Windows machine connects to it fine and connects to the Internet wirelessly.  My TV's & Bluerays connect to Netflix

  • Crazy error when trying to launch iPhoto'11

    I am geting the following error message when trying to start iPhoto. I just successfully installed iLife'11 on my MacBook. Any help will be appreciated. Thanks, Puneet Error Message Process:         iPhoto [2602] Path:            /Applications/iPhoto

  • SSM 7.0 - Schedule status calculation of initiatives

    Hi, Does anybody know how SSM calculate the schedule status of initiatives? For example: - 1 initiative (I1) with "Rule based on status" with 2 milestones (M1 and M2). - M1 finished before target end date, completion = 100% and importance = high. - M

  • Song list in iTunes "out of bounds"?

    Hey. I have had this issue the last couple days, the song list in iTunes is out of its bounds. It goes all the way to the top, hiding the search field and making life a real pain. I have tried restarting my PC and repairing iTunes, with no luck. Migh