How can I implement this??

I want to play a sound and after a specific time period stop that sound and play another one. How can I stop the sound after a specific time period??
Thanks

The problem is the sound buffer. You may stop the method which dispatch the notes to be played... but not clear your sound card buffer....
anyway: you should implement it in daemon threads. This way you can control the thread suspend, stop, restart, etc.
use Thread.sleep(milliseconds);

Similar Messages

  • We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    Anyone any ideas to help please?

  • How can I implement this database?

    Okay, so if you are working with a company who owns more than 10 apartment complexes and they have asked you to build a database.
    So if I want to implement this database.
    What database software package should I use (SQL Enterprise or SQL Data Center) (do not know the difference between the two) or is there any other SQL version that can be used/considered
    Also what else would I have to build or buy? What combination of things do I need?
    What hardware is needed at each apartment complex?
    I was told that something off the shelf will not give me everything I need.

    Please do not duplicate posts. You already posted it here
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5dfc3897-3ffb-490b-8e60-e775b43d3303/how-can-i-implement-this-database?forum=sqlgetstarted
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • How can I implement This? - Via Multiple Threads

    Hi Friends,
    I m getting a list of 4000 emails in an ArrayList. Now I want to put 300 addresses in a mail at a time, and Want to create a new Thread and Send a Mail.
    I want to run 20 threads at a time to do so, Means Each thread is taking 300 addresses from array assigning it to Message and send it. After Sending it should return to ThreadPool.
    Also the 300 addresses should be removed from arraylist.
    Here are code snippet, i m using..
    MailBean.java - A bean which have all the MailProperty and Send Method.
    MailSender.java - It implements Runnable Interface, In its constructor A MailBean Object is Created and in run method it is sending the Mail.
    FileReader.java - It extends ArrayList, it takes a fileName, parse the Emails add email.
    Main.java - Here i want to send mails using ExecutorService class of java.util.concurrent.
    Mailer.java (Main Class)
    public class Mailer {     
         private final FileReader toEmails;
         private ArrayCollection<String> emails ;
         public Mailer(String addressFile){          
              toEmails = new FileCollection(addressFile);
              emails = new ArrayCollection<String>();
                          Here I want to read the 300 emails from toEmails append it in a String and add it to emails ArrayCollection.
        public static void main(String[] args) {
            try{
                 BlockingQueue<Runnable> queue = new ArrayBlockingQueue<Runnable>(200);
                 Executor e = new ThreadPoolExecutor(50, 50, 1, TimeUnit.SECONDS, queue);
                    if (args.length != 1) {
                         System.err.println("Usage: java ExecutorExample address_file" );
                         System.exit(1);
                  Mailer mailer = new Mailer(args[0]);
                  MailBean bean = new MailBean();
                  bean.setSubject("Mail Bean Test");
                  bean.setMessage("Hi This is a Test Message, Please Ignore this Message");
               /*  I want to run the send mails to all the emails (300 emails per String.) with the Exceutor.
                   Can somebody tell, I want a new object of MailSender for each mail
                   and sendmails
                 System.out.println("Creating workers");
                 for(int i = 0; i < 20; i++)
                     e.execute(new MailSender(bean));
                 System.out.println("Done creating workers");
            }catch(Exception ex){
                 ex.printStackTrace();
    } Can Somebody give me hint, How can we do it?

    The problem is the sound buffer. You may stop the method which dispatch the notes to be played... but not clear your sound card buffer....
    anyway: you should implement it in daemon threads. This way you can control the thread suspend, stop, restart, etc.
    use Thread.sleep(milliseconds);

  • How can I implement this with CWGraph control?

    Who can help me,i meet a difficult problem:
    Now i have a form(historygraph.frm), four DTPicker controls(DTPicker1,DTPicker2,DTPicker3,DTPicker4), and three command control(cmdFind,cmdNextPage,cmdPreviousPage).
    My database is SQL SERVER 2000,
    In my table(mytable),I have two fields:
    (1)savetime(datetime) (2)value(integer)
    So DTPicker1 and DTPicker2 stand for the time that I want begin to find in the database table savetime field. DTPicker3 and DTPicker4 stand for the time that I want end to find in the database table savetime field.
    DTPicker1.Format = dtpShortDate
    DTPicker2.Format = dtpTime
    DTPicker3.Format = dtpShortDate
    DTPicker4.Format = dtpTime
    When the user select the time query range.(from begin time to end time)
    and press the command(cmdFind),I need these data value to display with the CWGraph control.Meanwhile,I must display the data savetime on X Axes,and the data value on Y Axes.
    Because the amounts of data is very large,So I must display the Graph on limited amount,When the chartlength is full,user can press the Next Page command,also user can press the Previous Page command to look the last page data chart. The whole interval of the pages can set 1 hour or 3 hour and so on.
    For Example:
    data1 savetime:09:00:03,data1 value:1000
    data2 savetime:09:00:08,data2 value:1020
    data3 savetime:09:00:20,data3 value:2000
    On the X Axes,display in order: 09:00:03 09:00:08 09:00:20 ...
    I have complete the code that get the savetime and value when user select the datetime query range,But I can't display it with chart,and implement the function as I describe above.
    Who can give me help ,how to use CWGraph control,How to set it,I have see the sample but can not solute this problem.
    Please Help me,otherwhise My boss will ......
    Thanks.

    Okay, first you will want to use the PlotXvsY method of CWGraph. This method plots a 1D or 2D array of Y data against a 1D array of X data.
    Place a CWGraph on your form. By default its name will be CWGraph1. You can change the format X axis by right-clicking on the graph and selecting Properties. On the Format tab, you will see that time is one of the Built-in format styles. Select the appropriate format string and press Apply. Anywhere you want the graph to plot your data you can place the command:
    CWGraph1.PlotXvsY savetime, value
    To view help on this method, you can type in the above command, place the cursor somewhere in the method call and press F1.
    Now, in terms of displaying only part of the data, I recommend deciding the maximum number of data points you want displayed at a time. You can then create arrays of the desired subsets of times and values to display, and use these subsets in your call to PlotXvsY. If you create a Sub with arguments for selecting the subsets of data, the Sub could be called from the callbacks of your command buttons.
    Regards,
    Eric

  • How can I implement this logic

    Hi,
    I have 3 input parameters. One is a random value .
    Inside a loop I read this random value . bsed on this value I would like to select between the other parameters.Let me use an example.
    X is the random value. Y and Z are the other 2 parameters. 
    1- In the first iteration if X is greater than previous X , I would like to show the value of Z
    2- In the second iteration If X< greater than preious X then I would like to keep showing Z if not I show Y
    3-  ( lets say we are showing y) In the 3rd iteration If X< greater than preious X then I would like to keep showing Y if not I show Z
    So as said the value of X is used to toggle between Z and Y so when the condition is met we keep showing y or Z if not we show the other parameter.
    Could you please help me to implement this logic in LV
    Thanks

    You only need a shift regsiter with a single output, your solution seems a bit convoluted.
    Anyway, if you want to switch whenever the comparison is false, here's what you would do. Modify as needed.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Switch ValueMOD.vi ‏10 KB

  • HELP... How can i implement this into my code

    Hello :) I'm writing a simple game here is the code now all it does right now is it writes out the values of the cards on the screen in an applet however I want it to display card images from http://www.waste.org/~oxymoron/cards
    i can't get it to use the string values and give me the card images instead of simple text... please help a woman in trouble ;O) thank you
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    //import java.applet.*;
    ///import java.util.*;
    public class HighLowGUI extends JApplet {
       public void init() {
             // The init() method lays out the applet.
             // A HighLowCanvas occupies the CENTER position of the layout.
             // On the bottom is a panel that holds three buttons.  The
             // HighLowCanvas object listens for ActionEvents from the
             // buttons and does all the real work of the program.
          setBackground( new Color(130,50,40) );
          HighLowCanvas board = new HighLowCanvas();
          getContentPane().add(board, BorderLayout.CENTER);
          JPanel buttonPanel = new JPanel();
          buttonPanel.setBackground( new Color(220,200,180) );
          getContentPane().add(buttonPanel, BorderLayout.SOUTH);
          JButton higher = new JButton( "Deal" );
          higher.addActionListener(board);
          buttonPanel.add(higher);
          JButton newGame = new JButton( "New Game" );
          newGame.addActionListener(board);
          buttonPanel.add(newGame);
       }  // end init()
       class HighLowCanvas extends JPanel implements ActionListener {
            // A nested class that displays the cards and does all the work
             // of keeping track of the state and responding to user events.
          Deck deck;       // A deck of cards to be used in the game.
          Hand hand;       // The cards that have been dealt.
          String message;  // A message drawn on the canvas, which changes
                           //    to reflect the state of the game.
          boolean gameInProgress;  // Set to true when a game begins and to false
                                   //   when the game ends.
          Font bigFont;      // Font that will be used to display the message.
          Font smallFont;    // Font that will be used to draw the cards.
          HighLowCanvas() {
                // Constructor.  Creates sets the foreground and
                // background colors, and starts the first game.
          setBackground( new Color(0,120,0) );
             setForeground( Color.yellow);
                     //  smallFont = new Font("SansSerif", Font.PLAIN, 12);
                      // bigFont = new Font("Serif", Font.BOLD, 14);
            doNewGame();
          } // end constructor
          public void actionPerformed(ActionEvent evt) {
                 // Respond when the user clicks on a button by calling
                 // the appropriate procedure.  Note that the canvas is
                 // registered as a listener in applet's init() method.
             String command = evt.getActionCommand();
             if (command.equals("Deal"))
                doDeal();
             else if (command.equals("New Game"))
                doNewGame();
          } // end actionPerformed()
          void doDeal() {
                   // Called by actionPerformmed() when user clicks "Higher" button.
                   // Check the user's prediction.  Game ends if user guessed
                   // wrong or if the user has made three correct predictions.
             if (gameInProgress == false) {
                   // If the game has ended, it was an error to click "Higher",
                   // So set up an error message and abort processing.
                message = "Click \"New Game\" to start a new game!";
                repaint();
                return;
             hand.addCard( deck.dealCard() );     // Deal a card to the hand.
             int cardCt = hand.getCardCount();
             Card thisCard = hand.getCard( cardCt - 1 );  // Card just dealt.
             Card prevCard = hand.getCard( cardCt - 2 );  // The previous card.
             if ( thisCard.getValue() < prevCard.getValue() ) {
                gameInProgress = false;
                message = "Too bad! You lose.";
             else if ( thisCard.getValue() == prevCard.getValue() ) {
                gameInProgress = false;
                message = "Too bad!  You lose"; // on ties
             else if ( cardCt == 4) {    //CHANGED+++++++++++++++++=
                gameInProgress = false;
               message = "You win! Hurra! ";
             else {
                message = "Got it right!  Try for " + cardCt + " Press  -Deal- ";
             repaint();
          } // end
          void doNewGame() {
                 // Called by the constructor, and called by actionPerformed() if
                 // the use clicks the "New Game" button.  Start a new game.
             if (gameInProgress) {
                     // If the current game is not over, it is an error to try
                     // to start a new game.
                message = "You still have to finish this game! Press   -Deal-";
                repaint();
                return;
             deck = new Deck();   // Create the deck and hand to use for this game.
             hand = new Hand();
             deck.shuffle();
             hand.addCard( deck.dealCard() );  // Deal the first card into the hand.
             message = "Deal your cards";
             gameInProgress = true;
             repaint();
          } // end doNewGame()
          public void paintComponent(Graphics g) {
                // This method draws the message at the bottom of the
                // canvas, and it draws all of the dealt cards spread out
                // across the canvas.  If the game is in progress, an
                // extra card is dealt representing the card to be dealt next.
             super.paintComponent(g);
                  g.setFont(bigFont);
                  g.drawString(message,10,135);
                  g.setFont(smallFont);
             int cardCt = hand.getCardCount();
                  for (int i = 0; i < cardCt; i++)
                        drawCard(g, hand.getCard(i), 10 + i * 90, 10);
             if (gameInProgress)
                drawCard(g, null, 10 + cardCt * 90, 10);
          } // end paintComponent()
          void drawCard(Graphics g, Card card, int x, int y) {
                  // Draws a card as a 80 by 100 rectangle with
                  // upper left corner at (x,y).  The card is drawn
                  // in the graphics context g.  If card is null, then
                  // a face-down card is drawn.  (The cards are
                  // rather primitive.)
             if (card == null) {      // Draw a face-down card
                g.setColor(Color.blue);
                g.fillRect(x,y,80,100);
                g.setColor(Color.white);
                g.drawRect(x+3,y+3,73,93);
                g.drawRect(x+4,y+4,71,91);
             else {
                g.setColor(Color.white);
                g.fillRect(x,y,80,100);
                g.setColor(Color.gray);
                g.drawRect(x,y,79,99);
                g.drawRect(x+1,y+1,77,97);
             if (card.getSuit() == Card.DIAMONDS || card.getSuit() == Card.HEARTS)
                g.setColor(Color.red);
             else
                g.setColor(Color.black);
                g.drawString(card.getValueAsString(), x + 10, y + 30);
                g.drawString("of", x+ 10, y + 50);
                g.drawString(card.getSuitAsString(), x + 10, y + 70);
          } // end drawCard()
       } // end nested class HighLowCanvas
    } // end class HighLowGUI
       An object of class card represents one of the 52 cards in a
       standard deck of playing cards.  Each card has a suit and
       a value.
    public class Card {
        public final static int SPADES = 0,       // Codes for the 4 suits.
                                HEARTS = 1,
                                DIAMONDS = 2,
                                CLUBS = 3;
        public final static int ACE = 1,          // Codes for the non-numeric cards.
                                JACK = 11,        //   Cards 2 through 10 have their
                                QUEEN = 12,       //   numerical values for their codes.
                                KING = 13;
        private final int suit;   // The suit of this card, one of the constants
                                  //    SPADES, HEARTS, DIAMONDS, CLUBS.
        private final int value;  // The value of this card, from 1 to 11.
        public Card(int theValue, int theSuit) {
                // Construct a card with the specified value and suit.
                // Value must be between 1 and 13.  Suit must be between
                // 0 and 3.  If the parameters are outside these ranges,
                // the constructed card object will be invalid.
            value = theValue;
            suit = theSuit;
        public int getSuit() {
                // Return the int that codes for this card's suit.
            return suit;
        public int getValue() {
                // Return the int that codes for this card's value.
            return value;
        public String getSuitAsString() {
                // Return a String representing the card's suit.
                // (If the card's suit is invalid, "??" is returned.)
            switch ( suit ) {
               case SPADES:   return "Spades";
               case HEARTS:   return "Hearts";
               case DIAMONDS: return "Diamonds";
               case CLUBS:    return "Clubs";
               default:       return "??";
        public String getValueAsString() {
                // Return a String representing the card's value.
                // If the card's value is invalid, "??" is returned.
            switch ( value ) {
               case 1:   return "A";
               case 2:   return "2";
               case 3:   return "3";
               case 4:   return "4";
               case 5:   return "5";
               case 6:   return "6";
               case 7:   return "7";
               case 8:   return "8";
               case 9:   return "9";
               case 10:  return "10";
               case 11:  return "J";
               case 12:  return "Q";
               case 13:  return "K";
               default:  return "??";
        public String toString() {
               // Return a String representation of this card, such as
               // "10 of Hearts" or "Queen of Spades".
            return getValueAsString() + " of " + getSuitAsString();
    } // end class Card
        An object of type Deck represents an ordinary deck of 52 playing cards.
        The deck can be shuffled, and cards can be dealt from the deck.
    public class Deck {
        private Card[] deck;   // An array of 52 Cards, representing the deck.
        private int cardsUsed; // How many cards have been dealt from the deck.
        public Deck() {       // Create an unshuffled deck of cards.
           deck = new Card[52];
           int cardCt = 0;    // How many cards have been created so far.
           for ( int suit = 0; suit <= 3; suit++ ) {
              for ( int value = 1; value <= 13; value++ ) {
                 deck[cardCt] = new Card(value,suit);
                 cardCt++;
           cardsUsed = 0;
        public void shuffle() {
              // Put all the used cards back into the deck, and shuffle it into
              // a random order.
            for ( int i = 51; i > 0; i-- ) {
                int rand = (int)(Math.random()*(i+1));
                Card temp = deck;
    deck[i] = deck[rand];
    deck[rand] = temp;
    cardsUsed = 0;
    public int cardsLeft() {
    // As cards are dealt from the deck, the number of cards left
    // decreases. This function returns the number of cards that
    // are still left in the deck.
    return 52 - cardsUsed;
    public Card dealCard() {
    // Deals one card from the deck and returns it.
    if (cardsUsed == 52)
    shuffle();
    cardsUsed++;
    return deck[cardsUsed - 1];
    } // end class Deck
    An object of type Hand represents a hand of cards. The maximum number of
    cards in the hand can be specified in the constructor, but by default
    is 5. A utility function is provided for computing the value of the
    hand in the game of Blackjack.
    import java.util.Vector;
    public class Hand {
    private Vector hand; // The cards in the hand.
    public Hand() {
    // Create a Hand object that is initially empty.
    hand = new Vector();
    public void clear() {
    // Discard all the cards from the hand.
    hand.removeAllElements();
    public void addCard(Card c) {
    // Add the card c to the hand. c should be non-null. (If c is
    // null, nothing is added to the hand.)
    if (c != null)
    hand.addElement(c);
    public void removeCard(Card c) {
    // If the specified card is in the hand, it is removed.
    hand.removeElement(c);
    public void removeCard(int position) {
    // If the specified position is a valid position in the hand,
    // then the card in that position is removed.
    if (position >= 0 && position < hand.size())
    hand.removeElementAt(position);
    public int getCardCount() {
    // Return the number of cards in the hand.
    return hand.size();
    public Card getCard(int position) {
    // Get the card from the hand in given position, where positions
    // are numbered starting from 0. If the specified position is
    // not the position number of a card in the hand, then null
    // is returned.
    if (position >= 0 && position < hand.size())
    return (Card)hand.elementAt(position);
    else
    return null;
    public void sortBySuit() {
    // Sorts the cards in the hand so that cards of the same suit are
    // grouped together, and within a suit the cards are sorted by value.
    // Note that aces are considered to have the lowest value, 1.
    Vector newHand = new Vector();
    while (hand.size() > 0) {
    int pos = 0; // Position of minimal card.
    Card c = (Card)hand.elementAt(0); // Minumal card.
    for (int i = 1; i < hand.size(); i++) {
    Card c1 = (Card)hand.elementAt(i);
    if ( c1.getSuit() < c.getSuit() ||
    (c1.getSuit() == c.getSuit() && c1.getValue() < c.getValue()) ) {
    pos = i;
    c = c1;
    hand.removeElementAt(pos);
    newHand.addElement(c);
    hand = newHand;
    public void sortByValue() {
    // Sorts the cards in the hand so that cards of the same value are
    // grouped together. Cards with the same value are sorted by suit.
    // Note that aces are considered to have the lowest value, 1.
    Vector newHand = new Vector();
    while (hand.size() > 0) {
    int pos = 0; // Position of minimal card.
    Card c = (Card)hand.elementAt(0); // Minumal card.
    for (int i = 1; i < hand.size(); i++) {
    Card c1 = (Card)hand.elementAt(i);
    if ( c1.getValue() < c.getValue() ||
    (c1.getValue() == c.getValue() && c1.getSuit() < c.getSuit()) ) {
    pos = i;
    c = c1;
    hand.removeElementAt(pos);
    newHand.addElement(c);
    hand = newHand;

    Please don't crosspost. It cuts down on the effectiveness of responses, leads to people wasting their time answering what others have already answered, makes for difficult discussion, and is generally just annoying and bad form.

  • How can I implement this functionality for button in Captivate.

    Hello Everyone
    I want to create a button with same functionality as on mobile.
    If the button is clicked for first time it will type in "2".
    Second time "a"
    third time "b"
    fourth time "c"
    then again circles back to 2.
    Thanks in advance if anyone can point us to the right direction.
    Cheers, JagVWS

    Which version are you using? It will be less cumbersome in the latest version, because you can copy/paste decisions.
    You can have a look at this blog post, it is not cycling text containers (which will be your case) but images. The logic is the same, bit different from Rod's explanation because I'm resetting the counter to 0 after each cycle. That way you need only one user variable (I'm trying to limit work). Probably you will not want to show an extra button after the first cycle, but that is easy to skip.
    http://blog.lilybiri.com/blog-after-posterous-clickclick
    Lilybiri

  • How can i implement this formula?

    Hello i've to use labview to implement the formula in the image;
    x with i, is a particolar element of the array nx1...
    what shall i do?
    Solved!
    Go to Solution.
    Attachments:
    Immagine.JPG ‏4 KB

    I don't think you even need a FOR loop. Try this:
    Message Edited by altenbach on 05-14-2009 11:25 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    formula20.PNG ‏5 KB

  • I heard that apple upgrades recently purchased ipad 3 to 4. How can I implement this ?

    Please

    Apple have a 14 day returns period for items bought from them, though some US stores are/were apparently allowing 30 days.  If you bought it from a different store then you will need to check that store's returns policy.

  • How can I implement a comfirmation window when closing javafx application?

    hi,guys
    I'd like to add a confirmation window when user is closing my javafx application,if user click yes, I will close the application,if no ,I wouldn't close it ,how can I implement this function?
    primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){
                   @Override
                   public void handle(WindowEvent arg0) {
                        try
                             //todo
                        catch(Exception ex)
                             System.out.print(ex.getMessage()+"\r\n");
            });

    Hi. Here is an example:
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Pos;
    import javafx.stage.*;
    import javafx.scene.*;
    import javafx.scene.paint.Color;
    import javafx.scene.layout.*;
    import javafx.scene.control.*;
    public class ModalDialog {
        public ModalDialog(final Stage stg) {
         final Stage stage = new Stage();          
            //Initialize the Stage with type of modal
            stage.initModality(Modality.APPLICATION_MODAL);
            //Set the owner of the Stage
            stage.initOwner(stg);
            Group group =  new Group();
            HBox hb = new HBox();
             hb.setSpacing(20);
            hb.setAlignment(Pos.CENTER);
            Label label = new Label("You are about to close \n your application: ");
            Button no  = new Button("No");
            no.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                       stage.hide();
            Button yes  = new Button("Yes");
            yes.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                       stg.close();
             hb.getChildren().addAll(yes, no);
             VBox vb =  new VBox();
             vb.setSpacing(20);
             vb.setAlignment(Pos.CENTER);
             vb.getChildren().addAll(label,hb);
            stage.setTitle("Closing ...");
            stage.setScene(new Scene( vb, 260, 110, Color.LIGHTCYAN));       
            stage.show();
    }Test:
       import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.stage.*;
    * @author Shakir
    public class ModalTest extends Application {
         * @param args the command line arguments
        public static void main(String[] args) {
            Application.launch(ModalTest.class, args);
        @Override
        public void start(final Stage primaryStage) {
            primaryStage.setTitle("Hello World");
            Group root = new Group();
            Scene scene = new Scene(root, 300, 250, Color.LIGHTGREEN);
           primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){
                   @Override
                   public void handle(WindowEvent arg0) {
                                    arg0.consume();
                        try
                         ModalDialog md = new ModalDialog(primaryStage);
                        catch(Exception ex)
                             System.out.print(ex.getMessage()+"\r\n");
            primaryStage.setScene(scene);
            primaryStage.show();
    }

  • How can I implement an user function in a derived column of a report ?

    Hello,
    I've a report and added a derived column.
    In this column should be displayed the result of a function.
    GETANZGJMONATE ( to_date(#START_AFA#,'DD.MM.YYYY'), #ND#, :P302_GJ );
    How can I implement this?
    Thanks in advance
    Regards Ulrike

    Ulrike - I would do this in the SQL statement (there may be other ways).
    Presumably START_AFA and ND are table columns?
    Presumably you've also created the GETANZGJMONATE function?
    So, something like this should work (this also assumes that START_AFA is of a DATE type - you'll need the TO_DATE call if not):
    SELECT COL1
    , COL2
    , START_AFA
    , ND
    , GETANZGJMONATE (START_AFA, ND, :P302_GJ)
    from TABLE
    where ...
    Can't remember if you have to grant any particular execute permissions on the function ('grant execute on GETANZGJMONATE to public', for example) when you call it from SQL on a page, but you could try that if the function call fails.
    Depending on what's in :P302_GJ and what the function parameter data type is, you might need to use the '&P302_GJ.' syntax or TO_NUMBER etc.
    Hope this helps.
    Regards,
    John.

  • How do I implement this in BI Integrated Planning

    Hi All,
    I need to capture data in the following format I have data of Deliveries Qty by Plant & Material Type in DeliveredQty. The DeliveredQty is the delivqty as of a given date. I need to based on the DeliveredQty calculate the DelivQtyMonth. So if the DelivQty as of today (3rd July) is 1000 EA for 3 days in the current month. The user will provide as input the remaining working days in the month and the number of days in the month elapsed.
    I need to calculate the DelvQtyMonth as follows = DeliveredQty + DeliveredQty/DaysElapsed * DaysRemaining
    The user wants to enter the DaysElapsed and the DaysRemaining in variables.
    Then I need to display the data in the following format:
    Plant    MaterialType          DeliveredQty        DelvQtyMonth         ManualDelvQty
    All data is display only columns except for ManualDelvQty I should provide for user to input data to this column.
    I have created a realtime plan cube with plant materialtype DeliveredQty in it.
    Can you kindly share your inputs how I can implement the DelvQtyMonth based on a variable at run time and ManualDelvQty.
    How can I implement this scenario in BI Integrated Planning.
    So far all I have done is implement a real time cube for capturing the data. I have data for plant materialtype Delivqty for a given fiscal year period. How can I copy this into the plan cube from integrated planning.
    Also, how do I implement the variables for DaysElapsed and DaysRemaining for the user to input values to it.
    Your help is greatly appreciated.
    Thanks
    Karen

    Hi,
    can you look at this
    [http://help.sap.com/saphelp_nw04/helpdata/en/44/584041b02e4c0de10000000a1550b0/frameset.htm]
    Regards,
    muralidhar

  • Hi how can i implement the scenario.......plz reply asap.........

    HI folks,
    i have a typical problem in bex .
    my scenario is:i am having 2 values say 'x','y'.
    i want to implement a formula like x-y.
    if the x value is negative then i have to get the result as negative after the 'y' value get subtracted.if 'x' is positive, i have to get positive value after subtracting 'y' value.
    please let me know how can i implement this scenario in bex.
    by using a formaula or condition or anything else. please let me know clearly including the expression asap.
    Best reagards,
    ashok.

    answered

  • How can I implement my vision for my website?

    Hello, I'm having a lot of trouble reaching my goals for my website using Muse. I do love Muse, it's allowed me to lauch pozzswim.ca and get some content up which I would have never been able to do before having no coding knowledge, but it's is only about 30% as functional as I want it to be.
    My vision:
    There are 2 sections to my site which the current version of muse would make very difficult to do: a blog and a news page. I want these two things streamlined and hassle free so I can upload new content on the fly as it happens no matter where I am.
    If a user were to navigate to my /video-blog.html page what I want them to see is a neat, chronologically organized view of the blogs I've done with a breif description and a thumbnail. Clicking on the blog title/thumbnail/description will take the user to a new page with the full blog and the video from youtube I've uploaded for it plus a section for comments using livefyre and links to other blogs. There will also be a headline on my homepage with the most recent 2 or 3 blogs I've done.
    If a user were to navigate to my /news.html page they would see a well organized chronolgical view of all my news items. My news items are usually short updates and links and won't require their own pages but will need to be formatted in an easy to digest way. I would also have a headline on the homepage for the most recent news items.
    The homepage headlines should update automatically as I post things, and blog pages and news articles should be able to be created without me having to do everything manually in Muse.
    Implementation:
    I'm sure this is possible, but how can I do this and still use Muse to design my site? I know it requires a content management system, but how can I integrate one into the static content created by Muse? Options I've looked into are wordpress, joomla, and business catalyst but how do I use those with what I already have?
    I could just create a pure wordpress site, but that would mean leaving Muse and the design freedom it gives me and learning a whole new system which I wouldn't have time for. Business Catalyst I wouldn't be too thrilled about as I would have to pay 3 times the hosting cost to get their blogging features plus I would have to migrate and I like my current host.
    So how can I do this?
    Thanks for your time and support
    -Andrew

    CRM, including blogs, is currently supported on Muse, but they are working on it. Meanwhile, you can try to integrate a blog into Muse. See more information:
    http://forums.adobe.com/message/4605983#4605983
    Here is a short video explaining how to integrate a blog
    https://my.adobeconnect.com/_a295153/p6wv1sik1gq/?launcher=false&fcsContent=true&pbMode=no rmal

Maybe you are looking for

  • How to use "where" clause in modify statement

    Hi can any1 telll me is it possible to use a where clause in a modify statemetn. I want to use modify statemetn  to insert a new recoed in a database table. Regards Sabahuddin Ahmed

  • Help in pdf email

    Hi Friends, My requirement is to send my report output as email with pdf attachment. I have my data to be displayed in internal table. I need to convert this to PDF format so that I can send mail, but I am stuck up in converting the data. I have prob

  • Flash command to open up page in .html

    Hello - I have created a site with frames for a client (against my suggestion) but they wanted it anyway. It has a top frame and a bottom frame. The top frames has all the options buttons in it "home" "about us" ,etc. When the click on these I need t

  • Help:Domain name forwarding to .mac URL

    Experts - newbie here - used iweb and built my site. Forwarded my domain name to the .mac URL and everytime I try to access the domain name I get a .mac screen that says my .mac iweb site does not exist. Seemed all rather simple with point and click

  • Exception while Route Requests using un-geocoded addresses

    Hi, We are having the simple Street data with 301 NODES and 399 EDGES. We use the partition router procedure to make the PARTITION table. My query is if we are making a query for Routing Engine using un-geocoded addresses a.     What can I pass as st