Inspection lot quantity in manual inspection lot (T.Code-QA01)

Dear Experts,
I have activated inspection setup "89" with lot origin '89".I have activated this inspection set up to a material in QM view.
When i want to create a manual inspection lot through T.Code QA01, the inspection lot quantity is a required field. But i do not want to enter a quantity here. I want to create manual inspection lot without quantity. Is it possible?
If yes, please suggest how to proceed.
Your help is highly appriciable.
Regards
Vivek

hi
Use User Exit :QPL10001
Description
    You can use this enhancement to change all the fields when creating an
    inspection lot. The function module is only run once.
    You must be careful when using this enhancement since this can lead to
    inconsistencies in inventory management. For example, if you change the
    quantity fields.
Logic:
Logic will be when you are using a specific Material say MATNR : xyz .......then disable the Qty field LOSMENGE.
I hope this will help you
Regards
Sujit

Similar Messages

  • I have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code?

    i have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code? thank you!

    i inherited the website. It’s for a non-profit and is not very
    sophisticated, and neither am I in webdesign. It currently has multiple
    pages that are identical except for that body section, so whenever i change
    the navigation (in the sidebar) I have to update every html page.  I want
    to have one basic page, and just call in the different body content based
    on the link the user selects from the nav bar. How can i do that using a
    script? i am using Dreamweaver.
    ~ in love and light ~
    Jeannie
    On Sat, Feb 7, 2015 at 4:07 AM, Ben Pleysier <[email protected]>

  • Lots of code

    Greetings,
    I am a java developer, I have been so for the past 9 years. Whenever I have time on my hands, I develop applications just for fun. I have a lot of code written and would like to share all of it. Which place is the best to post all this code and application? It would be great, if a particular piece of code can be tagged with labels. For example, I developed this puzzle game... I would like to tag it with labels like "Swing, Images Manipulation" and so on and so forth. The tags essentially will make it easier for other developers to fetch code according to tags and look up stuff.
    Thank you for any help.
    Please excuse, If this is the wrong forum.

    rksharma wrote:
    I have a lot of code written and would like to share all of it. Which place is the best to post all this code and application?There's an area of this site known as SDN Share. I'm sure you'll be able to find it.
    db

  • Fixed Purchase Order quantity with manual PO creation??

    Hi,
    Is there any way to define a fixed PO quantity on the inforecord or the material master and have SAP automatically insert this quantity on the PO. I know it is possible to have SAP determine the vendor from e.g. a quota arrangement set-up and have this inserted automatically, when source determination is flagged, but how about the PO quantity.
    Note that we do not use SAP for MRP planning, so we create a manual PO and enters all data on the PO manually including the PO quantity, but I assume there must be a way to have this quantity inserted automatically if it is maintained on the info record or material master. However if I enter a fixed quantity on either one of these it seems that it only works in relation to MRP planning, where SAP will then account for the fixed quantity.
    br,
    Jannik

    Best to achieve this is to use the copy functionality. Advise your users to create POs by copying from existing POs. This will ensure that the PO quantity is copied also, then the users can change whatever needs to be changed.

  • Best Practice with States and lots of code lines

    Hi.
    This is my first application in flex.
    I'm ok with as3.
    Now, in as3 we were 'forced' to work mostly with external classes so hardly we have a unique code page with lots of lines.
    In flex, using States leads to build codes with lots of line IF we think on states as web site pages.
    I'm not sure it I understand it right. You mean: if an user visits a website built with 10 pages, but the users access only 2 pages, all that 8 remaining pages would have to be download to the swf the user loads?  (this is, considering the usage os states as pages)
    I'm building a system where the user logs to use it.
    2 states at now:  login page and home page.
    I access the db, and get the user and password with this event dispatched from the db.result (this works, however i found it too-old-style looping. Is there a better way, of course, which?)
    protected function usersService_resultHandler(event:ResultEvent):void
                    allUsers = event.result as ArrayCollection;
                    for (var i:uint;i<allUsers.length;i++){
                        if(allUsers[i].user == tx_user.text && allUsers[i].password == tx_password.text)
                            currentState = "home";
                        else
                            Alert.show("Fault", "Login");
    While I have start to build the "home" page/state, I realized that my code would dramatcally increase. Is it the best practice? Do I have to call another url after login (to open a Session - please, some Session tutorials in flex)? Or I keep doing all in states? I'm afraid my swf would grow bigger.
    Thanks

    Ok.
    The problem is that I'm not used to PHP, and I have generated the code to deal with the server automatically via Flex.
    However I could add a new function, and I could guess how to catch values in the db to compare.
    its a frankenstein function, but i'm afraid it also works. By now, there is no way to know whether user mistyped password or username.
    public function getUserVerification($user, $pass) {
            $stmt = mysqli_prepare($this->connection, "SELECT user, password FROM $this->tablename where user=? AND password=?");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'ss', $user, $pass);       
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_bind_result($stmt, $row->user, $row->password);
            if(mysqli_stmt_fetch($stmt)) {
              return 1;
            } else {
              return 0;
    Also I had to update the _Super_UsersService.as  Class flex had generated before when I first created a php code to deal with db.
    Finaly, I had to assign return and input types for the new function I've created.
    Amazing... it works.
    Now, when pressing the submit button on the login, flex sends user and password so php compare them instead looping it in a Array.
    Also, I have made all this code inside a "loginView" component. So my main app is clean again.
    I guess I understand the idea of using components and reusing them as many as possible. I just have to get used to how to access a component value from outside and vice-versa.
    Now, the creationPolicy is something I would look for. This might be interesting.
    Thanks a lot.
    Btp~

  • Lots and lots of code errors

    I work at a nonprofit, and we've just been given a new
    website provided to us by a team of volunteers. However, the
    template has some minor typos that I need to fix. Whenever I save
    the template, I get error after error, primarily along the lines of
    "Unbalanced #EndEditable tag" or "Nested Editable Regions," but
    some others have popped up, too. I can't ignore the error, either,
    because the rest of the pages in the site won't update.
    The volunteer team was working in two different versions of
    Dreamweaver, and the following part of the code seems to be source
    of several of the problems. There's two different versions of the
    "begineditable" and "endeditable tags," with a section beginning
    with "#begineditable" and then containing a
    "templatebegineditable." When I try to standardize the tags or
    remove them from within each other, the content region drops to
    below the left nav. I don't understand what's happenning, or how to
    fix it. Any ideas?
    Thanks,
    Jodi
    <!-- BeginEditable "leftnav" -->
    <table width="205" border="0" cellpadding="0"
    cellspacing="0">
    <tr>
    <td height="32" align="center"
    background="../IMAGES/left_nav_top.gif" bgcolor="#FFFFFF"
    class="nav_links">
    <!-- TemplateBeginEditable name="left_nav_title" -->
    <table width="190" border="0" align="left"
    cellpadding="0" cellspacing="0">
    <tr>
    <td class="nav_links_title">About Page </td>
    </tr>
    </table>
    <!-- TemplateEndEditable -->
    </td>
    </tr>
    <tr>
    <td align="center" valign="top"
    background="../IMAGES/left_nav_middle.gif" class="text">
    <!-- TemplateBeginEditable name="left_nav_sections"
    -->
    <table width="190" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td height="25"><img
    src="../images/button-arrow.gif" width="13" height="13"><span
    class="nav_links">About
    Us </span></td>
    </tr>
    <tr>
    <td height="25"><img
    src="../images/button-arrow.gif" width="13" height="13"><span
    class="nav_links">Board
    of Directors </span></td>
    </tr>
    <tr>
    <td height="25"><img
    src="../images/button-arrow.gif" width="13" height="13"><span
    class="nav_links">Meet
    Our Staff </span></td>
    </tr>
    <tr>
    <td height="25"><img
    src="../images/button-arrow.gif" width="13" height="13"><span
    class="nav_links">Partners</span></td>
    </tr>
    <tr>
    <td height="25"><img
    src="../images/button-arrow.gif" width="13" height="13"><span
    class="nav_links">Funding
    and Financials </span></td>
    </tr>
    </table>
    <!-- TemplateEndEditable -->
    </td>
    </tr>
    <tr>
    <td height="32" align="center" valign="top"
    background="../IMAGES/left_nav_bottom.gif"
    class="text""> </td>
    </tr>
    </table>
    <!-- #EndEditable -->
    <table width="205" border="0" cellpadding="0"
    cellspacing="0">
    <tr>
    <td height="32" background="../IMAGES/left_nav_top.gif"
    bgcolor="#FFFFFF" class="nav_links"><font color="#000000"
    class="nav_links_title">What's your
    Footprint?</font></td>
    </tr>
    <tr>
    <td background="../IMAGES/left_nav_middle.gif"
    class="text">
    <p><a href="
    http://www.myfootprint.org"
    target="_blank"><img src="../images/logo_eco_fp.gif"
    width="180" height="80" border="0"></a>
    </td>
    </tr>
    <tr>
    <td background="../IMAGES/left_nav_middle.gif"
    class="text"><a href="
    http://www.officefootprint.org"
    target="_blank"><img src="../images/logo_off_fp.gif"
    width="180" height="26" border="0"></a></td>
    </tr>
    <tr>
    <td background="../IMAGES/left_nav_middle.gif"
    class="text"><a href="
    http://www.kidsfootprint.org"
    target="_blank"><img src="../images/logo_kid_fp.gif"
    width="180" height="28" border="0"></a></td>
    </tr>
    <tr>
    <td background="../IMAGES/left_nav_middle.gif"
    class="text"><a href="
    http://www.ecologicalfootprint.org"
    target="_blank"><img src="../images/logo_nat_fp.gif"
    width="180" height="51" border="0"></a></td>
    </tr>
    <tr>
    <td background="../IMAGES/left_nav_bottom.gif"
    class="text"> </td>
    </tr>
    <tr>
    <td height="32" background="../IMAGES/left_nav_top.gif"
    bgcolor="#FFFFFF" class="nav_links"><font color="#000000"
    class="nav_links_title">Learn about
    EJCC </font></td>
    </tr>
    <tr>
    <td background="../IMAGES/left_nav_middle.gif"
    class="text"><a href="
    http://www.ejcc.org"
    target="_blank"><img src="../images/logo_ejcc.gif"
    width="180" height="60" border="0"></a></td>
    </tr>
    <tr>
    <td height="14"
    background="../IMAGES/left_nav_bottom.gif"
    class="text"> </td>
    </tr>
    </table> </td>
    <td width="803"> <!-- #BeginEditable "content"
    -->
    <table width="763" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td height="31"
    background="../images/content_top.gif"> </td>
    </tr>
    <tr>
    <td background="../images/content_middle.gif">
    <!-- TemplateBeginEditable name="content" -->
    <table width="760" height="491" border="0"
    cellpadding="0" cellspacing="0">
    <tr>
    <td class="text"> </td>
    </tr>
    </table>
    <!-- TemplateEndEditable -->
    </td>
    </tr>
    <tr>
    <td height="31"
    background="../images/content_bottom.gif"> </td>
    </tr>
    </table>
    <!-- #EndEditable --></td>

    </table>
    <!-- #EndEditable --></td>
    I think somebody worked on the page with dw3 or dw4.
    If the code you showed was from the Template, it should work
    if you strip
    out the #BeginEditable and #EndEditable and leave the
    TemplateBegin and
    TemplateEnd.
    Then scan the code to see if all template syntax is correct,
    and everything
    you need to edit is in an Editable region. dw
    menu-->modify-->Templates-->Check template syntax.
    My guess is the dw4 person made one big editable area, and
    the MX or newer
    person put in a group of distinct editable areas that are now
    nested inside
    the old template syntax editable area.
    Strong Suggestion- Make a backup copy of the site's Local
    Site Folder before
    doing anything- template syntax problems can cause loss of
    content.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Reversi GUI question, A LOT of code in here!

    okay, so I've been working on his code for a long time. A REAL long time, working on it bit by bit, and all I got left is the Reversi's GUI. Basically I want to use the Jbutton and have x represent black and o represent white. I'm getting stuck on how to go about it. Any ideas?
    Here's alllll the code.
    package com.Ozo.games.reversi;
    * This utility class provides a number of static constants and
    * methods that provide abstractions for player colors and moves.
    * Colors and moves could be implemented as objects of separate
    * classes, but instead we represent them as integers and provide
    * the abstraction via these operations.
    public class Reversi {
         public static final int Black = 1;
         public static final int White = 2;
         public static final int Empty = 0;
          * Gives the color of a player's opponent.
          * @param color of this player.
          * @return color of the opponent.
         public static int playerOpposite(int color) {
              if (color == Black) return White;
              if (color == White) return Black;
              throw new Error("Player must be Black or White");
          * Compare two scores and determine whether the first is better than the second.
          * Better for black means more positive.  Better for white means more negative.
          * @param colorAsking
          * @param score1
          * @param score2
          * @return whether score1 is better than score2, as far as colorAsking is concerned.
         public static boolean isBetterScore(int colorAsking, int score1, int score2) {
              if (colorAsking == Black) return score1 > score2;
              if (colorAsking == White) return score1 < score2;
              throw new Error("Player must be Black or White");
          * Encode a move from this position as an integer.
          * A "pass" move is recorded as (-1,-1).
          * @param pos the board this move is for.
          * @param row the row at which the piece is placed.
          * @param col the column at which the piece is placed.
          * @return encoded move.
         public static int newMove(ReversiPosition pos, int row, int col) {
              return row * pos.ncols() + col;
          * A "pass" move.  I.e. no piece is placed.
         public static int newMovePass(ReversiPosition pos) {
              return newMove(pos, -1, -1);
          * Find the row of an encoded move.
          * @param pos the board this move is for.
          * @param move
          * @return the row.
         public static int moveRow(ReversiPosition pos, int move) {
              return move / pos.ncols();
          * Find the column of an encoded move.
          * @param pos the board this move is for.
          * @param move
          * @return the column.
         public static int moveCol(ReversiPosition pos, int move) {
              return move % pos.ncols();
    package com.Ozo.games.reversi;
    * Top-level driver for a Reversi game.
    public class ReversiGame {
         private ReversiPosition   _pos;
         private int               _toMoveColor;
         private ReversiTextIO     _userInterface;
         public ReversiGame(int nrows, int ncols) {
              _pos           = new ReversiPosition(nrows, ncols);
              _toMoveColor   = Reversi.Black;
              _userInterface = null;
              ReversiRules.setStartingPosition(_pos);
         public void setUserInterface(ReversiTextIO ui) {
              _userInterface = ui;
         public ReversiPosition currentPosition() { return _pos; }
         public int             toMoveColor()     { return _toMoveColor; }
         public void getHumanMoveAndApplyIt() {
              if (ReversiRules.countLegalMoves(_pos, _toMoveColor) != 0) {
                   int move = _userInterface.getMove(_pos, _toMoveColor);
                   _pos.applyMove(move, _toMoveColor);
              else
                   _userInterface.message("You have no move.  I get another turn.");
              _toMoveColor = Reversi.playerOpposite(_toMoveColor);
         public void getComputerMoveAndApplyIt() {
              if (ReversiRules.countLegalMoves(_pos, _toMoveColor) != 0) {
                   int move = ReversiStrategy.findBestMove(_pos, _toMoveColor);
                   _pos.applyMove(move, _toMoveColor);
              else
                   _userInterface.message("I have no move.  You get another turn.");
              _toMoveColor = Reversi.playerOpposite(_toMoveColor);
         public void play() {
              _userInterface.output(_pos);
              for (;;) {
                   if (ReversiRules.isGameOver(_pos, _toMoveColor)) { gameOverMessage(); break; }
                   getHumanMoveAndApplyIt();
                   _userInterface.output(_pos);
                   if (ReversiRules.isGameOver(_pos, _toMoveColor)) { gameOverMessage(); break; }
                   getComputerMoveAndApplyIt();
                   _userInterface.output(_pos);
         public void gameOverMessage() {
              _userInterface.message("Game over...");
              int winner = ReversiRules.winningColor(_pos, _toMoveColor);
              if      (winner == Reversi.Black) _userInterface.message("Black wins.");
              else if (winner == Reversi.White) _userInterface.message("White wins.");
              else    _userInterface.message("Draw.");
    package com.Ozo.games.reversi;
    * The main class to start a Reversi game as an application.
    public class ReversiMain {
         public static void main(String[] args) {
              ReversiGame   game = new ReversiGame(8, 8);
              ReversiTextIO tui  = new ReversiTextIO(System.in, System.out);
              game.setUserInterface(tui);
              game.play();
    }

    package com.Ozo.games.reversi;
    * This class provides all of the intelligence for a program to play Reversi.
    * It contains all the knowledge of play strategy.  (The knowledge of the rules
    * is maintained by the ReversiRules class.)
    * The principal method is findBestMove, which does an exhaustive search a number
    * of plys deep, and then applies a hueristic position evaluation function.
    public class ReversiStrategy {
         private static int PlysToTry = 6;
          * Find the best move for the player of the given color.
          * If there is no move, then return "pass".
          * @param pos the position to be evaluated.
          * @param toMoveColor the color of player to move.
          * @param plysRemaining the depth to examine (must be >= 1).
          * @return the best move within the default horizon.
         public static int findBestMove(ReversiPosition pos, int toMoveColor) {
              return findBestMove(pos, toMoveColor, PlysToTry).move;
          * This class is used to return a pair of values:  the best move and the score it achieves
          * after the number of plys remaining are played.
         public static class BestMove {
              public int move;
              public int score;
              public BestMove(int m, int s) { move = m; score = s; }
          * Find the best move for the player of the given color within
          * the given number of plys.
          * @param pos the position to be evaluated.
          * @param toMoveColor the color of player to move.
          * @param plysRemaining the depth to examine (must be >= 1).
          * @return a BestMove object returning the best move found and the score it achieves.
         public static BestMove findBestMove(ReversiPosition pos, int toMoveColor, int plysRemaining) {
              if (plysRemaining < 1) throw new Error("findBestMove needs plysRemaining >= 1");
              // Generate the legal moves.  If there are none, then pass.
              int opponentColor = Reversi.playerOpposite(toMoveColor);
              int[] moves = ReversiRules.generateMoves(pos, toMoveColor);
              if (moves.length == 0) {
                   if (plysRemaining == 1)
                        return new BestMove(Reversi.newMovePass(pos), summaryScore(pos));
                   else
                        return findBestMove(pos, opponentColor, plysRemaining-1);
              // Try all the moves.  Re-use one position object to make the move.
              ReversiPosition afterMove = pos.copy();
              // Start with a hypothetical worst scenario and then look for what's better.
              afterMove.fill(opponentColor);
              int bestScore = 2*summaryScore(afterMove);  // Worse that the worst possible real score.
              int bestIndex = -1;
              for (int i = 0; i < moves.length; i++) {
                   pos.copyInto(afterMove);      // Re-use the position object.
                   afterMove.applyMove(moves, toMoveColor);
                   int thisScore = (plysRemaining == 1) ?
                        summaryScore(afterMove) :
                        findBestMove(afterMove, opponentColor, plysRemaining - 1).score;
                   if (Reversi.isBetterScore(toMoveColor, thisScore, bestScore)) {
                        bestScore = thisScore;
                        bestIndex = i;
              if (bestIndex == -1) System.out.println("Number of moves " + moves.length + " plys " + plysRemaining);
              return new BestMove(moves[bestIndex], bestScore);
         * Examine contents of square and return 1 for Black, -1 for White, 0 for Empty.
         * Useful in computing scores.
         * @param r row number.
         * @param c column number.
         * @return +1/-1/0
         private static int squareVal(ReversiPosition pos, int r, int c) {
              if (pos.getSquare(r, c) == Reversi.White) return -1;
              if (pos.getSquare(r, c) == Reversi.Black) return +1;
              return 0;
         * Count the number of black squares minus the number of white squares.
         * @return difference in number of black and white squares.
         public static int squareScore(ReversiPosition pos) {
              int nBminusW = 0;
              for (int r = 0; r < pos.nrows(); r++)
                   for (int c = 0; c < pos.ncols(); c++)
                        nBminusW += squareVal(pos, r, c);
              return nBminusW;
         * Count the number of black edge squares minus the number of white ones.
         * @return difference in number of black and white squares.
         public static int edgeScore(ReversiPosition pos) {
              int nBminusW = 0;
              // East and west edges.
              for (int r = 1; r < pos.nrows()-1; r++)
                   nBminusW += squareVal(pos, r, 0) + squareVal(pos, r, pos.ncols()-1);
              // North and south edges.
              for (int c = 1; c < pos.ncols()-1; c++)
                   nBminusW += squareVal(pos, 0, c) + squareVal(pos, pos.nrows()-1, c);
              return nBminusW;
         * Count the number of black corner squares minus the number of white ones.
         * @return difference in number of black and white squares.
         public static int cornerScore(ReversiPosition pos) {
              int rlast = pos.nrows()-1, clast = pos.ncols()-1;
              return squareVal(pos, 0, 0) + squareVal(pos, 0, clast) +
              squareVal(pos, rlast, 0) + squareVal(pos, rlast, clast);
         * Compute a heuristic score for a given position. The more positive,
         * the better for Black. Controlling corners is weighted most heavily,
         * folowed by sides, then regular squares. In principle a different weight
         * function should be used at the end of the game, since then it is really
         * the total number of squares that counts.
         * @param pos the position to be assessed.
         * @return the numerical score, with positive being good for Black, negative good for White.
         public static int summaryScore(ReversiPosition pos) {
                   return squareScore(pos) + 8*edgeScore(pos) + 20*cornerScore(pos);
    }Edited by: Oozaro on Nov 19, 2009 12:41 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Lots of code, Little problem....

    Does anyone have how to get this program to run this line when the close box is pressed:
    userClosed("Connection Closing.", isC);
    This line sends that message to the other client program connected to it. I can get this line to run when the menu exit selection is called, but when the close box is pushed, nothin?
    This was a possible fix and from what I can tell should have worked. I'm trying to add some lines that say:
              Runtime.getRuntime().addShutdownHook(new Thread()
                   public void run()
                        userClosed("Connection Closing.", isC);
              });But for Some reason it doesn't seem to be working? I know the above code is valid, it works in other programs.
    The other possible fix is:
    When the Admin's default constructor is called, it is called from another program that MUST be kept running. When the Admin's client program shuts down I'm using a dispose() to protect the calling program from being shutdown. If someone can tell me how to shutdown this program without killing the calling program, that might work too.
    Thanks!
    /*  A simple Swing based client that talks to the Switch  */
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TrialClient extends JFrame implements GMReceiver    //-------------
         JTextField userText = new JTextField(40);
         JTextArea log = new JTextArea(24,40);
         JPanel outPanel = new JPanel();
         JScrollPane logScroll = new JScrollPane(log);
         JMenuBar menuBar = new JMenuBar();
         JMenuItem startItem = new JMenuItem("Start");
         JMenuItem hostItem = new JMenuItem("Host");
         JMenuItem aboutItem = new JMenuItem("About");
         JMenuItem exitItem = new JMenuItem("Exit");
         JMenu fileMenu = new JMenu("File");
         JMenu helpMenu = new JMenu("Help");
         Container cp;
         RemoteUser remote;
         String address="genesis.zedxinc.com";
         int port1=8000; int port2 = 8001; int port = 0;
         boolean running;
         int isC; Socket contin; int isApp;
         TrialClient()    //Client Default Constructor-------------------------------
              isC = 0;
              port = port1;
              String userName = JOptionPane.showInputDialog
                        (null, "Please Enter Your Name:", "ZedX Web Messenger", JOptionPane.QUESTION_MESSAGE);
              buildMenu();
              cp = getContentPane();
              log.setEditable(false);
              outPanel.add(new JLabel("Send: "));
              outPanel.add(userText);
              userText.addActionListener(new ActionListener()     {public void actionPerformed(ActionEvent evt){userTyped(evt);}});
              cp.setLayout(new BorderLayout());
              cp.add(outPanel,BorderLayout.NORTH);
              cp.add(logScroll,BorderLayout.CENTER);
              userName = "Client: " + userName;
              setTitle(userName);
              addWindowListener(new WindowAdapter()
                   {public void windowClosing(WindowEvent evt){mnuExit();}});
              toLog("!! use start menu to start");
              toLog("!! host is "+address+":"+port1);
              pack();
         TrialClient(JApplet a)    //Web Client Default Constructor-------------------------------
              isC = 0;
              isApp = 1;
              port = port1;
              String userName = JOptionPane.showInputDialog
                        (null, "Please Enter Your Name:", "ZedX Web Messenger", JOptionPane.QUESTION_MESSAGE);
              buildMenu();
              cp = getContentPane();
              log.setEditable(false);
              outPanel.add(new JLabel("Send: "));
              outPanel.add(userText);
              userText.addActionListener(new ActionListener()     {public void actionPerformed(ActionEvent evt){userTyped(evt);}});
              cp.setLayout(new BorderLayout());
              cp.add(outPanel,BorderLayout.NORTH);
              cp.add(logScroll,BorderLayout.CENTER);
              userName = "Client: " + userName;
              setTitle(userName);
              addWindowListener(new WindowAdapter()
                   {public void windowClosing(WindowEvent evt){mnuExit();}});
              toLog("!! use start menu to start");
              toLog("!! host is "+address+":"+port1);
              pack();
         TrialClient(String s, Socket myServer)    //Admin Default Constructor-------
              isC = 1;
              port = port2;
              String userName = s;
              contin = myServer;
              buildMenu();
              cp = getContentPane();
              log.setEditable(false);
              outPanel.add(new JLabel("Send: "));
              outPanel.add(userText);
              userText.addActionListener(new ActionListener()     {public void actionPerformed(ActionEvent evt){userTyped(evt);}});
              cp.setLayout(new BorderLayout());
              cp.add(outPanel,BorderLayout.NORTH);
              cp.add(logScroll,BorderLayout.CENTER);
              userName = "Admin: " + userName;
              setTitle(userName);
              addWindowListener(new WindowAdapter()
                   {public void windowClosing(WindowEvent evt){mnuExit();}});
              toLog("!! use start menu to start");
              toLog("!! host is "+address);
              pack();
              mnuStart();
         void RunShutdown()
              Runtime.getRuntime().addShutdownHook(new Thread()
                   public void run()
                        userClosed("Connection Closing.", isC);
         void userTyped(ActionEvent evt)    //----------------------------------------
              String txt = evt.getActionCommand();
              userText.setText("");
              toLog(txt, true);
              System.out.println("From user:"+txt);
              if(running)remote.postMessage(txt);
         void userClosed(String evt, int who)    //----------------------------------------
              String txt = evt;
              boolean istf = true;
              userText.setText("");
              toLog(txt, istf);
              System.out.println("From user:"+txt);
              if(running)remote.postMessage(txt);
         void toLog(String txt){toLog (txt,false);}    //-----------------------------
         void toLog(String txt, boolean user)    //-----------------------------------
              log.append((user?"> ":"< ")+txt+"\n");
              log.setCaretPosition(log.getDocument().getLength() );
         // build the standard menu bar
         void buildMenu()    //-------------------------------------------------------
              JMenuItem item;          // file menu
              startItem.addActionListener(new ActionListener()
                   {public void actionPerformed(ActionEvent e){mnuStart();}});
              fileMenu.add(startItem);
              hostItem.addActionListener(new ActionListener()
                   {public void actionPerformed(ActionEvent e){mnuHost();}});
              fileMenu.add(hostItem);
              exitItem.addActionListener(new ActionListener()
                   {public void actionPerformed(ActionEvent e){mnuExit();}});
              fileMenu.add(exitItem);
              menuBar.add(fileMenu);
              helpMenu.add(aboutItem);
              aboutItem.addActionListener(new ActionListener()
                   {public void actionPerformed(ActionEvent e){mnuAbout();}});
              menuBar.add(helpMenu);
              setJMenuBar(menuBar);
         void mnuStart()    //--------------------------------------------------------
              Runtime.getRuntime().addShutdownHook(new Thread()
                   public void run()
                        userClosed("Connection Closing.", isC);
              if(!running)
                   if (isC == 0)
                        remote = new RemoteUser(this, address, port);
                   else
                        remote = new RemoteUser(this, contin, isC);
                   if(remote.start())
                        startItem.setText("Stop");
                        running = true;
                   else remote = null;
              else
                   userClosed("Connection Closing.", isC);
                   remote.stop();
                   remote = null;
                   running = false;
                   startItem.setText("Start");
         void mnuHost()    //----------------------------------------------------------
              String txt = JOptionPane.showInputDialog("Enter host address and port");
              if (txt == null)return;
              int n = txt.indexOf(':');
              if(n == 0)
                   address = "genesis.zedxinc.com";
                   port = toInt(txt.substring(1),8000);
              else if(n < 0)
                   address = txt;
                   port = 8000;
              else
                   address = txt.substring(0,n);
                   port = toInt(txt.substring(n+1),8000);
              toLog("!! host set to "+address+":"+port);
         //     setTitle(userName);
         void mnuAbout()    //---------------------------------------------------------
              new AboutDialog(this).show();
              System.out.println("about called");
         void mnuExit()    //----------------------------------------------------------
              userClosed("Connection Closing.", isC);
    //          toLog("!! use start menu to start");
              if (isC == 1){
                   if(remote != null)remote.close();
                   dispose();
    //               System.exit(0);
              else if (isApp == 1)
                   this.destroy();
                   if(remote != null)remote.close();
                   System.exit(0);
              else
                   if(remote != null)remote.close();
                   System.exit(0);
         public void dispose() {     //------------------------------------------------
           switch (this.getDefaultCloseOperation()) {
              case DISPOSE_ON_CLOSE:
                super.dispose();
                break;
         public void fromHost(String txt){postGMessage(new GUIMessage(this,txt));}    //---------
         public void runGMessage(GUIMessage gm){toLog((String)gm.dat);}    //--------------------
         public void postGMessage(GUIMessage gm){SwingUtilities.invokeLater(gm);}    //----------
         public static int toInt(String s, int er)    //----------------------
              int i;
              try{i = new Integer(s).intValue();}
              catch(NumberFormatException exc){i = er;}
              return i;
    class AboutDialog extends JDialog    //-----------------------------------
         Container contentPane;
         JTextField text = new JTextField("Simple character client");
         AboutDialog(Frame f)
              super(f,"About TrialClient",true);
              contentPane = getContentPane();
              contentPane.add(text);
              pack();
    class RemoteUser    //----------------------------------------------------
         Socket sock;
         BufferedReader in;
         BufferedWriter out;
         TrialClient parent;
         String name ="";
         int state = 0;
         Thread recvThread;
         Thread sendThread;
         LinkedList sendQ = new LinkedList();
         boolean signedOn = false;
         String address;     int port; int isc;
         RemoteUser(TrialClient c, String a, int p)    //----------------------
              parent = c;
              address = a;
              port = p;
         RemoteUser(TrialClient c, Socket s, int isC)    //---------------------
              parent = c;
              sock = s;
              isc = isC;
         boolean start()    //---------------------------------------------------
              try
                   state = 1;
                   if (isc == 0)
                        sock = new Socket(address,port);
                   name = getAddress();
                   in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                   out = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream()));
                   recvThread = new Thread(new Runnable()
                        {public void run(){doRecv();}},"Recv");
                   sendThread = new Thread(new Runnable()
                        {public void run(){doSend();}},"Send" );
                   sendThread.start();
                   recvThread.start();
                   parent.fromHost ("!! Connected to = "+name);
                   state = 2;
              catch(Exception e)
                   parent.fromHost ("!! Connection failed to = "+name);
                   e.printStackTrace();
                   close();
              return state == 2;
         void stop(){close();}    //-----------------------------------------------
         void doSend()    //-------------------------------------------------------
              String msg;
              try
                   while (null != (msg = popMessage()))
                        System.out.println("sending ("+msg+") to user="+name);
                        out.write(msg+"\r\n");
                        out.flush();
              catch(Exception e){e.printStackTrace();}
         synchronized String popMessage()    //---------------------------------------
              String msg = null;
              while (state > 0 && sendQ.size() == 0)
                   try{this.wait();}
                   catch(InterruptedException e){}
              if(state > 0)msg = (String)sendQ.remove(0);
              return msg;
         synchronized void postMessage(String msg)    //------------------------------
              sendQ.add(msg);
              this.notify();
         void doRecv()    //----------------------------------------------------------
              String inbuf;
              while (0 != state)
                   try{inbuf = in.readLine();}
                   catch(Exception e){inbuf = null;}
                   if(inbuf == null)close();
                   else
                        System.out.println("received ("+inbuf+") from user="+name);
                        parent.fromHost(inbuf);
         void close()    //----------------------------------------------------------
              int s = state;
              state = 0;
              if(sock != null)
                   if (sendThread != null && sendThread.isAlive())sendThread.interrupt();
                   if(s == 0)parent.fromHost("!! closed");
                   else{ parent.fromHost("!! closing user "+name); }
                   try{sock.close();}
                   catch(Exception e){e.printStackTrace();}
         String getAddress(){return ""+sock.getInetAddress()+":"+sock.getPort();     }
    interface GMReceiver    //----------------------------------------------------------
         public void runGMessage(GUIMessage gm);
         public void postGMessage(GUIMessage gm);
    class GUIMessage implements Runnable    //------------------------------------------
         GMReceiver gui;
         Object dat;
         GUIMessage(GMReceiver gui, Object dat)
              this.dat = dat;
              this.gui = gui;
         public void run()
              gui.runGMessage(this);
    }

    How about interface java.awt.WindowListener???
    Sure can help you out!
    "windowOpened
    public void windowOpened(WindowEvent e)
    Invoked the first time a window is made visible.
    windowClosing
    public void windowClosing(WindowEvent e)
    Invoked when the user attempts to close the window from the window's system menu. If the program does not explicitly hide or dispose the window while processing this event, the window close operation will be cancelled.
    windowClosed
    public void windowClosed(WindowEvent e)
    Invoked when a window has been closed as the result of calling dispose on the window.
    windowIconified
    public void windowIconified(WindowEvent e)
    Invoked when a window is changed from a normal to a minimized state. For many platforms, a minimized window is displayed as the icon specified in the window's iconImage property.
    See Also:
    Frame.setIconImage(java.awt.Image)
    windowDeiconified
    public void windowDeiconified(WindowEvent e)
    Invoked when a window is changed from a minimized to a normal state.
    windowActivated
    public void windowActivated(WindowEvent e)
    Invoked when the Window is set to be the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.
    windowDeactivated
    public void windowDeactivated(WindowEvent e)
    Invoked when a Window is no longer the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.
    "

  • Lots of code clean-up / inclusion paths throwing errors.

    I just built a test app and I am getting errors all over the place.
    First, every page has an include with the 'virtual' method. IE... virtual('/Connections/conNightclub.php');
    I need this to be include ('Connections/conNightclub.php');
    I also noticed that some paths to includes have a forward slash and some don't. ie.. require_once ('/includes/mxi/MXI.php'); should be require_once ('includes/mxi/MXI.php')
    Then, when I fix them by hand the server behavior panel gets exclamation points next to the transactions.
    I hope this is something I forgot to set somewhere...

    Hi,
    >>
    First, every page has an include with the 'virtual' method
    >>
    seems you´re getting this error because
    (that´s a rather rare case) PHP has been configured as Apache CGI module on your remote server -- "virtual" won´t work then, means you´ll have to change it to "include" yourself
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Lots of code to make a web service

    Does anybody know of any tools to make creating web services faster in Java - I am getting frustrated with the amount of code it takes. Anybody else feel the same way?

    Here's an example of what I mean..
    // Open a database connection and statement.
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
    Connection dbConn = DriverManager.getConnection("jdbc:db2:sample","myuser","mypass");
    Statement statement = dbConn.createStatement();
    // Build the message.
    SOAPMessageContext ctx = (SOAPMessageContext) messageContext;
    try {
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage m = messageFactory.createMessage();
    SOAPEnvelope env = m.getSOAPPart().getEnvelope();
    SOAPBody body = env.getBody();
    SOAPElement elem =
    body.addBodyElement(env.createName("ns1:getEmployees"));
    elem.addNamespaceDeclaration("ns1",
    "http://www.abc.com/SampleApplication/Employee.wsdl");
    elem.addNamespaceDeclaration("ns2",
    "http://www.abc.com/SampleApplication/Employee.xsd");
    SOAPElement elem1 = new SOAPElementImpl("Response", null, null);
    // Execute the query.
    String sql = "SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, HIREDATE FROM EMPLOYEE";
    ResultSet result = statement.executeQuery(sql);
    SOAPElement employee = new SOAPElementImpl("Employees", "ns2", "http://www.abc.com/SampleApplication/Employee.xsd");
    employee.addChildElement("ns2:EMPNO").addTextNode(result.getString("EMPNO"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("FIRSTNME"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("MIDINIT"));
    employee.addChildElement("ns2:LASTNAME").addTextNode(result.getString("LASTNAME"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("HIREDATE"));
    elem1.addChildElement(employee);
    elem.addChildElement(elem1);
    ctx.setMessage(m);
    dbConn.close();
    } catch (Throwable e) {
    weblogic.utils.Debug.say("(hbs):e " + e);
    e.printStackTrace(System.out);
    putting the data in the node seems excessive to me.
    thanks
    DG

  • Showing different numbers with out a lot of code

    My assignment is to list the loan balance and interest paid for each payment over the term of the loan.
    The loan amount is for $200,000 at 5.75% for 360 months. Ill figure out the math part but how do I code so that it prints out the differerent principle balances for each month with out doing it 360 times for 360 months?
    Of course I wont have to code all 360 payments. So for example lets say the total loan amount is for $100 and and the interest is 1%. I pay $9 to the principle and $1 for the interest the first month, the next month there is $91 left on the principle etc etc. How do I show that?
    I am just learning java so the more basic the code the better off for me.
    thanks in advance!!

    Presumably you are taking a class in Java so the instructor should have covered loop structures for this assignment.
    But here are some references just in case:
    http://java.sun.com/docs/books/tutorial/java/nutsandbolts/while.html
    http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html

  • Lots of code when I boot - what is going on here?

    I just installed 10.4.10 ...
    (click me - flickr link to hi-res pic)
    I'm not sure what's happening here. my new mac book pro does this every time I try booting it up and just when I think it's frozen (after about two minutes) it gives me the login window. not a lethal issue but still disturbing.
    osx 10.4.10
    2ghz intel core duo
    1.6 GB ram
    Message was edited by: memos to the future

    Sounds like you are stuck in "verbose" mode.
    http://docs.info.apple.com/article.html?artnum=106388
    You should start up from the Mac OS X Installation Disk, from the Installer menu, run Disk Utility. Run both Repair and Repair Permissions routines on the First Aid tab. You can run Disk Utility after starting normally, but you cannot run the Repair routine.
    If that does not resolve the problem, try resetting the PRAM
    http://docs.info.apple.com/article.html?artnum=2238

  • Automatic Conversion of PR to PO.. Need User Manual for ME59 T code

    Hai Sap Gurus,
    I Got the following content from net. but kindly help me by sending me user manual for ME59.
    You created purchase requisition for various material. During creation of purchase order you used the following path:
    Purchase Requisition
    .......Follow on function 
    .........Create Purchase Order
    ............automatic via purReq. 
    When you mentioned required purchase requisition number and execute, system give error that purchase requisition does not contain any suitable item. 
    Is there any setting in customization where you can monitor and use that function.
    In an effort for you to successfully use the Transaction Code ME59 to automatically convert the current PR into PO, then the following criteria should be met: 
    1) In the Purchasing View of the material master data, the "Autom. PO" field must be clicked; 
    2) In the Purchasing View of the Vendor Master Data, the "Automatic Purchase Order" field must be clicked; 
    3) The Outline Agreement or Purchasing Info Record shall be maintained which will allow the automatic copying of unit price and other conditions into PO; 
    4) The Source List shall be maintained for the nominated vendor which was shown in either the Outline Agreement or Purchasing Info Record. 
    or 
    it might be PR subject to release strategy and not yet released
    or 
    If you're not using a source list or automatic creation of PO, you may need to assign the requisition to a purchase information record using transaction ME56. Then it should appear in ME58
    Thanks.. Reply me pls...
    Edited by: Swetha SAP Girl on Jun 18, 2009 2:19 PM

    Hi,
    Step by step process for automatic  PO creation from PR
    1.  Tick check box in purchasing view of Material Master(MM01/MM02)
    2.  Tick check box for auto PO in purchaisng data of Vendor Master record (MK02)
    3.   Maintain Source list for Material,plant and Vendor combination in ME01
    4.   In ME51N create PR and assign source of supply in "Source of supply" tab
    5.   In ME59N key in Purchaisng Org., Vendor and Plant - execute
    You will get POs created with reference to PR automatically.
    Hope its clear
    Regards,
    Uzair Hussain

  • Correct Posting Manual Bank Statement - Transaction Code FF67

    Hello,
    It would be very grateful if someone can advice me on an issue pertaining to transaction code FF67.
    A posting has been made with the wrong posting date. Also, the posted amount has not been recorded in FI because the amount posted was not allocated to any G/L Account.
    The status of this posting is "Manual Posting Completed".
    The questions, it is possible to delete this posted statement which has no effect on the accounts in FI.
    Or, can this completed posting be edited ?
    What will be the impact when the item is deleted.
    Thanks and regards,
    Elvis

    Hi there,
    What I mean about posting not hitting the GL accounts is, the balance of statement 99 is 3,000,000.00 and statement 100 is 3,500,000.00 for example, my current balance on the bank account bears the amount of statement 99.
    Statement 100 has a status as posting completed, but one way or the other, the line items does not reflect in my bank account balance which should have been 3,500,000.00.
    How would you reverse the entry that has a status "Posting completed"?
    Thanks,
    Elvis

  • Change manually the defaulted Tax code in PO

    Hello!
    I would like to know if it is possible to change manually the tax code in the PO item defulted from the PIR.
    Currently the field is display only. I checked the screen layout definition but I didnt find the Tax code field there.
    Thank you very much in advance!
    Kind regards,
    Mariya

    Mariya Petkova wrote:
    Hello!
    >
    > I would like to know if it is possible to change manually the tax code in the PO item defulted from the PIR.
    > Currently the field is display only. I checked the screen layout definition but I didnt find the Tax code field there.
    >
    > Thank you very much in advance!
    >
    > Kind regards,
    > Mariya
    Hi Mariya,
    It is there..
    Go to
    IMG> MM> Purhasing > PO> Define Screen Layout
    Here double click on field selection ME21N and in the new screen double click on GR/IR control which will display Tax-Code field.
    Regards
    Shiva

Maybe you are looking for

  • Payment pending status

    Hi there, I wanted to order a skype number but I have problem while processing to pay. Then I tried again and again by choosing new number but I didn't noticed that that it reserved the number and each time I failed, the payment status changed to pen

  • Change wav file names on iPod - unreadable

    Hi. I was asked to import some important imterviews made on an iPod mini and an ExtremeMac Micromemo onto a Mac, but, as requested, I change the file names first. Since changing the file names the files are completely unplayable, undownloadable and u

  • Images from synced collection won't download

    I'm trying to sync a collection between LR desktop and LR mobile.  The collection has 1444 NEF files in it.  When I mark for sync on my desktop the collection name appears on LR mobile saying  "1 collection with 1444 Photos" and the catalogue appears

  • Required Table fields

    Hi, please tell me the table for Purchase Order No. with Material number, description, vendor code and last PO Price... Thanks

  • Uninstalled software deployed by SCCM still remains in Installed Applications

    Hi experts I noticed when we manually uninstalled a software which was deployed via SCCM, in Software Center, under Installed Applications, the software is still listed as installed there.  I know the only way to make the software unlisted under Soft