Pls help me with this pinball flippers

Hi all
I am in a project of implementing the flippers for Pinball, but I couldn't made the user see the movement of flippers. Pls help.
To prevent your email address from exposure, pls write an email to me @ [email protected] I will send the program to you for advice.

Ok ... my logics is rather simple, I just wanted to a simple flipper. Just want to see it change from it initial state to a flip state. I'm using a polygon for it initial state and a rectangle when the keyPressed method is invoked. However, whenever I pressed the key, nothing happens. Pls help.
Below is my code,
public void keyPressed(KeyEvent evt) {
       char ch = evt.getKeyChar();
       // Move the left flipper.
       if(ch == 122){
        //leftflip = new LeftFlipper(true);
         setStatus(true);
          System.out.println(stat);
            update(getGraphics());
       else if (ch == 109){ 
        // Move the right flipper.
       // rightflip = new RightFlipper(true);
        setStatus(true);
         System.out.println(stat);
          update(getGraphics());              
       else{
            setStatus(false);
             System.out.println(stat);
               update(getGraphics());
       Part of my flipper class,
public void paint (Graphics g)
        g.setColor(Color.red);
        p = new PinBallGame();
       state1= p.getStatus();
        if(state1 == true){
          g.fillRect(hit1.x, hit1.y, hit1.width, hit1.height);
          System.out.println("In R fillRect");
          state1=false;
        else{
          g.fillPolygon(rflipper);
    }Pls advice me what should i do to see the flipper move.

Similar Messages

  • Can someone pls help me with this code

    The method createScreen() creates the first screen wherein the user makes a selection if he wants all the data ,in a range or single data.The problem comes in when the user makes a selection of single.that then displays the singleScreen() method.Then the user has to input a key data like date or invoice no on the basis of which all the information for that set of data is selected.Now if the user inputs a wrong key that does not exist for the first time the program says invalid entry of data,after u click ok on the option pane it prompts him to enter the data again.But since then whenever the user inputs wrong data the program says wrong data but after displaying the singlescreen again does not wait for input from the user it again flashes the option pane with the invalid entry message.and this goes on doubling everytime the user inputs wrong data.the second wrong entry of data flashes the error message twice,the third wrong entry flashes the option pane message 4 times and so on.What actually happens is it does not wait at the singlescreen() for user to input data ,it straight goes into displaying the JOptionPane message for wrong data entry so we have to click the optiion pane twice,four times and so on.
    Can someone pls help me with this!!!!!!!!!
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    public class MainMenu extends JFrame implements ActionListener,ItemListener{
    //class     
         FileReaderDemo1 fd=new FileReaderDemo1();
         FileReaderDemo1 fr;
         Swing1Win sw;
    //primary
         int monthkey=1,counter=0;
         boolean flag=false,splitflag=false;
         String selection,monthselection,dateselection="01",yearselection="00",s,searchcriteria="By Date",datekey,smonthkey,invoiceno;
    //arrays
         String singlesearcharray[];
         String[] monthlist={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"};
         String[] datelist=new String[31];
         String[] yearlist=new String[100];
         String[] searchlist={"By Date","By Invoiceno"};
    //collection
         Hashtable allinvoicesdata=new Hashtable();
         Vector data=new Vector();
         Enumeration keydata;
    //components
         JButton next=new JButton("NEXT>>");
         JComboBox month,date,year,search;
         JLabel bydate,byinvno,trial;
         JTextField yeartext,invtext;
         JPanel panel1,panel2,panel3,panel4;
         JRadioButton single,range,all;
         ButtonGroup group;
         JButton select=new JButton("SELECT");
    //frame and layout declarations
         JFrame jf;
         Container con;
         GridBagLayout gridbag=new GridBagLayout();
         GridBagConstraints gc=new GridBagConstraints();
    //constructor
         MainMenu(){
              jf=new JFrame();
              con=getContentPane();
              con.setLayout(null);
              fr=new FileReaderDemo1();
              createScreen();
              setSize(500,250);
              setLocation(250,250);
              setVisible(true);
    //This is thefirst screen displayed
         public void createScreen(){
              group=new ButtonGroup();
              single=new JRadioButton("SINGLE");
              range=new JRadioButton("RANGE");
              all=new JRadioButton("ALL");
              search=new JComboBox(searchlist);
              group.add(single);
              group.add(range);
              group.add(all);
              single.setBounds(100,50,100,20);
              search.setBounds(200,50,100,20);
              range.setBounds(100,90,100,20);
              all.setBounds(100,130,100,20);
              select.setBounds(200,200,100,20);
              con.add(single);
              con.add(search);
              con.add(range);
              con.add(all);
              con.add(select);
              search.setEnabled(false);
              single.addItemListener(this);
              search.addActionListener(new MyActionListener());     
              range.addItemListener(this);
              all.addItemListener(this);
              select.addActionListener(this);
         public class MyActionListener implements ActionListener{
              public void actionPerformed(ActionEvent a){
                   JComboBox cb=(JComboBox)a.getSource();
                   if(a.getSource().equals(month))
                        monthkey=((cb.getSelectedIndex())+1);
                   if(a.getSource().equals(date)){
                        dateselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(year))
                        yearselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(search)){
                        searchcriteria=(String)cb.getSelectedItem();
         public void itemStateChanged(ItemEvent ie){
              if(ie.getItem()==single){
                   selection="single";     
                   search.setEnabled(true);
              else if (ie.getItem()==all){
                   selection="all";
                   search.setEnabled(false);
              else if (ie.getItem()==range){
                   search.setEnabled(false);
         public void actionPerformed(ActionEvent ae){          
              if(ae.getSource().equals(select))
                        if(selection.equals("single")){
                             singleScreen();
                        if(selection.equals("all"))
                             sw=new Swing1Win();
              if(ae.getSource().equals(next)){
                   if(monthkey<9)
                        smonthkey="0"+monthkey;
                   System.out.println(smonthkey+"/"+dateselection+"/"+yearselection+"it prints this");
                   allinvoicesdata=fr.read(searchcriteria);
                   if (searchcriteria.equals("By Date")){
                        System.out.println("it goes in this");
                        singleinvoice(smonthkey+"/"+dateselection+"/"+yearselection);
                   else if (searchcriteria.equals("By Invoiceno")){
                        invoiceno=invtext.getText();
                        singleinvoice(invoiceno);
                   if (flag == false){
                        System.out.println("flag is false");
                        singleScreen();
                   else{
                   System.out.println("its in here");
                   singlesearcharray=new String[data.size()];
                   data.copyInto(singlesearcharray);
                   sw=new Swing1Win(singlesearcharray);
         public void singleinvoice(String searchdata){
              keydata=allinvoicesdata.keys();
              while(keydata.hasMoreElements()){
                        s=(String)keydata.nextElement();
                        if(s.equals(searchdata)){
                             System.out.println(s);
                             flag=true;
                             break;
              if (flag==true){
                   System.out.println("vector found");
                   System.exit(0);
                   data= ((Vector)(allinvoicesdata.get(s)));
              else{
                   JOptionPane.showMessageDialog(jf,"Invalid entry of date : choose again");     
         public void singleScreen(){
              System.out.println("its at the start");
              con.removeAll();
              SwingUtilities.updateComponentTreeUI(con);
              con.setLayout(null);
              counter=0;
              panel2=new JPanel(gridbag);
              bydate=new JLabel("By Date : ");
              byinvno=new JLabel("By Invoice No : ");
              dateComboBox();
              invtext=new JTextField(6);
              gc.gridx=0;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(month,gc);
              panel2.add(month);
              gc.gridx=1;
              gc.gridy=0;
              gridbag.setConstraints(date,gc);
              panel2.add(date);
              gc.gridx=2;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(year,gc);
              panel2.add(year);
              bydate.setBounds(100,30,60,20);
              con.add(bydate);
              panel2.setBounds(170,30,200,30);
              con.add(panel2);
              byinvno.setBounds(100,70,100,20);
              invtext.setBounds(200,70,50,20);
              con.add(byinvno);
              con.add(invtext);
              next.setBounds(300,200,100,20);
              con.add(next);
              if (searchcriteria.equals("By Invoiceno")){
                   month.setEnabled(false);
                   date.setEnabled(false);
                   year.setEnabled(false);
              else if(searchcriteria.equals("By Date")){
                   byinvno.setEnabled(false);
                   invtext.setEnabled(false);
              monthkey=1;
              dateselection="01";
              yearselection="00";
              month.addActionListener(new MyActionListener());
              date.addActionListener(new MyActionListener());
              year.addActionListener(new MyActionListener());
              next.addActionListener(this);
              invtext.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent ke){
                        char c=ke.getKeyChar();
                        if ((c == KeyEvent.VK_BACK_SPACE) ||(c == KeyEvent.VK_DELETE)){
                             System.out.println(counter+"before");
                             counter--;               
                             System.out.println(counter+"after");
                        else
                             counter++;
                        if(counter>6){
                             System.out.println(counter);
                             counter--;
                             ke.consume();
                        else                    
                        if(!((Character.isDigit(c) || (c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)))){
                             getToolkit().beep();
                             counter--;     
                             JOptionPane.showMessageDialog(null,"please enter numerical value");
                             ke.consume();
              System.out.println("its at the end");
         public void dateComboBox(){          
              for (int counter=0,day=01;day<=31;counter++,day++)
                   if(day<=9)
                        datelist[counter]="0"+String.valueOf(day);
                   else
                        datelist[counter]=String.valueOf(day);
              for(int counter=0,yr=00;yr<=99;yr++,counter++)
                   if(yr<=9)
                        yearlist[counter]="0"+String.valueOf(yr);
                   else
                        yearlist[counter]=String.valueOf(yr);
              month=new JComboBox(monthlist);
              date=new JComboBox(datelist);
              year=new JComboBox(yearlist);
         public static void main(String[] args){
              MainMenu mm=new MainMenu();
         public class WindowHandler extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   jf.dispose();
                   System.exit(0);
    }     

    Hi,
    I had a similar problem with a message dialog. Don't know if it is a bug, I was in a hurry and had no time to search the bug database... I found a solution by using keyPressed() and keyReleased() instead of keyTyped():
       private boolean pressed = false;
       public void keyPressed(KeyEvent e) {
          pressed = true;
       public void keyReleased(KeyEvent e) {
          if (!pressed) {
             e.consume();
             return;
          // Here you can test whatever key you want
       //...I don't know if it will help you, but it worked for me.
    Regards.

  • My toshiba satellite e105-s1802 do not recognized my a4tech pocket usb hub pls help me with this?

    my toshiba satellite e105-s1802 do not recognized my a4tech pocket usb hub pls help me with this?

    I AM HAVING THE SAME PROBLEM WITH THE SAME MODEL. I GOT THE SERVICE
    MANUAL AND I'M THINKING TO OPEN IT AND SEE IF THERE'S SOME PHYSICAL BAD CONNECTION
    INSIDE. BUT LIKE YOU SAID.  IT'S ONLY THREE MONTHS OLD.!!! I DON'T WANT TO RUIN THE WARRANTEE.
    BUT THIS IS VERY FRUSTATING. I WANDER IF TOSHIBA DOES THIS ON PURPUSE.!!! KEEP IN TOUCH AND
    IF YOU NEED THE SERVICE MANUAL CONTACT ME AT [email protected]
          THANK YOU.!!!!

  • Pls help me with this installation problem. Your advice is highly needed.

    I am installing oracle 11.1.6.0 on windows xp professional everything was going fine untill there was a pop up that reads below
    INFO: exit-tool: Launch browser
    INFO: saving exit only tools ...
    INFO: no detached only tools in this session
    INFO: exit-only tools are created in single installation
    INFO: no. of sets of tools to be run: 1
    INFO: ca page to be shown: true
    INFO: exitonly tools to be excuted passed: 1
    INFO: Starting to execute configuration assistants
    INFO: Command = C:\WINDOWS\system32\cmd /c call c:\app\doN H\home/bin/netca.bat /orahome c:\app\doN H\home /orahnam OraDb11g_home1 /instype typical /inscomp client,oraclenet,javavm,server,ano /insprtcl tcp,nmp /cfg local /authadp NO_VALUE /nodeinfo NO_VALUE /responseFile c:\app\doN H\home\network\install\netca_typ.rsp
    Command = C:\WINDOWS\system32\cmd /c call c:\app\doN H\home/bin/netca.bat has failed
    Execution Error : 'c:\app\doN' is not recognized as an internal or external command,
    operable program or batch file.
    INFO: Configuration assistant "Oracle Net Configuration Assistant" failed
    *** Starting OUICA ***
    Oracle Home set to c:\app\doN H\home
    Configuration directory is set to c:\app\doN H\home\cfgtoollogs. All xml files under the directory will be processed
    INFO: The "c:\app\doN H\home\cfgtoollogs\configToolFailedCommands" script contains all commands that failed, were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same.
    INFO:
    The Runconfig command constructed is C:\app\doN H\home\oui\bin\runConfig.bat ORACLE_HOME=C:\app\doN H\home MODE=perform ACTION=configure RERUN=false $*
    INFO: Since there is an Internal Plugin Invocation or a Java Plugin Invocation tool in the Oracle Home C:\app\doN H\home we use the runConfig Command instead of the plugin's command
    INFO: Created a new file C:\app\doN H\home\cfgtoollogs\configToolFailedCommands
    INFO: Since the option is to overwrite the existing C:\app\doN H\home\cfgtoollogs\configToolFailedCommands file, backing it up
    INFO: The backed up file name is C:\app\doN H\home\cfgtoollogs\configToolFailedCommands.bak
    SEVERE: OUI-25031:Some of the configuration assistants failed/cancelled. It is strongly recommended that you retry the configuration assistants at this time. Not successfully running any "Recommended" assistants means your system will not be correctly configured.
    1. Check the Details panel on the Configuration Assistant Screen to see the errors resulting in the failures.
    2. Fix the errors causing these failures.
    3. Select the failed assistants and click the 'Retry' button to retry them.
    INFO: User Selected: Yes/OK
    INFO: Starting to execute configuration assistants
    INFO: Command = C:\WINDOWS\system32\cmd /c call c:\app\doN H\home/bin/netca.bat /orahome c:\app\doN H\home /orahnam OraDb11g_home1 /instype typical /inscomp client,oraclenet,javavm,server,ano /insprtcl tcp,nmp /cfg local /authadp NO_VALUE /nodeinfo NO_VALUE /responseFile c:\app\doN H\home\network\install\netca_typ.rsp
    Command = C:\WINDOWS\system32\cmd /c call c:\app\doN H\home/bin/netca.bat has failed
    Execution Error : 'c:\app\doN' is not recognized as an internal or external command,
    operable program or batch file.
    INFO: Configuration assistant "Oracle Net Configuration Assistant" failed
    *** Starting OUICA ***
    Oracle Home set to c:\app\doN H\home
    Configuration directory is set to c:\app\doN H\home\cfgtoollogs. All xml files under the directory will be processed
    INFO: The "c:\app\doN H\home\cfgtoollogs\configToolFailedCommands" script contains all commands that failed, were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same.
    INFO:
    The Runconfig command constructed is C:\app\doN H\home\oui\bin\runConfig.bat ORACLE_HOME=C:\app\doN H\home MODE=perform ACTION=configure RERUN=false $*
    INFO: Since there is an Internal Plugin Invocation or a Java Plugin Invocation tool in the Oracle Home C:\app\doN H\home we use the runConfig Command instead of the plugin's command
    INFO: Since the option is to overwrite the existing C:\app\doN H\home\cfgtoollogs\configToolFailedCommands file, backing it up
    INFO: The backed up file name is C:\app\doN H\home\cfgtoollogs\configToolFailedCommands.bak.1
    SEVERE: OUI-25031:Some of the configuration assistants failed/cancelled. It is strongly recommended that you retry the configuration assistants at this time. Not successfully running any "Recommended" assistants means your system will not be correctly configured.
    1. Check the Details panel on the Configuration Assistant Screen to see the errors resulting in the failures.
    2. Fix the errors causing these failures.
    3. Select the failed assistants and click the 'Retry' button to retry them.
    INFO: User Selected: No
    1...The Netmgr and the ODCA was not properly configured and they are not opening on the windows enviroment.
    2...The sqlplus, whenever called up, aooears and disappears in 1 second
    3...I can not connet to the database. Says adapter error
    4...Will 1 start the listner before i can connect and how?
    Ur contribution is highly needed. TNX

    I am installing oracle 11g on windows xp, everything installed suceessfully except the enterprise control. the error reads
    Jan 14, 2011 5:32:30 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl1' to fully start
    Jan 14, 2011 5:32:40 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl1' to fully start
    Jan 14, 2011 5:32:51 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl1' to fully start
    Jan 14, 2011 5:33:01 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl1' to fully start
    Jan 14, 2011 5:33:11 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl1' to fully start
    Jan 14, 2011 5:33:21 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl1' to fully start
    Jan 14, 2011 5:33:31 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl1' to fully start
    Jan 14, 2011 5:33:41 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error starting Database Control
    Refer to the log file at G:\app\doN_H\cfgtoollogs\dbca\orcl1\emConfig.log for more details.
    Jan 14, 2011 5:33:41 PM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
    at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:869)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:250)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:213)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:235)
    at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:460)
    at java.lang.Thread.run(Thread.java:595)
    Jan 14, 2011 5:33:41 PM oracle.sysman.emcp.EMConfig restoreOuiLoc
    CONFIG: Restoring oracle.installer.oui_loc to G:\app\doN_H\product\11.1.0\db_1\oui
    It also told me that i can configure it later by running G:\app\doN_H\product\11.1.0\db_1\BIN\emca.script
    Pls help me. I appreciate ur help so far.

  • Hi experts pls help me with this materialized view refresh time!!!

    Hi Expeerts ,
    Please clarify my doubt about this materialized view code
    [\n]
    CREATE MATERIALIZED VIEW SCHEMANAME.products_mv
    REFRESH WITH ROWID
    AS SELECT * from VIEW_TABLE@DATAOPPB;
    [n]
    Here i am creating a materialized view named products_mv of the view_table present in the remote server.Can anyone tell me when will my table product_mv will get refreshed if i follow this code.As what i read from the books is that the refresh period is implicit and is carried out by the database implicitly.so can u tell me suppose i insert 2 new records into my view_table when will this record get updated into my product_mv table.
    I cant use primary key approach so this is the approach i am following .Kindly help me in understanding when will refresh of records occur in the materialized view product_mv...Pls help
    regards
    debashis

    Hi Justin ,
    Yes, my database can reasonably schedule other jobs too .Its not an issue.
    Actually what i meant "fine in all aspects" is that will the matrerialized view will get refreshed w.r.t the documetum_v table present in my remote server.This is all i need to refresh my materialized view .
    I queries the DBA_JOBS table .I could see the following result i have pasted below:-
    [\n]
    NLS_ENV
    MISC_ENV INSTANCE
    dbms_refresh.refresh('"WORKFLOW"."PRODUCTS_MV2"');
    JOB LOG_USER PRIV_USER
    SCHEMA_USER LAST_DATE LAST_SEC THIS_DATE THIS_SEC NEXT_DATE
    NEXT_SEC TOTAL_TIME B
    INTERVAL
    FAILURES
    WHAT
    [n]
    here WORKFLOW"."PRODUCTS_MV2 is the materialized view i have created.So can u tell me that whether we can predict our refresh part is functioning fine from this data.If so how?
    Actually i am asking u in details as i dont have much exposure to materialized view .I am using it for the very first time.
    Regds
    debashis

  • Hi pls help me with this speck.. very urgent...

    REPORT zm_material_prodhier_update  MESSAGE-ID zsd
                                        NO STANDARD PAGE HEADING
                                        LINE-SIZE 160.
    Tables
    TABLES: mara,mvke.
    Data Definitions.
    TYPES: BEGIN OF ty_mat,
             matnr     TYPE mara-matnr,
             vkorg     TYPE mvke-vkorg,                " Sales Org
             vtweg     TYPE mvke-vtweg,                " Dist. Channel
             prdha     TYPE mara-prdha,                " Prod Hierarchy
             err(60)   TYPE C,
           END OF ty_mat.
    DATA: gt_matnr     TYPE STANDARD TABLE  OF ty_mat WITH HEADER LINE,
          gt_matnr_err TYPE STANDARD TABLE  OF ty_mat WITH HEADER LINE.
    DATA: gs_matnr_err TYPE ty_mat.
    DATA: lv_file_name    TYPE string,
          lv_message(200) TYPE c.
    For BAPI
    DATA: headdata             TYPE bapimathead,
          clientdata           TYPE bapi_mara,
          clientdatax          TYPE bapi_marax,
          return               TYPE bapiret2,
          salesdata            TYPE bapi_mvke,
          salesdatax           TYPE bapi_mvkex.
    DATA: ret  TYPE STANDARD TABLE OF bapi_matreturn2 WITH HEADER LINE.
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b001 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_matnr FOR mara-matnr,
                    s_vkorg FOR mvke-vkorg OBLIGATORY,
                    s_vtweg FOR mvke-vtweg OBLIGATORY,
                    s_matkl FOR mara-matkl.
    SELECTION-SCREEN END OF BLOCK b001.
    SELECTION-SCREEN BEGIN OF BLOCK b002 WITH FRAME TITLE text-002.
        PARAMETERS: p_err       TYPE localfile OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK b002.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_err.
      PERFORM get_filename USING 'Output - Error File'
                           CHANGING p_err.
    START-OF-SELECTION.
    START-OF-SELECTION.
      PERFORM 100_collect_dbrecs.
      PERFORM 200_process_dbrecs.
    END-OF-SELECTION.
    *&     TOP-OF-PAGE.
    TOP-OF-PAGE.
      WRITE: 40 'Material Product Hierarchy Update Report'.
      ULINE (115).
    *SKIP.
      WRITE: /'MATERIAL'.
      WRITE: /.
      ULINE (115).
    *&      Form  100_collect_dbrecs
    FORM 100_collect_dbrecs .
      SELECT   maramatnr mvkevkorg mvkevtweg maraprdha
         INTO  CORRESPONDING FIELDS OF TABLE gt_matnr
         FROM  mara INNER JOIN mvke
         ON    maramatnr = mvkematnr
         WHERE mara~matnr IN s_matnr
           AND mara~prdha NE space
           AND mara~matkl IN s_matkl
           AND mara~lvorm EQ space
           AND mvke~vkorg IN s_vkorg
           AND mvke~vtweg IN s_vtweg
           AND mvke~prodh EQ space.
    ENDFORM.                    " 100_collect_dbrecs
    *&      Form  200_process_dbrecs
    FORM 200_process_dbrecs.
      IF gt_matnr[] IS INITIAL.
        MESSAGE s000 WITH 'No Materials Processed.'.
      ELSE.
        LOOP AT gt_matnr.
          CLEAR:  headdata,
                  clientdata,
                  clientdatax,
                  return,
                  salesdata  ,
                  salesdatax,
                  ret.
          REFRESH: ret.
    Filling Material.
          MOVE: gt_matnr-matnr   TO headdata-material,
                'X'              TO headdata-sales_view.
    Sales Org
          MOVE: gt_matnr-vkorg TO salesdata-sales_org,
                gt_matnr-vkorg TO salesdatax-sales_org.
    *Dist Channel
          MOVE: gt_matnr-vtweg TO salesdata-distr_chan,
                gt_matnr-vtweg TO salesdatax-distr_chan.
    *Prod Hierarchy
          MOVE: gt_matnr-prdha TO salesdata-prod_hier,
                'X'            TO salesdatax-prod_hier.
          PERFORM  220_bapi_call.
          CLEAR: gt_matnr.
        ENDLOOP.
    Download Error Files
        IF gt_matnr_err[] IS INITIAL.
    no errors to be downloaded
        ELSE.
    Error File being downloaded.
      lv_file_name = p_err.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = lv_file_name
          filetype                = 'ASC'
        TABLES
          data_tab                = gt_matnr_err
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 99.
      IF sy-subrc = 0.
        WRITE: /05 'Error File Download - Successful.'.
      ELSE.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                INTO lv_message.
        FORMAT INTENSIFIED ON.
        WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
      ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " 200_process_dbrecs
    *&      Form  220_BAPI_CALL
    FORM 220_bapi_call .
      DATA: lv_message(60) TYPE c.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
          headdata       = headdata
          clientdata     = clientdata
          clientdatax    = clientdatax
          salesdata      = salesdata
          salesdatax     = salesdatax
        IMPORTING
          return         = return
        TABLES
          returnmessages = ret.
      IF sy-subrc EQ 0.
        MOVE : return-message TO lv_message.
        IF return-type EQ 'E'.
          WRITE: /  gt_matnr-matnr,
                   'Change Failed -', lv_message.
          MOVE-CORRESPONDING gt_matnr TO gs_matnr_err.
          APPEND gs_matnr_err to gt_matnr_err. CLEAR gs_matnr_err.
        ELSE.
          WRITE: / gt_matnr-matnr,
                   'Change Successful -', lv_message, ' for ', gt_matnr-vkorg,' ', gt_matnr-vtweg.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
          COMMIT WORK.
        ENDIF.
      ENDIF.
    ENDFORM.                    " 220_BAPI_CALL
    *&      Form  get_filename
          Call up a dialog window to retrieve the filename
         --> P_FILETITLE    Dialog file title
         <-- P_FILENAME     FIle name retrieved
    FORM get_filename  USING    p_filetitle         TYPE c
                       CHANGING p_filename          TYPE localfile.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_filename     = ' '
          def_path         = ' '
          mask             = ',.,..'
          mode             = 'O'
          title            = p_filetitle
        IMPORTING
          filename         = p_filename
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    ENDFORM.                    " get_filename
    the program reads the product higher from Basic View to Sales View.
    You all must be familiar with this program.
    Modify the program with option(radio button) to be able to run the program in foreground and background.
    Currently the program should in foreground mode.
    Add to this program option so this program is executed in the background and the file is downloaded as well.
    can anyone help me by editing the code n givin one sample prog..
    kindly help.
    Thnx
    Naveen

    Hi Naveen,
    you mean background is job scheduling if yes you couldnt down load the file into Desktop bec sys my be swithc-off, in this case you can down load the file into application server or you can create the display normal report while program run in back ground.
    Here i am giving code for background.
    PARAMETERS      : p_dload_fg AS CHECKBOX,
                                  p_dload_bg AS CHECKBOX
    download the data into Local pc file
      IF p_dload_fg EQ 'X'.
        PERFORM file_download.
      ENDIF.
      IF sy-batch NE space.
    *Display normal report when this program put in
    *batch job
        PERFORM normal_report.  " this is to dispaly normal report
    download the data into Application Server
    IF p_dload_bg EQ 'X'.
        PERFORM file_download. " this is for down load the file into Apllication sercver.
      ENDIF.
      ELSE.  " If program run in foreground.
        IF NOT gt_matnr[] IS INITIAL.
    *Display the output data in ALV
          PERFORM alv_report.
        ELSE.
          MESSAGE s999 WITH text-001.
        ENDIF.
      ENDIF.
    <b>
    NOTE</b> : try to avoid the joins with replacing FOR ALL ENTRIES to better performance ,while selection the data from d/b.
    Let me know if u have any doubts.
    <b>Reward with points if helpful.</b>
    Regards,
    Vijay

  • Pls help me with this program - urgent

    Hi,
    I am new to Java. First time to do the program. Stuck here.
    The description of the program:
    Implement a complex number (numbers of the form a+ib, where i2 = -1, i2 is i raised to power 2 ). Recall that a complex number consists of a real part (a) and an imaginary part (b). Provide a reasonable set of constructors; the methods add, subtract, multiply and divide; as well as toString and equals.
    You are to implement a complex number as having two fields, one for the real part another for the imaginary part.
    If z = a + ib and x = c + id are two complex numbers, then their sum z+ x = (a+c) + i(b+d), quotient z/x = (ac+bd)/(c*c+d*d) + i(-ab+bc)/(c*c + d*d). two complex numbers are equal if their real and imaginary parts are equal.
    I really do not have any clues about imaginary parts and how to do it.
    Could you please help me with that.
    Thanks a lot.

    ur dboubt has nothing to do java.. its a mathematical concept..
    as the question says the complexnumbers can be represented in the form of a+ib where i=squre-root of -1 .. and as this is imaginary (ie u cant get a minus number by squring a number) the second part is called imaginay.
    so as a programmer u dont have to give more strain on this but to declare a class having to instance varaiables and inplememts the methods as said.
    and in the toString() method u can return the numbers in the reuired format like
    return ( a + "+i" +b);

  • My iphone shut three days now whenever i put it on there is only an arrow and Itunes icon on it pls help me with this?

    Hello out there i have a problem with my iphone, it went off and whenever i on it there is this display, an arrow pointing to an itunes icon on it, can you help me fix my phone?

    Your iPhone is in Recovery Mode try Restoring your iTunes to Factory settings using iTunes on your Computer :
    http://support.apple.com/kb/ht1808

  • Unable to Intialize HDV deck - can anyone pls help me with this FCE Issue?

    I have recently moved from a MacBook Pro (circa 2 yrs old) to a new MacBook Pro with the NEW firewire 800 port. I have bought a new firewire cable and my camera does not want to be capture from my Sony A1E.
    I have a MacBook Pro 2.8ghz running on OS X 10.6.2 and have all the updates installed for FCE.
    Every time i try to capture the message comes up "Unable to Intialize HDV deck. Please make sure a deck is connected and try again".
    The System is set up to receive the correct frame rate footage and type of footage (which is: HDV-Apple Intermediate Codec 1080i50. Formats: All formats). I am running on PAL, so 25fps.
    Is there any advice / direction that you could give me at all as I am struggling!
    Any help support would be appreciated!
    Thanks, Martin

    Hi,
    Would you confirm that you are using a 9-pin to 4-pin FW cable to connect to your camcorder and that your camcorder is the only FW device connected to your Mac.
    When you start up FCE with the camera connected to your Mac and already powered on in VTR mode, does FCE 'see' the camera, or do you get a warning message that FCE is "Unable to locate the following external devices ..." ?

  • Pls help me with this function

    i want to write a function with parameters String striker,String nonstriker and Integer runsscored.
    how can i write this with the following conditions
    1.when runsscored ==1 or 3 or 5 or 7 striker and nonstriker should interchange and in other conditions it
    should be same ie when runs scored are 2 , 4and 6

    public static void newRunScored(String striker, String nonStriker, int runScored) {
         System.err.println("Before: " + striker + nonStriker);
         if (runScored % 2 == 1) {
              String temp = "";
              temp = striker;
              striker = nonStriker;
              nonStriker = temp;
         System.err.println("After: " + striker + nonStriker);
    }

  • I am using Iphone 4... how to delete the updates in the app store icon? I dont want my updates to be there anymore.. pls help me with this.. the history in updates under the app store... thanks.

    I'm using Iphone 4. how to delete the stuff in UPDATES section from the app store icon pls??????

    The only way to do that is to delete the apps on your phone or update the apps.

  • Pls help me with this weird error

    here are the codes
    A
    package testing;
    import java.io.*;
    import java.util.*;
    public class Test {
         public static void main(String[] args) throws IOException {
              Numbering CM = new Numbering(0, new byte[0]);
              Scanner in = new Scanner(System.in);
              System.out.print("Datas = ");
              byte[] c;
              c = new byte[5];
              for (byte i = 0; i < 5; i++) {
                   c[i] = in.nextByte(c);
                   CM.setData(c);
    Bpackage testing;
    public class Numbering {
         private int number1;
         private byte[] data;
         public Numbering(int number1, byte[] data) {
              this.number1 = number1;
              this.data = data;
         public byte[] getData() {
              return data;
         public void setData(byte[] data) {
              this.data = data;
    Here is the errorDatas = Exception in thread "main" java.util.regex.PatternSyntaxException: Unclosed character class near index 525
    (([-+]?(((((?i)[]|\p{javaDigit})++)|([\p{javaDigit}&&[^0]]((?i)[]|\p{javaDigit})?((?i)[]|\p{javaDigit})?(\,((?i)[]|\p{javaDigit})((?i)[]|\p{javaDigit})((?i)[]|\p{javaDigit}))+)))))|(((((?i)[]|\p{javaDigit})++)|([\p{javaDigit}&&[^0]]((?i)[]|\p{javaDigit})?((?i)[]|\p{javaDigit})?(\,((?i)[]|\p{javaDigit})((?i)[]|\p{javaDigit})((?i)[]|\p{javaDigit}))+)))|(\Q-\E((((?i)[]|\p{javaDigit})++)|([\p{javaDigit}&&[^0]]((?i)[]|\p{javaDigit})?((?i)[]|\p{javaDigit})?(\,((?i)[]|\p{javaDigit})((?i)[]|\p{javaDigit})((?i)[]|\p{javaDigit}))+)))
    ^
         at java.util.regex.Pattern.error(Pattern.java:1713)
         at java.util.regex.Pattern.clazz(Pattern.java:2254)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.clazz(Pattern.java:2210)
         at java.util.regex.Pattern.sequence(Pattern.java:1818)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.group0(Pattern.java:2530)
         at java.util.regex.Pattern.sequence(Pattern.java:1806)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.group0(Pattern.java:2530)
         at java.util.regex.Pattern.sequence(Pattern.java:1806)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.group0(Pattern.java:2530)
         at java.util.regex.Pattern.sequence(Pattern.java:1806)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.group0(Pattern.java:2530)
         at java.util.regex.Pattern.sequence(Pattern.java:1806)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.group0(Pattern.java:2530)
         at java.util.regex.Pattern.sequence(Pattern.java:1806)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.group0(Pattern.java:2530)
         at java.util.regex.Pattern.sequence(Pattern.java:1806)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.compile(Pattern.java:1460)
         at java.util.regex.Pattern.<init>(Pattern.java:1133)
         at java.util.regex.Pattern.compile(Pattern.java:823)
         at java.util.Scanner$1.create(Scanner.java:391)
         at java.util.Scanner$1.create(Scanner.java:389)
         at sun.misc.LRUCache.forName(LRUCache.java:52)
         at java.util.Scanner.integerPattern(Scanner.java:467)
         at java.util.Scanner.nextByte(Scanner.java:1855)
         at testing.Test.main(Test.java:17)
    what is the problem?
    tq                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    c[i] = in.nextByte(c);
    = nonsense ; what are you trying to do, exactly?

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

  • Pls Help me with my hp mini laptop

    Pls Help me with  my hp mini laptop
    system disabled
    [69005685]
    This question was solved.
    View Solution.

    Hi,
    Try entering:     76963201
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Pls help me with Strings.................

    Hi,
    i'm need to get the html content from the site. So i create this getURLContent
    method. However, the method keep return null to main() which call this method.
    Someone pls help me with it.......
    Thanks in advance!
    Here's my method created.
    public String getURLContent(String site){
         String urlContent = "";
         try {
              URL url = new URL(site);
              HttpURLConnection con = (HttpURLConnection)
    url.openConnection();
              con.setRequestMethod("GET");
              con.connect();
              int code= con.getResponseCode();
              if (code == HttpURLConnection.HTTP_OK) {
                   BufferedReader r= new BufferedReader(new
    InputStreamReader(con.getInputStream()));
                   String s = "";
              while ((s = r.readLine()) != null)
                   urlContent.concat(s);
         catch (Exception e) { e.printStackTrace(); }
         return urlContent;
    }

    When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    Strings are immutable.
    Strings, String Buffers, and String Builders
    Create a StringBuffer, use .append, then return stringBuffer.toString().

Maybe you are looking for

  • How can I get my web page to center in IE?

    My web page aligns left in IE, but not in other browsers.  Any suggestions?   http://www.theolderuggedcross.com/

  • Mapping error - Flat file to Flat file Scenario

    Hi All, Iam designing Flatfile to Flatfile Scenario. Source Structure RSET RSETSTRUCTURE 1-un S1  1-1 S2  1-1 S3  1-1 target Structure RSET RSETSTRUCTURE 1-un R1  1-1 R2  1-1 R3  1-1 Mapping RSETSTRUCTURE - RSETSTRUCTURE S1 - R1 S2 - R2 S3 - S3 Flatf

  • How to use "redefine edge" tool?

    I've seen the tutorial and the video about this tool where he taps and hold for a second or so to activate the function.... But it does not work... It paints normally and comes back to the same. Can anyone help. Is there a manual coming? Some keys I

  • Volume up and standby button both have double purposes

    Hello, I got a problem with my iPod Touch 2G 32GB. It worked perfectly all the time, until yesterday. The buttons look like the got a second purpose. When I push the volume up button, my volume indeed goes up, BUT... after I release the button, I hea

  • Finding source codes and page rankings

    I have just got the new upgraded Firefox, and I would like to know how to find two things in this browser: (1) the source codes for any site I visit, and (2) the page rankings for any site I visit, Or aren't these available on Firefox? Roger