Please help with this method

im creating a little animation of pacman, just an animation of it moving buy its self. im using the java elements package so this is all being shown in a drawing window.
ive made it move fine and go round the window abit eating dots but the code is a mess, and i know i could change some of the main part into a few simple methods and have tried but it seems to stop moving when i try
below is part of the code, the first three blocks are when its moving sideways with its mouth in three different states, and the bottom three blocks are it moving down with its mouth in three states again.
Arc pacarc = new Arc();
while (startmv++<stopmv)
pac1x += 4;
d.setForeground(Color.yellow);
pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth1,pacangle1);
d.fill(pacarc);
d.setForeground(Color.black);
waitNSeconds(1);
d.fill(pacarc);
pac1x += 4;
d.setForeground(Color.yellow);
pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth2,pacangle2);
d.fill(pacarc);
d.setForeground(Color.black);
waitNSeconds(1);
d.fill(pacarc);
pac1x += 4;
d.setForeground(Color.yellow);
pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth3,pacangle3);
d.fill(pacarc);
d.setForeground(Color.black);
waitNSeconds(1);
d.fill(pacarc);
while (startdwn++<stopdwn)
pac1y +=4;
d.setForeground(Color.yellow);
pacarc = new Arc(pac1x,pac1y,50,50,pacdwn1,pacdwnang1);
d.fill(pacarc);
d.setForeground(Color.black);
waitNSeconds(1);
d.fill(pacarc);
pac1y +=4;
d.setForeground(Color.yellow);
pacarc = new Arc(pac1x,pac1y,50,50,pacdwn2,pacdwnang2);
d.fill(pacarc);
d.setForeground(Color.black);
waitNSeconds(1);
d.fill(pacarc);
pac1y +=4;
d.setForeground(Color.yellow);
pacarc = new Arc(pac1x,pac1y,50,50,pacdwn3,pacdwnang3);
d.fill(pacarc);
d.setForeground(Color.black);
waitNSeconds(1);
d.fill(pacarc);
so for the first part i tried putting this into a method and running the program but where i had used the method the pacman shape just stayed still. any help please guys?
this is the code for the method i tried (this is just for thefirst state of the pacmans mouth while moving sideways)
public static void pacmve(int pactestx, int pactesty, int pacsizetest1, int pacsizetest2, int pacmouthtest, int pacangletest)
pactestx += 4;
Arc pacarc = new Arc();
d.setForeground(Color.yellow);
pacarc = new Arc(pactestx,pactesty,pacsizetest1,pacsizetest2,pacmouthtest,pacangletest);
d.fill(pacarc);
d.setForeground(Color.black);
waitNSeconds(1);
d.fill(pacarc);
this is the loop i where i was trying to use the method
while (startmv++<stopmv)
pacmve(20,20,50,50,45,270);
Edited by: jeffsimmo85 on Nov 22, 2007 1:18 AM

When you post a code on a public forum, the code must be:
1)Properly formatted using code tags.
2)Generally compilable and runnable for us casual forum viewers.
3)Reproducible of your problems when we run it.

