CPU 100%, network traffic light

My setup:
Xserve G4, 2 Gb RAM
OSX Server 10.4.11
In recent days, the server CPU is maxed out as shown by the graphs in Server Admin. Our network traffic is fairly light as shown by the graph.
I run:
top -o cpu
Processes: 71 total, 7 running, 64 sleeping... 197 threads 08:35:30
Load Avg: 7.69, 6.83, 6.10 CPU usage: 82.6% user, 17.4% sys, 0.0% idle
SharedLibs: num = 134, resident = 22.1M code, 3.04M data, 6.75M LinkEdit
MemRegions: num = 9369, resident = 270M + 6.72M private, 44.1M shared
PhysMem: 113M wired, 141M active, 824M inactive, 1.05G used, 711M free
VM: 4.36G + 85.0M 26950(0) pageins, 0(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
15923 httpd 19.2% 0:01.98 1 12 249 6.91M+ 19.5M 11.7M+ 72.4M+
15867 httpd 18.0% 0:05.45 1 12 275 14.0M+ 19.4M 18.8M+ 79.4M+
15926 httpd 17.5% 0:01.57 1 12 247 6.38M+ 19.5M 11.0M+ 71.9M+
15922 httpd 17.4% 0:02.01 1 12 257 9.51M+ 19.5M 14.3M+ 74.9M+
15870 httpd 9.9% 0:13.47 1 12 275 13.8M+ 19.5M 18.7M+ 79.1M+
15917 top 7.6% 0:05.40 1 26 22 1.17M 448K 1.59M 27.0M
15871 httpd 7.4% 0:13.82 1 12 274 13.8M+ 19.5M 18.8M+ 79.1M+
269 mysqld 1.5% 2:47:51 29 150 134 29.6M- 5.48M 33.3M- 132M-
0 kernel_tas 0.4% 5:11.65 43 2 2532 19.4M 0K 96.5M 1.11G
106 lookupd 0.1% 1:27.48 6 44 53 4.23M+ 1020K 4.98M+ 33.6M+
102 SecurityAg 0.1% 1:34.08 1 69 99 1.76M 7.10M 8.66M 116M
48 memberd 0.0% 1:20.43 3 22 24 268K 412K 628K 27.7M
15650 sshd 0.0% 0:00.42 1 11 42 108K 1.62M 496K 30.0M
38 netinfod 0.0% 0:21.80 1 14 22 208K 524K 572K 26.9M
63 WindowServ 0.0% 0:14.16 2 67 56 588K 4.97M 5.02M 92.2M
52 notifyd 0.0% 0:10.16 2 79 21 204K 416K 468K 27.2M
120 ntpd 0.0% 0:04.63 1 11 19 192K 608K 412K 27.1M
298 httpd 0.0% 0:06.42 1 10 229 104K 19.5M 7.00M 79.8M
272 serialnumb 0.0% 0:00.96 3 27 32 308K 800K 1.08M 28.3M
15921 httpd 0.0% 0:01.17 1 12 277 14.3M 19.5M 18.6M 79.9M
15920 httpd 0.0% 0:01.19 1 13 277 14.3M 19.5M 18.7M 79.9M
15919 httpd 0.0% 0:01.23 1 12 274 13.8M 19.5M 18.3M 79.2M
15918 httpd 0.0% 0:01.44 1 13 229 1.66M 19.5M 6.32M 67.1M
15900 httpd 0.0% 0:06.63 1 12 277 14.4M 19.5M 19.2M 79.9M
15881 trivial-re 0.0% 0:00.01 1 16 19 200K 512K 760K 26.7M
15869 httpd 0.0% 0:11.61 1 12 275 13.9M 19.5M 18.6M 79.4M
15868 httpd 0.0% 0:09.79 1 12 274 13.8M 19.5M 18.9M 79.1M
15852 servermgrd 0.0% 0:01.47 4 61 169 4.30M 3.86M 7.28M 46.4M
15824 pickup 0.0% 0:00.01 1 16 20 204K 500K 700K 26.7M
15651 bash 0.0% 0:00.04 1 14 17 200K 896K 820K 27.2M
15643 sshd 0.0% 0:00.12 1 18 43 128K 1.62M 1.36M 30.1M
348 slpd 0.0% 0:00.40 6 31 34 260K 908K 968K 30.2M
305 httpd 0.0% 66:38.29 1 13 237 3.14M 19.4M 9.52M 68.3M
304 httpd 0.0% 66:09.95 1 13 278 15.1M 19.4M 21.0M 80.3M
303 httpd 0.0% 68:59.73 1 13 234 3.17M 19.4M 9.29M 68.3M
302 httpd 0.0% 66:02.83 1 13 281 15.3M 19.4M 20.8M 80.0M
301 httpd 0.0% 68:12.51 1 13 281 15.6M 19.4M 21.4M 81.0M
300 rotatelogs 0.0% 0:00.02 1 14 18 136K 380K 360K 26.6M
299 rotatelogs 0.0% 0:04.57 1 14 18 140K 380K 364K 26.6M
285 mds 0.0% 0:00.05 6 71 46 556K 1.37M 1.88M 40.8M
217 sh 0.0% 0:00.04 1 14 18 188K 812K 720K 27.2M
207 getty 0.0% 0:00.00 1 14 18 112K 388K 332K 26.6M
164 crashrepor 0.0% 0:00.00 1 17 18 120K 384K 200K 26.6M
150 automount 0.0% 0:00.02 3 40 30 312K 932K 1.05M 28.7M
146 automount 0.0% 0:00.03 3 42 34 312K 968K 1.09M 29.0M
143 rpc.lockd 0.0% 0:00.00 1 10 18 108K 432K 192K 26.7M
134 nfsiod 0.0% 0:00.00 5 30 25 128K 376K 180K 28.6M
101 authorizat 0.0% 0:00.05 1 31 27 368K 940K 1.21M 27.4M
98 mcxd 0.0% 0:02.21 1 41 39 608K 1.26M 2.23M 69.1M
95 loginwindo 0.0% 0:00.25 3 101 90 904K 2.04M 3.25M 102M
Not sure where to start diagnosing this issu

Camelot,
Thanks again for your response!
Camelot wrote:
You shouldn't need to do that - what happens when you try?
Safari can't connect to the server "localhost".
The only thing I can think of off-hand that would cause this is if mod_status was disabled (which you might have done thinking you didn't need it). It would be a good idea to re-enable this, even if only short-term, to get an idea of what's going on.
mod_status is not listed in Web > Modules
Not sure if it will help significantly but I did enable the query cache for MySQL.
The query cache will generally help reduce load on the database server, but only if there's sufficient RAM on the server to cache the queries and results. The real question is how mush RAM is your system using? If it's out of memory then enabling the query cache can be detrimental.
For that matter, do your sites seem slow? Is your only concern the relatively high CPU load? or are pages loading slowly, too?
The pages are taking exceptionally long to load.
The 1.7 Gb Ram...Yes, it's a config of 512-512-512-256.
Swapping that 256MB for a 512MB seems like a no-brainer, no matter what else you do. It'll cost you $20 from OWC.
You're right...no brainer. Will do
Was wondering if a permissions issue could create the problems I'm having with Apache?
Unlikely. If apache didn't have permission to serve a file it would throw an error page back pretty quickly. I can't see this is the cause, but a quick look at apache's error log will tell you if there are any permission issues.
The site was running well this morning but as bloggers logged into Wordpress and general traffic picked up, the CPU load ramped up to 100% and pages are now loading very slowly.

Similar Messages

  • Unknown network traffic / router traffic monitoring

    So I got a new PC with windows 7 on it, and I installed this gadget that monitors network traffic, and it shows a lot of traffic that my local PC isn't showing, so I am thinking there is something running on the LAN that I can't see. I was looking to find a live, better program to monitor the actiontec router, for traffic. anyone know of anything that can maybe show me who is using all the bandwidth on my network?
    i have found software for Linksys, but nothing for the Actiontec.
    Thanks,
    Quasimodem
    Fios in Florida
    Solved!
    Go to Solution.

    Keep in mind that when looking at Wireshark (sniffer) software there are different types of traffic:
    Unicast
    Broadcast
    Multicast
    Unicast is traffic between two devices.  You will see the traffic between the PC with wireshark and another device on your local network such as a printer, another PC or the Router.  You should not see traffic between another PC and the Internet for example.  Using a phone as an example some calls you and the conversation is between you and the person on the other end of the phone.  This is unicast traffic.  Using defaults of the actiontec, IP address seen will be 192.168.1.1 for the router and 192.168.1.2-99 for devices on your network.  If you have the TV service, 192.168.1.100-1xx is used for the cable boxes.
    Broadcast traffic is traffic sent to all devices.  Its not directed toward a particular PC but rather usually looking for information.  In a sniffer trace you will see broadcast traffic. Going back to the phone example, someone makes an announcement on an overhead intercom system that is broadcast traffic.  Broadcast traffic will be seen as 192.168.255.255
    Multicast traffic is traffic from one device for many devices.  Usually used in video feeds.   Using the phone system as an example someone wishes to tell a group of people something so instead of calling each person up and telling them each person who wants the information joins a conference bridge.  Anyone is allowed to listen but only those that wish to get the information receive it.  Generally how multicast works.  Multicast traffic will be seen as IP address 224.x.x.x or something of the sorts where the address will be 2xx.x.x.x.  
    I hope this makes sense.  Probably more information than you needed but at least it will help you understand what wireshark is telling you.

  • Traffic lights Vs day's supply

    Hi,
    In MRP collective lists, system is showing red signal lights to all the materials and showing the message "3.0- days is less than limiting value of 0.1-"
    In the day's supply,1stRDS and 2nd columns system is showing the value 3.0-.
    In this case, how to change the signal light from red to green?
    Can any body please explain the concept behind this?
    Thanks in advance.
    Sekhar.

    hi
    traffic light depends upon the day's supply and exception messages.
    in md04 collective access , display all materials with MRP controller wise. Press the Tab " define traffic lights" there u can put ur own criterion of days supply and R days supply.
    Example how system calculates days supply.
    Calculation of the range of coverage: Starting from the current plant stock, the requirements are deducted one after the other along the time axis. This is done until there is a shortage (requirement > stock). The range of coverage is then the number of workdays between todays date and the date of the requirement that causes the shortage minus one day. The value after the decimal point is the ratio between the opening stock on the day of the shortage and the requirement on the day of the shortage.
    Stock = 240 pcs
    1st day: Requirement for 90  pcs => Stock = 150 pcs
    2nd day: Requirement for 70  pcs => Stock = 80  pcs
    3rd day: Requirement for 100 pcs => Shortage
    Range of coverage = 3 workdays minus 1 + 80/100
                      = 2 + 0,8
                      = 2,8
    Reward if useful
    Amit

  • MDNSResponder problem / network traffic reduction measures in effect

    [Part I in a series of "Why Does My Machine Randomly Shut Down And Related Oddities" :-D ]
    Below you can see a bunch of log output which seems to show a network problem. My connection is not too fast, which I've blamed on my low tier of U-Verse, but this makes me wonder. And it seems to occur each wakeup.
    "network traffic reduction measures in effect" I've found mentioned as an AirPort problem.
    BUT, my AirPort is OFF.
    (Plus, why is it changing the host name and then back again?)
    Mar 1 08:41:43 al-pines-imac-g5 kernel[0]: System Wake
    Mar 1 08:41:43 al-pines-imac-g5 kernel[0]: Wake event 0020
    Mar 1 08:41:43 al-pines-imac-g5 kernel[0]: UniNEnet::monitorLinkStatus - Link is up at 100 Mbps - Full Duplex (PHY regs 5,6:0x41e1,0x0007)
    Mar 1 08:37:49 al-pines-imac-g5 configd[36]: setting hostname to "al-pines-imac-g5.local"
    Mar 1 08:41:43 unknown000D93C8E73A configd[36]: setting hostname to "unknown000D93C8E73A"
    Mar 1 08:56:49 unknown000D93C8E73A kernel[0]: IOPMSlotsMacRISC4::determineSleepSupport has canSleep true
    Mar 1 08:56:50 unknown000D93C8E73A kernel[0]: System Sleep
    Mar 1 09:06:10 unknown000D93C8E73A kernel[0]: System Wake
    Mar 1 08:56:50 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 09:06:10 unknown000D93C8E73A kernel[0]: Wake event 0020
    Mar 1 08:56:50 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 09:06:10 unknown000D93C8E73A kernel[0]: UniNEnet::monitorLinkStatus - Link is up at 100 Mbps - Full Duplex (PHY regs 5,6:0x41e1,0x0007)
    Mar 1 08:56:50 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 08:56:50 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 9: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 9: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 9: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 9: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 09:06:10: --- last message repeated 1 time ---
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 9: Error 50 Network is down
    Mar 1 09:06:10: --- last message repeated 2 times ---
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 22: Error 50 Network is down
    Mar 1 09:06:03 unknown000D93C8E73A mDNSResponder[24]: ERROR: mDNSPlatformTCPConnect - connect failed: socket 9: Error 50 Network is down
    Mar 1 09:06:11 al-pines-imac-g5 configd[36]: setting hostname to "al-pines-imac-g5.local"
    Mar 1 09:06:11 al-pines-imac-g5 mDNSResponder[24]: Note: Frequent transitions for interface en0 (192.168.1.67); network traffic reduction measures in effect
    Mar 1 09:06:26 unknown000D93C8E73A configd[36]: setting hostname to "unknown000D93C8E73A"
    Mar 1 09:09:08 unknown000D93C8E73A ntpd[14]: time reset +2.174483 s

    Is that an actual dump from your logs? If so, I find it strange - not least because the timestamps are not consecutive. That certainly makes it harder to trace what's going on.
    Deciphering it as best I can, I'd say you have a flaky network. This could be due to cabling or some process on the machine that's interrupting sleep - I find it strange that many of the mDNSResponder messages are timestamped while the machine is asleep. That could be related to the various wake-on-LAN options - are they enabled in System Preferences -> Energy Saver?

  • Traffic lights on push button

    Hi all,
              In my requirement i have a field as push button , now i require to put traffic lights on this push button.I am displaying alv grid through
    class cl_gui_alv_grid
    please help me with a sample code.
    regards,
    kushagra

    Hi,
    Pass below codes as texts for the push buttons:
    @0A@ - Red
    @09@ - Orange
    @08@ - Green
    Below code can help you understanding handling normally without pushbuttons:
    DATA: ok_code TYPE syucomm.
    TYPES: BEGIN OF ty_data,
             num TYPE i,
             icon TYPE icon_d,
           END OF ty_data.
    DATA: wa_data TYPE ty_data,
          i_data TYPE TABLE OF ty_data.
    DATA: i_fieldcat TYPE lvc_t_fcat,
          wa_fieldcat TYPE lvc_s_fcat.
    DATA: g_cust_cont   TYPE REF TO cl_gui_custom_container,
          g_container   TYPE scrfname VALUE 'GRID1',
          g_grid        TYPE REF TO cl_gui_alv_grid.
    START-OF-SELECTION.
      DO 10 TIMES.
        wa_data-num = sy-index.
        IF sy-tabix < 4.
          wa_data-icon = '@0A@'.
        ELSEIF sy-tabix < 7.
          wa_data-icon = '@09@'.
        ELSE.
          wa_data-icon = '@08@'.
        ENDIF.
        APPEND wa_data TO i_data.
      ENDDO.
    END-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAINTITLE'.
      IF g_grid IS INITIAL.
        PERFORM display_list.
      ENDIF.
      CALL METHOD cl_gui_cfw=>flush.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      DATA: l_event TYPE REF TO cl_gui_event.
      CASE ok_code.
        WHEN 'EXIT' OR 'BACK' OR 'CANC'.
          PERFORM exit_program.
      ENDCASE.
      CLEAR: ok_code.
      CALL METHOD cl_gui_cfw=>flush.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  DISPLAY_LIST
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display_list .
      IF g_cust_cont IS INITIAL.
    * Create Custom Container
        CREATE OBJECT g_cust_cont
               EXPORTING container_name = g_container.
    * Create Ojbect for Grid Display
        CREATE OBJECT g_grid
               EXPORTING i_parent = g_cust_cont.
    * Build Field Catalog
        PERFORM build_catalog.
    * Display Output in Grid Form
        CALL METHOD g_grid->set_table_for_first_display
          CHANGING
            it_fieldcatalog = i_fieldcat
            it_outtab       = i_data[].
      ELSE.
    * Refresh Display
        CALL METHOD g_grid->refresh_table_display.
      ENDIF.
    ENDFORM.                    " DISPLAY_LIST
    *&      Form  BUILD_CATALOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_catalog .
      PERFORM build_fld_catalog USING:
         1 'NUM'   'I_DATA'   space     'Number'   10,
         2 'ICON'   'I_DATA'   'X'     'Icon'      10.
    ENDFORM.                    " BUILD_CATALOG
    *&      Form  BUILD_FLD_CATALOG
    *       text
    *      -->P_1      text
    *      -->P_0182   text
    *      -->P_0183   text
    *      -->P_C_X  text
    *      -->P_0185   text
    *      -->P_12     text
    FORM build_fld_catalog  USING    p_col
                                     p_fld
                                     p_tab
                                     p_icon
                                     p_text
                                     p_len.
      CLEAR: wa_fieldcat.
      wa_fieldcat-col_pos = p_col.
      wa_fieldcat-fieldname = p_fld.
      wa_fieldcat-tabname = p_tab.
      wa_fieldcat-icon = p_icon.
      wa_fieldcat-scrtext_l = p_text.
      wa_fieldcat-outputlen = p_len.
      APPEND wa_fieldcat TO i_fieldcat.
    ENDFORM.                    " BUILD_FLD_CATALOG
    *&      Form  EXIT_PROGRAM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM exit_program .
      CALL METHOD g_grid->free.
      LEAVE TO SCREEN 0.
    ENDFORM.                    " EXIT_PROGRAM

  • Curious about App-V 4.6 RO Cache Network Traffic

    Our environment is Server 4.5 SP2, and Client 4.6 SP3. We utilize RO cache on DFS network storage, and our clients are VDI VM's.
    We recently ran into an issue when we recycled a large pool of VM's where the CPU/Network Utilization was maxed on our cache file server. Upon further investigation there appears to be about 550MB of traffic between each VM and the Cache file itself when
    the VM boots (no users logged in). Can someone explain to me what this traffic could be?

    In RO cache mode (ReadOnlyFSD], *nothing* should get streamed down to the client at all.
    where does the amount of data show up - any specific files/folders, or monitored network traffic between the client and the DFS share?
    is there anything in the App-V log file?
    Did you initiate a server publishing refresh with a user that has access to all applications before you sealed the VDI Master image?
    Falko
    Twitter
    @kirk_tn   |   Blog
    kirxblog   |   Web
    kirx.org   |   Fireside
    appvbook.com

  • Traffic light  repaint not working via button

    I created a traffic light, a button is pressed and the colors should cycle yellow>green>yellow>red etc.. as a normal traffic light would
    when i press the start button, the repaint(); doesnt work, system.output shows me the number which corresponds to the light changes but somehow the graphics/paint is not updated.
    what am i doing wrong?
    package test2;<br />
    <br />
    import java.awt.event.ActionEvent;<br />
    import java.awt.event.ActionListener;<br />
    import javax.swing.JButton;<br />
    import javax.swing.JOptionPane;<br />
    import javax.swing.JPanel;<br />
    <br />
    public class Traffic_Lights extends JPanel implements ActionListener {<br />
    <br />
    private Light_Controller LightController;<br />
    private JButton jStart, jStop;<br />
    <br />
    public Traffic_Lights() {<br />
    jStart = new JButton("START");<br />
    jStop = new JButton("EXIT");<br />
    <br />
    // Register Listeners with buttons<br />
    jStart.addActionListener(this);<br />
    jStop.addActionListener(this);<br />
    LightController = new Light_Controller();<br />
    this.add(jStart);<br />
    this.add(jStop);<br />
    }<br />
    // Adding the traffic light<br />
    <br />
    <br />
    /**<br />
    * This method traps the button click events<br />
    */<br />
    public void actionPerformed(ActionEvent e) {<br />
    // Rotate button is clicked<br />
    if (e.getSource() == jStart) {<br />
    // Change the color displayed<br />
    LightController.changeColor();<br />
    package test2;<br />
    import java.awt.*;<br />
    import java.awt.geom.Rectangle2D;<br />
    import javax.swing.JComponent;<br />
    import javax.swing.JPanel;<br />
    <br />
    <br />
    public class Light_Controller extends JPanel {<br />
    <br />
    private int lightState = 1;<br />
    <br />
    <br />
    public void changeColor() {<br />
    lightState++;<br />
    System.out.println(lightState);<br />
    if (lightState > 5) {<br />
    lightState = 2;<br />
    <br />
    }<br />
    <br />
    this.repaint();<br />
    <br />
    }<br />
    <br />
    /**<br />
    * This method draws the traffic light on the screen<br />
    */<br />
    public void paintComponent(Graphics g) {<br />
    super.paintComponent(g);<br />
    <br />
    Graphics2D g1 = (Graphics2D) g;<br />
    // Draws the traffic light<br />
    // Draw out white frame<br />
    g.setColor(new Color(255,255,255));<br />
    g.fillRoundRect(35,15,120,225,30,30);<br />
    <br />
    // Draw inner black frame<br />
    g.setColor(new Color(0,0,0));<br />
    g.fillRoundRect(50,30,90,195,30,30);<br />
    g.drawRoundRect(35,15,120,225,30,30);<br />
    <br />
    // RED dim<br />
    g.setColor(new Color(100,0,0));<br />
    g.fillOval(70,40,50,50);<br />
    <br />
    // YELLOW dim<br />
    g.setColor(new Color(100,100,0));<br />
    g.fillOval(70,100,50,50);<br />
    <br />
    // GREEN dim<br />
    g.setColor(new Color(0,100,0));<br />
    g.fillOval(70,160,50,50);<br />
    <br />
    // Draw traffic light stand<br />
    g.setColor(new Color(50,50,50));<br />
    g.fillRect(80,240,30,30);<br />
    <br />
    switch(lightState) {<br />
    case 1:<br />
    // red glows<br />
    g.setColor(new Color(255, 0, 0));<br />
    g.fillOval(70, 40, 50, 50);<br />
    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));<br />
    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));<br />
    break;<br />
    <br />
    case 2:<br />
    // yellow glows<br />
    g.setColor(new Color(255, 255, 0));<br />
    g.fillOval(70, 100, 50, 50);<br />
    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));<br />
    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));<br />
    break;<br />
    <br />
    case 3:<br />
    // green glows<br />
    g.setColor(new Color(0, 255, 0));<br />
    g.fillOval(70, 160, 50, 50);<br />
    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));<br />
    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));<br />
    break;<br />
    <br />
    case 4:<br />
    // back to yellow glows<br />
    g.setColor(new Color(255, 255, 0));<br />
    g.fillOval(70, 100, 50, 50);<br />
    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));<br />
    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));<br />
    break;<br />
    <br />
    case 5:<br />
    // back to red glows<br />
    g.setColor(new Color(255, 0, 0));<br />
    g.fillOval(70, 40, 50, 50);<br />
    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));<br />
    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));<br />
    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));<br />
    break;<br />
    }<br />
    }<br />
    } <br />

    Code continued...
    class Light_Controller extends JPanel {
        private int lightState = 1;
        public void changeColor() {
            lightState++;
            System.out.println(lightState);
            if (lightState > 5) {
                lightState = 2;
            this.repaint();
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g1 = (Graphics2D) g;
            g.setColor(new Color(255, 255, 255));
            g.fillRoundRect(35, 15, 120, 225, 30, 30);
            g.setColor(new Color(0, 0, 0));
            g.fillRoundRect(50, 30, 90, 195, 30, 30);
            g.drawRoundRect(35, 15, 120, 225, 30, 30);
            g.setColor(new Color(100, 0, 0));
            g.fillOval(70, 40, 50, 50);
            g.setColor(new Color(100, 100, 0));
            g.fillOval(70, 100, 50, 50);
            g.setColor(new Color(0, 100, 0));
            g.fillOval(70, 160, 50, 50);
            g.setColor(new Color(50, 50, 50));
            g.fillRect(80, 240, 30, 30);
            switch (lightState) {
                case 1:
                    g.setColor(new Color(255, 0, 0));
                    g.fillOval(70, 40, 50, 50);
                    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));
                    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));
                    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));
                    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));
                    break;
                case 2:
                    g.setColor(new Color(255, 255, 0));
                    g.fillOval(70, 100, 50, 50);
                    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));
                    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));
                    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));
                    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));
                    break;
                case 3:
                    g.setColor(new Color(0, 255, 0));
                    g.fillOval(70, 160, 50, 50);
                    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));
                    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));
                    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));
                    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));
                    break;
                case 4:
                    g.setColor(new Color(255, 255, 0));
                    g.fillOval(70, 100, 50, 50);
                    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));
                    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));
                    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));
                    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));
                    break;
                case 5:
                    g.setColor(new Color(255, 0, 0));
                    g.fillOval(70, 40, 50, 50);
                    g1.fill(new Rectangle2D.Double(440, 450, 60, 5));
                    g1.fill(new Rectangle2D.Double(350, 240, 60, 5));
                    g1.fill(new Rectangle2D.Double(345, 360, 5, 80));
                    g1.fill(new Rectangle2D.Double(500, 250, 5, 90));
                    break;
    }

  • ALV editable with traffic lights

    Hello all,
    I need some help about ALV editable; my reports display an ALV grid editable, and update all the new values on the DB table, but I have traffic lights as values on the DB table.
    More information’s:
    So this is my internal table…
    <i>DATA: BEGIN OF it_table OCCURS 0,
          document    TYPE admi-document,
          status           TYPE admi-status,          “(traffic</i> lights from the table able to modify) 
          archiv_key  TYPE admi_files-archiv_key,
          status_opt  TYPE admi_files-status_opt,     “(traffic lights from the table able to modify )
          status_fil    TYPE admi_files-status_fil,     “(traffic lights from the table able to modify )
          END OF it_report.
    …</i>
    I got all the match code form the table (DB) , so on my report I could modify all the traffic lights but when I save the modifications, I got a message error.
    And the second problem was, I couldn’t come back to the value initial and I getting the same message. 
    Can anybody help me please?
    Thanks you.

    see the program and i am using traffic lights in my program --
    REPORT ZWM_BIN_STOCK_REQ no standard page heading
                        message-id zwave.
    D A T A   D E C L A R A T I O N ****************************
    Tables
    tables : zpwvbap,
             mara,
             marc,
             makt,
             vbap,
             zshift,
             marm,
             lqua.
    TYPE-POOLS: SLIS.
    Internal Table for Sales order
    data : begin of i_vbap occurs 0,
           matnr like zpwvbap-matnr," Material #
           ZZCUTOFF like zpwvbak-ZZCUTOFF," Cutoff Time
           vlpla like zpwvbap-vlpla,
           kwmeng like zpwvbap-kwmeng," Quantity
           vrkme  like zpwvbap-vrkme, " Sales Unit
           meins like zpwvbap-meins, " Unit of measure
           end of i_vbap.
    Internal Table for final Processing
    data : begin of i_final occurs 0,
           date(8) type c,
           matnr like zpwvbap-matnr," Material #
           zzshift like zshift-zzshift, " Wave Drop
           maktx like makt-maktx," Desc
           lgpla like lagp-lgpla, " Pick Bin
           pverme like lqua-verme," Stock at Pick Bin
           prverme like lqua-verme," Stock at Prod Bin
           kwmeng like zpwvbap-kwmeng," Requiremnet from Wave Drop
           vrkme  like zpwvbap-vrkme, " Sales Unit
          meins like zpwvbap-meins," Unit of measure
           end of i_final.
    Internal Table for Output
    data : begin of i_output occurs 0,
           field type c, " Traffic Lights
           zzshift like zshift-zzshift, " Wave Drop
           matnr like zpwvbap-matnr," Material #
           maktx like makt-maktx," Desc
           lgpla like lagp-lgpla, " Pick Bin
           pverme like lqua-verme," Stock at Pick Bin
           prverme like lqua-verme," Stock at Prod Bin
           kwmeng like zpwvbap-kwmeng," Requiremnet from Wave Drop
           vrkme like zpwvbap-vrkme," Sales Unit
          meins like zpwvbap-meins," Unit of measure
           diff like zpwvbap-kwmeng, " Diffrence
           end of i_output.
    Work Area for Final Internal Table
    data wa_final like i_final.
    data :  w_zzcutoff(12) TYPE c,
            v_date type sy-datum,
            v_time(4) type c,
            v_fldate(12) type c,
            v_fhdate(12) type c,
            v_pverme like lqua-verme,
            v_prverme like lqua-verme,
            v_diff like zpwvbap-kwmeng.
    Variables for new check box
    data : v_nverme like lqua-verme.
    Internal Table for Pick Bin
    data : begin of i_verme occurs 0,
           verme like lqua-verme,
           end of i_verme.
    Internal table for Prod Bin
    data : begin of i_pverme occurs 0,
           verme like lqua-verme,
           end of i_pverme.
    Variables for ALV
    DATA: FIELDCAT           TYPE SLIS_T_FIELDCAT_ALV,
          FIELDCAT_LN        LIKE LINE OF FIELDCAT,
          SORTCAT            TYPE SLIS_T_SORTINFO_ALV,
          SORTCAT_LN         LIKE LINE OF SORTCAT,
          EVENTCAT           TYPE SLIS_T_EVENT,
          EVENTCAT_LN        LIKE LINE OF EVENTCAT,
          LAYOUT             TYPE SLIS_LAYOUT_ALV,
          C_TOP_OF_PAGE      TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
          g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
          GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    DATA: COL_POS TYPE I,
          P_LIGNAM TYPE SLIS_FIELDNAME VALUE  'FIELD'.
    DATA : V_REPID LIKE SY-REPID,
           flag type c.
    S E L E C T I O N - S C R E E N *************************
    selection-screen : begin of block blk with frame title text-001.
    parameter : p_plant like marc-werks obligatory default '1000'.
    select-options : s_date for sy-datum obligatory ,
                     s_shift for zshift-zzshift,
                     s_matnr for mara-matnr,
                     s_dept for zpwvbap-zzdept,
                     s_pdept for marc-ZZPRODDEPT.
    selection-screen: end of block blk.
    parameters : p_check as checkbox ."default 'X'.
    ranges r_cutoff for  w_zzcutoff.
    I N I T I A L I Z A T I O N ****************************
    initialization.
      V_REPID = SY-REPID.
      s_date-low = sy-datum + 1.
      append s_date.
    S T A R T - O F - S E L E C T I O N  ***********************
    start-of-selection.
    Get the Shift Data.
      PERFORM GET_SHIFT_DETAILS.
    Get the data from ZPWVBAP Table
      PERFORM GET_DATA_VBAP.
    E N D - O F - S E L E C T I O N **********************
    end-of-selection.
      if not i_output[] is initial.
        sort i_output by field zzshift matnr.
    Reset the all Fiedcatlog.
        PERFORM RESETVALUES.
    Traffic Lights
        PERFORM BUILD_LAYOUT.
    Fill the fieldcatlog values
        PERFORM FILL_FIELDCATLOG.
    Call the List Function module
        PERFORM CALL_lIST.
      endif.
    *&      Form  GET_SHIFT_DETAILS
          Get the Cutoff Time.
    FORM GET_SHIFT_DETAILS.
      clear : v_fldate,
              v_fhdate.
      if not s_shift-low is initial.
        clear: v_time,
               v_date.
        if s_shift-low = '1'.
          v_time = '2000'.
        elseif s_shift-low = '2'.
          v_time = '2300'.
        endif.
        v_date = s_date-low - 1.
        concatenate v_date v_time into v_fldate.
      endif.
      if not s_shift-high is initial.
        clear : v_date,
                v_time.
        if s_shift-high = '1'.
          v_time = '2000'.
        elseif s_shift-high = '2'.
          v_time = '2300'.
        endif.
        if not s_date-high is initial.
          v_date = s_date-high - 1.
        else.
          v_date = s_date-low - 1.
        endif.
        concatenate v_date v_time into v_fhdate.
      endif.
      if not v_fhdate is initial.
        r_cutoff-low = v_fldate.
        r_cutoff-high = v_fhdate.
        r_cutoff-sign = 'I'.
        r_cutoff-option = 'BT'.
        append r_cutoff.
      endif.
    ENDFORM.                    " GET_SHIFT_DETAILS
    *&      Form  GET_DATA_VBAP
          Get the data from ZPWVBAP Table
    FORM GET_DATA_VBAP.
    Get the data from ZPWVBAP and ZPWVBAK Table
      if not v_fhdate is initial.
        select matnr ZZCUTOFF  vlpla sum( kwmeng ) vrkme meins
                     into table i_vbap
                     from zpwvbap as a inner join zpwvbak as b on
                                   a~vbeln = b~vbeln
                                   where a~werks = p_plant
                                   and   a~matnr in s_matnr
                                   and b~vdatu in s_date
                                   and a~zzdept in s_dept
                                   and b~zzcutoff in r_cutoff
                                  group by matnr zzcutoff vlpla vrkme meins.
      elseif not v_fldate is initial.
        select matnr ZZCUTOFF vlpla sum( kwmeng ) vrkme meins
                           into table i_vbap
                           from zpwvbap as a inner join zpwvbak as b on
                                   a~vbeln = b~vbeln
                                   where a~werks = p_plant
                                   and   a~matnr in s_matnr
                                   and b~vdatu in s_date
                                   and a~zzdept in s_dept
                                   and b~zzcutoff = v_fldate
                               group by matnr zzcutoff vlpla vrkme meins.
      else.
        select matnr ZZCUTOFF vlpla sum( kwmeng ) vrkme meins
                              into table i_vbap
           from zpwvbap as a inner join zpwvbak as b on
                                   a~vbeln = b~vbeln
                                   where a~werks = p_plant
                                   and   a~matnr in s_matnr
                                   and b~vdatu in s_date
                                   and a~zzdept in s_dept
                                   and b~zzcutoff in r_cutoff
                                group by matnr zzcutoff vlpla vrkme meins .
      endif.
      if sy-subrc ne 0.
        message i000(zwave) with 'No data found for given selection'.
        stop.
      endif.
      sort i_vbap by zzcutoff matnr.
      loop at i_vbap.
        clear : v_pverme,
                v_prverme.
    Compare the data with pick method
        select single zzpick from marc into marc-zzpick
                             where matnr = i_vbap-matnr
                             and   werks = p_plant
                             and   zzpick = '01'.
        if sy-subrc ne 0.
          continue.
        endif.
    Compare the data from MARC Table with Production Department
        select single zzPRODdept from marc into marc-zzPRODdept
                             where matnr = i_vbap-matnr
                             and werks = p_plant
                             and  zzPRODdept in s_pdept.
        if sy-subrc ne 0.
          continue.
        endif.
    Get the Material Description from MAKT Table
        Select single maktx from makt into makt-maktx
                            where matnr = i_vbap-matnr
                            and   spras = 'E'.
        if sy-subrc eq 0.
          i_final-maktx = makt-maktx.
        endif.
    Get the Pick Bin
        i_final-lgpla = i_vbap-vlpla.
        refresh i_verme.
        clear i_verme.
    Get the stock at Pick bin
        select verme  from lqua into table i_verme
                            where lgpla = i_vbap-vlpla
                            and   matnr = i_vbap-matnr
                            and   LGNUM = '100'.
        if sy-subrc eq 0.
          loop at i_verme.
            v_pverme = v_pverme + i_verme-verme.
          endloop.
          if sy-subrc eq 0.
            i_final-pverme = v_pverme.
          endif.
        endif.
        refresh i_pverme.
        clear i_pverme.
    Get the stock at Production bin
        select  verme from lqua into table i_pverme
                           where matnr = i_vbap-matnr
                           and   LGNUM = '100'
                       and ( lgpla = '9595959595' or
                             lgpla = '2222222222' or
                             lgpla = '5555555555' or
                             lgpla = '3232323232' or
                             lgpla = '8080808080' or
                             lgpla = '4040404040' or
                             lgpla = '9090909090' ).
        if sy-subrc eq 0.
          loop at i_pverme.
            v_prverme = v_prverme + i_pverme-verme.
          endloop.
          if sy-subrc eq 0.
            i_final-prverme = v_prverme.
          endif.
        endif.
    Compare the unit of measure and sales unit
        if i_vbap-vrkme ne i_vbap-meins.
    Get the data from MARM Table ( Unit of measure )
          select single * from marm into marm
                               where matnr = i_vbap-matnr
                               and   meinh = i_vbap-vrkme.
          if sy-subrc eq 0.
            i_final-pverme = ( i_final-pverme * marm-umren ) / marm-umrez.
          endif.
        endif.
    Material #
        i_final-matnr = i_vbap-matnr.
    Quantity from ZPWVBAP
        i_final-kwmeng = i_vbap-kwmeng.
    Unit of Measure
       i_final-meins = i_vbap-meins.
    Sales Unit
        i_final-vrkme = i_vbap-vrkme.
    Wave Drop
        if i_vbap-ZZCUTOFF+8(4) = '2000' .
          i_final-zzshift = '1'.
        endif.
        if i_vbap-zzcutoff+8(4) = '2300'.
          i_final-zzshift = '2'.
        endif.
        i_final-date = i_vbap-zzcutoff+0(8).
        append i_final.
        clear : i_final,
                i_vbap.
    **Difference
       i_output-diff = i_output-pverme - i_vbap-kwmeng.
    Traffic Lights Depends on value
       if i_output-pverme > i_output-kwmeng.
         i_output-field = '3'.
       elseif i_output-pverme < i_output-kwmeng.
         i_output-field = '1'.
       elseif i_output-pverme = i_output-kwmeng.
         i_output-field = '2'.
       endif.
       append i_output.
       clear : i_output,
               i_vbap.
      endloop.
      refresh i_vbap.
      sort i_final by date matnr zzshift.
    Processing the internal table to get same material with pick quantity
    deduction even it for 2nd shift
      loop at i_final.
    Move the data into work area in order remove #
        move i_final to wa_final.
        clear : flag.
        at new matnr.
          move : wa_final-matnr to i_output-matnr," Material #
                 wa_final-maktx to i_output-maktx," Desc
                 wa_final-lgpla to i_output-lgpla," Pick Bin
                 wa_final-kwmeng to i_output-kwmeng," Order qty
                 wa_final-zzshift to i_output-zzshift," Shift
                 wa_final-pverme to i_output-pverme, " Pick bin qty
                 wa_final-vrkme  to i_output-vrkme," Sales Unit
                 wa_final-prverme to i_output-prverme. " Prod Bin Qty
          break sreddy.
    Difference
          i_output-diff = i_output-pverme - i_output-kwmeng.
    New logic for Only HMR Department
          if p_check = 'X'.
            if i_output-pverme < i_output-kwmeng.
              v_nverme = i_output-pverme + i_output-prverme.
              if v_nverme > i_output-kwmeng.
               if i_output-pverme < i_output-kwmeng.
               i_output-field = '2'.
                else.
    Traffic Lights Depends on value
                i_output-field = '3'.
                endif.
              elseif v_nverme < i_output-kwmeng.
                i_output-field = '1'.
              elseif v_nverme = i_output-kwmeng.
                i_output-field = '2'.
              endif.
            elseif i_output-pverme > i_output-kwmeng.
              i_output-field = '3'.
            elseif i_output-pverme = i_output-kwmeng.
              i_output-field = '3'.
            endif.
          else.
    Traffic Lights Depends on value
            if i_output-pverme > i_output-kwmeng.
              i_output-field = '3'.
            elseif i_output-pverme < i_output-kwmeng.
              i_output-field = '1'.
            elseif i_output-pverme = i_output-kwmeng.
              i_output-field = '2'.
            endif.
          endif.
          move i_output-diff to v_diff.
          flag = 'X'.
        endat.
        if flag ne 'X'.
          move : wa_final-matnr to i_output-matnr," Material #
                 wa_final-maktx to i_output-maktx," Desc
                 wa_final-lgpla to i_output-lgpla," Pick Bin
                 wa_final-kwmeng to i_output-kwmeng," Order qty
                 wa_final-zzshift to i_output-zzshift," Shift
                 wa_final-vrkme  to i_output-vrkme," Sales Unit
                 wa_final-prverme to i_output-prverme. " Prod Bin Qty
      Move Diffrence value
          move v_diff to i_output-pverme.
          clear: v_diff.
    New logic for Only HMR Department
    New logic for Only HMR Department
          if p_check = 'X'.
            if i_output-pverme < i_output-kwmeng.
              v_nverme = i_output-pverme + i_output-prverme.
              if v_nverme > i_output-kwmeng.
              if i_output-pverme < i_output-kwmeng.
               i_output-field = '2'.
                else.
    Traffic Lights Depends on value
                i_output-field = '3'.
                endif.
    Traffic Lights Depends on value
               i_output-field = '3'.
              elseif v_nverme < i_output-kwmeng.
                i_output-field = '1'.
              elseif v_nverme = i_output-kwmeng.
                i_output-field = '2'.
              endif.
            elseif i_output-pverme > i_output-kwmeng.
              i_output-field = '3'.
            elseif i_output-pverme = i_output-kwmeng.
              i_output-field = '3'.
            endif.
    i_output-diff = i_output-pverme - i_output-kwmeng.
          else.
    Difference
            i_output-diff = i_output-pverme - i_output-kwmeng.
    Traffic Lights Depends on value
            if i_output-pverme > i_output-kwmeng.
              i_output-field = '3'.
            elseif i_output-pverme < i_output-kwmeng.
              i_output-field = '1'.
            elseif i_output-pverme = i_output-kwmeng.
              i_output-field = '2'.
            endif.
          endif.
        endif.
        append i_output.
        clear : i_output,
                wa_final,
                i_final,
                 v_nverme.
      endloop.
      sort i_output by field zzshift matnr.
    ENDFORM.                    " GET_DATA_VBAP
    *&      Form  RESETVALUES
          Reset the all fieldcatlogs
    FORM RESETVALUES.
      FIELDCAT_LN-KEY = SPACE.
      FIELDCAT_LN-DO_SUM = SPACE.
      FIELDCAT_LN-NO_OUT = SPACE.
      FIELDCAT_LN-QFIELDNAME = SPACE.
      FIELDCAT_LN-HOTSPOT = SPACE.
      FIELDCAT_LN-OUTPUTLEN = '0'.
      CLEAR: fieldcat_ln-seltext_l, fieldcat_ln-seltext_m,
             fieldcat_ln-seltext_s, fieldcat_ln-reptext_ddic.
    ENDFORM.                    " RESETVALUES
    *&      Form  FILL_FIELDCATLOG
          Fill the Fieldcatlog values
    FORM FILL_FIELDCATLOG.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
    Trafiic Light
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'FIELD'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 7.
      LS_FIELDCAT-col_pos    = '1'.
      ls_fieldcat-seltext_L = 'Lights'.
      ls_fieldcat-seltext_s = 'Lights'.
      ls_fieldcat-seltext_m = 'Lights'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Wave Drop
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'ZZSHIFT'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 9.
      LS_FIELDCAT-col_pos    = '2'.
      ls_fieldcat-seltext_L = 'Wave Drop'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Material
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 18.
      LS_FIELDCAT-col_pos    = '3'.
      ls_fieldcat-seltext_L = 'Material'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 40.
      LS_FIELDCAT-col_pos    = '4'.
      ls_fieldcat-seltext_L = 'Description'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Pick Bin
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'LGPLA'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-col_pos    = '5'.
      ls_fieldcat-seltext_L = 'Pick Bin'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Trafiic Light
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'PVERME'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 16.
      LS_FIELDCAT-col_pos    = '6'.
      ls_fieldcat-seltext_L = 'Stock at Pick Bin'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Stock at Prod Bin
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'PRVERME'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 16.
      LS_FIELDCAT-col_pos    = '7'.
      ls_fieldcat-seltext_L = 'Stock at Prod Bin'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Req from wave drop
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KWMENG'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 23.
      LS_FIELDCAT-col_pos    = '8'.
      ls_fieldcat-seltext_L = 'Requirement from Wave Drop'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Sales Unit
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'VRKME'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 12.
      LS_FIELDCAT-col_pos    = '9'.
      ls_fieldcat-seltext_L = 'Sales Unit'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Unit of Measure
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MEINS'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 9.
      LS_FIELDCAT-col_pos    = '10'.
      ls_fieldcat-seltext_L = 'UNIT'.
      ls_fieldcat-no_out = 'X'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    Diffference
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'DIFF'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      LS_FIELDCAT-OUTPUTLEN    = 12.
      LS_FIELDCAT-col_pos    = '11'.
      ls_fieldcat-seltext_L = 'Difference'.
      APPEND LS_FIELDCAT TO FIELDCAT.
    ENDFORM.                    " FILL_FIELDCATLOG
    *&      Form  CALL_lIST
          Use ALV Function module to display output
    FORM CALL_lIST.
    Top - of - Page
      PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = V_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = g_user_command
          I_CALLBACK_TOP_OF_PAGE            = C_TOP_OF_PAGE
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
          IS_LAYOUT                         = LAYOUT
          IT_FIELDCAT                       = FIELDCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = I_OUTPUT
       EXCEPTIONS
         PROGRAM_ERROR                     = 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.
    ENDFORM.                    " CALL_lIST
    *&      Form  BUILD_LAYOUT
          text
    FORM BUILD_LAYOUT.
      LAYOUT-GET_SELINFOS = 'X'.
    Now we want a traffic light to say if the Truck is deleted
    the variable p_lignam contains the name in IREPO which stores the
    value for the traffic light
      LAYOUT-LIGHTS_FIELDNAME = P_LIGNAM.
      layout-HEADER_TEXT = 'Lights'.
      LAYOUT-LIGHTS_CONDENSE =  'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  COMMENT_BUILD
          text
         -->P_GT_LIST_TOP_OF_PAGE[]  text
    FORM COMMENT_BUILD USING    LT_TOP_OF_PAGE TYPE
                                            SLIS_T_LISTHEADER.
      data : v_day(2) type c,
             v_mon(2) type c,
             v_year(4) type c,
             v_ldate(10) type c,
             v_hdate(10) type c.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
      data: d_date like sy-datum.
      clear : v_ldate,
              v_hdate.
    Header Information.
    LIST HEADING LINE: TYPE H
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      LS_LINE-INFO = 'Bin Replenishment report for HMR'.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
    STATUS LINE: TYPE S
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = TEXT-003.
    LS_LINE-INFO = TEXT-003.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
    STATUS LINE: TYPE S
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
    LS_LINE-KEY  = TEXT-003.
    LS_LINE-INFO = TEXT-003.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
    Get the data ( s_date_low) into proper format.
      v_year = s_date-low+0(4).
      v_mon = s_date-low+4(2).
      v_day = s_date-low+6(2).
      concatenate v_mon '/' v_day '/' v_year into v_ldate.
      clear : v_mon,
              v_year,
              v_day.
    Get the data ( s_date_high) into proper format.
      v_year = s_date-high+0(4).
      v_mon  = s_date-high+4(2).
      v_day  = s_date-high+6(2).
      concatenate v_mon '/' v_day '/' v_year into v_hdate.
      clear : v_mon,
              v_year,
              v_day.
    Delivery date
      if not s_date-low is initial .
        if not s_date-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Delivery date From:'.
          LS_LINE-INFO = v_ldate.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Delivery date To :'.
          LS_LINE-INFO =  v_hdate.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
      if not s_date-low is initial.
        if  s_date-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Delivery date :'.
          LS_LINE-INFO = v_ldate.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
    Wave Drop
      if not S_SHIFT-LOW is initial.
        if not S_SHIFT-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Wave Drop From :'.
          LS_LINE-INFO = s_shift-low.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Wave Drop to :'.
          LS_LINE-INFO = s_shift-high.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
      if not S_SHIFT-LOW is initial.
        if S_SHIFT-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Wave Drop :'.
          LS_LINE-INFO = s_shift-low.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
         CLEAR LS_LINE.
         LS_LINE-TYP  = 'S'.
         LS_LINE-KEY  = 'Wave Drop to :'.
         LS_LINE-INFO = s_shift-high.
         APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
    Department
      if not s_dept-low is initial .
        if not s_dept-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Department From :'.
          LS_LINE-INFO = s_dept-low.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Department to :'.
          LS_LINE-INFO = s_dept-high.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
      if not s_dept-low is initial .
        if  s_dept-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Department :'.
          LS_LINE-INFO = s_dept-low.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
    Production Department
      if not S_PDEPT-LOW is initial.
        if not S_PDEPT-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Production Department From :'.
          LS_LINE-INFO = S_PDEPT-LOW.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Production Department to :'.
          LS_LINE-INFO = S_PDEPT-high.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
      if not S_PDEPT-LOW is initial.
        if  S_PDEPT-high is initial.
          CLEAR LS_LINE.
          LS_LINE-TYP  = 'S'.
          LS_LINE-KEY  = 'Production Department :'.
          LS_LINE-INFO = S_PDEPT-LOW.
          APPEND LS_LINE TO LT_TOP_OF_PAGE.
        endif.
      endif.
    ENDFORM.                    " COMMENT_BUILD
          FORM TOP_OF_PAGE                                              *
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = GT_LIST_TOP_OF_PAGE
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    ENDFORM.
          FORM USER_COMMAND                                             *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                rs_selfield TYPE slis_selfield.                 "#EC CALLED
      CASE R_UCOMM.
        WHEN '&IC1'.
          read table i_output index rs_selfield-tabindex.
          SET PARAMETER ID 'MAT' FIELD i_output-matnr.
          SET PARAMETER ID 'WRK' FIELD p_plant.
          if not i_output-matnr is initial.
            call transaction 'MD04' and skip first screen.
          endif.
      ENDCASE.
    ENDFORM.

  • Tooltip for Traffic light when mouse over

    Hallo experts,
    I have a column in a ALV with trafic light(red, yelloy and green) . I woild like to have a tooltip text
    when the user move the mose over the traffic light per row.
    I use the class   cl_salv_table to output my ALV.
    When is rood: article is not more in warehouse
    when is yellow: quantity article very low, must be ordered
    when is green: article enough in warehouse.
    Thanks in advance,
    Edited by: Bassydiallo on Feb 25, 2011 3:59 PM

    Thanks all of you , here the code I use. It works I get the right traffic light on the column class_light, I just need
    the tooltip on it.
    I tried to insert your code in my program but i don't get the tooltip. Can some body tell me where I have to inser the code above ?
    Thanks in advance for your help.
    REPORT  z_prg_alv00_article.
    TYPE-POOLS: icon.
    TYPE-POOLS: col.
    TYPES: BEGIN OF tt_article.
                 INCLUDE STRUCTURE st_article.
    TYPES: class_light TYPE n, " column traffic light
    END OF tt_article.
    DATA: gr_container TYPE REF TO cl_gui_custom_container.
    DATA: gt_outtab TYPE TABLE OF tt_article,
              gr_alv TYPE REF TO cl_salv_table,
              ok_code LIKE sy-ucomm.
    DATA: wa_tt_article LIKE LINE OF gt_outtab.
    CALL SCREEN 100.
    Module before output of screen 100
    MODULE LOAD_DATA_ALV100 OUTPUT
    MODULE load_data_alv100 OUTPUT.
      SELECT * FROM tab_article INTO CORRESPONDING FIELDS OF TABLE gt_outtab
    LOOP at gt_outtab INTO wa_article.
    settings the color
               IF wa_article-qty < 100.
                          wa_article-class_light = '1'.
              ELSEIF wa_article-qty > 100 AND wa_article-qty < 300.
                        wa_wa_article-class_light = '2'.
             ELSE.
                      wa_sflight-class_light = '3'.
             ENDIF.
      MODIFY gt_outtab FROM wa_article TRANSPORTING class_light.
    ENDLOOP.
    IF gr_container IS INITIAL.
      "Creating the container-instance with reference gr_cont
      CREATE OBJECT gr_container
           EXPORTING
                   container_name = 'CONT_AREA'
           EXCEPTIONS
                 OTHERS         = 1.
      CALL METHOD cl_salv_table=>factory
        EXPORTING
               r_container    = gr_container
              container_name = 'CONT_AREA'
        IMPORTING
               r_salv_table   = gr_alv
        CHANGING
               t_table        = gt_outtab.
    "display alv
            gr_alv->display( ).
    ELSE.
          gr_alv->refresh( ).
    ENDIF.
    ENDMODULE.                    "LOAD_DATA_ALV100 OUTPUT

  • Traffic light system sensor

    hi, i'm developing a simulation for a traffic light system. i'm finding problem in traffic lighting system. i gave each traffic light 2 minitus. 120 seconds for re light 50 seconds fro green light and 10 seconds for yellow. i did until the the car movement. i dont know how to control the to stop at the juction when the is a red light and also the timer. help me to modify the simulator.
    import java.awt.Graphics;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class RectNew extends Applet implements Runnable
         Image car1;
         Image car2;
         Image car3;
         Image car4;
         Image beh;
         Image offScreenImage;
         Dimension offDimension;
         Graphics offGraphics;
         MediaTracker mt;
         Thread thisThread;
         boolean enableCar1;
         boolean enableCar2;
         boolean enableCar3;
         boolean enableCar4;
         int car1X;
         int car1Y;
         int car2X;
         int car2Y;
         int car3X;
         int car3Y;
         int car4X;
         int car4Y;
         int i;
         public void init()
              enableCar1 =true;
              enableCar2 =true;
              enableCar3 =true;
              enableCar4 = true;
              beh = getImage(getCodeBase(),"road_corner.jpg");
              car1=getImage(getCodeBase(),"Orange.jpg");
              car2=getImage(getCodeBase(),"Blue.jpg");
              car3=getImage(getCodeBase(),"Red.jpg");
              car4=getImage(getCodeBase(),"Green.jpg");
              car1X=0;
              car1Y=(int)(((640-car1.getHeight(this))-0+1));
              car2X=(int)(((590-car2.getWidth(this))-0+1));
              car2Y=0;
              car3X=0;
              car3Y=(int) (((540-car3.getHeight(this))-0+1));
              car4X=(int)(((490-car4.getWidth(this))-0+1));
              car4Y=0;
              mt=new MediaTracker(this);
              mt.addImage(car1,1);
              mt.addImage(car2,2);
              mt.addImage(car3,3);
              mt.addImage(car4,4);
              try
                   mt.waitForAll();
              catch(InterruptedException e)
              resize(640,640);
              thisThread=new Thread(this);
              thisThread.start();
         public synchronized void paint(Graphics g)
              Dimension d=getSize();
              if(offGraphics==null || d.width!=offDimension.width || d.height!=offDimension.height)
                   offDimension=d;
                   offScreenImage=createImage(d.width,d.height);
                   offGraphics=offScreenImage.getGraphics();
              offGraphics.drawImage(beh,0, 0, d.width,d.height,this);
              offGraphics.drawImage(car1,car1X,car1Y,this);     
              offGraphics.drawImage(car2,car2X,car2Y,this);
              offGraphics.drawImage(car3,car3X,car3Y,this);
              offGraphics.drawImage(car4,car4X,car4Y,this);
                   //Traffic Light 1
                   offGraphics.setColor(Color.blue);
                                    offGraphics.fillRect(200,200,25,50);
                                 offGraphics.setColor(Color.red);
                                 offGraphics.fillOval(205,205,15,15);
                                 offGraphics.setColor(Color.yellow);
                                 offGraphics.fillOval(205,220,15,15);
                                offGraphics.setColor(Color.green);
                                 offGraphics.fillOval(205,235,15,15);
                        //Traffic Light 2
                        offGraphics.setColor(Color.blue);
                    offGraphics.fillRect(400,200,25,50);
                      offGraphics.setColor(Color.red);
                      offGraphics.fillOval(405,205,15,15);
                      offGraphics.setColor(Color.yellow);
                      offGraphics.fillOval(405,220,15,15);
                     offGraphics.setColor(Color.green);
                      offGraphics.fillOval(405,235,15,15);
                   //Traffic Light 3
                   offGraphics.setColor(Color.blue);
                offGraphics.fillRect(200,400,25,50);
                  offGraphics.setColor(Color.red);
                  offGraphics.fillOval(205,405,15,15);
                  offGraphics.setColor(Color.yellow);
                  offGraphics.fillOval(205,420,15,15);
                 offGraphics.setColor(Color.green);
                  offGraphics.fillOval(205,435,15,15);
                        //Traffic Light 4
                             offGraphics.setColor(Color.blue);
                          offGraphics.fillRect(400,400,25,50);
                          offGraphics.setColor(Color.red);
                          offGraphics.fillOval(405,405,15,15);
                          offGraphics.setColor(Color.yellow);
                          offGraphics.fillOval(405,420,15,15);
                         offGraphics.setColor(Color.green);
                          offGraphics.fillOval(405,435,15,15);
              g.drawImage(offScreenImage,0,0,this);
         public void update(Graphics g)
              paint(g);
         public void start()
              if(thisThread==null)
                   thisThread=new Thread(this);
                   thisThread.start();
         public void stop()
              if(thisThread!=null)
                   thisThread=null;
         public void run()
              while(true)
                            if((enableCar2==true) && (car1X+car1.getWidth(this)+20>car2X) && (car1X+car1.getWidth(this)<car2X))
                        if((car1Y<car2Y+car2.getHeight(this)) && (car1Y+car1.getHeight(this)>car2Y))
                             enableCar1=false;
                             //enableCar3=false;
                             //enableCar4=false;
                           if((enableCar1==true) && (car2Y+car2.getHeight(this)+20>car1Y) && (car2Y+car2.getHeight(this)<car1Y+20))
                                   if((car2X<car1X+car1.getWidth(this)) && ((car2X>car1X)||(car2X+car2.getWidth(this)>car1X)))
                             enableCar2=false;
                             //enableCar3=false;     
                             //enableCar4=false;
                            if((enableCar4==true) && (car3X+car3.getWidth(this)+20>car4X) && (car3X+car3.getWidth(this)<car4X))
                        if((car3Y<car4Y+car4.getHeight(this)) && (car3Y+car3.getHeight(this)>car4Y))
                             enableCar3=false;
                             //enableCar2=false;
                             //enableCar3=false;
                           if((enableCar3==true) && (car4Y+car4.getHeight(this)+20>car4Y) && (car4Y+car4.getHeight(this)<car3Y+20))
                                   if((car4X<car3X+car3.getWidth(this)) && ((car4X>car3X)||(car4X+car4.getWidth(this)>car3X)))
                             enableCar4=false;
                             //enableCar2=false;
                             //enableCar1=false;
                          if(enableCar1==false)
                   if(car2Y>car1Y+car1.getHeight(this))
                        enableCar1=true;
                                    if(enableCar2==false)
                                              if(car1X>car2X+car2.getWidth(this))
                             enableCar2=true;
                          if(enableCar3==false)
                   if(car4Y>car3Y+car3.getHeight(this))
                        enableCar3=true;
                                    if(enableCar4==false)
                                              if(car3X>car4X+car4.getWidth(this))
                             enableCar4=true;
                       if(enableCar1)
                                         car1X+=5;
                      if(enableCar2)
                                         car2Y+=5;
                      if(enableCar3)
                                         car3X+=5;
                      if(enableCar4)
                                         car4Y+=5;
                       if(car1X>=640)
                   car1X=-100;
                   car1Y=(int) (((280-car1.getHeight(this))-0+1));
                                     enableCar1=true;
                   enableCar2=true;
                   enableCar3=true;
                                enableCar4=true;
                      if(car2Y>=640)
                   car2Y=-100;
                   car2X=(int)(((370-car2.getWidth(this))-0+1));
                                enableCar1=true;
                                enableCar2=true;
                                enableCar3=true;
                                enableCar4=true;
                      if(car3X>=640)
                   car3X=-100;
                   car3Y=(int) (((380-car3.getHeight(this))-0+1));
                   enableCar1=true;
                                enableCar2=true;
                   enableCar3=true;
                                enableCar4=true;
                      if(car4Y>=640)
                   car4Y=-100;
                   car4X=(int)(((300-car4.getWidth(this))-0+1));
                                enableCar1=true;
                                   enableCar2=true;
                     enableCar3=true;
                                   enableCar4=true;
              repaint();
              try
                               Thread.sleep(5);
                               showStatus("Traffic Light System Sensor");
              catch(InterruptedException e)
    }thanx

    Hi,
    This forum is exclusively for the Sun Java Studio Creator related discussions. Could you please post your question in the appropriate forum.
    Thanks,
    Creator Team.

  • GetURL generating "no network traffic"

    i don't have the code in front of me so can't quote from it
    i'm afraid, but as a general picture:
    we have a pop up browser window generated by the
    FCK editor within which 2
    iframes inside of which either <object> & <embed>
    tags or geoff sterns
    swfobject include
    (the result with either embed method is the same) and a swf. said
    swf then has this code:
    getURL( destination, "", "POST" );
    the problem is, i'm told by my java guys, this call is
    generating ZERO network traffic.
    any ideas why?

    never forget your window declaration. here we have before and
    after:
    getURL( destination, "", "POST" );
    getURL( destination, "_self", "POST" );
    the second one works. oddly, the first WAS working, firstly
    for years using a previous rich text editor and then even now with
    our latest rich text editor on our test environment, only not on
    our live environment. and the java guys are glad to see it working
    but still wonder quite what the problem is because as far as they
    can tell everything is similarly named on test as on live.
    i don't know, all i know is that using "_self" made a world
    of difference and i recommend it 100%. it's great!!! :)

  • Unexplained network traffic

    I leave my MacBook Pro on all the time with normal energy saving preferences - computer sleep after 15 minutes, display sleep after 10 minutes. Since upgrading to Mavericks I've noticed an unexplained daily amount of about 150MB of network traffic on my ISP billing. It occurs off-peak every day - between midnight and 7am - so it's not added to my paid-for usage. I have an Extreme Base Station that's on all the time, with a wi-fi network protected by an obscure password, so I don't suspect that anyone's piggy-backing on my network.
    So what's causing that traffic?

    I'm running an iMac in a single person business off an ethernet connection and also have had a huge increase in data usage. My normal 10GB monthly allowance got sucked out in 14 days last month. [My normal usage is about 100-200MB a day]. It started shortly after Maverics was installed..... 600-800Mb a day then rising to 1200-1500MB a day.
    I have made 4-5 calls to Apple and my ISP and no solution. Recent nights I have quit all applications and yesterday evening signed out of iCloud to eliminate that as a possibilities. This all seems to have accellerated the usage to a further escallation ..... 2GB yesterday and 2.5GB since midnight to 9:00am this morning...... this alarming!

  • Slow network traffic when replica1 is started

    Hi, I have a problem with a WLSS cluster. Each time I started the replica the network traffic turns so slow. I dont know how to explain that. Besides I make a Camtasia video that you could download from this URL.
    http://rapidshare.com/files/174413972/BEA_ping.wmv.html
    I hope you can told me whats going on.
    Thanks a lot
    Greetings

    I've also noticed that my airport express is blinking green, showing network traffic, when both my imac and ipad are turned off - even though I have the airport express set to be hidden, password protected and limited to certain airport IDs.
    The cable company sends continuous, almost non-stop garbage down the line. The tech guy at the cable company would say that the devices are "associating". That's why you see the green light flashing. You might want to turn off the "flash on activity" option and simply have it glow solid green...unless you like to watch the flashing, or you want to switch to DSL.
    Try turning off the anti-virus to see if that helps wireless perform better. Most anti-virus applications do more harm than good. Otherwise, look for wireless interference from another nearby wireless network, cordless phone, or even that new security system at the neighbors.

  • Any way to 'watch' Airport network traffic?

    Is there any way of 'watching' the network traffic over our home Airport network through the Airport Admin Utility? Or elsewhere? We're cross platform and my partner's PC refused to accept an access-restricting password (though the Airport was in the same room as the PC, it showed no signal strength), so we had to give up on password protection. I suspect someone in the complex is using our network, because very early in the morning, the activity lights flash like crazy -- even tho' our own computers are off. If I can prove this is so, I can reopen the password protection argument...

    Welcome to Apple Discussions.
    The simplest way to restrict access to your network is to allow only very specific MAC addresses to connect with the base station.
    From the Managing Airport Extreme Networks guide from Apple:
    "Every AirPort and wireless card has a unique MAC address, sometimes referred to as the AirPort ID. Support for MAC (media access control) address filtering lets administrators set up a list of MAC addresses and restrict access to the network to only those users whose MAC addresses are on the access control list."
    That document is available here:
    ] http://manuals.info.apple.com/en/ManagingAirPort_Extreme_Networksv3.4.pdf
    While this is a very basic form of security and is insufficient in and of itself to protect the propietary data transmitted across your network, it is an effective way to keep others from accessing the network.

  • Oracle oleDB generates lots of network traffic than Microsoft Oledb

    Hi,
    When calling the same stored proc. that returns a ref cursor, Oracle Oledb (1.34 MB) generates alot of network traffic than Microsoft Oledb (0.06 MB). The statistic is gathered using Windows 2000 Network Monitoring tools.
    Calling the same stored proc. that returns a ref cursor
    Oracle OleDB Microsoft Oledb
    Byte Received: 1408026 (1.34 M) 71032 (0.06 M)
    Byte Sent: 306468 (0.29M) 69914 ( 0.067M)
    Frame: 1263 414
    Network Utilization: 6%-14% 1%-3%
    Anyone know why is this case?
    Joe

    When working with ADO and VB6, I looked at the database server with SQL Trace and found that each dynamic SQL statement was parsed twice per execution. REF CURSORs certainly require several network round-trips in order to retrieve schema information for the dataset to be created. This behaviour probably increases network load.
    Unfortunately, I have not found any description of Oracle's OLEDB implementation. Hopefully, things will get better with the new, native OleDb data adapter.
    /Armin
    Previous post:
    multiple parsing of SELECTs O/S : N/A POST: REPLY (W/QUOTE)
    Author : Armin Type : N/A
    Date : Apr 7, 2001 12:51 PT
    System: OLEDB provider 8.1.7, server 8.1.7.
    Our VB code dynamically assembles SELECT statements and fetches recordsets with ADO function Recordset::Open. SQL TRACE shows that those SELECTs are parsed twice per execution. SELECTs embedded in stored procedures are parsed only once during the SP's life time (but then the stored procedure call itself is parsed once per execution).
    Parsing twice per execution consumes a lot of CPU. REF Cursors might reduce parsing but cause additional network roundtrips.
    How could I reduce the parse count?

Maybe you are looking for

  • Loading dimension via plsql

    Hi I am trying to create a dimension and load it via plsql and am able to create dimension and its corresponding table in database.I am quite unsure of how to load the dimension D_OFF from an equivalent relational table R_OFF I have a dimension D_OFF

  • WC 2.1 - dropdown addition causing problems

    wc 2.1 with Plum 5.0.4 (.NET)Created a portlet using 2 buttons. Have set ptrender=true in both of them. It was working like a charm.I added a drop down to the same portlet. Dropdown postbacks are giving error. It has alaso broken button postbacks.IS

  • Can't start Ps no more

    My application below on my laptop, Mac, doesn't start no more.. i paid the bill though!!!

  • TROUBLE WITH OPEN CURSOR

    Hi, we have an application running on 8.1.6 with 20 000 open cursors is this a really resources problem for database. Ive tried with this parameter CLOSECACHED_OPEN_CURSORS = TRUE in INIT.ORA but it doesnt work with PLSQL. I found problem resolves if

  • Solaris Volume Manager or Hardware RAID?

    Hi - before I build some new Solaris servers I'd like thoughts on the following please. I've previously built our Sun servers using SVM to mirror disks and one of the reasons is when I O/S patch the server I always split the mirrors beforehand and in