OOD With multiple jFrames

Hello All,
I am writting an application which contains a nubmer of GUI classes which operate on the same data class. For example I have classes A, B, and C which extend jFrame and contain an ActionEvent which creates the next appropriate user interface class. In other words I have class A which will create object b, and class B which will create object c. Now my problem is I have a data class, Data, which after instatiate in A, will need to be accessed in B and C. Do I the data object from class to class through a constructor? Do I need to create a file and read it back when I need to manipulate the attributes or the Data class? Do I create a Data class with all the GUI classes as inner classes? What would be the best design??
Thanks,
Mike

I have more than one instance of Data, therefore a
Singelton Pattern is out. My problem with passing a
reference is the jFrame class which instaciates the
next jFrame needs to contain a reference to the Data
Class. In other words if I have user interface
classes D and E and if D does not need access to the
Data attributes, it still need to contain a reference
to the Data class if the next jFrame, E will need
access to the attributes (if it the reference is
passed via the constructor).
I'm confused. Before you said that all of the classes need the Data object, but not are you saying that one of them doesn't? I think if you want decent advice you're going to have to give us more information about what you're doing. We aren't going to be able to help if we only get an incredibly vague, and somewhat confusing description of what's going on.

Similar Messages

  • Multiple JFrames

    Hi. I have a situation where I need to display multiple JFrames. I have an application with a control panel that has the ability to launch another application (via a JButton). The only problem is, the only handle I have to that other application is another JButton, so I end up with something that looks like:
    JButton launchButton = new JButton();
    launchButton.setAction(new AbstractAction() {
        public void actionPerformed(ActionEvent e) {
            //SomeOtherApp extends JFrame
            SomeOtherApp app = new SomeOtherApp();
            app.setVisible(true); 
    });This works, but I run into all sorts of repainting problems. Since SomeOtherApp is so large, it seems to be hogging the Event-Dispatching Thread, and the app never repaints my control panel JFrame correctly. Any thoughts on how to improve this performance?
    Thanks,
    Jeff

    Only one frame ever has focus at a time and therefore only one frame ever responds to events at a time. So neither frame should be affecting the other.

  • UI Design help / Slider with multiple thumbs?

    I've got an application which is trying to set multiple bounds
    around a single value. For instance, if my value was "temperature",
    possible bounds might be cold, temperate, hot.
    I want my user to be able to assign all of those ranges.
    My first thought was to use a slider with multiple thumbs. I could
    have 0 and 100 as min and max, say, with 2 sliders. Everything
    to the left of the first slider is "cold", everything between the two
    sliders is "temperate", and everything to the right of the second
    slider is "hot.
    Of course, JSlider does not have support for multiple thumbs.
    So, I was hoping someone could either suggest a freeware/LGPL
    widget that did *or* could propose a clever redesign to obviate
    the need for one.
    In reality, my problem is more complex -- multiple values with
    varying start values, end values, and number of thresholds. I'm
    using multiple sliders right now, and it's functional, but really fugly.
    Thanks for any help you might be able to provide!
    Eric

    Have found this triple slider from Gene Vishnevsky. Needs some work to adapt to your needs :
    * TripleSlider_Test.java
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import javax.swing.*;
    public class TripleSlider_Test extends JFrame {
        public TripleSlider_Test() {
            setTitle("TripleSlider Test");
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setSize(400,300);
            setLocationRelativeTo(null);
            MyTripleSlider slider = new MyTripleSlider();
            add(slider, BorderLayout.NORTH);
        public static void main(String args[]) {
            new TripleSlider_Test().setVisible(true);
        class MyTripleSlider extends TripleSlider{
             * This method is called when the "thumb" of the slider is dragged by
             * the user. Must be overridden to give the slider some behavior.
            public void Motion(){
                // TODO add your handling code here:
    * TripleSlider
    * Description:     Slider with two thumbs that divide the bar
    *   into three parts. Relative size of each part is
    *   the value of that part, so the three values add up to 1.
    * Author: Gene Vishnevsky  Oct. 15, 1997
    * This class produces a slider with 2 thumbs that has 3 values.
    class TripleSlider extends JPanel  {
        private final static int THUMB_SIZE = 14;
        private final static int BUFFER = 2;
        private final static int TEXT_HEIGHT = 18;
        private final static int TEXT_BUFFER = 3;
        private final static int DEFAULT_WIDTH = 300; //200;
        private final static int DEFAULT_HEIGHT = 15;
        /** Array that holds colors of each of the 3 parts. */
        protected Color colors[];
        private boolean enabled=true;
        private Dimension preferredSize_;
        /* this value depends on resizing */
        protected int pixMin_, pixMax_, width_;
        private int pix1_, pix2_;               // pixel position of the thumbs
        private double values[];                    // the 3 values
        /** current font of the labels. */
        protected Font font;
         * Enables/disables the slider.
        public void setEnabled( boolean flag ) {
            enabled = flag;
         * Constructs and initializes the slider.
        public TripleSlider() {
            values = new double[3];
            colors = new Color[3];
            preferredSize_ = new Dimension( DEFAULT_WIDTH,
                    DEFAULT_HEIGHT + TEXT_HEIGHT + TEXT_BUFFER );
            font = new Font("TimesRoman", Font.PLAIN, 12);
            pixMax_ = DEFAULT_WIDTH - THUMB_SIZE - 1;
            pixMax_ = DEFAULT_WIDTH - THUMB_SIZE - 1;
            width_ = DEFAULT_WIDTH;
            resize( width_, DEFAULT_HEIGHT + TEXT_HEIGHT /*�+ TEXT_BUFFER*/ );
            setValues( 0.33333, 0.33333 );
            setColor( 0, Color.blue );
            setColor( 1, Color.green );
            setColor( 2, Color.red );
            addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent evt) {
                    mouseDown(evt);
            addMouseMotionListener(new MouseMotionAdapter() {
                public void mouseDragged(MouseEvent evt) {
                    mouseDrag(evt);
         * Sets color of a part.
        public void setColor( int part, Color color ) {
            colors[part] = color;
         * Returns color of a part.
         * @return current part's color.
        public Color getColor( int part ) {
            return colors[part];
         * This method is called by the runtime when the slider is resized.
        public void reshape( int x, int y, int width, int height ) {
            // setBounds() is not called.
            super.reshape(x, y, width, height);
            width_ = width;
            pixMin_ = THUMB_SIZE;
            pixMax_ = width - THUMB_SIZE - 1;
            // recompute new thumbs pixels (for the same values)
            setValues( values[0], values[1], values[2] );
            repaint();
        private void setValues( double a, double b, double c ) {
            // we know the values are valid
            values[0] = a;
            values[1] = b;
            values[2] = c;
            double total = (double)( width_ - THUMB_SIZE * 4 ); // sum
            pix1_ = (int)(a * total) + THUMB_SIZE;
            pix2_ = (int)(b * total) + pix1_ + THUMB_SIZE * 2;
         * Sets new values of the slider.
         * is 1 - a - b.
        public void setValues( double a, double b ) {
            double sum_ab = a + b;
            if( sum_ab > 1. || sum_ab < 0. ) {
                /* invalid input: should throw exception */
                System.out.println("invalid input");
                return;
            /* call this private method */
            setValues( a, b, 1 - sum_ab );
            repaint();
        private void updateValues() {
            double total = (double)( width_ - THUMB_SIZE * 4 ); // sum
            int a = pix1_ - THUMB_SIZE;
            int b = pix2_ - pix1_ - THUMB_SIZE * 2;
            int c = width_ - (pix2_ + THUMB_SIZE);
            values[0] = (double)a / total;
            values[1] = (double)b / total;
            values[2] = (double)c / total;
         * Returns value for a part.
         * @return value for the part.
        public double getValue( int part ) {
            return values[part];
         * This method is called when the "thumb" of the slider is dragged by
         * the user. Must be overridden to give the slider some behavior.
        public void Motion() {
         * Paints the whole slider and labels.
        public void paint( Graphics g ) {
            int width = size().width;
            int height = size().height;
            g.setColor( Color.lightGray );          // bground
            g.fillRect( 0, 0, width, TEXT_HEIGHT );
            g.setColor( colors[0] );
            g.fillRect( 0, TEXT_HEIGHT,
                    pix1_ - THUMB_SIZE, height - TEXT_HEIGHT );
            g.setColor( colors[1] );
            g.fillRect( pix1_ + THUMB_SIZE, TEXT_HEIGHT,
                    pix2_ - pix1_ - THUMB_SIZE * 2, height - TEXT_HEIGHT );
            g.setColor( colors[2] );
            g.fillRect( pix2_ + THUMB_SIZE, TEXT_HEIGHT,
                    width_ - pix2_ - THUMB_SIZE, height - TEXT_HEIGHT );
            /* draw two thumbs */
            g.setColor( Color.lightGray );
            g.fill3DRect( pix1_ - THUMB_SIZE, TEXT_HEIGHT /*+ BUFFER*/,
                    THUMB_SIZE * 2 + 1, height /*- 2 * BUFFER*/ - TEXT_HEIGHT,
                    true);
            g.fill3DRect( pix2_ - THUMB_SIZE, TEXT_HEIGHT /*+ BUFFER*/,
                    THUMB_SIZE * 2 + 1, height /*- 2 * BUFFER*/ - TEXT_HEIGHT,
                    true);
            g.setColor( Color.black );
            g.drawLine(pix1_, TEXT_HEIGHT + BUFFER + 1,
                    pix1_, height - 2 * BUFFER);
            g.drawLine(pix2_, TEXT_HEIGHT + BUFFER + 1,
                    pix2_, height - 2 * BUFFER);
            g.setFont(font);
            // center each value in the middle
            String str = render( getValue(0) );
            g.drawString(str,
                    pix1_ / 2 - (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
            str = render( getValue(1) );
            g.drawString(str,
                    (pix2_ - pix1_ ) / 2 + pix1_ -
                    (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
            str = render( getValue(2) );
            g.drawString(str,
                    (width_ - pix2_ ) / 2 + pix2_ -
                    (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
        private String render(double value){
            DecimalFormat myF = new DecimalFormat("###,###,###.#");
            return myF.format(value);
         * An internal method used to handle mouse down events.
        private void mouseDown(MouseEvent e) {
            if( enabled ) {
                HandleMouse((int)e.getPoint().getX());
                Motion();
         * An internal method used to handle mouse drag events.
        private void mouseDrag(MouseEvent e) {
            if( enabled ) {
                HandleMouse((int)e.getPoint().getX());
                Motion();
         * Does all the recalculations related to user interaction with
         * the slider.
        protected void HandleMouse(int x) {
            boolean leftControl = false;
            int left = pix1_, right = pix2_;
            int xmin = THUMB_SIZE;
            int xmax = width_ - THUMB_SIZE;
            // Which thumb is closer?
            if( x < (pix1_ + (pix2_ - pix1_) / 2 ) ) {
                leftControl = true;
                left = x;
            } else {
                right = x;
            /* verify boundaries and reconcile */
            if( leftControl ) {
                if( left < xmin ) {
                    left = xmin;
                } else if( left > (xmax - THUMB_SIZE*2) ) {
                    left = xmax - THUMB_SIZE*2;
                } else {
                    if( left > (right - THUMB_SIZE * 2) && right < xmax ) {
                        // push right
                        right = left + THUMB_SIZE * 2;
            } else {
                // right control
                if( right > xmax ) {
                    right = xmax;
                } else if( right < (xmin + THUMB_SIZE*2) ) {
                    right = xmin + THUMB_SIZE*2;
                } else {
                    if( right < (left + THUMB_SIZE * 2) && left > xmin ) {
                        // push left
                        left = right - THUMB_SIZE * 2;
            pix1_ = left;
            pix2_ = right;
            updateValues();
            repaint();
         * Overrides the default update(Graphics) method
         * in order not to clear screen to avoid flicker.
        public void update( Graphics g ) {
            paint( g );
         * Overrides the default preferredSize() method.
         * @return new Dimension
        public Dimension preferredSize() {
            return preferredSize_;
         * Overrides the default minimumSize() method.
         * @return new Dimension
        public Dimension minimumSize() {
            return preferredSize_;
    }

  • Multiple jFrames in Application

    Hello,
    I am having problems finding documentation or an example on how to make multiple jFrames work.
    In my application I have my main jFrame and would like something very simple to where the user can open a second jFrame while the main jFrame is still visible (the second jFrame would have focus) the user can use the functionality of the second jFrame and then close it returning the focus back to the main jFrame.
    Can you point me into the right direction for doing this?
    Thanks,
    Tim

    Your question is too general. There are many ways to do this. First, what action do you want the user to take to open the second JFrame. Select a menu item? Click a button? Enter a value into a text input field? <continueAdNauseum/>
    Secondly, does the second JFrame prevent your user from continuing to work in the first JFrame. Then, Encephalopathic is correct ... JDialog is a top level container that can block input from other top level containers and their contents (using the [Modality API|http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/modality/]). A JFrame is another top level container, and you can open as many as you like.
    It's always good to start with the [Java Tutorial|http://java.sun.com/docs/books/tutorial/]. Pay special attention to the [Swing Tutorial|http://java.sun.com/docs/books/tutorial/ui/index.html] . It may seem like a lot to wade through, but you will learn alot. Then, as specific questions come up. you can ask them here.
    ¦ {Þ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • JTable with Multiple Row Header

    well, Im do an application thats need formated ISOS Sheets, and most of them have a Table with Multiple Row Header , and Groupable Header, and both of them. I have the .java and in the class MultipleRowHeaderExample calls a class AttributiveCellTableModel for setColumnIdentifiers() and setDataVector() the cue is why this print stack :
    Exception in thread "main" java.lang.StackOverflowError
         at java.util.Vector.<init>(Unknown Source)
         at java.util.Vector.<init>(Unknown Source)
         at jp.gr.java_conf.tame.swing.table.AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:54)
         at javax.swing.table.DefaultTableModel.setColumnIdentifiers(Unknown Source)
         at jp.gr.java_conf.tame.swing.table.AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:55)
         at javax.swing.table.DefaultTableModel.setColumnIdentifiers(Unknown Source)
         at jp.gr.java_conf.tame.swing.table.AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:55)
         at javax.swing.table.DefaultTableModel.setColumnIdentifiers(Unknown Source)
         at jp.gr.java_conf.tame.swing.table.AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:55)
         at javax.swing.table.DefaultTableModel.setColumnIdentifiers(Unknown Source)
         at jp.gr.java_conf.tame.swing.table.AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:55)
         at javax.swing.table.DefaultTableModel.setColumnIdentifiers(Unknown Source)
         at jp.gr.java_conf.tame.swing.table.AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:55)
         at javax.swing.table.DefaultTableModel.setColumnIdentifiers(Unknown Source)
         at jp.gr.java_conf.tame.swing.table.AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:55)
         at javax.swing.table.DefaultTableModel.setColumnIdentifiers(Unknown Source)
    .if in main class, have initialized the data, and column vars
    public class MultipleRowHeaderExample extends JFrame {
      Object[][] data;
      Object[] column;
      JTable table;
      MultiSpanCellTable fixedTable;
      public MultipleRowHeaderExample() {
        super( "Multiple Row Header Example" );
        setSize( 400, 150 );
        data =  new Object[][]{
            {"SNo."    ,"" },
            {"Name"    ,"1"},
            {""        ,"2"},
            {"Language","1"},
            {""        ,"2"},
            {""        ,"3"}};
        column = new Object[]{"",""};
        AttributiveCellTableModel fixedModel = new AttributiveCellTableModel(data, column) {
          public boolean CellEditable(int row, int col) {
            return false;
        };

    What's the code in AttributiveCellTableModel?
    * (swing1.1beta3)
    package jp.gr.java_conf.tame.swing.table;
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    * @version 1.0 11/22/98
    public class AttributiveCellTableModel extends DefaultTableModel {
      protected CellAttribute cellAtt;
      public AttributiveCellTableModel() {
        this((Vector)null, 0);
      public AttributiveCellTableModel(int numRows, int numColumns) {
        Vector names = new Vector(numColumns);
        names.setSize(numColumns);
        setColumnIdentifiers(names);
        dataVector = new Vector();
        setNumRows(numRows);
        cellAtt = new DefaultCellAttribute(numRows,numColumns);
      public AttributiveCellTableModel(Vector columnNames, int numRows) {
        setColumnIdentifiers(columnNames);
        dataVector = new Vector();
        setNumRows(numRows);
        cellAtt = new DefaultCellAttribute(numRows,columnNames.size());
      public AttributiveCellTableModel(Object[] columnNames, int numRows) {
        this(convertToVector(columnNames), numRows);
      public AttributiveCellTableModel(Vector data, Vector columnNames) {
        setDataVector(data, columnNames);
      public AttributiveCellTableModel(Object[][] data, Object[] columnNames) {
        setDataVector(data, columnNames);
      public void setDataVector(Vector newData, Vector columnNames) {
        if (newData == null)
          throw new IllegalArgumentException("setDataVector() - Null parameter");
        dataVector = new Vector();
        setColumnIdentifiers(columnNames);
        dataVector = newData;
        cellAtt = new DefaultCellAttribute(dataVector.size(),
                                           columnIdentifiers.size());
        newRowsAdded(new TableModelEvent(this, 0, getRowCount()-1,
               TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
      @Override
      public void setColumnIdentifiers(Vector arg0) {
              // TODO Auto-generated method stub
              super.setColumnIdentifiers(arg0);
      public void addColumn(Object columnName, Vector columnData) {
        if (columnName == null)
          throw new IllegalArgumentException("addColumn() - null parameter");
        columnIdentifiers.addElement(columnName);
        int index = 0;
        Enumeration enumeration = dataVector.elements();
        while (enumeration.hasMoreElements()) {
          Object value;
          if ((columnData != null) && (index < columnData.size()))
           value = columnData.elementAt(index);
          else
         value = null;
          ((Vector)enumeration.nextElement()).addElement(value);
          index++;
        cellAtt.addColumn();
        fireTableStructureChanged();
      public void addRow(Vector rowData) {
        Vector newData = null;
        if (rowData == null) {
          newData = new Vector(getColumnCount());
        else {
          rowData.setSize(getColumnCount());
        dataVector.addElement(newData);
        cellAtt.addRow();
        newRowsAdded(new TableModelEvent(this, getRowCount()-1, getRowCount()-1,
           TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
      public void insertRow(int row, Vector rowData) {
        if (rowData == null) {
          rowData = new Vector(getColumnCount());
        else {
          rowData.setSize(getColumnCount());
        dataVector.insertElementAt(rowData, row);
        cellAtt.insertRow(row);
        newRowsAdded(new TableModelEvent(this, row, row,
           TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
      public CellAttribute getCellAttribute() {
        return cellAtt;
      public void setCellAttribute(CellAttribute newCellAtt) {
        int numColumns = getColumnCount();
        int numRows    = getRowCount();
        if ((newCellAtt.getSize().width  != numColumns) ||
            (newCellAtt.getSize().height != numRows)) {
          newCellAtt.setSize(new Dimension(numRows, numColumns));
        cellAtt = newCellAtt;
        fireTableDataChanged();
      public void changeCellAttribute(int row, int column, Object command) {
        cellAtt.changeAttribute(row, column, command);
      public void changeCellAttribute(int[] rows, int[] columns, Object command) {
        cellAtt.changeAttribute(rows, columns, command);
    }that's it

  • How can a family with multiple existing accounts use Home Sharing?

    I'd like to use the new Home Sharing feature, but it appears to be restricted to families in which all of the family members share a single user account.
    We already have separate accounts for each family member. Is there some way for us to use Home Sharing without abandoning most of our existing accounts, along with all of the purchases made by those accounts? I don't think anyone in this situation would be willing to do that.

    Eh. I am not too sure since I have not messed with it much but I do have a great deal of experience with multiple accounts. Each computer can be authorized for multiple accounts. As can iPods. iPods can sync songs/videos/apps from multiple accounts as long as the computer is authorized with them. What I have set up here, is I buy my stuff I want, my parents buy what they want and so do my brothers. When my bro gets something I want I just move it to my computer. That way all our accounts are separate, but if there is something I want I can get it. Also, since the music no longer has DRM, it won't matter. It will play on any computer. What you should see is if you can just do the shared library with multiple accounts. Then if you don't have videos or such, you can get apps or music. Hope this helps!

  • How do I use your iPhone with multiple iTunes libraries

    Hi, I have my music spread out between 3 seperate Itunes libraries on 3 different profiles on my computer. I have the newest generation Ipod Nano, Ipod Shuffle, and Iphone 4s. My Ipod's are both full, so I've decided to start putting music onto my phone. With my Ipod's, I can plug them into one profile on the computer, download the music on the Itunes library that exists on that profile, then do the same with the other profiles with no issue. However when I try to do this with my phone, It asks me to erase the music I have gotten from one Itunes library and sync with the current library, as soon as I plug it in to a different Itunes on one of the other profiles. I have my Iphone configured with the Manually manage music option, and I still haven't found a way to use my Iphone with multiple music libraries. PLEASE HELP

    http://support.apple.com/kb/PH12113 - If you use manual syncing, you can sync items from more than one iTunes library to your iPod. (You can sync iPod touch, iPhone, and iPad with only one iTunes library.)
    http://support.apple.com/kb/HT1202 - When manually managing content, you can add content from multiple libraries to your iPod or iPad. Even when manually managing music, some content may be available from only one library at time. This includes all content on iPhone and video content on iPod and iPad.
    They seem inconsistent as far as the iPad is concerned but in both articles the iPhone appears to only be able to sync to one library at a time.
    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • How to share account with multiple devices?

    3 kids with 3 devices - an iPod Touch and two iPads Mini - family shares one account with Apple/iTunes and one library on our family PC.  They use FACETIME and MESSAGES with their friends, and they all see each others messages and conversations.  How do I fix this?  Is there a setting or a way to create sub-accounts off the family account so they can still share the main library for music and video OR do I have to create separate Apple/iTunes accounts for each kid?  Is there a setting on their devices that can help?  Any help is greatly appreciated.  I'm not even sure the right question to ask...

    How to use multiple iPods, iPads, or iPhones with one computer
    http://support.apple.com/kb/HT1495
    How to Share a Family iPad
    http://www.macworld.com/article/1163347/how_to_share_a_family_ipad.html
    Using iPhone, iPad, or iPod with multiple computers
    http://support.apple.com/kb/ht1202
    iOS & iCloud Tips: Sharing an Apple ID With Your Family
    http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/
    How To Best Use and Share Apple IDs across iPhones, iPads and iPods
    http://www.nerdsonsite.com/blog/2012/06/07/help-im-appleid-confused/
     Cheers, Tom

  • How can I merge all of the new FF windows that are open into one window with multiple tabs? Safari has a merge windows feature that I like. This is really nice when conducting reasearch on multiple sites at the same time.

    When I clik on weblinks they all open into new windows making it somewhat painful to clik on window in the menu bar to go to each new page. I would rather have a feature that would allow me to merge all of those individual windows into tabs within one page.
    == This happened ==
    Every time Firefox opened

    Thank you. That worked. I was able to open 1 window with multiple tabs. Thanks cor-el!

  • How can I share only the same music with multiple iTunes accounts

    Hello
    I hope someone can help. [I am using Windows Vista (Unfortunately J) and iTunes 10]
    I am trying to share the same music library with multiple iTunes accounts. Basically, I want to know if there is a way to automatically upload to other libraries when importing new music into my library, vice versa. [Better information below]
    Me, my sister and my dad all use iTunes (on different iTunes accounts), and before now we used to have are own music on our own windows user. Due to many duplicates and a loss of hard drive space I have brought an external hard drive and organised all the music.
    It was all going well - I first populated all the music onto my iTunes, exported the library, and then imported it on both the other users. However! Because this is only a copy of the library, when I try to import a new CD, it will not show up on there’s until I “Add File to Library”! Originally I thought about using the same library however we each have are own apps etc, that we don’t want to share.
    If you need anymore information please ask!
    Matt

    Hello roaminggnome
    Unfortunately the support is down at the moment, I will have a better look later. I did go though the Apple support previously, however I found nothing that worked.
    The first thread I came across was “Home Sharing” however no mater what I did, it did not appear in the iTunes sharing list (I did go though the “Show Sharing Networks” support as well)
    Secondly, I saw “Using A Single Library With Multiple Accounts On The Same PC” (Something like that) but all this did was let us share the same music location, if I was to rip extra music, it will not show in there library
    Matt

  • How to configure one TREX host with multiple index servers ?

    Hi All,
    Does anyone know how to configure TREX on the one host,
    with multiple index servers ?
    Reason for this is to make better use of resources available on the host server(4 Gig, 4 Processor, Windows2003), to improve the search performance of
    our KM content for portal users.
    I am using TREX 7 and have not been able to do this,
    despite reading the Single and Distributed install
    documentation.
    Any help would be appreciated.
    Regards,
    Andres

    Hi Andres,
    To make use of the RAM a Server provides you have to run two indexserver processes (each can then consume 2 GB);
    Proceed like this:
    1. Go to TREXdeamon.ini; check if section [indexserver2] is there (it is already provided, but not active in standard installation)
    2. In TREXdeamon.ini go to
    [daemon]
    references sections below
    programs=nameserver,preprocessor1,indexserver1,queueserver,alertserver
    and add indexserver2 here. Restart TREX; second porcess is then started; can be checked in TREX monitor in Portal as well
    3. To distribute existing indexes to the new process, start TREXadmintool and go to Index: Landscape
    Go to the last two columns and move the indexes (move master here/secondary mouse click)
    If you don't distribute the indexes the new index server process will be regarded when an new index is created.
    Hope this helps!
    cheers
    Bettina

  • ITunes setup on a NAS with multiple windows users - how?

    iTunes setup on a NAS with multiple windows users?
    I am very confused on what is the best way to handle this setup for my friends family.  Any help would be appreciated.  Sorry in advance as I know this is a long winded post - I have a feeling this will help others faced with the same issues or questions.
    CURRENT SETUP
    I have three new Windows 7 machines networked (two desktops and one laptop) that have four users on each - as busy family with children who need the computers for homework, projects, games, etc...  The goal of this setup is that any user can log onto any computer and have there documents available to them no matter computer was free to use.  I set this up using the library function in Windows 7 and seems to work pretty well.
    I have put a Buffalo Linkstation NAS on the system as well.  This was going to serve two purposes 1)  run some backup software to protect the computers and 2) consolidate the iTunes content in one place for all users.  There is also an iPad in the home that I should would be better served by accessing the content on the NAS without requiring any of the computers being on.  Dave is thinking about getting some other playback devices like Apple TV so thought a NAS would be a good way to go.
    CURRENT ITUNES SETUP - I have created a new iTunes library on the NAS by holding the SHIFT button down while starting iTunes and pointed to that folder on a Share on the NAS.  There was no music on the system at the time as we are planning to copy this over from an OLD machine that is now not being used.  I have also authorized all the computers and turned on the home sharing feature (although I am not sure what good that does).
    This “shift” button trick seesm to also point the default directory there without point to it in the advanced setup tab of iTunes.
    I then synced one of the iPods with purchased content on it and synced that to the library after asking me to do so before an update.  All the content showed up in the library and was playable - awesome.
    I then logged into each user on each machine (yikes) and installed iTunes  and used the “shift” trick to connect each users iTunes to the database on the NAS.  Everything seems to work - but I have not tested it thoroughly.
    SUMMARY
    3 new Windwos 7 networked machines
    4 identical users on each machine
    1 TB Buffalo linkstation
    iTunes setup with the folder on a SHARE
    all user’s itunes connected to the iTunes folder on the NAS
    all computers authorized with home sharing turned on.
    one iTunes user account signed in on each machine
    multiple iPods and one iPad in the system
    QUESTIONS/CONCERNS
    Is there a better way to do this on a NAS?
    Would home sharing be better in some way?
    I understand the NAS should show up under the shared section in iTunes - I assume that would mean that would mean each user has an iTunes library on their documents?
    I have read that there may be corruption issues if users on the different machines try to access iTunes at the same time.
    Will there be any issues syncing that various iPods with?
    Ugh - sorry for the long post and all the questions.  I am just trying to find the best way to do this.  I wish Apple would put out a best practices document for setups like this.  Thanks in advance.

    This is a user to user support forum. Your fellow users can offer solutions or workarounds based on their experience with the application. If you think it should work differently drop a line to iTunes Feedback.
    For reasons unknown Apple haven't chosen to allow iTunes to be suspended in one profile and active in another. My recollection is that this applies even if each profile has a different library, although it is some time since I've committed a personal test.
    I'm not sure why my suggestion make less sense that your current approach?. As I understand it currently everybody is either signed into their own account when they can do something other than work with iTunes, or they sign into the special iTunes account where they can't access any of their other stuff. You don't have to disable fast user switching. Follow exactly the same steps, but make sure everyone closes iTunes before turning the computer over to another user. Disabling fast user switching helps to enforce that action.
    tt2

  • Using a seagate external drive with multiple macs

    i got a 1TB seagate external hard drive for backup and transfer purposes... it had a little program to help set it up and i set it up for use with mac and pc ( only onther option was stricty this computer.) it works on my computer and a pc but when i tried transfering files from another older mac i have it showed that i could only read on that computer...
    how can i get it to work with multiple macs...?

    I have the oldest macbook (1.83. 2 gigs ram, 60 gig internal hard drive)
    I have all my logic content on my external maxtor firewire 400 drive (usb 2.0 is actually faster than firewire 400) and everything is fine. the good thing is if your external drive has 7200rpm, but the ones with 5600rpm should do as well.
    Once you drag your apple loops to logic from your external drive, logic will remember for the next visit. And when you are opening a project which is on the external drive , just find it with logic finder and all should be fine.

  • Error while posting Customer with Multiple sales areas using DEBMAS05.

    Dear experts,
    We are generating IDOCS vis SAP DS for posting Customer master. The message type used is DEBMAS and basic type is DEBMAS05.  we have a requirement to create 1 customer with multiple sales areas. However, we are ending up with a strange error:  "Fill all required fields SAPMF02D 0111 ADDR1_DATA-NAME1". Despite the IDOC going into status 51, the customer gets created and the 1st sales area too. the 2nd sales area however is not created!  The IDOC data definitely contains Name1, otherwise the customer would not have been created in the first place.
    As the error message is related to the Address data, I also explored upon exploring this erorr further on the lines of Central Address management where in the ADRMAS and DEBMAS have to be passed together(IDOC Serialiization).  OSS Note (384462)  provides further details about this. One Important point from the note is: 
    "As you have to specify the logical name of the sending system among other things, SAP is not able to make any default settings in the standard systems. When you use the serialization groups delivered as a standard by SAP, the address objects are imported before the master objects.Thus the sequence address data before master objects must only be adhered to if one of the following points applies to your application:
    Such fields are set as required entry fields that are only provided by the BAS in the Customizing of the customer or vendor master.
    For your customers, contact persons exist to which a private address or a different business address is assigned.".
    This is not the case in our situation, as we do not have required entry fields in customizing that are only provided by the BAS, so the error is all the more confusing and I am not too sure what the cause is.
    If someone have experienced the same issue before and have found a solution to it, kindly help out.

    I have found the cause and solution to this problem.
    This error ”Fill all required fields SAPMF02D 0111 ADDR1_DATA-NAME1” and other similar errors like “Fill all required fields SAPMF02D 0111 ADDR1_DATA-SORT1“ which occurrs during the IDOC posting when there are more than one sales area or company code occurs when the customer number range is set up for Internal numbering. This means, that the number gets generated only at the time of save and upon debugging the IDOC, we found out that after creating the customer and the first sales area/company code record, the segment E1KNA1M is cleared completely! This is the reason, it throws an error which points to a mandatory KNA1 field as missing. (Like NAME1, SORT1 etc.)
    This was resolved by splitting the IDOC into 2.
    The solution is to First post only the KNA1 segment and create the customer.
    In the second step, pass the IDOC with all other segments along with E1KNA1M, but pass only KUNNR in E1KNA1M and the rest of the fields in E1KNA1M as “/”:  you would have got the KUNNR after the first step.
    Important note: This requirement to split the IDOCs does not occur when the customer number is known upfront. (Meaning cases where the customer number is externally generated) I also tested this and created a customer with external numbering and I was able to post more than 1 sales area with the same IDOC. 
    I noticed multiple threads with the same issue, but none of it had a concrete answer. I hope this information will be useful for anyone facing similar problems.
    Cheers
    Venkat

  • Sending mail with multiple attachment

    hi.
    i want to send mail with multiple attachment.
    i m succeed in sending multiple attachment but the second pdf is not open.
    its given error like "This file is damaged and could not be open.
    pls check my code. and
    give the solution....
    point should be assured...........
    hope all u r understand my problem..
    & tell me where is i m missing something.
    REPORT  YSDPASALE1_MAIL LINE-SIZE 110.
    data : year_month(6) type c.
    data : from_date like sy-datum,to_date like sy-datum.
    INITIALIZATION.
    year_month = sy-datum+0(6).
    CONCATENATE year_month '01' into from_date.
    to_date = sy-datum.
    ranges : temp for mkpf-budat.
    temp-low = from_date.
    temp-high = to_date.
    append temp to temp.
    DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
           jobname like TBTCJOB-JOBNAME,
           L_RELEASE(1) TYPE c.
    CONSTANTS : l_c_device(4)    VALUE 'LOCL'.
    DATA : t type i value 0.
    DATA : p_email1 like somlreci1-receiver,
            p_sender LIKE somlreci1-receiver.
    Data Declaration
    DATA: gd_recsize TYPE i,gd_recsize1 TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject  LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att1 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att2 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_desc1 TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des,
          gd_mtitle LIKE sodocchgi1-obj_descr.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    DATA: BEGIN OF mailstr OCCURS 0,
            p_email like somlreci1-receiver,
          END OF mailstr.
    DATA: mailtab like STANDARD TABLE OF mailstr WITH HEADER LINE.
    DATA: ypp18tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ymis008tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ysd15tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ymis10tab like STANDARD TABLE OF mailstr WITH HEADER LINE.
    SUBMIT YSDPASALE1 with bdt in temp
                           to sap-spool
                          with line-size = '255'
                           with KEEP_IN_SPOOL = 'X'
                           with IMMEDIATELY = ' '
                           WITHOUT SPOOL DYNPRO
                           AND RETURN
       NEW-PAGE PRINT ON
       DESTINATION l_c_device
       IMMEDIATELY ' '
       KEEP IN SPOOL 'X'
       NEW LIST IDENTIFICATION 'X'
       NO DIALOG.
       new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf.
        select yemail as p_email into CORRESPONDING FIELDS OF TABLE ymis008tab
          from ymail
          where ytcode = 'YMIS008'.
    ELSE.
       SKIP.
       WRITE:/ 'Program must be executed in background in-order for spool & mail sending',
               'request to be created.'.
      ENDIF.
    wait up to 3 seconds.
      submit YSD_MONTHLY_SALES
                                USING SELECTION-SET 'MAIL'
                                to sap-spool
                               with KEEP_IN_SPOOL = 'X'
                               with IMMEDIATELY = ' ' "SPACE
                               WITHOUT SPOOL DYNPRO
                               AND RETURN
       NEW-PAGE PRINT ON
       DESTINATION l_c_device
       IMMEDIATELY ' '
       KEEP IN SPOOL 'X'
       NEW LIST IDENTIFICATION 'X'
       NO DIALOG.
       new-page print off.
        IF sy-batch EQ 'X'.
        gd_attachment_desc1  = 'YMIS10'.
        gd_mtitle = 'Monthly Sales Report'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf1.
       loop at it_mess_att.
        move it_mess_att1 to it_mess_att.
        APPEND it_mess_att.
       endloop.
       APPEND LINES OF it_mess_att1 to it_mess_att.
       free it_mess_att1.
        it_mess_att[] = it_mess_att1[].
        insert LINES OF it_mess_att1 into it_mess_att.
        APPEND LINES OF it_mess_att2 to it_mess_att .
         insert LINES OF it_mess_att1 into it_mess_att.
         insert LINES OF it_mess_att2 into it_mess_att.
       loop at ymis008tab into mailstr.
         p_email1 = mailstr-p_email.
          p_email1 = '[email protected]'.
           PERFORM process_email.
       endloop.
           clear mailstr.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
      ELSE.
        SKIP.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
    FORM convert_spool_to_pdf1.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att1 = gd_buffer.
        APPEND it_mess_att1.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      DESCRIBE TABLE it_mess_att1 LINES gd_recsize1.
      CHECK gd_recsize > 0 or gd_recsize1 > 0.
      PERFORM send_email." USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email." USING p_email.
    CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = gd_attachment_desc1 .
    gd_attachment_desc = 'YPP18 - Daily Highlights'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Dear Sir,'.
      APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
      it_mess_bod        = ' '.
      APPEND it_mess_bod.
      it_mess_bod        = 'kindly find the attached document'.
      APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
    it_mess_bod        = 'Do not reply on this mail, It is generated from SAP'.
    APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
      it_mess_bod        = ' '.
      APPEND it_mess_bod.
      it_mess_bod        = 'Regards,'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Arpit Shah'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                          it_mess_att1
                                    using "p_email
                                          gd_mtitle
                                         'Testing mail generated from SAP'
                                         'Daily Highlights Abstract Report - YPP18'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                              it_attach1
                                        using "p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1,w_doc_data1 like sodocchgi1.
    ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data1-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    For 2nd Attachments
    * Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach1 INDEX w_cnt.
      w_doc_data-doc_size = w_doc_data1-doc_size +
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach1 ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
    APPEND LINES OF it_attach1 to t_attachment.
      t_attachment[] = it_attach1[].
    APPEND LINES OF it_attach1 to t_attachment.
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = 1.
    DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
      DESCRIBE TABLE it_attach LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  'YMIS008'."ld_attdescription.
      t_packing_list-obj_name   =  'YMIS008'."ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
      clear t_packing_list.
    for 2 attachments
      data : a type i,b type i.
       a = t_packing_list-body_num.
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = a + 1. "1
    DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
      DESCRIBE TABLE it_attach1 LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  'YMIS10'."ld_attdescription.
      t_packing_list-obj_name   =  'YMIS10'."ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    a = t_packing_list-body_num.
    clear t_packing_list.
    * Create attachment notification
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 1.
    t_packing_list-head_num   = 1.
    t_packing_list-body_start = a + 1.
    t_packing_list-body_num = t_packing_list-body_num + 1.
    DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
    t_packing_list-body_num = a + t_packing_list-body_num .
    t_packing_list-doc_type   =  ld_format.
    t_packing_list-obj_descr  =  'YMIS10'."ld_attdescription.
    t_packing_list-obj_name   =  'YMIS10'."ld_attfilename.
    t_packing_list-doc_size   =  t_packing_list-body_num * 255.
    APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
    loop at ymis008tab into mailstr.
      t_receivers-receiver = mailstr-p_email.  "ld_email.
      t_receivers-receiver = p_email1.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'. "X   "Read Acknoledgement
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
    endloop.
       CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Rgds.
    Arpit

    Hi Arpit,
    Take a look at the documentation of FM 'SO_DOCUMENT_SEND_API1' for parameter PACKING_LIST. I think you should set t_packing_list-head_num to a different value than 0 for the second attachment.
    Regards,
    John.

Maybe you are looking for

  • Get the request id from a PSA in start routine in transformation

    Hello All, I need to get the request id of the PSA (source_package) during the start routine or field routine and then use it to look up the Date when requested was created using the table RSREQDONE. I'm extracting data from ECC, and then I load the

  • Eyedropper in PS CS6 picking wrong color

    My eyedropper started picking the wrong color!  I ahve reset and reinstalled PS - and still have this problem.  No matter what color I click the eyedropper on, it picks a shade darker than what I want.  Anyone have any ideas?  Like I said, I am runni

  • Endeca JDBC adapter issue

    Hi, When I ran my baseline with one jdbc record adapter there was no issue. When I added one more JDBC record adapter it fails. I have mentioned the pass through properly itself COLUMN_HANDLER_CLASS     com.endeca.soleng.itl.jdbc.AdvancedJDBCColumnHa

  • How to Avoid Group By

    Hello, My Database Version - 10g I have one Query SELECT 'Emp Count' TYPE, max(decode(emp_location,'Mumbai',COUNT(*))) Mumbai , max(decode (emp_location,'Kota',COUNT(*))) Kota,                max(decode(emp_location,'Delhi',COUNT('Delhi'))) Delhi, ma

  • Actions do not fired inside af:table

    Hi, I have recently faced a problem within actions inside af:table. Such that: The action of a commanlink (the command link resides in a af:table column) does not executed (the backing bean do not get hit). The suprising thing is: The command can be