Problem for drawimage

i want to draw a image random and they are not stick together but i try that code it only have one image show up.how to do draw a image and they are not stick together too?
and i have one more question how to make a image stand on other image . because i want to make a person walk on a floor.
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.Ellipse2D;
import java.awt.image.BufferedImage;
import javax.swing.*;
import javax.swing.event.*;
public class Downstair  {
    Playscreen graphicComponent;
    JPanel centerPanel;
    private JPanel getCenterPanel() {
        graphicComponent = new Playscreen();
        CardLayout cards = new CardLayout();
        centerPanel = new JPanel(cards);
        centerPanel.add("Menu", getMenuPanel());
        centerPanel.add("Game", graphicComponent);
        return centerPanel;
    private JPanel getMenuPanel() {
        // Create components.
        String[] gameMenulist = {"New Game","Abouts","how to play","Options","Exit"};
        JList menulist= new JList(gameMenulist);
        ListSelectionModel menulistModel = menulist.getSelectionModel();
        //menulist setting
        menulist.setLayoutOrientation(JList.HORIZONTAL_WRAP);
        menulist.setVisibleRowCount(-1);
        menulist.setBackground(Color.BLACK);
        menulist.setForeground(Color.WHITE);
        menulist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        menulist.addListSelectionListener(new ListListener());
        JPanel panel = new JPanel() {
            Image bg = new ImageIcon("image/bgimg.jpg").getImage();
            protected void paintComponent(Graphics g) {
                super.paintComponent(g);
                g.drawImage(bg, 0, 0, this);
        panel.setBackground(Color.white);
        panel.setOpaque(true);  // default value
        panel.setLayout(new GridBagLayout());
        GridBagConstraints a = new GridBagConstraints();
        // The anchor constraint requires a non-zero weight
        // constraint in the direction it is going, ie,
        // weightx for horizontal values such as EAST,
        // WEST, LINE_START, LINE_END.
        a.anchor = GridBagConstraints.PAGE_END;
        panel.add(menulist, a);
        return panel;
    public static void main(String[] args) {
        Downstair app = new Downstair();
        JFrame mainframe = new JFrame();
        mainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        mainframe.getContentPane().add(app.getCenterPanel());
        mainframe.setSize(600, 600);
        mainframe.setVisible(true);
    private class ListListener implements ListSelectionListener {
        public void valueChanged(ListSelectionEvent e) {
            if(!e.getValueIsAdjusting()) {
                JList list = (JList)e.getSource();
                int index = list.getSelectedIndex();
                switch(index) {
                    case 0:
                        CardLayout cards = (CardLayout)centerPanel.getLayout();
                        cards.show(centerPanel, "Game");
                        break;
                    case 4:
                        System.exit(0);
                        break;
                    default:
                        System.out.println("unexpected type: " + index);
class Playscreen extends JPanel {
     ImageIcon playbg;
     ImageIcon playerIcon;
     ImageIcon[] stair;
     int floor;
     int live;
     int randomX;
     int randomY;
     int randompic;
     public Playscreen(){
          playbg = new ImageIcon("image/bgimg.jpg");
          playerIcon = new ImageIcon("image/ball.gif")[10];
          stair = new ImageIcon("image/stair.jpg");
          randomX = (int)( ( Math.random() * 400 ) + 1 );
          randomY = (int)( ( Math.random() * 400 ) + 1 );
          randompic = (int)( ( Math.random() * 10 ) + 10 );
          setBackground(Color.white);
          setOpaque(true);
     protected void paintComponent(Graphics g) {
          super.paintComponent(g);
          g.drawImage(playbg.getImage(), 0, 0, this);
          for(int numpic= 0; numpic < 10 ; numpic++){
               g.drawImage(playerIcon.getImage(), randomX, randomY, this);
}Message was edited by:
nickgoldgodl

fileNames = new String[20];
20 images is a lot for this small space.
Recall one of comments from reply 5:
About the method setRects: If there are too many rectangles or if they are too big
or if the graphic component is too small this method may not be able to find a legal
location for one of the rectangles.
What this means is this: if an acceptable location cannot be found for any of the rects
(which are used to place the images) your app will freeze while setRect goes on in an
infinite loop.
import java.awt.*;
import java.awt.event.*;
import java.util.Random;
import javax.swing.*;
import javax.swing.event.*;
public class Downstair  {
    Playscreen playScreen;
    Pseudo pseudo;
    JPanel rightPanel;
    private JPanel getCenterPanel() {
        // Instantiate components.
        playScreen = new Playscreen();
        pseudo = new Pseudo();
        // Layout right panel.
        rightPanel = new JPanel(new CardLayout());
        rightPanel.add("Menu", getMenuPanel());
        rightPanel.add("Game", playScreen);
        // Layout center panel.
        JPanel centerPanel = new JPanel(new BorderLayout());
        centerPanel.add(pseudo,     BorderLayout.LINE_START);
        centerPanel.add(rightPanel, BorderLayout.CENTER);
        return centerPanel;
    private JPanel getMenuPanel() {
        // Create components.
        String[] gameMenulist = {"New Game","Abouts","how to play","Options","Exit"};
        JList menulist= new JList(gameMenulist);
        ListSelectionModel menulistModel = menulist.getSelectionModel();
        //menulist setting
        menulist.setLayoutOrientation(JList.HORIZONTAL_WRAP);
        menulist.setVisibleRowCount(-1);
        menulist.setBackground(Color.BLACK);
        menulist.setForeground(Color.WHITE);
        menulist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        menulist.addListSelectionListener(new ListListener());
        JPanel panel = new JPanel() {
            Image bg = new ImageIcon(//"image/bgimg.jpg").getImage();
                                     "images/geek-----.gif").getImage();
            protected void paintComponent(Graphics g) {
                super.paintComponent(g);
                g.drawImage(bg, 0, 0, this);
        panel.setBackground(Color.white);
        panel.setOpaque(true);
        panel.setLayout(new GridBagLayout());
        GridBagConstraints a = new GridBagConstraints();
        a.anchor = GridBagConstraints.PAGE_END;
        panel.add(menulist, a);
        return panel;
    public static void main(String[] args) {
        Downstair app = new Downstair();
        JFrame mainframe = new JFrame();
        mainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        mainframe.getContentPane().add(app.getCenterPanel());
//        mainframe.setSize(600, 600);
        mainframe.pack();
        mainframe.setVisible(true);
    private class ListListener implements ListSelectionListener {
        public void valueChanged(ListSelectionEvent e) {
            if(!e.getValueIsAdjusting()) {
                JList list = (JList)e.getSource();
                int index = list.getSelectedIndex();
                switch(index) {
                    case 0:
                        CardLayout cards = (CardLayout)rightPanel.getLayout();
                        cards.show(rightPanel, "Game");
                        break;
                    case 4:
                        System.exit(0);
                        break;
                    default:
                        System.out.println("unexpected type: " + index);
class Playscreen extends JPanel {
     ImageIcon playbg;
     ImageIcon playerIcon;
     ImageIcon[] stair;
     int floor;
     int live;
     Point loc = new Point(100,100);
     int dx = 3;
         int dy = 3;
     Rectangle[] rects;
     Random seed = new Random();
     String[] fileNames;
     boolean firstTime = true;
     public Playscreen(){
          String img = //"stair.jpg";
                         "../images/geek-----.gif";
          fileNames = new String[5];
          playbg = new ImageIcon(//"image/bgimg.jpg");
                                   "../images/Bird.gif");
          playerIcon = new ImageIcon(//"image/player.gif");            
                                       "../images/Cat.gif");
          setBackground(Color.white);
          setOpaque(true);
          registerKeys();
          setFocusable(true);
          for(int f = 0; f < fileNames.length; f++){
               fileNames[f] = img;
          rects = new Rectangle[fileNames.length];
          stair = new ImageIcon[fileNames.length];
          for(int j = 0; j < rects.length; j++) {
                 stair[j] = new ImageIcon(//"Image/" + fileNames[j]);
                                           "../images/" + fileNames[j]);
                 rects[j] = new Rectangle(stair[j].getIconWidth(),
                                           stair[j].getIconHeight());
     protected void paintComponent(Graphics g) {
          super.paintComponent(g);
          g.drawImage(playbg.getImage(), 0, 0, this);
          g.drawImage(playerIcon.getImage(), loc.x, loc.y, this);
          if(firstTime) {
                 setRects();
                 firstTime = false;
          for(int j = 0; j < stair.length; j++) {
                     g.drawImage(stair[j].getImage(), rects[j].x, rects[j].y, this);
    public Dimension getPreferredSize() {
        return new Dimension(600,500);
     private void setRects() {
             Point p;
            int count = 0;
             for(int j = 0; j < rects.length; j++) {
                 do {
                         p = getRandomLocationFor(rects[j]);
                          rects[j].setLocation(p);
                        System.out.println("count for " + j + " = " + count++);
                     } while(!notTouching(j));
         private boolean notTouching(int index) {
            for(int j = 0; j < index; j++) {
                 if(rects[j].intersects(rects[index]))
                      return false;
             return true;
     private Point getRandomLocationFor(Rectangle r) {
             Point p = new Point();
             p.x = seed.nextInt(getWidth()  - r.width );
             p.y = seed.nextInt(getHeight() - r.height);
             return p;
     private void registerKeys() {
             int c = JComponent.WHEN_IN_FOCUSED_WINDOW;
             getInputMap(c).put(KeyStroke.getKeyStroke("UP"), "UP");
             getActionMap().put("UP", upAction);
             getInputMap(c).put(KeyStroke.getKeyStroke("LEFT"), "LEFT");
             getActionMap().put("LEFT", leftAction);
            getInputMap(c).put(KeyStroke.getKeyStroke("DOWN"), "DOWN");
             getActionMap().put("DOWN", downAction);
             getInputMap(c).put(KeyStroke.getKeyStroke("RIGHT"), "RIGHT");
             getActionMap().put("RIGHT", rightAction);
     private Action upAction = new AbstractAction() {
             public void actionPerformed(ActionEvent e) {
         private Action leftAction = new AbstractAction() {
                 public void actionPerformed(ActionEvent e) {
                      loc.x -= dx;
                      repaint();
         private Action downAction = new AbstractAction() {
             public void actionPerformed(ActionEvent e) {
         private Action rightAction = new AbstractAction() {
             public void actionPerformed(ActionEvent e) {
                      loc.x += dx;
                      repaint();
class Pseudo extends JPanel {
    JButton ok = new JButton("Okay");
    public Pseudo() {
        setLayout(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.gridwidth = GridBagConstraints.REMAINDER;
        add(new JLabel("Pseudo Panel", JLabel.CENTER), gbc);
        gbc.weighty = 1.0;
        add(ok, gbc);
        setBorder(BorderFactory.createLineBorder(Color.red));
    public Dimension getPreferredSize() {
        return new Dimension(200,100);
}

Similar Messages

  • Hi all, I upgraded my MBP to Lion , but on the screen where i need to type my password, click  on my photo and it does not appear the place for me to type my password and it stay stuck there. Can anyone solve this problem for me?

    Hi all, I upgraded my MBP to Lion , but on the screen where i need to type my password, click  on my photo and it does not appear the place for me to type my password and it stay stuck there. Can anyone solve this problem for me?

    Reboot the machine holding Command and r keys down, you'll boot into Lion Recovery Partition
    In there will be Disk Utility, use that to select your Lion OS X Partition and Repair Permissions.
    After that is done reboot the machine and see if you can log in.
    If not repeat the above steps to get into Lion Recovery, get online and reinstall Lion again, it will overwrite the installed version and hopefully after that it wil work.
    Reboot and try again.
    If not follow my steps to create a Snow Leopard Data Recovery drive, then option boot from it and grab a copy of your files off the machine.
    Then reinstall all your programs onto the external drive like setting up a new machine, then use Disk Utility to erase the entire internal boot drive (select the drive media on the far left, not the partiton slightly indented) format Option: GUID , 1 partition OS X Extended and then use Carbon Copy Cloner to clone the external to the newly formatted internal drive. Once that is finished reboot and disconnect the external drive.
    Once you go that, boot into Snow Leopard and update to 10.6.8, use the AppStore and option click on Purchases and download Lion again and install.
    Lots of work, but there is no Lion disks.
    https://discussions.apple.com/message/16276201#16276201

  • Hi team , I have some questions/Problem for my product apple (iPad,iPhone) , I want to employee speak and type thai language

    Hi team , I have some questions/Problem for my product apple (iPad,) , I want to employee that can  speak  or response me in thai language
    1. ผม อาคเนย์  พำนักอยู่ประเทศไทย กรุงเทพฯ  มีปัญหาสอบถาม ดังต่อไปนี้
       - กระผมได้ทำการตัดบัตร เครดิต เพื่อซื้อเกมส์ผ่าน itune store ผ่าน apple itune ID : misskor.yaprom@*** เพื่อซื้อเกมส์ Eleves Realm ในวันที่18 ก.ค. 56 เวลา 17.07น. ซึ่งทางบัตรเครดิตได้แจ้งเรียกเก็บเงินมายอดเงิน 39.99$ ซึ่งในระบบจริงๆ ทางกระผมต้องการตัดในยอด 99.99$ แต่พอได้ประสานงานไปยังธนาคาร ได้รับการแจ้งกลับมาว่า ได้ทำการตัดบัตรในยอดเงิน 39.99$ ซึ่งในความเป็นจริงนั้น กระผมไม่ได้สั่งซื้อเกมส์ในยอด 39.99$ ซึ่งในยอด 99.99$ นั้นพยายามตัดในระบบบัตรเครดิตอยู่ แต่ทางกระผมได้ยืนยันกลับไปว่าไม่ให้ระบบตัดนะครับ เพราะว่าเนื่องจากมีปัญหาในการชำระเงินระหว่าง Apple itune store อยู่
       - ทั้งนี้ขอให้ทางเจ้าหน้าที่ประสานงานตรวจสอบ apple itune ID : misskor.yaprom@*** เพื่อซื้อเกมส์ Eleves Realm ตามที่ได้ให้รายละเอียดโดยด่วนว่าเป็นเพราะว่าระบบมีปัญหาหรือว่ามีอะไรเกิดขึ้นในข ั้นตอนการชำระเงินครับ
    รบกวนประสานงานกลับมายังกระผม อาคเนย์ ที่หมายเลขโทรศัพท์มือถือ +**** / reply feedback  email : lekod1@*** โดยด่วน ในวันศุกร์ที่ 19 ก.ค. 2556 ครับ
    ขอบคุณครับ
    อาคเนย์  อุดปิน
    กด
    <Edited By Host>

    Google translation:
    พนักงานของ iTunes Store จะไม่ได้อ่านข้อความในเว็บบอร์ดนี้ ถ้าคุณต้องการความช่วยเหลือสำหรับปัญหาที่มีใน iTunes Store, คุณจะต้องติดต่อกับพวกเขาผ่านทางแบบฟอร์มเว็บนี้:
    http://www.apple.com/emea/support/itunes/contact.html

  • Problem for releasing  blocked sales order on Creditlimit

    Hi Gurus,
            I a   hve a problem for releasing blocked sales orders
             what i have done: 1)i have blocked sales order based on exceeded creditlimit
             (i have change SDType in 'OVAK' is 'C')
                      2)now i have to release for furthur processing so i have done following steps
                      3)Goto VKM3/VKM1 T.Code and then release what order that is blocked.
                      4) order will appear in the list.
                      5)Select that one.
                      6)Click on the green flag that appears on the left hand side.
                      7)Click on save.
                      8)click on back it will ask for "Leave list".
                      9)Click on yes.
                      10)It said that Sales orer has been released
    Still what my problem is:
    Problem: 1)So i'm trying to create deliver for Sales order but it shows an error
             2)"Sales order is blocked for delivery: Credit limits" Even it was released    
    Plz kindly help  me what i do....
    Thanks In Advance
    sivakumar

    sorry   i was  unfotunately put this thread here  over in SD

  • I have been using Elements 12 without a problem for 9 months.  Now when I try to open the program, I get an error message  "Adobe Photoshop Elements 12 quit unexpectedly" and it will not open at all.  What can I do to open the program?

    I have been using Elements 12 without a problem for 9 months.  Now when I try to open the program, I get an error message  "Adobe Photoshop Elements 12 quit unexpectedly" and it will not open at all.  What can I do to open the program?

    Thank you for responding.  Nothing actually worked!  After reading the posts online, I called Apple.  They indicated they have seen problems with some software after their upgrades.  The technician was able to fix the problem on my computer remotely, but I have no clue what he did!  But, it was definitely related to their recent upgrade to my computer.

  • I can use my appleID without any problems for using to download new apps in the app-store or Itunes - Problem: I can´t use my ID at facetime and Imessage - I´d like to add an EMail account on top to my mobile number. My password will not be accepted!!!???

    I can use my appleID without any problems for using to download new apps in the app-store or Itunes - Problem: I can´t use my ID at facetime and Imessage -
    I´d like to add an EMail account on top to my mobile number to use more this services. My password will not be accepted!!!??? I try it and i try it and i try ist, throughout the same problem. Whats on? The user help desk said, i´ve to reset and use the WLAN key new as well as possible - no way!

    Contact the App store for Apple ID help. Their support link is on the right of the App store window
    LN

  • Period Problem for MR21

    Dear All,
    i am getting problem for the following in transaction MR21, as there is no stock available for material.
    Posting period 03 2008 is not open
    Message no. F5201
    Diagnosis
    Period 03 of fiscal year 2008 is not open for posting for the variant of posting period .
    regards,
    qsm sap

    Hi,
    First check the Current period in OMSY trx...for your Comp code..
    Then go to MMPV and enter Comp code, Period & Year
    and execute...
    Ex: if the current period in OMSY for your Comp code is 01,2008
    then you need to enter period 02, 2008 in MMPV trx...
    so, that period 01 will be closed & Period 02 will be opened automatically...
    You need to close periods one by one like this..
    until the period you want use...
    Thx
    Raju

  • Lenovo ideapad yoga 13 pci data acqusition and signal processing center for problem for windows 8

    Link to picture
    hi everyone, 
    find original w8 cd and then i installed, when i was installing
    i deleted all recovery and other partition, i did not think what can i do,
    but then i activated windows and installed all driver, but i taking 
    after all drivers it stayed
    2''unknown devices''
    and when i rebooted, it says, usb device not recognized'' and also
    ''pci data acquisition and signal processing center'' devices problem for windows 8. and touchscreen not working.
    i read related for w7 same problem, but what i will do now ?
      thanks.
    Moderator note; picture(s) totalling >50K converted to link(s) Forum Rules

    hi adilsefaersan,
    Welcome to Lenovo Community Forums!
    By opening your Device Manager right click on one unknown device and choose properties,
        >On the properties windows Click on the Details Tab, on the property drop down Choose hadware IDs
         > then copy the value and post back here whats on the Value pane
    Do it for all those unknown Device and Post here the Value of the hardware ids
    also can you share your Windows Version and bit type so we'll knwo the correct download page for you
    Thanks and Regards
    Solid Cruver
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Server 2008R2 mapping to shared folders fails users of Windows 8.1 but seems OK on Windos 8.0 and no problems for Windows 7

    Having read what I could from the related questions, the answers still elude me.  This issue apparently is specific to Windows 8.1.
    First, a little background.
    1:  The server is not on a domain,  The system runs Server 2008-R2 standard with all folders shared across a standard "Workgroup" type network.  They would prefer to
    leave this layout intact. 
    2:  The shared folders are nothing but Data files.  There are no active system folders or anything used in an "active" environment.  They are mostly Word doc, excel
    files, pdf, txt, etc.  However, due to the requirements of the software that needs to access these files, they Must
     reside on a mapped network drive letter. Nothing else works due to the way the SQL database program stores the reference points back to the data.
    I have had some success using what amounts to a “simulated” mapping using  WebDAV to access the server.  But access speed is a lot slower ad file size is limited.
    3:  The system has been configured as-is for the past 3 years with Users all on Windows 7 x64 (mixed OS, some Home Premium, some Professional) and the only problems that come up are when
    access is through an ISP that blocks port 445.  This was the original reason for finding a WebDAV/Cloud method just for those Users since they were unable to Map drives to anything on the Office Servers from their Home Internet even when using a VPN.
    When Windows 8.0 became the only version available, I added a few users whose new laptops came with 8.0 from the vendors.  While there were a very few minor problems, for all practical
    purposes, I was still able to provide access to the mapped folders.
    As the Windows 8.1 roll-out progressed, some users were successfully upgraded while others  are still stuck in Windows 8.0.  The issues with this seem to be hardware related and vary
    depending on the Make and model of the laptop.  I have been assured that eventually all of these will be able to advance to 8.1.  But this delay has given me an excellent mixed OS environment for testing.
    On the users who have not yet purchased new equipment and who are still using Windows 7.  There has been no change.  Their drive mapping is stable and they can always connect as usual. 
    Those blocked from lack of port 445 or still blocked.  Systems inside the Office and those with ISP's who allow port 445 can use all mapped drives as normal.
    Users who had Windows 8.0 and who have not yet been able to upgrade to 8.1 also have been unaffected.  Same results as Windows 7. 
    Users who got the Windows 8.1 upgrade as well as those that came factory loaded with Windows 8.1 seem to be a never-ending list of problems.  The ones that came native with 8.1 are worst
    of all.  The list of error codes runs through everything that has to do with “communication with the server”.  As far as I have seen, this appears to be the issue.
    Whether they are in the office on a wired network connection or at home on a Wi-Fi connection, the issues have the same results but the actual error codes may vary slightly.  All of
    them refer back to an inability to communicate with the server.
    Nothing on the server has changed in any way.  Users with Windows 7 continue to have zero problems,  Users with Windows 8.0 seem to be doing fine as well.  Only those with Windows
    8.1 are affected and their problems are dramatic with everything from a total loss of drive mapping to misdirected data when the maps are active.
    I have tried to make the drives automatically remap on reboot. I have tried registry modifications.  I have done everything I can think of to make a difference but the results are the same
    for every system using 8.1.  The mapped drive letters invariably disappear.  Sometimes while the system is in use ( I think I have been able to trace this to times when the system enters Sleep or Hibernate) but always when the system reboots. 
    One detail that might point to somewhere is that the "time to connect" when mapping the drive is so long that I believe some of the original failures were due to not waiting for a
    minimum of 3 or 4 minutes to give time for the Shares to show-up in order to map them.  Once the mapping is successful, the file access speed seems normal.  But invariably, the drive becomes "unmapped" repeatedly each day.
    I know this was a long question but I have tried to provide every possible detail for anyone who has experienced events like this who may already have a solution.  I would even be glad
    to purchase a 3rd party application if that is what it takes to get this to work.  My next planned effort is to try using Server 2013 but I am afraid that might open another can of worms for those who still use Windows 7.
    I have also been told that this is in some way related to the push to "Cloud" support in Windows 8.1 OS but I do not see where this would come in.  I can say that this was the
    one place where things continued to work as before.  People who had Windows 8.1 and who had to use the CLOUD copies of our data are still able to connect to it with no problems.
    Any suggestions appreciated.  Preferably those that would not need extensive changes to the basic network structure.  This "workgroup" consists of less than 25 users and any
    extreme measures would be hard to justify

    Hi,
    I sugget you try to ping server so that we can verify the connectivity.
    Can windows 8.1 access Windows Server 2008R2?
    Also,please check the event viewer to see if some error log appeared when the issue occurred.
    Regards,
    Kelvin Xu
    TechNet Community Support

  • Change transaction using BDC-problem for large number of lines on screen

    Hi All,
    I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen
    perform bdc_dynpro using 'SAPLIQS0' '7200'.
    perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.
    LOOP AT p_qmsm INTO wa_qmsm.
    *IF wa_qmsm_cntr > 2.
           wa_qmsm_cntr = 2.
           perform bdc_dynpro  using 'SAPLIQS0'                   '7204'.
           perform bdc_field   using 'BDC_OKCODE'                 '=PEND'.
    ENDIF.
    perform bdc_dynpro using 'SAPLIQS0' '7204'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.
    CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.
    CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.
    CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.
    perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.
    perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.
    perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.
    perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.
    wa_qmsm_cntr = wa_qmsm_cntr + 01.
    ENDLOOP.
    CALL TRANSACTION 'IQS2' USING wt_bdc
    MODE 'N' UPDATE 'A'  MESSAGES INTO P_MESSTAB.
    The same code is used in modify mode also. web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence. It is working fine if i comment 5 lines which is starting with *. But in modify mode, how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?Please suggest?

    Hi yogesh,
    how can i ensure that correct row is modified?
    1. For this we need to know two things ;
       a) the database table in which the entries are already stored
       b) the sequence in which they are displayed in the transaction.
    2. So before changing any line, we need to compare (the primary key values / important values)
       a) as per the database table and as per the incoming data from web application (using bapi)
      b) if the match is ok, it means that particular row was not modified, else modified.
    how can i achieve problem of large no of lines on screen?
    1. For this I am  not sure about the transaction and its screen. Manytimes for appending row on the screen,
      there is a PLUS + button on the grid toolbar. So for every entry, (inspite of some empty/filled rows already visible on the screen), we should use the + button, and this new row always appears on the top i.e. row number 1.
    hope this helps.
    regards,
    amit m.

  • Good receipt problem for subcontracting purchase order

    Good receipt problem for subcontracting purchase order
    with account assignment type ‘E’.
    After update to ECC 6.0. Do good receipt for subcontracting purchase order with account assigment 'E'.The system show the error message(KI235)----Two cost elements (Change in Stock (Subcontracting)&Outside processed fee) haven't CO account assignment.but the field status  for sale order is option entry , when I default cost center for the cost element  in OKB9.the system post the material document and generate the following accounting document.
    Doc.Type : WE ( Goods receipt ) Normal document
    Doc. Number    5000056065       Company code    1000         Fiscal year     2007
    Doc. date      2007.12.04       Posting date    2007.12.04   Period          12
    Calculate Tax
    Doc.currency   HKD
    tm PK Account    Account short text   Tx Cost Ctr   SaleOrder               Amount
    1 89 13500000   Stock-Work in proces                   1007823  10             274.4
    2 96 21210010   GR/IR Clearing                             1007823  10             205
    3 91 41010102   Chg in Stock(Subcon)    10901099  1007823  10            274.4
    4 86 41031000   Outside processed fe     10901099  1007823  10            205  
    5 99 13500000   Stock-Work in proces                    1007823  10            69.4
    6 81 41010101   Cost of Prod (Subco)                      1007823  10           69.40
    My problem is:
    When use MIGO to do good receipt for subcontracting Purchase order, for consumption account((Change in Stock (Subcontracting)-41010102&Outside processed fee--41031000) ,why the system don’t recognize the sale order filled as CO account assignment?

    Dear fanny chen
    Did you get a solution for your open question?
    I`m facing the same problem, so any help yould be appreciated.
    Regards

  • Problem for creation of PO for different company code

    I have problem for creation of PO using ME21 for different company code.Order is not created.
    Please give reply it is urgent.

    Hi Mansih,
    I don´t understand what is your exact problem, as I don´t see any company code being specified. But maybe you should check in XK03 that the vendor master data is created for this company code/purchasing organisation!
    Have a nice day!

  • TS4088 why is there a limit on 3 years? it should be all the MacBook Pro mid 2010 with symptoms, there should get their logic board changed for free, mine mac is 3 month late and i had this problem for over a year, but i first saw this article today :(

    it should be all the MacBook Pro mid 2010 with symptoms, there should get their logic board changed for free, mine mac is 3 month late and i had this problem for over a year, but i first saw this article today

    Hey Clintonfrombirmingham
    I called Apple technical support in Denmark, but with no positive reply.
    She couldn't do anything, and said that They had sent a recall Email about the problem and with their offer to repair the Macbook Pro, but I'd never recieved an Email about the problem. She wasn't in power to make an exception. It can't be true that i paid a lot of money, for a product that can't barely stand on its own feets, Apple didn't tell me that the product I was about to buy, would restart every 5 minute. and now when  they know the problem, they wont repair it? it just don't make sense for me. If a car seller discovers that all the brakes in a car he had sold, will crash after some years he will call all the cars back to repair no mater what. i just don't understand how Apple will make good service for their custumers, by extending the warranty from 2 to 3 years, but wont take the computers there is a little bit to old, 4 months will make the difference. i can't believe it.
    What can i do now? 
    best regards Oskar

  • TS1811 Hi!! I am a user of i Pod 5g 32GB....I got the same problem for which the solution is given above....but the thing is that.......in my laptop I have a windows operating system....that is windows 7....so can you explain how to do settings in Windows

    Hi!! I am a user of i Pod 5g 32GB....I got the same problem for which the solution is given above  "
    iTunes for Mac reports error -50 when trying to authorize iTunes Store purchases
    "....but the thing is that.......in my laptop I have a windows operating system....that is windows 7....so can you explain how to do settings in Windows 4 same

    Archived - iTunes for Mac reports error -50 when trying to authorize iTunes Store purchases
    Products Affected
    iTunes 7 for Mac, iTunes 8 for Mac, iTunes 9 for Mac
    This article has been archived and is no longer updated by Apple. 
    Symptoms
    After installing the Mac OS X 10.4.9 Update, iTunes may be unable to properly authorize your computer to play your iTunes Store purchases.
    Resolution
    The following steps will delete your network preferences. Most broadband connections do not require any special settings to connect, but if your connection does or if you are not sure, please contact your ISP or network administrator for further assistance.
    Important: You must be logged in as an Administrator.
    Click the Finder icon in the Dock.
    Choose Go to Folder from the Go menu.
    Type /Library/Preferences/SystemConfiguration
    Click Go.
    In the Finder window, locate the file named NetworkInterfaces.plist.
    Drag this file to the Trash.
    Restart the computer.
    Once your computer has restarted. You will not be able to connect to the Internet. Now you will need to refresh your network settings to be able to connect again.
    Choose System Preferences from the Apple menu.
    Choose Network from the View menu.
    To refresh your network settings, from the Location pop-up menu, choose New Location.
    Type a name for your location and click OK.
    Click the Apply Now at the bottom right to accept the changes.
    If your network connection requires any special settings, you will need to put them back in at this point. Once you have made these changes you should be able to connect to the Internet again and authorize your computer to play your iTunes Store purchases.

  • I need someone to take over my computer and fix this problem for me

    pls help i need someone to fi this problem for me my j4680 will not go wireless can someone take over my computer and find out what is wrong plsssssssssssssss

    Try HP's diagnostic utilities:
    http://h30434.www3.hp.com/t5/Printer-networking-and-wireless/Network-Printer-Problems-Try-the-HP-Hom...
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

Maybe you are looking for

  • Hi Everyone, i have made a flash gallery using actionscript..how to add a loader to it?

    hi i am loading all thumbs and images in a container on a single frame using action script..but the size of the swf becomes 1.2 mb so i want to add a loader to it...the loader i am trying to add counts the frames but my file has just one frame so the

  • How to Change Industry type in a existing running CRM system

    Hi Experts, We are running presently on CRM 5.0 and we went live on Nov 2006.Currently we found that the industry type has been configured as CG (We are HT industry type). If we change the industry type in the current running CRM system what will be

  • Indicator on previous tab opened?

    Is there a way to know which tab you last had open prior to the currently opened tab? Sometimes I have quite s few tabs up from the same website and it's easy to forget which tab was the last one you had open if you require to go straight back to it

  • Newly installed CS2 will not recognize raw images

    I have installed my Photoshop CS2 on my new computer.  It will not recognize my raw images.  I get a message that says "could not complete your request because it is not the right kind of document".  I uninstalled the program and reinstalled it again

  • Membership of Domain Admins group not providing full NTFS access?

    I recently tried to check the properties of a folder on the network to see what the total file size of its contents was (on a Server 2008 R2 server, logged on using my domain admin account).The total size of the contents reported was ony 6 MB. This w