Similar Messages

  • Please help with this method, cant get it to work correctly.

    any suggestions AT ALL please, im really stuck with this.
    im creating a little animation of pacman, just an animation of it moving buy its self. im using the java elements package so this is all being shown in a drawing window.
    ive made it move fine and go round the window abit eating dots but the code is a mess, and i know i could change some of the main part into a few simple methods and have tried but it seems to stop moving when i try
    import element.*;
    import java.awt.Color;
    static DrawingWindow d = new DrawingWindow(500,500);  
       public static void wait1second()
        //  pause for one tenth of a second second
            long now = System.currentTimeMillis();
            long then = now + 100; // 100 milliseconds
            while (System.currentTimeMillis() < then)
        public static void waitNSeconds(int number)
            int i;
            for (i = 0; i < number; i++) //allows you to determine how long to pause for
                wait1second();
    public static void main(String[] args) {
        //  declaring the variables
        int pacsize1 = 50, pacsize2 = 50;
        int pac1x = 20, pac1y = 20;
        int pacmouth1 = 45, pacangle1 = 270;
        int pacmouth2 = 25, pacangle2 = 320;
        int pacmouth3 = 6, pacangle3 = 348;
        int startmv = 0, stopmv = 33;
        d.setForeground(Color.black);
        Rect bkrnd = new Rect(0,0,500,500);     
        d.fill(bkrnd);
       // while loop used to make the pacman shape move right across the screen with its mouth in three different states
    Arc pacarc = new Arc();
         while (startmv++<stopmv)
            pac1x += 4;
            d.setForeground(Color.yellow);
            pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth1,pacangle1);
            d.fill(pacarc);
            d.setForeground(Color.black);
            waitNSeconds(1);
            d.fill(pacarc);
            pac1x += 4;
            d.setForeground(Color.yellow);
            pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth2,pacangle2);
            d.fill(pacarc);
            d.setForeground(Color.black);
            waitNSeconds(1);
            d.fill(pacarc);
            pac1x += 4;
            d.setForeground(Color.yellow);
            pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth3,pacangle3);
            d.fill(pacarc);
            d.setForeground(Color.black);
            waitNSeconds(1);
            d.fill(pacarc);
    }so i tried making a method to make all the stuf in the while loop alot simpler but it just keeps making the pacman not move at all and im not sure why. heres the code i tried for the method:
    public static void pacmve(int pactestx, int pactesty, int pacsizetest1, int pacsizetest2, int pacmouthtest, int pacangletest)
            pactestx += 4;
            Arc pacarc = new Arc();
            d.setForeground(Color.yellow);
            pacarc = new Arc(pactestx,pactesty,pacsizetest1,pacsizetest2,pacmouthtest,pacangletest);
            d.fill(pacarc);
            d.setForeground(Color.black);
            waitNSeconds(1);
            d.fill(pacarc);
            }it had no problems with the code, but it just doesnt seem to do anything when i call it in the while loop. heres how i used it to try and just make it move across with the mouth in one state:
    while (startmv++<stopmv)
    pacmve(20,20,50,50,45,270);
    }any ideas?
    Edited by: jeffsimmo85 on Nov 22, 2007 2:36 AM

    the clock is still ticking while you do this:
    while (System.currentTimeMillis() < then)
    is that method your design? why not just call Thread.sleep()?
    %

  • Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hello Priyanks,
    I found an article with steps you can take to troubleshoot issues with an iPhone not connecting to your car stereo:
    iOS: Troubleshooting car stereo connections
    http://support.apple.com/kb/TS3581
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    Following the fix here worked for me:
    https://discussions.apple.com/message/15680566#15680566
    except my plist file was in ~/Library instead of /Library.
    -Scott

  • Please help with this issue "To Run a SSIS Package outside of Server Data Tools You must install Drived Column of Integration sercvies of higher" From C# app

     i have searched all over the google and here on MSDN(I have read all the threads related to my problem ) , i am new to SISS and doing my clg project ,
    I have this package which loads data from  dim tables to a fact table , my Package runs without any problem in BIDS (2012)
    I have installed SQl Server integration services on SQL and service is also running in services.msc,
    the problem comes when i execute my package using my C# application i am using MSDN Method to execute a SSIS package programmatically given here.
    "http://msdn.microsoft.com/en-us/library/ms136090.aspx"
    For loading my FactTable i have used a Derived columns  and some lookups , 
    Now if i don't use derived columns and looks ups and just use source and destination component then my package runs fine from my C# application but if i use derived columns or looks ups etc it gives the following error
    "Error in Microsoft.SqlServer.Dts.Runtime.TaskHost/SSIS.Pipeline: To Run a SSIS package outside of SQL Server Data Tools you must Install Derived Column of Integration services of higher"
    I am searching and trying to resolve this issue from previous 2 days but without any luck please help or guide me what is solution to this problem ,,i will be very thankful
    I have also found that integration services that are running on my system have version  10.0
    but the BIDS have version Version 11.0.3402.0
    IS this causing problem ?  if yes then what i have to do  ?

    Hi BlaxButt,
    The package is developed in SSDT installed by SQL Server 2012, so it is a SSIS 2012 package. However, the Integration Services you have installed is SQL Server 2008 R2 version. To run the package outside SSDT, you need SSIS 2012 installed. The reason why
    the package runs fine with only Source and Destination components is that such a simple package can be executed by the DTExec utility installed by SQL Server 2012 Data base Engine or Client Tools (SQL Server Import and Export Wizard). To run a package that
    uses other tasks/components outside SSDT/BIDS, the SSIS runtime is also required except the DTExec utility. To obtain the SSIS 2012 runtime, we have to install SSIS 2012 on the server where the package runs.
    Reference:
    http://stackoverflow.com/questions/19989099/getting-error-running-ssis-package-on-non-ssis-server
    Regards,
    Mike Yin
    TechNet Community Support

  • Please help with this code....

    I create a button with ActionListner and a writeCd method. Now I want everytime i push the button, it will read the writeCd method. I dont' know how to make it work. Please help me out as soon as possible. Thanks a lot. Below are the codes of the button and writeCd method.
    class findCD implements ActionListener
    public void actionPerformed(ActionEvent event)
    //what do I need to put here to make the button work
    //with method writeCD() below
    public void writeCd() throws Exception
    String outputFileName;
    PrintWriter outputFile;
    outputFileName = "D:\\cdoutput.txt";
    outputFile = new PrintWriter(new FileWriter(outputFileName,true));
    int loopTest;
    do
    String numStr = JOptionPane.showInputDialog("Please enter Index number");
    int number = Integer.parseInt(numStr);
    cC.setIndexNumber(number);
    numStr = JOptionPane.showInputDialog("Please enter cd name");
    number = Integer.parseInt(numStr);
    cC.setCdName(number);
    String message = cC.toString() +
    "\nYour input is: ";
    JOptionPane.showMessageDialog(null, message);
    outputFile.println(numStr + "");
    loopTest = JOptionPane.showConfirmDialog(null,"Do another?","",0,1);
    while (loopTest == 0);
    outputFile.close();

    class findCD implements ActionListener
           public void actionPerformed(ActionEvent event)
                try
                     writeCd();
                } catch(Exception e){
                                        e.printStackTrace();
      public void writeCd() throws Exception
          String outputFileName;
          PrintWriter outputFile;
          outputFileName = "D:\\cdoutput.txt";
    outputFile = new PrintWriter(new
    (new FileWriter(outputFileName,true));
             int loopTest;
             do
    String numStr =
    umStr = JOptionPane.showInputDialog("Please enter
    Index number");
             int number = Integer.parseInt(numStr);
             cC.setIndexNumber(number);
    numStr = JOptionPane.showInputDialog("Please
    "Please enter cd name");
             number = Integer.parseInt(numStr);
             cC.setCdName(number);
             String message = cC.toString() +
                              "\nYour input is: ";
             JOptionPane.showMessageDialog(null, message);
            outputFile.println(numStr + "");
    loopTest =
    pTest = JOptionPane.showConfirmDialog(null,"Do
    another?","",0,1);
             while (loopTest == 0);
           outputFile.close();
        }That should work. This also assumes that the method writeCd is in the class findCD.

  • I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect to my MacBook it erases everything on had on there. Can someone please help with this problem?

    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.

    dwgar1322 wrote:
    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.
    Yes, you have WD software installed  REMOVE IT !! 
    WD has warned its customers about their huge mistake that their software doesnt work on Mavericks and causes data loss.
    (also dont use WD drives anymore)
    Read all about it here:
    https://discussions.apple.com/thread/5475136?start=255&tstart=0
    See their website on removing the destructive WD software here:
    http://community.wd.com/t5/External-Drives-for-Mac/External-Drives-for-Mac-Exper iencing-Data-Loss-with-Maverick-OS/td-p/613775
    Western Digital External Hard Drives Experiencing Data Loss On OS X Mavericks
    http://www.cultofmac.com/252826/western-digital-external-hard-drives-experiencin g-data-loss-on-os-x-mavericks/

  • Please help with this error: "Your request could not be completed because of a disk error"

    So photoshop cs6 was working fine a few weeks ago. After not using it for about 2 weeks, I try opening a RAW file and I get this error every time. JPGs open and work fine. I have extensively searched on the internet for solutions and have tried everything such as: disk checking, deframgenting, playing around with photoshop preferences, deleting temp files, resetting preferences, clearing disk space. I have assigned two hard drives for photoshop, one with 16 GB free and the other with 8 GB free. I am getting very frustrated. Please help!

    mistahbo1 wrote:
    …I have assigned two hard drives for photoshop, one with 16 GB free and the other with 8 GB free. I am getting very frustrated. Please help!
    That's woefully inadequate for scratch file space.
    The rule of thumb I follow says to figure on 50 to 100 times the size of your largest file ever multiplied by the number of files you have open.  I have seen the scratch file exceed 300 GB once, an admittedly rare occurrence, but it often exceeds 200 GB when stitching large panoramas and the like.
    Additionally, if either one those two drives you mention with "16 GB free and the other with 8 GB free" happened to be your boot drive, you'd be in a heap of trouble because neither one of those drives has nearly enough space to accommodate the swap files of the OS and Photoshop's scratch.
    As an example—and stressing that I'm aware that others have even more scratch space than I do—I keep two dedicated, physically separate hard drives as my primary and secondary Photoshop scratch disks and a lot of GB free on my boot drive for the OS.  I have 16 GB of RAM installed:

  • Please help with this slow internet

    Can someone please help me with this slow internet. I have been looking on this forum for a while and have tried about everything I can do. I bought a new macbook, a new airport extreme base station, and have high speed internet. I can connect with a wire and it works great but wirelessly is slower than dial up. I am also not very good with computers so I am not sure how to do a lot of the things that many people say to do. I have comcast internet. If you need anymore information I will do my best to give it. Please help me fix this, remember it is the holiday season be a giver.
    Thanks in advance for any help you can give.
    Aaron

    I believe there are several reasons for Leopard's networking issues.
    I've heard it's worth a try to *turn off IPv6 in the OS network settings and your router* (if such an option exists in your router). IPv6 is the new addressing protocol which many consider to be overkill, seeing as it allows for approximately as many addresses as there are square centimeters of surface area on planet Earth (according to Wikipedia). It's also known to cause issues with Vista, which leads me to believe that the protocol is fundamentally flawed in some way.
    Just a note, turning off IPv6 in the OS is easy, simply go to *System Preferences* > Network > select the *network type* you're using (i.e. Wi-fi, ethernet, FireWire). Then click the Advanced... button, go to the TCP/IP tab, and say *Configure IPv6: Off*.
    Upgrading your router's firmware is worth a try, although such updates should only be performed through the ethernet connection, not over Wi-Fi (otherwise you could risk turning your router into a giant paperweight). You should also take note of your router settings prior to the firmware upgrade, because they will probably be reset with the upgrade.
    Check your *Activity Monitor* in Applications under Utilities. Right-click (or control-click) on the *Activity Monitor* icon and tell the *Dock Icon* to *Show CPU Usage*. Keep an eye on the CPU usage in the dock and if it goes higher than expected, click on the icon and tell the window to *Show Active Processes*, and/or organize the processes by order of CPU usage.
    Leopard doesn't have "nice" processes anymore and I find that some processes that like to use the network prevent other processes from using the network simultaneously. I think a lot of the network issues people are having are due to *Quick Look*, mdworker, and mds. These processes seem to like to go out on the network and make notes about every server available, however there doesn't seem to be any way to make these processes "nice" or kill them permanently without losing valuable system functions. It's interesting, at least, to see the probable cause of some of these networking problems, even if we can't fix them.
    By now, I'm sure I sound like I'm babbling, but I hope at least some of this helps somebody out there.

  • Please help with this part of error...

    Hi all,
    Please help me with this error. What i was trying to do is that when Server send a message to client, it print out on the screen what is sent to Client. For instance, if the Message is called FirstMessage sent to Client, the message FirstClient will display from server console with a specific message such as "First Message from server to client: first Message") and so on. I tried to implement the below code but when compiled it i got error message as follows :
    C:\Java\bin>javac QuoteServer.java
    QuoteServer.java:60: <identifier> expected
    out.close();
    ^
    QuoteServer.java:61: <identifier> expected
    in.close();
    ^
    QuoteServer.java:62: <identifier> expected
    clientSocket.close();
    ^
    QuoteServer.java:63: <identifier> expected
    myserverSocket.close();
    ^
    4 errors
    Her is the Server side socket...
    import java.net.*;
    import java.io.*;
    import java.util.*;
    class QuoteServer
    public static void main(String[] args) throws IOException
    ServerSocket myserverSocket = null;
    try
    myserverSocket = new ServerSocket(4998);
    } catch (IOException e)
                        System.err.println("Could not listen on port: 4998.");
                        System.exit(1);
    Socket clientSocket = null;
    try
    clientSocket = myserverSocket.accept();
    } catch (IOException e)
                        System.err.println("Accept failed.");
                        System.exit(1);
                   PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
                   BufferedReader in = new BufferedReader(
                   new InputStreamReader(
                   clientSocket.getInputStream()));
                   String inputLine, outputLine;
                   QuoteProtocol QP = new QuoteProtocol();
                   outputLine = QP.processInput(null);
                   Date current = new Date();
                   out.println(outputLine);
                   String ToClient;
                   while ((inputLine = in.readLine()) != null )
                             outputLine = QP.processInput(inputLine);
                             out.println(outputLine);
                             System.out.println(inputLine);
                             System.out.println(current.toString());
                             /* additional..if doesn't work delete this code*/
                             while ((ToClient = in.readLine()) != null)
                                  System.out.println("Server: " + ToClient);
                                  if (ToClient.equals("Bye."))
                                  break;
                   /* delete up to break*/
                        if (outputLine.equals("Bye."))
                             break;
    out.close();
    in.close();
    clientSocket.close();
    myserverSocket.close();
    Could someone with the expertise advise me what shall i do?
    Thank you very much.
    Audrea.

    Thanks for the quick reply...
    Here is the code with correct open/close braces...
    import java.net.*;
    import java.io.*;
    import java.util.*;
    class QuoteServer
    public static void main(String[] args) throws IOException
    ServerSocket myserverSocket = null;
    try
    myserverSocket = new ServerSocket(4998);
    } catch (IOException e)
                        System.err.println("Could not listen on port: 4998.");
                        System.exit(1);
    Socket clientSocket = null;
    try
    clientSocket = myserverSocket.accept();
    } catch (IOException e)
                        System.err.println("Accept failed.");
                        System.exit(1);
                   PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
                   BufferedReader in = new BufferedReader(
                   new InputStreamReader(
                   clientSocket.getInputStream()));
                   String inputLine, outputLine;
                   QuoteProtocol QP = new QuoteProtocol();
                   outputLine = QP.processInput(null);
                   Date current = new Date();
                   out.println(outputLine);
                   String ToClient;
                   while ((inputLine = in.readLine()) != null )
                             outputLine = QP.processInput(inputLine);
                             out.println(outputLine);
                             System.out.println(inputLine);
                             System.out.println(current.toString());
                             /* additional..if doesn't work delete this code*/
                             while ((ToClient = in.readLine()) != null)
                                  System.out.println("Server: " + ToClient);
                                  if (ToClient.equals("Bye."))
                                  break;
                   /* delete up to break*/
                        if (outputLine.equals("Bye."))
                             break;
    out.close();
    in.close();
    clientSocket.close();
    myserverSocket.close();
    Line 60 starting from out.close(); onwards.
    Please help..
    Thanks a lot.
    Audrea.

  • Please help with this com/apple/mrj/macos/carbon/CarbonLock

    Can anyone help me with this error
    java.lang.NoClassDefFoundError: com/apple/mrj/macos/carbon/CarbonLock
    we have written a app that takes a digital photo with a web cam. Now get this on my macs
    Please help any help Please
    Craig

    Thank I have seen that but thanks
    I was hoping there is a way around it ??
    I can not believe that Apple the makers of QuickTime don['t support Java 1.4.1
    Craig

  • Please help with this bapi

    Hi Experts!
    I am trying to use 'BAPI_OUTB_DELIVERY_CONFIRM_DEC' for posting goods issue but could not succeed. I am getting the message 615 (Delivery item is not or only partially packed) when I test the same in SE37. However the same delivery, if I go to VL02n and issue post goods issue, it is succeeding. I think I am doing some mistake with the parameters to be passed to bapi. Please help me find the error as I am unable to find. I am stuck with this for pretty long time. Points assured for helpful answers.
    Thanks for your time.
    Krishen
    DATA: itab_headerdata TYPE STANDARD TABLE OF bapiobdlvhdrcon WITH HEADER LINE.
    DATA: itab_headercontrol TYPE STANDARD TABLE OF bapiobdlvhdrctrlcon WITH HEADER LINE.
    DATA: itab_itemdata TYPE STANDARD TABLE OF bapiobdlvitemcon WITH HEADER LINE.
    DATA: itab_itemcontrol TYPE STANDARD TABLE OF bapiobdlvitemctrlcon WITH HEADER LINE .
    DATA: itab_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA: itab1_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA: itab3_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA: deliv_numb TYPE bapiobdlvhdrcon-deliv_numb.
    Vbeln and posnr are coming from itab.
      SELECT SINGLE * FROM likp
        WHERE vbeln = itab-vbeln.
      SELECT SINGLE * FROM lips
      WHERE vbeln = itab-posnr.
      itab_headerdata-deliv_numb = likp-vbeln.
      itab_headercontrol-deliv_numb = likp-vbeln.
      itab_headercontrol-post_gi_flg = 'X'.
      CLEAR deliv_numb.
      deliv_numb = likp-vbeln.
      itab_itemdata-deliv_numb = likp-vbeln.
      itab_itemdata-deliv_item = lips-posnr.
      itab_itemdata-dlv_qty = lips-lfimg.
      itab_itemdata-sales_unit = lips-meins.
      itab_itemdata-fact_unit_nom = lips-umvkz.
      itab_itemdata-fact_unit_denom = lips-umvkn.
      itab_itemcontrol-deliv_numb = likp-vbeln.
      itab_itemcontrol-deliv_item = lips-posnr.
      itab_itemcontrol-chg_delqty = 'X'.
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
        EXPORTING
          header_data                = itab_headerdata
          header_control             = itab_headercontrol
          delivery                   = deliv_numb
      TECHN_CONTROL              =
        TABLES
      HEADER_PARTNER             =
      HEADER_PARTNER_ADDR        =
      HEADER_DEADLINES           =
       item_data                  = itab_itemdata
       item_control               = itab_itemcontrol
      ITEM_SERIAL_NO             =
      SUPPLIER_CONS_DATA         =
      HANDLING_UNIT_HEADER       =
      HANDLING_UNIT_ITEM         =
      HANDLING_UNIT_SERNO        =
      EXTENSION1                 =
      EXTENSION2                 =
          return                = itab_bapiret2.
      TOKENREFERENCE             =
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait   = 'X'
        IMPORTING
          return = itab1_bapiret2.

    Hi Krishen
       Have done some modifications to your code. Highlighted below are the same. Please check if the same works for you.
    DATA: itab_headerdata TYPE STANDARD TABLE OF bapiobdlvhdrcon WITH HEADER LINE.
    DATA: itab_headercontrol TYPE STANDARD TABLE OF bapiobdlvhdrctrlcon WITH HEADER LINE.
    DATA: itab_itemdata TYPE STANDARD TABLE OF bapiobdlvitemcon WITH HEADER LINE.
    DATA: itab_itemcontrol TYPE STANDARD TABLE OF bapiobdlvitemctrlcon WITH HEADER LINE .
    DATA: itab_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA: itab1_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA: itab3_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA: deliv_numb TYPE bapiobdlvhdrcon-deliv_numb.
    Vbeln and posnr are coming from itab.
    SELECT SINGLE * FROM likp
    WHERE vbeln = itab-vbeln.
    SELECT SINGLE * FROM lips
    WHERE vbeln = itab-posnr.
    <b>select single kostk from vbuk into vbuk-kostk
           where vbeln = itab-vbeln
           and   kostk = 'C'.
    if sy-subrc ne 0.
    message "Picking is not fully done
    else.</b>
    itab_headerdata-deliv_numb = likp-vbeln.
    itab_headercontrol-deliv_numb = likp-vbeln.
    itab_headercontrol-post_gi_flg = 'X'.
    CLEAR deliv_numb.
    deliv_numb = likp-vbeln.
    <b>*itab_itemdata-deliv_numb = likp-vbeln.
    *itab_itemdata-deliv_item = lips-posnr.
    *itab_itemdata-dlv_qty = lips-lfimg.
    *itab_itemdata-sales_unit = lips-meins.
    *itab_itemdata-fact_unit_nom = lips-umvkz.
    *itab_itemdata-fact_unit_denom = lips-umvkn.
    *itab_itemcontrol-deliv_numb = likp-vbeln.
    *itab_itemcontrol-deliv_item = lips-posnr.
    *itab_itemcontrol-chg_delqty = 'X'.</b>
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
    EXPORTING
    header_data = itab_headerdata
    header_control = itab_headercontrol
    delivery = deliv_numb
    TECHN_CONTROL =
    TABLES
    HEADER_PARTNER =
    HEADER_PARTNER_ADDR =
    HEADER_DEADLINES =
    item_data = itab_itemdata
    item_control = itab_itemcontrol
    ITEM_SERIAL_NO =
    SUPPLIER_CONS_DATA =
    HANDLING_UNIT_HEADER =
    HANDLING_UNIT_ITEM =
    HANDLING_UNIT_SERNO =
    EXTENSION1 =
    EXTENSION2 =
    return = itab_bapiret2.
    TOKENREFERENCE =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'
    IMPORTING
    return = itab1_bapiret2.
    <b>endif.</b>
    Kind Regards
    Eswar

  • I need help with this method, i don't know how to call it correct.

    public void method397(byte byte0, int i)
            if(byte0 != 6)
                for(int j = 1; j > 0; j++);
            aByteArray1405[anInt1406++] = (byte)(i + cacheMod.method246());
        }This code is for a Game client im making for a 2dmmorpg, the method was refactored by a friend but he isn't online at the moment because his on holiday; This method sends a packet to the server, i have handled it in the server;
    So i would think you would call it like this;
    super.engineStream.method397((byte)6, 103);But that gives me a huge exception, so please could someone explain how i could fix?
    Thanks
    Ill get the error in a second.

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at Gui.ClientStreamLoader(Gui.java:328)
            at Gui.actionPerformed(Gui.java:323)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.AbstractButton.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknow
    Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)

  • Please help with this Premiere Pro CS5 encoding error

    VBR 2 pass encoding getting stuck at 50% in Premire Pro CS5. I assume this is the starting point of pass #2. The Error message states that one of the temporary files created during first pass cannot be read. I confirmed that said file exists, it is in the correct location and has the correct file name. Interestingly, at times, the 2 pass encoding proceeds through completion without issues, but I haven't been able to identify the reason for this. PLEASE HELP!! Thank you.

    Thank you so much for replying. I tried running as administrator and it did not correct the issue. Luckily I did figure out the problem after trying various ways. It so happens that Windows seven sets "read Only" attributes to files within folders that you create by right clicking on the drive name and using "New Folder". So, when the encoder tries to over-write on one of the temporary files it created during the first pass it can't do it and it issues the error "Cannot open file for writing...etc.". I fixed it by right clicking inside the folder contents and changing the attribute. Now it works. This is the error that I was getting:

  • Please help with this format

    http://i18.tinypic.com/7ygz9k7.jpg
    I have to make a report to come out like this from existing tables. I used the following sum and compute commands:
    compute sum label '' of charge on patient_no
    select patient.patient_no,item.charge,sum(charge) as TOTAL
    The problem is i get this table:
    http://i9.tinypic.com/80nmsdd.jpg
    As can be seen it repeats the charges.
    I know there must be an easy way or something. PLEASE HELP!

    i really appreciate the help i am getting here...here is my complete code and a screenshot of my result...how should i edit it to get my required result:
    SET PAGESIZE 50;
    SET LINESIZE 112;
    COLUMN DATE_CHARGED NEW_VALUE DATE_CHARGEDVAR;
    TTITLE LEFT 'DAILY REVENUE REPORT' RIGHT 'DATE: ' DATE_CHARGEDVAR SKIP 2;
    COLUMN DATE_CHARGED NOPRINT;
    BREAK ON PATIENT_NO NODUPLICATES ON PATIENT_NAME NODUPLICATES ON LOCATION NODUPLICATES ON FINANCIAL_SOURCE SKIP 1;
    COMPUTE SUM LABEL '' OF TOTAL ON PATIENT_NO;
    SELECT DISTINCT PATIENT.PATIENT_NO,LOCATION,PATIENT_NAME,FINANCIAL_SOURCE,COST_CENTER.COST_CENTER,ITEM.ITEM_CODE,
    DATE_CHARGED,DESCRIPTION,CHARGE,SUM(CHARGE) AS TOTAL
    FROM REPORT,PATIENT,HISTORY,ITEM,COST_CENTER
    WHERE DATE_CHARGED='08-04-06'
    AND PATIENT.PATIENT_NO=HISTORY.PATIENT_NO
    AND PATIENT.PATIENT_NO=REPORT.PATIENT_NO
    AND ITEM.ITEM_CODE=REPORT.ITEM_CODE
    AND COST_CENTER.COST_CENTER=REPORT.COST_CENTER
    GROUP BY PATIENT.PATIENT_NO,LOCATION,PATIENT_NAME,FINANCIAL_SOURCE,COST_CENTER.COST_CENTER,ITEM.ITEM_CODE,DATE_CHARGED,
    DESCRIPTION,CHARGE;
    The result of this table is this:
    http://i4.tinypic.com/82iy9w8.jpg
    How can i remove the duplicate values from the column total?
    THe tables i am using here are ITEM (which has item_no, description, charge), HISTORY(location, financial_source), COST_CENTER(cost_center) and REPORT(date_charged).
    ALl these tables have been used as can be seen in the code.
    I hope this makes things much clear and i can get it sorted :)

Maybe you are looking for

  • I can't find video out on my iphone 3gs

    I bought an apple component cable for my iphone 3gs and/or 4th generation itouch.  But even when the cable is plugged in I can't find the video out setting. I realize that since the new update to 5, this setting is in a different location (under gene

  • Help with Zoom and fullscreen

    Hi, i'm a novice flash user and i have a few questions. Is it possible to lock the size of the movie using actionscript unless the user presses a button in which case it resizes the movie to fullscreen? Is it possible to call the flash player's zoom

  • Recurring Inspection Error.

    Dear Friends, I have a problem: A Batch is posted in QI (Qnty:300gm) for recurring inspection lot. Now according to the inspection plan for the inspection lot is having sample size 500gm i.e. greater then the lot size. ow the system is not allowing m

  • Forms 10g Crash in Windows 7

    Hi, Forms builder crashed during opening a file from a network location. Version: Forms= [32 Bit] Version 10.1.2.0.2 DB = Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 Event Id in Event Viewer is 1000 Error in Event Viewer: Faulting appli

  • Dynamic range of exposure for t3i/600d

    can someone help me by providing the dynamic range of exposure for t3i. (dynami range - Lowest and highest exposure range in terms of f-stops for a given scene) Solved! Go to Solution.