Can anybody helpout - "Bills payable Configurations with Vendors"
I want to know configuration in IMG for bills payable along with account determinations and Tcodes.
Hi Anand
For bill of exchange, you have to make the below settings
in transaction FBZP - Payment methods in country
in the Payment method classification select - Bill/ex
Also select the Create bill/exchbefore due date
and in posting details select the spl GL indicator W
in transction FBZP - Payment method in company code
Select the Post bill liability at the bank
in trasnaction FBZP - bank determination, ranking order
you need to give payment method, currency, ranking order,house bank for b/exc, acct id for bill/exch.
Hope this helps
Thanks
Ashok
Assign points for useful answer
Similar Messages
-
Can anybody explain how to configure the Centralized contract in SRM 7
Hi All,
Can anybody explain how to configure the Centralized contract management in SRM 7 with ECC EHP4 ?what are all that need to be perform in PI system.
Thank you,
praveenHello,
PI will be required here. You can also refer the config guides maintained at the belwo mentioned location.
Goto URL http://service.sap.com/srm-inst and then navigate to SAP SRM --> SAP SRM Server 7.0 -> Configuration Guides for SAP SRM 7.0
Best Regards,
Rahul -
Can anybody know how to configure Multi threaded server?
Hi
All,
Can anybody know how to configure Multi threaded server?
Thanks,
VishalValues are just samples only. use what ever appropriate for your environment. Understand each of them before using in production.
alter system set DISPATCHERS="(PROTOCOL=tcp)(DISPATCHERS=3)(CONNECTIONS=1000)"
alter system set shared_servers=100
replace "DEDICATED" with "SHARED" in tns names
Ready to go.
select username,server from gv$session (server should show none or shared) -
Can anybody give me the table with tcode and its development class
can anybody give me the table with tcode and its development class
Hi phani,
1) First retrieve program name from tstc table I.e field pgmna.
2) Using pgmna retrieve from tadir table by using the following criteria from tadir table
pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
We will get development class or package in tadir i.e
tadir-devclass
Thanks,
Naveen Kumar. -
Hi,
I am unable to connect facebook using HTTP_CONNECTOR component i have added all the parameters required for its authentication i.e client_id , client_secret, grant_type correct but the graph is giving the following error:
====================================================================================================================
ERROR [WatchDog_0] - Component [Query for access token:QUERY_FOR_ACCESS_TOKEN] finished with status ERROR.
peer not authenticated
ERROR [WatchDog_0] - Error details:
org.jetel.exception.JetelRuntimeException: Component [Query for access token:QUERY_FOR_ACCESS_TOKEN] finished with status ERROR.
at org.jetel.graph.Node.createNodeException(Node.java:535)
at org.jetel.graph.Node.run(Node.java:514)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:641)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
at org.jetel.component.HttpConnector.buildAndSendRequest(HttpConnector.java:1836)
at org.jetel.component.HttpConnector.process(HttpConnector.java:1803)
at org.jetel.component.HttpConnector.executeForRecord(HttpConnector.java:1947)
at org.jetel.component.HttpConnector.execute(HttpConnector.java:1914)
at org.jetel.graph.Node.run(Node.java:485)
... 1 more
============================================================================================================
Can anybody help with this ??Hi Brett,
I have installed endeca in non-ssl mode. I am trying to validate the HTTP_Connector component as shown below and its showing the following error:
and if run the graph its showing error as mention above. I am new to endeca so can you please help me that what can i do for validating this component and connecting to facebook. -
Can anybody tell me the problem with this code when compiled in jdk1.4
Can anybody help me find out the error in this code.
Try to drag a file from your desktop and drop it on the first textpane on my GUI. Then try to drag another file. This time the dragdrop event handler throws a null pointer exception. This happened when I compiled the code with jdk1.4. With jdk1.3 it is working fine. Actually, I need jdk1.4 to get the systemicons for the files I drop on my desktop.
/* Client.java*/
import java.util.Vector;
import java.util.Enumeration;
import java.util.Arrays;
import java.awt.*;
import java.awt.event.*;
import java.rmi.*;
import java.rmi.server.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.filechooser.*;
import java.io.*;
import java.awt.dnd.*;
import java.awt.datatransfer.*;
import java.util.Iterator;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import java.util.Hashtable;
import javax.swing.text.*;
import javax.swing.event.*;
public class Client extends JFrame{
static String newline = System.getProperty("line.separator");
static Client client;
//ServerInterface server;
//ClientProperties clp;
Vector v1=new Vector();
ByteArrayOutputStream out;
Runtime r1;
//file objects,together with array of bytes
Hashtable files=new Hashtable(); //files sent
Hashtable rfiles=new Hashtable(); //files received
//file objects,together with button handlers
Hashtable hfiles=new Hashtable(); //files sent,files received
JButton button1=new JButton();
JButton button2=new JButton();
JButton button3=new JButton();
JLabel label1=new JLabel();
JLabel label2=new JLabel();
JLabel label3=new JLabel();
JLabel label4=new JLabel();
JLabel label5=new JLabel();
JLabel label6=new JLabel();
JLabel label7=new JLabel();
JLabel label8=new JLabel();
JOptionPane dialog=new JOptionPane();
JFileChooser chooser = new JFileChooser();
JPanel panel1;
JPanel panel2;
DropTarget dtarget;
DragSource dsource;
JTextPane textArea1=new JTextPane();
TextArea textArea2=new TextArea();
JTextPane textpanel=new JTextPane();
Style defstyle,style;
StyledDocument doc,doc1;
JPopupMenu popup;
JTree tree;
JScrollPane jsppane;
JScrollPane jsp,jsp2;
DefaultMutableTreeNode top;
Container cp;
private String toalias;
private String togroup;
private String fromalias;
private String fromgroup;
private boolean CONNECT;
public Client()
cp=getContentPane();
cp.setLayout(null);
setForeground(java.awt.Color.red);
setFont(new Font("Dialog", Font.PLAIN, 14));
setVisible(false);
label1.setText(" CHAT APPLICATION");
cp.add(label1);
label1.setFont(new Font("Dialog", Font.BOLD, 16));
label1.setBounds(72,20,319,30);
label2.setText("List of Users Connected.");
cp.add(label2);
label2.setForeground(java.awt.Color.blue);
label2.setFont(new Font("Dialog", Font.BOLD, 12));
label2.setBounds(24,60,192,26);
label8.setBounds(280,60,100,26);
cp.add(label8);
cp.add(textArea2);
textArea2.setBounds(204,120,268,90);
jsppane=new JScrollPane(textArea1);
doc1=textArea1.getStyledDocument();
jsppane.setBounds(12,264,456,109);
cp.add(jsppane);
label3.setText("TO::");
cp.add(label3);
label3.setFont(new Font("Dialog", Font.BOLD, 12));
label3.setBounds(12,228,36,20);
cp.add(label4);
label4.setBackground(java.awt.Color.lightGray);
label4.setBounds(60,228,172,19);
label5.setText("SERVER RESPONSE");
cp.add(label5);
label5.setFont(new Font("Dialog", Font.BOLD, 12));
label5.setBounds(204,96,204,21);
label7.setText("MESSAGE FOR YOU.");
cp.add(label7);
label7.setFont(new Font("Dialog", Font.BOLD, 14));
label7.setBounds(12,371,288,25);
jsp2=new JScrollPane(textpanel);
setTextPaneStyle();
jsp2.setBounds(12,401,456,109);
cp.add(jsp2);
button1.setLabel("Send");
button1.setEnabled(false);
cp.add(button1);
button1.setBackground(java.awt.Color.lightGray);
button1.setForeground(java.awt.Color.black);
button1.setFont(new Font("Dialog", Font.BOLD|Font.ITALIC, 10));
button1.setBounds(60,520,78,36);
button2.setLabel("Attach");
//button2.setEnabled(false);
cp.add(button2);
button2.setBackground(java.awt.Color.lightGray);
button2.setForeground(java.awt.Color.black);
button2.setFont(new Font("Dialog", Font.BOLD|Font.ITALIC, 10));
button2.setBounds(180,520,72,36);
button3.setLabel("Connect");
cp.add(button3);
button3.setBackground(java.awt.Color.lightGray);
button3.setForeground(java.awt.Color.black);
button3.setFont(new Font("Dialog", Font.BOLD|Font.ITALIC, 10));
button3.setBounds(288,520,72,33);
setSize(500,620);
show();
addWindowListener(new WindowEventHandler());
button1.addActionListener(new ButtonHandler());
button2.addActionListener(new ButtonHandler());
button3.addActionListener(new ButtonHandler());
textArea1.addContainerListener(new ComponentHandler());
dtarget=new DropTarget(textArea1,new DragDropHandler());
textArea2.setEnabled(false);
textpanel.setEnabled(false);
r1=Runtime.getRuntime();
r1.addShutdownHook(new onshutdown());
addMenu();
cp.repaint();
//adds attachments to the textArea1
synchronized private void addAttach(java.util.List fileList)
Iterator iterator=fileList.iterator();
JButton bw;
while(iterator.hasNext())
File file=(File)iterator.next();
Icon icon=chooser.getIcon(file);
bw=new JButton(icon);
bw.setBackground(java.awt.Color.gray);
bw.setToolTipText(file.getAbsolutePath());
bw.addMouseListener(new AttachmentHandler());
Dimension d1=new Dimension(icon.getIconWidth(),icon.getIconHeight());
bw.setMaximumSize(d1);
hfiles.put(bw,file);
textArea1.insertComponent(bw);
textArea1.setCaretPosition(doc1.getLength());
bw.setSize(icon.getIconWidth(),icon.getIconHeight());
//only one file at a time
break;
cp.repaint();
public void setAudioStream(ByteArrayOutputStream out)
this.out=out;
private void addMenu()
JMenuBar mbar=new JMenuBar();
mbar.setVisible(true);
mbar.setBounds(0,0,500,20);
mbar.setBackground(java.awt.Color.gray);
//first menu
JMenu m1=new JMenu("Connection");
m1.setBounds(0,0,80,20);
m1.setBackground(java.awt.Color.gray);
JMenuItem mitem1=new JMenuItem("Connect");
JMenuItem mitem2=new JMenuItem("Disconnect");
m1.add(mitem1);
m1.add(mitem2);
mitem1.addActionListener(new ButtonHandler());
mitem2.addActionListener(new ButtonHandler());
mbar.add(m1);
//second menu
JMenu m2=new JMenu("Send...");
m2.setBounds(90,0,80,20);
m2.setBackground(java.awt.Color.gray);
JMenuItem mitem3=new JMenuItem("Send");
JMenuItem mitem4=new JMenuItem("Send with Audio...");
mitem3.addActionListener(new ButtonHandler());
mitem4.addActionListener(new ButtonHandler());
m2.add(mitem3);
m2.add(mitem4);
mbar.add(m2);
cp.add(mbar);
private void setTextPaneStyle()
StyleContext stylecontext =StyleContext.getDefaultStyleContext();
defstyle=stylecontext.getStyle(StyleContext.DEFAULT_STYLE);
doc= textpanel.getStyledDocument();
//style 1
style= textpanel.addStyle("bold",defstyle);
StyleConstants.setBackground(style,Color.white);
StyleConstants.setForeground(style,Color.blue);
StyleConstants.setItalic(style, false);
StyleConstants.setBold(style, true);
StyleConstants.setFontSize(style,16);
//style 2
style= textpanel.addStyle("normal",defstyle);
StyleConstants.setBackground(style,Color.white);
StyleConstants.setForeground(style,Color.black);
StyleConstants.setItalic(style, false);
StyleConstants.setBold(style, false);
StyleConstants.setFontSize(style,14);
//style3
style= textpanel.addStyle("attach",defstyle);
StyleConstants.setBackground(style,Color.white);
StyleConstants.setForeground(style,Color.red);
StyleConstants.setItalic(style, true);
StyleConstants.setBold(style, false);
StyleConstants.setFontSize(style,12);
//remote method called by server
public void addClient(String alias,String group,JTree tree)
//if old client remove old tree
if(!alias.equals(""))
cp.remove(this.jsp);
//add new tree
this.tree=tree;
setTreeModel();
getSound(2);
if(!alias.equals(""))
textArea2.append("\nNew Client:" + alias + "has joined");
else
textArea2.append("\nYou have been connected to the Server.");
jsp=new JScrollPane(this.tree);
jsp.setBounds(12,96,168,120);
jsp.setBackground(java.awt.Color.lightGray);
cp.add(jsp);
this.tree.addMouseListener(new MouseHandler());
//remote method called by server
public void sendMessage(String str,Hashtable rfiles,String alias,String group) throws RemoteException
receiveMessage(str,rfiles,alias,group);
//remote method called by server
public void removeClient(JTree tree,String alias,String group) throws RemoteException
cp.remove(this.jsp);
this.tree=tree;
setTreeModel();
getSound(3);
jsp=new JScrollPane(this.tree);
jsp.setBounds(12,96,168,120);
jsp.setBackground(java.awt.Color.lightGray);
cp.add(jsp);
this.tree.addMouseListener(new MouseHandler());
textArea2.append("\nClient:" + alias + "has disconnected");
private void receiveMessage(String str,Hashtable rfiles,String alias,String group)
boolean flag=true;
UIManager.put("JFrame.activeTitleBackground", new Color(64,128,255));
UIManager.put("JFrame.activeTitleForeground", Color.white);
UIManager.put("JFrame.inactiveTitleBackground", new Color(128,128,128));
UIManager.put("JFrame.inactiveTitleForeground", Color.black);
SwingUtilities.updateComponentTreeUI(this);
try{
if(alias.equals(""))
doc.insertString(doc.getLength(),"CHATMASTER>>",textpanel.getStyle("bold"));
doc.insertString(doc.getLength(),str+ newline,textpanel.getStyle("normal"));
else
doc.insertString(doc.getLength(),alias + "@" + group + ">>",textpanel.getStyle("bold"));
doc.insertString(doc.getLength(),str,textpanel.getStyle("normal"));
//add files to textpanel
if(rfiles!=null && rfiles.size()>0)
doc.insertString(doc.getLength(),newline+"Attachments>>",textpanel.getStyle("attach"));
showattach(rfiles);
addtoList(rfiles);
doc.insertString(doc.getLength(),newline,textpanel.getStyle("normal"));
catch(Exception e)
e.printStackTrace();
dialog.showMessageDialog(client,e.toString(),"Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
cp.repaint();
protected boolean ContactServer(String alias,String servername,String group)
try{
//UnicastRemoteObject.exportObject(this);
//server=(ServerInterface)Naming.lookup("//gpt02d05:5500/" + servername);
// server.notifyMe(this,alias,group);
//change the settings of buttons
button1.setEnabled(true);
button2.setEnabled(true);
button3.setLabel("Disconnect");
label8.setVisible(true);
label8.setText(" Welcome::" + alias);
//putting values of alias and group for sending messages
fromalias=alias;
fromgroup=group;
CONNECT=true;
return true;
catch(UnsupportedOperationException e)
dialog.showMessageDialog(client,"Client with the Same Alias in " + group + " already exists","Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
try{
// UnicastRemoteObject.unexportObject(client,true);
catch(Exception ev){System.out.println(ev.toString());}
catch(Exception e)
dialog.showMessageDialog(client,"Unable to connect to Server","Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
try{
// UnicastRemoteObject.unexportObject(client,true);
catch(Exception ev){System.out.println(ev.toString());}
return false;
public static void main(String args[]) throws RemoteException{
client=new Client();
}//main ends
public void getSound(int count)
Toolkit t1=getToolkit();
for(int i=0;i<count;i++)
t1.beep();
try{
Thread.sleep(500);
catch(Exception e){}
public void setTreeModel()
ImageIcon i1=new ImageIcon("Lock.gif","No Users");
ImageIcon i2=new ImageIcon("Connec.gif","Users in Group");
ImageIcon i3=new ImageIcon("authorbn.gif","An User");
DefaultTreeCellRenderer dr1= new DefaultTreeCellRenderer();
dr1.setClosedIcon(i1);
dr1.setOpenIcon(i2);
dr1.setLeafIcon(i3);
dr1.setTextSelectionColor(java.awt.Color.red);
tree.setCellRenderer(dr1);
//add received files to the list
private void addtoList(Hashtable rfiles)
Enumeration filelist=rfiles.keys();
while(filelist.hasMoreElements())
File file=(File)filelist.nextElement();
this.rfiles.put(file,rfiles.get(file));
//show the attachments received
private void showattach(Hashtable rfiles)
Enumeration filelist=rfiles.keys();
dsource=DragSource.getDefaultDragSource();
JButton b1=null;
while(filelist.hasMoreElements())
File file=(File)filelist.nextElement();
Icon icon=chooser.getIcon(file);
b1=new JButton(icon);
b1.setBackground(java.awt.Color.gray);
b1.setToolTipText(file.getName());
b1.addMouseListener(new AttachmentHandler());
Dimension d1=new Dimension(icon.getIconWidth(),icon.getIconHeight());
b1.setMaximumSize(d1);
hfiles.put(b1,file);
textpanel.setCaretPosition(doc.getLength());
textpanel.insertComponent(b1);
b1.setSize(icon.getIconWidth(),icon.getIconHeight());
dsource.createDefaultDragGestureRecognizer(b1, DnDConstants.ACTION_COPY_OR_MOVE,new DragGestureHandler());
cp.repaint();
private void savefile(File file,Object parent)
//ExtensionFileFilter filter = new ExtensionFileFilter(false);
//filter.addExtension("txt",true);
//chooser.setFileFilter(filter);
int returnVal = chooser.showSaveDialog(client);
if(returnVal ==JFileChooser.APPROVE_OPTION)
try{
FileOutputStream fstream=new FileOutputStream(chooser.getSelectedFile());
//decide whether the file received or sent is to be saved
if(((Container)parent).equals(textArea1))
fstream.write((byte[])files.get(file));
else
fstream.write((byte[])rfiles.get(file));
fstream.close();
System.out.println(file.getName());
catch(Exception e)
{System.out.println(e.toString()); }
private void openfile(File file,Object parent)
File tempfile=null;
try{
String fname=file.getName();
tempfile=File.createTempFile("temp",fname.substring(fname.lastIndexOf(".")));
FileOutputStream fstream=new FileOutputStream(tempfile);
System.out.println(tempfile.getAbsolutePath());
//decide whether the file received or sent is to be saved
if(((Container)parent).equals(textArea1))
fstream.write((byte[])files.get(file));
else
fstream.write((byte[])rfiles.get(file));
fstream.close();
catch(Exception e){System.out.println(e.toString());}
try{
Process p1=r1.exec("cmd /c start " + tempfile.getAbsolutePath());
p1.waitFor();
catch(Exception e){System.out.println(e.toString());}
//inner classes
class ComponentHandler implements ContainerListener{
public void componentRemoved(ContainerEvent ev)
Container cont=(Container)ev.getChild();
if(cont.getComponentCount()>0)
JButton but=(JButton)cont.getComponent(0);
files.remove((File)hfiles.get(but));
hfiles.remove(but);
public void componentAdded(ContainerEvent ev){}
class AttachmentHandler extends MouseAdapter{
public void mouseClicked(MouseEvent ev){
if(ev.getModifiers()==4)
Component comp=(Component)ev.getSource();
File file=(File)hfiles.get(comp);
popup=new JPopupMenu();
JMenuItem popopen=new JMenuItem("Open");
JMenuItem popsave=new JMenuItem("Save As..");
popup.add(popopen);
System.out.println(comp.getParent().getParent().getClass().toString());
popopen.addActionListener(new ButtonHandler(file,comp.getParent().getParent()));
popup.add(popsave);
popsave.addActionListener(new ButtonHandler(file,comp.getParent().getParent()));
popup.show(comp,12,12);
class DragGestureHandler extends Vector implements DragGestureListener,DragSourceListener,Transferable{
final static int FILE = 0;
final static int STRING = 1;
final static int PLAIN = 2;
DataFlavor flavors[] = {DataFlavor.javaFileListFlavor,DataFlavor.stringFlavor,DataFlavor.plainTextFlavor};
public void dragDropEnd(DragSourceDropEvent ev){}
public void dragEnter(DragSourceDragEvent ev){}
public void dragExit(DragSourceEvent ev){}
public void dragOver(DragSourceDragEvent ev){}
public void dropActionChanged(DragSourceDragEvent ev){}
public void dragGestureRecognized(DragGestureEvent ev)
System.out.println("recognized");
File file=(File)hfiles.get(ev.getComponent());
addElement(file);
ev.startDrag(DragSource.DefaultCopyDrop,this,this);
/* Returns the array of flavors in which it can provide the data. */
public synchronized DataFlavor[] getTransferDataFlavors() {
return flavors;
/* Returns whether the requested flavor is supported by this object. */
public boolean isDataFlavorSupported(DataFlavor flavor) {
boolean b = false;
b |=flavor.equals(flavors[FILE]);
b |= flavor.equals(flavors[STRING]);
b |= flavor.equals(flavors[PLAIN]);
return (b);
public synchronized Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException,IOException
if(flavor.equals(flavors[FILE])){return this;}
else if (flavor.equals(flavors[PLAIN])) {
return new StringReader(((File)elementAt(0)).getAbsolutePath());
} else if (flavor.equals(flavors[STRING])) {
return((File)elementAt(0)).getAbsolutePath();
} else {
throw new UnsupportedFlavorException(flavor);
//inner class for draging in the files on java frame
class DragDropHandler implements DropTargetListener{
public void dragEnter(DropTargetDragEvent ev){
public void dragExit(DropTargetEvent ev){
public void dragOver(DropTargetDragEvent ev){
public void drop(DropTargetDropEvent ev){
Transferable tf1=ev.getTransferable();
DataFlavor fl[]=ev.getCurrentDataFlavors();
if(ev.isDataFlavorSupported(DataFlavor.javaFileListFlavor))
ev.acceptDrop (DnDConstants.ACTION_COPY_OR_MOVE);
try{
java.util.List fileList = (java.util.List)tf1.getTransferData(DataFlavor.javaFileListFlavor);
Iterator iterator = fileList.iterator();
while (iterator.hasNext())
File file = (File)iterator.next();
if(file.isFile())
Icon icon=chooser.getIcon(file);
FileInputStream fstream=new FileInputStream(file);
int filedata=(new Double(file.length())).intValue();
byte bytes[]=new byte[filedata];
fstream.read(bytes);
files.put(file,bytes);
ev.getDropTargetContext().dropComplete(true);
addAttach(fileList);
catch(Exception e)
{System.out.println(e.toString() + "here");}
public void dropActionChanged(DropTargetDragEvent ev){
class MouseHandler extends MouseAdapter{
public void mouseClicked(MouseEvent me)
TreePath tp=tree.getPathForLocation(me.getX(),me.getY());
if(tp!=null)
if(tp.getPathCount()==3)
toalias=tp.getPathComponent(2).toString();
togroup=tp.getPathComponent(1).toString();
System.out.println(toalias);
if (!(toalias.equals(fromalias) && togroup.equals(fromgroup)))
System.out.println("hh " + toalias);
label4.setText(tp.getPathComponent(2).toString() + "_@" + tp.getPathComponent(1).toString());
class ButtonHandler implements ActionListener{
private File file;
private Object parent;
//constructors
public ButtonHandler()
public ButtonHandler(File file,Object parent)
this.file=file;
this.parent=parent;
//other functions
public void actionPerformed(ActionEvent ev){
String s=ev.getActionCommand();
System.out.println(s);
if(s.equals("Send with Audio..."))
//Audio audio=new Audio(client,false,"CAPTURE");
if(s.equals("Disconnect"))
try{
// server.disconnect(client);
client.getSound(3);
cp.remove(jsp);
label6.setVisible(false);
//UnicastRemoteObject.unexportObject(client,true);
button3.setLabel("Connect");
textArea2.append("\nYou have been disconnected to Server");
client.repaint();
catch(Exception e)
System.out.println(e.toString());
if(s.equals("Connect"))
// clp=new ClientProperties(client,false);
if(s.equals("Save As.."))
savefile(file,parent);
if(s.equals("Open"))
openfile(file,parent);
if(s.equals("Attach"))
//ExtensionFileFilter filter = new ExtensionFileFilter(false);
//filter.addExtension(".txt",true);
//filter.setDescription("Text Files(.txt)");
// chooser.setFileFilter(filter);
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
//chooser.setMultiSelectionEnabled(true);
int returnVal = chooser.showOpenDialog(client);
if(returnVal ==JFileChooser.APPROVE_OPTION)
//File fp[]=chooser.getSelectedFiles();
File fp[]=new File[1];
fp[0]=chooser.getSelectedFile();
int i=0;
while(i<fp.length)
try{
File file=fp;
Icon icon=chooser.getIcon(file);
FileInputStream fstream=new FileInputStream(file);
int filedata=(new Double(file.length())).intValue();
byte bytes[]=new byte[filedata];
fstream.read(bytes);
files.put(file,bytes);
catch(Exception e){dialog.showMessageDialog(client,e.toString(),"Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
return; }
i++;
java.util.List fileList=Arrays.asList(fp);
addAttach(fileList);
if(s.equals("Send"))
try{
if(toalias==null)
dialog.showMessageDialog(client,"Select the Recepient First!!","Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
return;
if(toalias!=null && togroup!=null && (!toalias.equals(fromalias)))
// server.sendMessage(textArea1.getText(),files,toalias,togroup,fromalias,fromgroup);
textArea1.setText("");
catch(Exception e)
e.printStackTrace();
}//if ends
class WindowEventHandler extends WindowAdapter{
public void windowClosing(WindowEvent ev){
try{
//server.disconnect(client);
client.getSound(3);
// UnicastRemoteObject.unexportObject(client,true);
catch(Exception e){System.out.println(e.toString());}
dispose();
private class onshutdown extends Thread{
public void run(){
try{
//server.disconnect(client);
//UnicastRemoteObject.unexportObject(client,true);
catch(Exception e){}
}//run endsHere is the working code :
There was an error line 724
File file=fp; -> File file=fp[0];
Several method were deprecated and try to replace the deprecated static field : DataFlavor.plainTextFlavor which was deprecated since 1.4.
/* Client.java*/
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import java.rmi.*;
import java.rmi.server.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.filechooser.*;
import java.io.*;
import java.awt.dnd.*;
import java.awt.datatransfer.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.text.*;
import javax.swing.event.*;
public class Client extends JFrame{
static String newline = System.getProperty("line.separator");
static Client client;
//ServerInterface server;
//ClientProperties clp;
Vector v1=new Vector();
ByteArrayOutputStream out;
Runtime r1;
//file objects,together with array of bytes
Hashtable files=new Hashtable(); //files sent
Hashtable rfiles=new Hashtable(); //files received
//file objects,together with button handlers
Hashtable hfiles=new Hashtable(); //files sent,files received
JButton button1=new JButton();
JButton button2=new JButton();
JButton button3=new JButton();
JLabel label1=new JLabel();
JLabel label2=new JLabel();
JLabel label3=new JLabel();
JLabel label4=new JLabel();
JLabel label5=new JLabel();
JLabel label6=new JLabel();
JLabel label7=new JLabel();
JLabel label8=new JLabel();
JOptionPane dialog=new JOptionPane();
JFileChooser chooser = new JFileChooser();
JPanel panel1;
JPanel panel2;
DropTarget dtarget;
DragSource dsource;
JTextPane textArea1=new JTextPane();
TextArea textArea2=new TextArea();
JTextPane textpanel=new JTextPane();
Style defstyle,style;
StyledDocument doc,doc1;
JPopupMenu popup;
JTree tree;
JScrollPane jsppane;
JScrollPane jsp,jsp2;
DefaultMutableTreeNode top;
Container cp;
private String toalias;
private String togroup;
private String fromalias;
private String fromgroup;
private boolean CONNECT;
public Client()
cp=getContentPane();
cp.setLayout(null);
setForeground(java.awt.Color.red);
setFont(new Font("Dialog", Font.PLAIN, 14));
setVisible(false);
label1.setText(" CHAT APPLICATION");
cp.add(label1);
label1.setFont(new Font("Dialog", Font.BOLD, 16));
label1.setBounds(72,20,319,30);
label2.setText("List of Users Connected.");
cp.add(label2);
label2.setForeground(java.awt.Color.blue);
label2.setFont(new Font("Dialog", Font.BOLD, 12));
label2.setBounds(24,60,192,26);
label8.setBounds(280,60,100,26);
cp.add(label8);
cp.add(textArea2);
textArea2.setBounds(204,120,268,90);
jsppane=new JScrollPane(textArea1);
doc1=textArea1.getStyledDocument();
jsppane.setBounds(12,264,456,109);
cp.add(jsppane);
label3.setText("TO::");
cp.add(label3);
label3.setFont(new Font("Dialog", Font.BOLD, 12));
label3.setBounds(12,228,36,20);
cp.add(label4);
label4.setBackground(java.awt.Color.lightGray);
label4.setBounds(60,228,172,19);
label5.setText("SERVER RESPONSE");
cp.add(label5);
label5.setFont(new Font("Dialog", Font.BOLD, 12));
label5.setBounds(204,96,204,21);
label7.setText("MESSAGE FOR YOU.");
cp.add(label7);
label7.setFont(new Font("Dialog", Font.BOLD, 14));
label7.setBounds(12,371,288,25);
jsp2=new JScrollPane(textpanel);
setTextPaneStyle();
jsp2.setBounds(12,401,456,109);
cp.add(jsp2);
button1.setText("Send");
button1.setEnabled(false);
cp.add(button1);
button1.setBackground(java.awt.Color.lightGray);
button1.setForeground(java.awt.Color.black);
button1.setFont(new Font("Dialog", Font.BOLD|Font.ITALIC, 10));
button1.setBounds(60,520,78,36);
button2.setText("Attach");
//button2.setEnabled(false);
cp.add(button2);
button2.setBackground(java.awt.Color.lightGray);
button2.setForeground(java.awt.Color.black);
button2.setFont(new Font("Dialog", Font.BOLD|Font.ITALIC, 10));
button2.setBounds(180,520,72,36);
button3.setText("Connect");
cp.add(button3);
button3.setBackground(java.awt.Color.lightGray);
button3.setForeground(java.awt.Color.black);
button3.setFont(new Font("Dialog", Font.BOLD|Font.ITALIC, 10));
button3.setBounds(288,520,72,33);
setSize(500,620);
show();
addWindowListener(new WindowEventHandler());
button1.addActionListener(new ButtonHandler());
button2.addActionListener(new ButtonHandler());
button3.addActionListener(new ButtonHandler());
textArea1.addContainerListener(new ComponentHandler());
dtarget=new DropTarget(textArea1,new DragDropHandler());
textArea2.setEnabled(false);
textpanel.setEnabled(false);
r1=Runtime.getRuntime();
r1.addShutdownHook(new onshutdown());
addMenu();
cp.repaint();
//adds attachments to the textArea1
synchronized private void addAttach(java.util.List fileList)
Iterator iterator=fileList.iterator();
JButton bw;
while(iterator.hasNext())
File file=(File)iterator.next();
Icon icon=chooser.getIcon(file);
bw=new JButton(icon);
bw.setBackground(java.awt.Color.gray);
bw.setToolTipText(file.getAbsolutePath());
bw.addMouseListener(new AttachmentHandler());
Dimension d1=new Dimension(icon.getIconWidth(),icon.getIconHeight());
bw.setMaximumSize(d1);
hfiles.put(bw,file);
textArea1.insertComponent(bw);
textArea1.setCaretPosition(doc1.getLength());
bw.setSize(icon.getIconWidth(),icon.getIconHeight());
//only one file at a time
break;
cp.repaint();
public void setAudioStream(ByteArrayOutputStream out)
this.out=out;
private void addMenu()
JMenuBar mbar=new JMenuBar();
mbar.setVisible(true);
mbar.setBounds(0,0,500,20);
mbar.setBackground(java.awt.Color.gray);
//first menu
JMenu m1=new JMenu("Connection");
m1.setBounds(0,0,80,20);
m1.setBackground(java.awt.Color.gray);
JMenuItem mitem1=new JMenuItem("Connect");
JMenuItem mitem2=new JMenuItem("Disconnect");
m1.add(mitem1);
m1.add(mitem2);
mitem1.addActionListener(new ButtonHandler());
mitem2.addActionListener(new ButtonHandler());
mbar.add(m1);
//second menu
JMenu m2=new JMenu("Send...");
m2.setBounds(90,0,80,20);
m2.setBackground(java.awt.Color.gray);
JMenuItem mitem3=new JMenuItem("Send");
JMenuItem mitem4=new JMenuItem("Send with Audio...");
mitem3.addActionListener(new ButtonHandler());
mitem4.addActionListener(new ButtonHandler());
m2.add(mitem3);
m2.add(mitem4);
mbar.add(m2);
cp.add(mbar);
private void setTextPaneStyle()
StyleContext stylecontext =StyleContext.getDefaultStyleContext();
defstyle=stylecontext.getStyle(StyleContext.DEFAULT_STYLE);
doc= textpanel.getStyledDocument();
//style 1
style= textpanel.addStyle("bold",defstyle);
StyleConstants.setBackground(style,Color.white);
StyleConstants.setForeground(style,Color.blue);
StyleConstants.setItalic(style, false);
StyleConstants.setBold(style, true);
StyleConstants.setFontSize(style,16);
//style 2
style= textpanel.addStyle("normal",defstyle);
StyleConstants.setBackground(style,Color.white);
StyleConstants.setForeground(style,Color.black);
StyleConstants.setItalic(style, false);
StyleConstants.setBold(style, false);
StyleConstants.setFontSize(style,14);
//style3
style= textpanel.addStyle("attach",defstyle);
StyleConstants.setBackground(style,Color.white);
StyleConstants.setForeground(style,Color.red);
StyleConstants.setItalic(style, true);
StyleConstants.setBold(style, false);
StyleConstants.setFontSize(style,12);
//remote method called by server
public void addClient(String alias,String group,JTree tree)
//if old client remove old tree
if(!alias.equals(""))
cp.remove(this.jsp);
//add new tree
this.tree=tree;
setTreeModel();
getSound(2);
if(!alias.equals(""))
textArea2.append("\nNew Client:" + alias + "has joined");
else
textArea2.append("\nYou have been connected to the Server.");
jsp=new JScrollPane(this.tree);
jsp.setBounds(12,96,168,120);
jsp.setBackground(java.awt.Color.lightGray);
cp.add(jsp);
this.tree.addMouseListener(new MouseHandler());
//remote method called by server
public void sendMessage(String str,Hashtable rfiles,String alias,String group) throws RemoteException
receiveMessage(str,rfiles,alias,group);
//remote method called by server
public void removeClient(JTree tree,String alias,String group) throws RemoteException
cp.remove(this.jsp);
this.tree=tree;
setTreeModel();
getSound(3);
jsp=new JScrollPane(this.tree);
jsp.setBounds(12,96,168,120);
jsp.setBackground(java.awt.Color.lightGray);
cp.add(jsp);
this.tree.addMouseListener(new MouseHandler());
textArea2.append("\nClient:" + alias + "has disconnected");
private void receiveMessage(String str,Hashtable rfiles,String alias,String group)
boolean flag=true;
UIManager.put("JFrame.activeTitleBackground", new Color(64,128,255));
UIManager.put("JFrame.activeTitleForeground", Color.white);
UIManager.put("JFrame.inactiveTitleBackground", new Color(128,128,128));
UIManager.put("JFrame.inactiveTitleForeground", Color.black);
SwingUtilities.updateComponentTreeUI(this);
try{
if(alias.equals(""))
doc.insertString(doc.getLength(),"CHATMASTER>>",textpanel.getStyle("bold"));
doc.insertString(doc.getLength(),str+ newline,textpanel.getStyle("normal"));
else
doc.insertString(doc.getLength(),alias + "@" + group + ">>",textpanel.getStyle("bold"));
doc.insertString(doc.getLength(),str,textpanel.getStyle("normal"));
//add files to textpanel
if(rfiles!=null && rfiles.size()>0)
doc.insertString(doc.getLength(),newline+"Attachments>>",textpanel.getStyle("attach"));
showattach(rfiles);
addtoList(rfiles);
doc.insertString(doc.getLength(),newline,textpanel.getStyle("normal"));
catch(Exception e)
e.printStackTrace();
dialog.showMessageDialog(client,e.toString(),"Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
cp.repaint();
protected boolean ContactServer(String alias,String servername,String group)
try{
//UnicastRemoteObject.exportObject(this);
//server=(ServerInterface)Naming.lookup("//gpt02d05:5500/" + servername);
// server.notifyMe(this,alias,group);
//change the settings of buttons
button1.setEnabled(true);
button2.setEnabled(true);
button3.setText("Disconnect");
label8.setVisible(true);
label8.setText(" Welcome::" + alias);
//putting values of alias and group for sending messages
fromalias=alias;
fromgroup=group;
CONNECT=true;
return true;
catch(UnsupportedOperationException e)
dialog.showMessageDialog(client,"Client with the Same Alias in " + group + " already exists","Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
try{
// UnicastRemoteObject.unexportObject(client,true);
catch(Exception ev){System.out.println(ev.toString());}
catch(Exception e)
dialog.showMessageDialog(client,"Unable to connect to Server","Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
try{
// UnicastRemoteObject.unexportObject(client,true);
catch(Exception ev){System.out.println(ev.toString());}
return false;
public static void main(String args[]) throws RemoteException{
client=new Client();
}//main ends
public void getSound(int count)
Toolkit t1=getToolkit();
for(int i=0;i<count;i++)
t1.beep();
try{
Thread.sleep(500);
catch(Exception e){}
public void setTreeModel()
ImageIcon i1=new ImageIcon("Lock.gif","No Users");
ImageIcon i2=new ImageIcon("Connec.gif","Users in Group");
ImageIcon i3=new ImageIcon("authorbn.gif","An User");
DefaultTreeCellRenderer dr1= new DefaultTreeCellRenderer();
dr1.setClosedIcon(i1);
dr1.setOpenIcon(i2);
dr1.setLeafIcon(i3);
dr1.setTextSelectionColor(java.awt.Color.red);
tree.setCellRenderer(dr1);
//add received files to the list
private void addtoList(Hashtable rfiles)
Enumeration filelist=rfiles.keys();
while(filelist.hasMoreElements())
File file=(File)filelist.nextElement();
this.rfiles.put(file,rfiles.get(file));
//show the attachments received
private void showattach(Hashtable rfiles)
Enumeration filelist=rfiles.keys();
dsource=DragSource.getDefaultDragSource();
JButton b1=null;
while(filelist.hasMoreElements())
File file=(File)filelist.nextElement();
Icon icon=chooser.getIcon(file);
b1=new JButton(icon);
b1.setBackground(java.awt.Color.gray);
b1.setToolTipText(file.getName());
b1.addMouseListener(new AttachmentHandler());
Dimension d1=new Dimension(icon.getIconWidth(),icon.getIconHeight());
b1.setMaximumSize(d1);
hfiles.put(b1,file);
textpanel.setCaretPosition(doc.getLength());
textpanel.insertComponent(b1);
b1.setSize(icon.getIconWidth(),icon.getIconHeight());
dsource.createDefaultDragGestureRecognizer(b1, DnDConstants.ACTION_COPY_OR_MOVE,new DragGestureHandler());
cp.repaint();
private void savefile(File file,Object parent)
//ExtensionFileFilter filter = new ExtensionFileFilter(false);
//filter.addExtension("txt",true);
//chooser.setFileFilter(filter);
int returnVal = chooser.showSaveDialog(client);
if(returnVal ==JFileChooser.APPROVE_OPTION)
try{
FileOutputStream fstream=new FileOutputStream(chooser.getSelectedFile());
//decide whether the file received or sent is to be saved
if(((Container)parent).equals(textArea1))
fstream.write((byte[])files.get(file));
else
fstream.write((byte[])rfiles.get(file));
fstream.close();
System.out.println(file.getName());
catch(Exception e)
{System.out.println(e.toString()); }
private void openfile(File file,Object parent)
File tempfile=null;
try{
String fname=file.getName();
tempfile=File.createTempFile("temp",fname.substring(fname.lastIndexOf(".")));
FileOutputStream fstream=new FileOutputStream(tempfile);
System.out.println(tempfile.getAbsolutePath());
//decide whether the file received or sent is to be saved
if(((Container)parent).equals(textArea1))
fstream.write((byte[])files.get(file));
else
fstream.write((byte[])rfiles.get(file));
fstream.close();
catch(Exception e){System.out.println(e.toString());}
try{
Process p1=r1.exec("cmd /c start " + tempfile.getAbsolutePath());
p1.waitFor();
catch(Exception e){System.out.println(e.toString());}
//inner classes
class ComponentHandler implements ContainerListener{
public void componentRemoved(ContainerEvent ev)
Container cont=(Container)ev.getChild();
if(cont.getComponentCount()>0)
JButton but=(JButton)cont.getComponent(0);
files.remove((File)hfiles.get(but));
hfiles.remove(but);
public void componentAdded(ContainerEvent ev){}
class AttachmentHandler extends MouseAdapter{
public void mouseClicked(MouseEvent ev){
if(ev.getModifiers()==4)
Component comp=(Component)ev.getSource();
File file=(File)hfiles.get(comp);
popup=new JPopupMenu();
JMenuItem popopen=new JMenuItem("Open");
JMenuItem popsave=new JMenuItem("Save As..");
popup.add(popopen);
System.out.println(comp.getParent().getParent().getClass().toString());
popopen.addActionListener(new ButtonHandler(file,comp.getParent().getParent()));
popup.add(popsave);
popsave.addActionListener(new ButtonHandler(file,comp.getParent().getParent()));
popup.show(comp,12,12);
class DragGestureHandler extends Vector implements DragGestureListener,DragSourceListener,Transferable{
final static int FILE = 0;
final static int STRING = 1;
final static int PLAIN = 2;
DataFlavor flavors[] = {DataFlavor.javaFileListFlavor,DataFlavor.stringFlavor,DataFlavor.plainTextFlavor};
public void dragDropEnd(DragSourceDropEvent ev){}
public void dragEnter(DragSourceDragEvent ev){}
public void dragExit(DragSourceEvent ev){}
public void dragOver(DragSourceDragEvent ev){}
public void dropActionChanged(DragSourceDragEvent ev){}
public void dragGestureRecognized(DragGestureEvent ev)
System.out.println("recognized");
File file=(File)hfiles.get(ev.getComponent());
addElement(file);
ev.startDrag(DragSource.DefaultCopyDrop,this,this);
/* Returns the array of flavors in which it can provide the data. */
public synchronized DataFlavor[] getTransferDataFlavors() {
return flavors;
/* Returns whether the requested flavor is supported by this object. */
public boolean isDataFlavorSupported(DataFlavor flavor) {
boolean b = false;
b |=flavor.equals(flavors[FILE]);
b |= flavor.equals(flavors[STRING]);
b |= flavor.equals(flavors[PLAIN]);
return (b);
public synchronized Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException,IOException
if(flavor.equals(flavors[FILE])){return this;}
else if (flavor.equals(flavors[PLAIN])) {
return new StringReader(((File)elementAt(0)).getAbsolutePath());
} else if (flavor.equals(flavors[STRING])) {
return((File)elementAt(0)).getAbsolutePath();
} else {
throw new UnsupportedFlavorException(flavor);
//inner class for draging in the files on java frame
class DragDropHandler implements DropTargetListener{
public void dragEnter(DropTargetDragEvent ev){
public void dragExit(DropTargetEvent ev){
public void dragOver(DropTargetDragEvent ev){
public void drop(DropTargetDropEvent ev){
Transferable tf1=ev.getTransferable();
DataFlavor fl[]=ev.getCurrentDataFlavors();
if(ev.isDataFlavorSupported(DataFlavor.javaFileListFlavor))
ev.acceptDrop (DnDConstants.ACTION_COPY_OR_MOVE);
try{
java.util.List fileList = (java.util.List)tf1.getTransferData(DataFlavor.javaFileListFlavor);
Iterator iterator = fileList.iterator();
while (iterator.hasNext())
File file = (File)iterator.next();
if(file.isFile())
Icon icon=chooser.getIcon(file);
FileInputStream fstream=new FileInputStream(file);
int filedata=(new Double(file.length())).intValue();
byte bytes[]=new byte[filedata];
fstream.read(bytes);
files.put(file,bytes);
ev.getDropTargetContext().dropComplete(true);
addAttach(fileList);
catch(Exception e)
{System.out.println(e.toString() + "here");}
public void dropActionChanged(DropTargetDragEvent ev){
class MouseHandler extends MouseAdapter{
public void mouseClicked(MouseEvent me)
TreePath tp=tree.getPathForLocation(me.getX(),me.getY());
if(tp!=null)
if(tp.getPathCount()==3)
toalias=tp.getPathComponent(2).toString();
togroup=tp.getPathComponent(1).toString();
System.out.println(toalias);
if (!(toalias.equals(fromalias) && togroup.equals(fromgroup)))
System.out.println("hh " + toalias);
label4.setText(tp.getPathComponent(2).toString() + "_@" + tp.getPathComponent(1).toString());
class ButtonHandler implements ActionListener{
private File file;
private Object parent;
//constructors
public ButtonHandler()
public ButtonHandler(File file,Object parent)
this.file=file;
this.parent=parent;
//other functions
public void actionPerformed(ActionEvent ev){
String s=ev.getActionCommand();
System.out.println(s);
if(s.equals("Send with Audio..."))
//Audio audio=new Audio(client,false,"CAPTURE");
if(s.equals("Disconnect"))
try{
// server.disconnect(client);
client.getSound(3);
cp.remove(jsp);
label6.setVisible(false);
//UnicastRemoteObject.unexportObject(client,true);
button3.setText("Connect");
textArea2.append("\nYou have been disconnected to Server");
client.repaint();
catch(Exception e)
System.out.println(e.toString());
if(s.equals("Connect"))
// clp=new ClientProperties(client,false);
if(s.equals("Save As.."))
savefile(file,parent);
if(s.equals("Open"))
openfile(file,parent);
if(s.equals("Attach"))
//ExtensionFileFilter filter = new ExtensionFileFilter(false);
//filter.addExtension(".txt",true);
//filter.setDescription("Text Files(.txt)");
// chooser.setFileFilter(filter);
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
//chooser.setMultiSelectionEnabled(true);
int returnVal = chooser.showOpenDialog(client);
if(returnVal ==JFileChooser.APPROVE_OPTION)
//File fp[]=chooser.getSelectedFiles();
File fp[]=new File[1];
fp[0]=chooser.getSelectedFile();
int i=0;
while(i<fp.length)
try{
File file=fp[0];
Icon icon=chooser.getIcon(file);
FileInputStream fstream=new FileInputStream(file);
int filedata=(new Double(file.length())).intValue();
byte bytes[]=new byte[filedata];
fstream.read(bytes);
files.put(file,bytes);
catch(Exception e){dialog.showMessageDialog(client,e.toString(),"Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
return; }
i++;
java.util.List fileList=Arrays.asList(fp);
addAttach(fileList);
if(s.equals("Send"))
try{
if(toalias==null)
dialog.showMessageDialog(client,"Select the Recepient First!!","Error:ChatApplication",JOptionPane.ERROR_MESSAGE);
return;
if(toalias!=null && togroup!=null && (!toalias.equals(fromalias)))
// server.sendMessage(textArea1.getText(),files,toalias,togroup,fromalias,fromgroup);
textArea1.setText("");
catch(Exception e)
e.printStackTrace();
}//if ends
class WindowEventHandler extends WindowAdapter{
public void windowClosing(WindowEvent ev){
try{
//server.disconnect(client);
client.getSound(3);
// UnicastRemoteObject.unexportObject(client,true);
catch(Exception e){System.out.println(e.toString());}
dispose();
private class onshutdown extends Thread{
public void run(){
try{
//server.disconnect(client);
//UnicastRemoteObject.unexportObject(client,true);
catch(Exception e){}
}//run ends
I hope this helps,
Denis -
Can anybody see what is wrong with this SQL statement?
Hey guys, just a quick question. Can anybody tell me what is wrong with this line of SQL? I keep getting a syntax error message. I've been trying for ages and I can't see any problem at all!"
{code}prepStat = connection.prepareStatement("INSERT INTO WeatherHistory (Date, Location, Overview, Temperature, WindDirection, WindSpeed, Pressure) VALUES ('"+date+"','"+location+"','"+temp+"','"+windDir+"','"+windSpd+"','"+pressure+"')");{code}
All the field names and variables definitely exist so I can't see what the problem is!DHD wrote:
Thanks for the replies.
I've matched the correct number of column names and variables, but still no luck.
And how exactly am I misusing Prepared Statements here?As noted above, not according to the code you posted. I didn't just pluck something out of my @ss and throw it out there. There was a reason behind what I said. And, if you mean you changed it, and you still got an exception, then post that exception (completely), and your new code, which is, hopefully, using PreparedStatement, (properly). -
Can we have 2 Alert Configurations with same XI Server, Local&Central(CCMS)
Hi,
I am looking to configure Local Alert Configuration with XI Server,
It already had CCMS Alert Configurations in place, But the solution Manager
is forwarding alerts related to all the Servers (ECC,CRM,BW,XI). It is becoming
difficult to track the alerts of XI.
So my question is is it possible to have 2 alert configurations with XI l ocal & Certral (CCMS)?.
What are the effects if we have both.
I think it is possible to maintain xi specific alerts to specific mail ID's . But basis is finiding difficult in doing this.
Let me know suggestions if you have any in this case.Yes you can have your own PI specific alerts.
You do this via ALRTCATDEF (as stated earlier)
You can edit the message header so you know if it's PI generated or if you log in as PISUPER to configure this then the sender will be PISUPER
Alternatively, why dont you ask BASIS to turn off monitoring for XI and allow you do a more fine-tuned version of this monitoring.
Or even better, dont create any local alerts but have BASIS finetune the central alerts so that the affected system is included in the subject header, also have them create roles for these systems and ensure messages are only sent to the impacted role. Blindly sending messages for all system to all system owners is really lazy config. -
CAN ANYBODY TELL ME WHAT WRONG WITH THIS RSS FEED IT WONT WORK
CAN ANYBONE TELL ME WHATS WRONG WITH THIS FEED BECAUSE IT WONT WORK AND ALSO HOW DO I GET A LINK TO THE PODCAST RSS FEED FOR THE SUBMIT PODCAST PAGE ON ITUNES,
ANY HELP WILL BE MUCH APRECIATED
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>DJ Hybrid Coventry Drum n Bass Podcast</title>
<link>http://www.djhybridcoventry.com/podcast.htm</link>
<language>en-us</language>
<copyright>℗ & © 2007 DJ Hybridb& </copyright>
<itunes:subtitle>DJ Hybrid Drum n Bass Podcast brings you all the latest and greatest from the Drum n Bass scene, updated every two weeks</itunes:subtitle>
<itunes:author>DJ Hybrid</itunes:author>
<itunes:summary>The DJ Hybrid Coventry Drum n Bass Podcast will showcase a selection of the latest and greatest tunes that are getting rinsed on the scene, mixed down with sharp cuts and nasty double drops by Dj Hybrid the podcast will also feature other DJ's and Mc's on different shows. Updated every two weeks this is guarenteed to be an original style of drum n bass mashup, for more info check www.djhybridcoventry.com</itunes:summary>
<description>DJ Hybrid Drum n Bass Podcast brings you all the latest and greatest from the Drum n Bass scene, updated every two weeks</description>
<itunes:owner>
<itunes:name>DJ Hybrid</itunes:name>
<itunes:email>[email protected]</itunes:email>
</itunes:owner>
<itunes:image href="http://i100.photobucket.com/albums/m8/djhybrid/PODCASTLOGOBLUE.jpg" />
<itunes:category text="Music">
<itunes:category text="Drum n Bass"/>
</itunes:category>
<itunes:category text="music"/>
<item>
<title>DJ Hybrid Podcast - 1st Show 03/6/07</title>
<itunes:author>DJ Hybrid</itunes:author>
<itunes:subtitle>The first show of the new drum n bass podcast from DJ Hybrid</itunes:subtitle>
<itunes:summary>Welcome to the 1st show from DJ Hybrid because its the first show im goin to play what tunes i think represent me as a DJ aswell as my favourite drum n bass tunes at the moment for tracklistings check www.djhybridcoventry.com</itunes:summary>
<enclosure url="http://fs06n5.sendspace.com/dl/603942da730253766c5157920e810d3e/46771dd931 3f824d/v3adp4/DJ%20Hybrid%20Podcast%201%20%20-%20%203rd%20June%202007.mp3" length="8727310" type="audio/x-m4a" />
<guid>http://fs06n5.sendspace.com/dl/603942da730253766c5157920e810d3e/46771dd9313f824d /v3adp4/DJ%20Hybrid%20Podcast%201%20%20-%20%203rd%20June%202007.mp3</guid>
<pubDate>Sun, 03 Jun 2007 20:00:00 GMT</pubDate>
<itunes:duration>53:36</itunes:duration>
<itunes:keywords>DJ, Hybrid, Podcast, Drum, Bass, Jungle, Coventry, Double Drop, Latest, Tunes, Vinyl, Liquid, Rave, Reggae, Urban</itunes:keywords>
</item>
</channel>
</rss>First...Stop screaming. It's rude.
Next...there are some minor problems with your feed. "Drum n Bass" is not a iTunes category. Stick with <itunes:category text="Music" /> remove the others.
Not required, but recommend to add an <itunes:explicit> tag with a Y or N depending on what suits your podcast. The iTunes staff will remove your feed if it isn't tagged properly.
MP3 audio files should have a type="audio/mpeg".
Keep the Podcast spec handy...the categories and other info listed in the spec.
Test your feed with http://www.feedvalidator.org it will point out problems with your feed.
The bigger problems stem from your podcast enclosure, specifically the URL.
The URL you have listed to the podcast mp3 apparently has changed so iTunes can't download the file. It also appears that you are using a "free download" kind of service that uses web page based downloads, which might account for why the URL keeps changing. Don't think that iTunes will be able to properly download the file.
Erik -
After some years of faithful service my PC died and I am not able to get Premiere Pro 1.5 to work on the new PC. I had several HDD with my video files on and the C: drive died. I have reinstalled the original drives so all my files are recovered and I can see/open them in Premiere BUT I cannot setup to capture anything.
System is Win XP Pro, Pentium Dual core, 2.7GHz, 2Mb RAM, Capture device is Canopus with DV Storm 2 drivers, Sony DR1000 deck connected by firewire.
When I go to capture settings there is an IEEE1394 option and DV Capture. If I select Canopus the PD INSTANTLY reboots. I don't know where to start looking for the issue . . . is anybody able to help ?
Would be much appreciated . . .Ian
Did you replace the whole PC or just the boot drive?
I may be totally wrong but I had a Storm card years ago and it worked with Premiere up to the old verions 6 or 6.5, Premiere 6.5 is when it became realtime and hence the Storm card was no longer necessary for anything other than faster mpeg encoding
I seem to remember that Canopus introduced Lets Edit which then became Edius at this time and they dropped bundling Abobe products so I am surprized that Premiere Pro 1.5 worked with the Storm
If the Storm cannot be got to work and you do not have a firewire port on the Mobo go to your local PC component supplier and obtain a firewire PCI card with Texas chipset and install it. the card should cost about $20-$30. The Storms worked a treat but the Mobo had to be right and it did not like certain chipsets on the boards, not only that the installation process was a total pain -
Can Best Buy bill to account with Verizon?
Or is that only with Verizon corporate locations?
No, you must pay Best Buy for the phone. However you can finance it with 0% interest over 6-18 months with the Reward Zone Credit Card.
Dan K. | Mobile Specialty Stores
Any opinions expressed in this post are those of
the author and do not represent Best Buy Co., Inc. -
Can anybody help solve my problem with compilation?
In win XP i try to compile program.
javac Lematizator.java
Lematozator.java:85: cannot find symbol
symbol : class PodstatneMeno
location : class slovnik.Lematizator
static ArrayList<PodstatneMeno> zoznamPodstatnychMienZoSlovnika = new ArrayList<PodstatneMeno><>;
^
There are more errors this is just example, how can i repair it?
This is code:
package slovnik;
import java.io.BufferedReader;
import java.io.FileReader;
//import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Vector;
public class Lematizator
static String suborSPredlohami = "predlohy.txt";
// static String slovnik = "slova.txt";
static String zoznamPodstatnychMien = "podstatneMena.txt";
static ArrayList<PodstatneMeno> predlohy = new ArrayList<PodstatneMeno>();
static ArrayList<PodstatneMeno> zoznamPodstatnychMienZoSlovnika = new ArrayList<PodstatneMeno>();
static ArrayList<PodstatneMeno> mozneTvarySlova = new ArrayList<PodstatneMeno>();
// static ArrayList<String> slovaZoSlovnika;
// static String slovo = "slovách";
static String slovo = "slová";
// static String slovo = "mestách";
// static String slovo = "cestách";
public static void main(String[] args)
String slovo0 = "slovo";
String slovo1 = "";
String slovo2 = "";
String slovo3 = "";
String slovo4 = "";
if (args.length>0)
slovo0 = args[0];
if (args.length>1)
slovo1 = args[1];
if (args.length>2)
slovo2 = args[2];
if (args.length>3)
slovo3 = args[3];
if (args.length>4)
slovo4 = args[4];
System.out.println(slovo0);
System.out.println(slovo1);
System.out.println(slovo2);
System.out.println(slovo3);
System.out.println(slovo4);
System.out.println();
System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo0));
System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo1));
System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo2));
System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo3));
System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo4));
public static String najdiZakladnyTvar (String slovo)
ArrayList<PodstatneMeno> zt = najdiZakladneTvary(slovo, false);
if (zt.size() > 0)
return zt.get(0).getTvar();
else
return null;
public static ArrayList<String> najdiVsetkyZakladneTvary (String slovo)
ArrayList<String> z = new ArrayList<String>();
ArrayList<PodstatneMeno> zt = najdiZakladneTvary(slovo, true);
for (int i = 0; i < zt.size(); i++)
String t = zt.get(i).getTvar();
boolean nebolo = true;
for (int j = 0; j < z.size(); j++)
if (t.equals(z.get(j)))
nebolo = false;
if (nebolo)
z.add(t);
return z;
public static ArrayList<PodstatneMeno> najdiZakladneTvary (String slovo, boolean vsetky)
ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
if (predlohy.size() == 0)
predlohy = Lematizator.nacitajPredlohy(suborSPredlohami);
if (zoznamPodstatnychMienZoSlovnika.size() == 0)
zoznamPodstatnychMienZoSlovnika = Lematizator.nacitajZoznamPodstatnychMien(zoznamPodstatnychMien);
mozneTvarySlova = Lematizator.najdiMozneTvarySlova(slovo);
for (int i=0; i < mozneTvarySlova.size(); i++)
PodstatneMeno pm = mozneTvarySlova.get(i);
if (pm.jeVZoznamePodstatnychMien(zoznamPodstatnychMienZoSlovnika))
vystup.add(pm);
if (!vsetky)
return vystup;
return vystup;
static ArrayList<PodstatneMeno> nacitajPredlohy(String suborSPredlohami)
ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
try
PodstatneMeno zt = null;
String nemennaCast = "";
String skratkaRod = "";
String skratkaCislo = "";
String skratkaPad = "";
String koncovka = "";
BufferedReader br = new BufferedReader(new FileReader(suborSPredlohami));
String riadok;
while ((riadok = br.readLine()) != null)
if (riadok.equals("koniec"))
br.close();
return vystup;
if (riadok.startsWith("="))
zt = null;
if (!(riadok.startsWith("-") || riadok.startsWith("=")))
riadok = (riadok+" ").replaceAll("\t",":");
String[] cs = riadok.split(":");
if (!cs[0].trim().equals(""))
nemennaCast = cs[0].trim();
if (!cs[1].trim().equals(""))
skratkaRod = cs[1].trim();
if (!cs[2].trim().equals(""))
skratkaCislo = cs[2].trim();
if (!cs[3].trim().equals(""))
skratkaPad = cs[3].trim();
koncovka = cs[4].trim();
PodstatneMeno p = new PodstatneMeno(nemennaCast,koncovka,skratkaRod,skratkaCislo,skratkaPad);
if (zt == null)
zt = p;
p.setZakladnyTvar(zt);
p.setPredloha (p);
vystup.add(p);
br.close();
catch (Exception e)
e.printStackTrace();
return vystup;
static ArrayList<PodstatneMeno> najdiMozneTvarySlova (String slovo)
ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
for (int i=0; i< predlohy.size(); i++)
PodstatneMeno predloha = predlohy.get(i);
if (slovo.endsWith(predloha.getKoncovka()))
String jadro = slovo.substring(0,slovo.length()-predloha.getKoncovka().length());
PodstatneMeno zPredloha = predloha.getZakladnyTvar();
PodstatneMeno zt = new PodstatneMeno(jadro, zPredloha.getKoncovka(), zPredloha.getRod(), zPredloha.getCislo(), zPredloha.getPad(), null, zPredloha);
//System.out.println(zt);
vystup.add(zt);
return vystup;
static ArrayList<PodstatneMeno> nacitajZoznamPodstatnychMien (String subor)
ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
try
BufferedReader br = new BufferedReader(new FileReader(subor));
String riadok;
while ((riadok = br.readLine()) != null)
riadok = (riadok+" ").replaceAll("\t",":");
String[] cs = riadok.split(":");
PodstatneMeno pm = new PodstatneMeno(cs[1].trim(), cs[0].trim());
vystup.add(pm);
catch (Exception e)
e.printStackTrace();
return vystup;
return vystup; Thanks
Edited by: 855126 on Apr 27, 2011 11:22 AM
Edited by: EJP on 28/04/2011 21:39: added code tags. Please use them.Please put your code within tags to make it more readable, and then someone will be more willing to offer advice.
As to your error, the message is telling you exactly what the problem is. Your code can't find the class PodstatneMeno. My first question would be, "Is PodstatneMeno in the same package as Lematizator?" If it's not, then you need to import it in your Lematizator class. -
Hi all anybody can contribute on how to configure Freegood for 3 items
HI all,
Can anybody share how to configure 1 free good for 3 items.Ex: When we purchase A,B&C items system should give D as a free good.
Thanks in advance,
Ramhi
there are constraints for free godds scenario
1> Free goods are currently not supported with material structures like product selection, BOM, variants with Bom selection.
2>only supported on a 1:1 basis
3>only supported with sales orders with document category "c" not for quotation etc
4>are not currently supported for deliveries without reference to sales orders
5>are not supported for make to order production, third party scenario,and scheduling agreements
regards -
Can anybody explain all the details about idoc like configuration settings etc..
Hi all can anybody explain the idoc configuration settings, communication channels sender and receiver settings
Hi,
Common steps in both Sender and Receiver:
Create logical system and assign to client
Create RFC Destinations in SM59
Create RFC Ports in WE21
Steps in Sender
Create table in SE11 and insert data
Create Segments in Tcode WE31.Define the table fields in segment
Create basic IDOC type in WE30.Specify the above created segment name,save and release the IDOC
Create message type in WE81
Assign message type to IDOC type in WE82 and release
Create partner profile in BD64,add the message type ,specify sender,receiver,message type and generate partner profile and execute.Distribute the model view
Check the partner profile in WE20
Develop a report in SE38 with code that transfers the data from source to destination
Execute the report and specify the fields to be transferred
Check the control records in WE02
Steps in Receiver:
Create an update function module in SE37
Assign the function module to logical message
Define input method in Tcode BD51
Create process code in WE42
Generate partner profile in BD64
After executing the report in sender system check in the destination system table wheather the fields are transferred
In this case a custom table has been created in sender and receiver with same structure.We can even transfer the standard table fields by using idocs
Thanks & Regards,
Sravanthi Polu -
SD-Configuration With T-Codes Material
Hi Sap Guru's,
Can Anybody send me the configuration Material Of the SD Module....,because i new learner and dont have any material.it would be a great help for me if any body send me the material,,,Thanks in advance..
Regards
Sap Guru
[email protected]Hi
1. ENTERPRISE STRUCTURE
Company Code: - It is the company for which we implement SAP.
NOTE: - It is defined by FI Consultants.
Sales Organisation: - It is the organizational unit, which is responsible for the sales activities in the company.
Distribution Channel: - It is the channel through which goods are reaching the customers.
Divisions: - The range of products or services that the company manufacturing falls into different divisions.
Sales Area: - It is the combination of sales Organisation, distribution channel and Division.
Sales Line: - It is the combination of Sales Organisation and distribution channel.
Sales Office: - It is the Geographical aspect of the structure.
Sales Group: - The employees in a sales office can be divided into different sales groups.
Plant: - The factory is called the plant in SAP.
RELATIONSHIPS:
Company code to Sales Organisation: - One company code can have many sales organizations. But one Organisation has to be assigned to one company code. So the relation is one to many.
Sales Organisation to Distribution channel: - One Organisation can have many distribution channels. One Distribution channel can be assigned to many organizations, so the relation is Many to Many.
Sales Organisation to Division: - One Organisation can have many divisions. One division can be assigned to many organizations. So the relationship is Many to Many.
Distribution channel to Division: - One Distribution channel can have many divisions. One division can be assigned to many Distribution channels. So the relationship is Many to Many.
NOTE: - Division is always Organisation specific.
NOTE: - If sales Organisation wants to use a plant that plant must be
assigned to the Sales Organisation.
Path in SAP Library: -
SAP Library
Logistics
Sales and Distribution
Basic Function and Master Data in Sales and Distribution
Master data in Sales and Distribution
Organisational Structures
Organisational Structures in Sales and Distribution
Defining Sales Organisation: -
SPRO
Enterprise Structure
Definition
Sales and Distribution
Define Copy, Delete, Check Sales organization [EC04]
Go to Define Copy, Delete, Check Sales organization,
Go to Copy Organisational Object,
Come back
Define Sales Organisation
Select defined sales Organisation and go to details.
Select the Address icon & maintain the details and save it.
NOTE: - To unlock the locked data use the Transaction code SM12.
Rebate Process Active: - It controls whether rebate processing is active for a particular sales Organisation.
Defining Distribution Channel: -
SPRO
Enterprise Structure
Definition
Sales and Distribution
Define Copy, Delete, Check Distribution Channel [EC05]
Go to Define Copy, Delete, Check Distribution Channel
Go to Copy Organisational Object,
Come back
Go to Define Distribution Channel
Select defined sales Organisation and give the required name and save it.
Defining Division: -
SPRO
Enterprise Structure
Definition
Sales and Distribution
Define Copy, Delete, Check Division [EC06]
Go to Define Copy, Delete, Check Division
Go to Copy Organisational Object,
Come back
Go to Define Division
Select defined division and give the required name and save it.
Defining Sales Office: -
SPRO
Enterprise Structure
Definition
Sales and Distribution
Maintain Sales Office
Go to New entries and define the sales office
Go to Address Icon and maintain the details and save it.
Defining Sales Group: -
SPRO
Enterprise Structure
Definition
Sales and Distribution
Maintain Sales Group
Go to New entries and define the Sales Group
Go to Address Icon and maintain the details and save it.
Defining a Plant: -
SPRO
Enterprise Structure
Definition
Logistics General
Define, Copy, Delete, Check Plant [EC02]
Go to copy organisational object
Come back
Go to Define Plant
Select the defined Plant and go to details Address and Maintain Details and Edit details and save it.
Defining Company Code: -
SPRO
Enterprise Structure
Definition
Financial Accounting
Edit Copy, Delete, Check Company code [EC01]
Go to Define Company and save it.
Assigning Sales Organisation to the Company Code: -
SPRO
Enterprise Structure
Assignment
Sales and Distribution
Assign Sales Organisation to Company Code [OVX3]
Select the Company Code and go to assign from the list of sales Organisations and select required Sales Organisations and assign and save it.
Assigning Distribution Channels to Sales Organisations: -
SPRO
Enterprise Structure
Assignment
Sales and Distribution
Assign Distribution Channels to Sales Organisation [OVXK]
Select the Sales Organisation and go to assign from the list of the Distribution Channels and select required Distribution Channels and assign and save it.
Assigning Division to Sales Organisations: -
SPRO
Enterprise Structure
Assignment
Sales and Distribution
Assign Division to Sales Organisation [OVXA]
Select the Sales Organisation and go to assign from the list of the Divisions and select required Divisions and assign and save it.
Defining Sales area: -
SPRO
Enterprise Structure
Assignment
Sales and Distribution
Setup Sales area [OVXG]
Select the Sales Organisation and assign Distribution channels
Select the distribution channel and assign the divisions and save it.
Assigning Sales Office to Sales area: -
SPRO
Enterprise Structure
Assignment
Sales and Distribution
Assign Sales Office to Sales are [OVXM]
Select the required Sales Area and assign the Sales Office.
Assigning the Plant to the Company Code: -
SPRO
Enterprise Structure
Assignment
Logistics General
Assign Plant to Company code [OX18]
Select the Company code and assign the required Plants.
Assigning the Plant to Sales Organisation: -
SPRO
Enterprise Structure
Assignment
Sales and Distribution
Assign Sales Organisation Distribution Channel Plant [OVX6]
Select the required sales line and assign the required Plants.
2. MASTER DATA (MD)
Master Data is divided into:
 Customer Master Data
 Material Master Data
 Conditions Master Data
 Customer Material Information Record
1. Customer Master Data: -
Logistics
Sales and Distribution
Master Data
Business Partner
Customer
Create
XD01 Complete
Change
XD02 Change
Display
XD03 Display
The Customer Master Data contains 3 screens:
a. General Data
b. Company Code Data
c. Sales Area Data
Each screen contains different tab pages; each tab page contains different fields.
a. General Data screen: -
Marketing Tab Page: -
Customer Classification: - Specifies a classification of the customer for
Ex: - classifies the customer as a bulk buyer or it can be based on turnover.
Defining Customer Classification: -
SPRO
Sales and Distribution
Master data
Business Partner
Customers
Marketing
Define Customer Classifications
Go to new entries and define and save it.
Unloading Points Tab page: -
Unloading Point: - Specifies the point at which the material is to be unloaded.
Goods Receiving Hours: - Specifies the timings in which the customer can receive the goods.
Defining Goods Receiving Hours: -
SPRO
Sales and Distribution
Business Partner
Customers
Shipping
Define Goods Receiving Hours [OVSC]
Go to new entries and define and save it.
Contact persons tab page: - Enter the contact persons of the customer.
a. Company Code Data Screen: -
Account Management tab page: -
Reconciliation Account: - The Reconciliation account in General Ledger accounting is the account, which is, updated parallel to the sub ledger account for normal postings.
Payment Transactions tab page: -
Terms of Payment: - Specifies the key for defining payment terms composed of cash discount percentages and payment periods.
Defining terms of payment: -
SPRO
Sales and Distribution
Master Data
Business Partners
Customers
Billing Documents
Define terms of payment
Go to new entries and define and save it.
Payment History Record: - If we check this field the payment history of the customer will be recorded in his credit management.
To change the customer details go to xd02 and change the values and save it.
b. Sales Area Data Screen: -
Sales Tab Page: -
Sales District: - Specifies in which district the customer is there.
Before specifying the sales district we should define the sales district.
Defining Sales District: -
SPRO
Sales and Distribution
Master Data
Business Partners
Customers
Sales
Define sales district [OVR0]
Go to new entries and define and save it.
Customer Group: - Identifies a particular group of customers (for Ex: -wholesale or Retail) for the purpose of pricing or generating statistics.
Defining Customer Group: -
SPRO
Sales and Distribution
Master Data
Business Partners
Customers
Sales
Define customer groups [OVS9]
Go to new entries and define and save it.
Customer Pricing Procedure: - This field along with few other fields determines the pricing procedure that is given to a customer. [1]
Shipping Tab Page: -
Shipping Conditions: - This field along with few other fields determines the shipping point that is proposed by the system.
Defining Shipping Conditions: -
SPRO
Logistics Execution
Shipping
Basic shipping functions
Shipping point and goods receiving point determination scheduling
Define shipping conditions
Go to new entries and define and save it.
Delivering Plant: - Specifies the plant from which the goods should be delivered to the customer.
Order Combination: - If we want to combine multiple orders for the customer to create a single delivery we need to check this field.
Partial delivery per Item: - Specifies whether the customer requires full or partial delivery for the item.
Maximum partial delivery is 9.
Billing Documents Tab Page: -
Rebates: - If the customer wants to receive the rebates check this field.
If we check this field the customer can get rebates from the company.
Incoterms: - Incoterms specifies certain internationally recognised procedures that the shipper and the receiving party must follow for the shipping transaction to be successfully completed.
Account Assignment Group: - This field along with few other fields determines the General Ledger Account to which the sales values are to be posted.
Tax classification: - Specifies whether the customer is liable for tax or not.
Partner Functions Tab Page: -
Sold-to-Party (SP): - The customer who is placing order with the company.
Ship-to-Party (SH): - The customer who is receiving the goods.
Bill-to-Party (BP): - The customer on whom the bill is raised.
Payer (PY): - The customer who pays the bill.
Creating the Customer: -
Logistics
Sales and Distribution
Master Data
Business Partner
Customer
Create
XD01
Change
XD02
Display
XD03
Enter the Account Group [Here specify whether the customer is a SP, SH, BP or PY]
Enter the Account Group
Enter the Company Code
Enter the Sales Area
NOTE: - If we get the error sales area is not defined for the customers.
SPRO
Sales and Distribution
Master data
Define common distribution channels [VOR1]
And also go to
Define common divisions [VOR2]
Defining Account Groups: -
SPRO
Financial Accounting
Accounts Receivable and Accounts payable
Customer Accounts
Master Data / Records
Preparations for creating customer master data / record
Define account groups with screen layout (customer)
0001  Sold-to-party
0002  Ship-to-party
0003  Bill-to-party
0004  Payer
If the definition of the account group we can control the field status. We can make fields mandatory or optional or suppress or display mode.
Defining the number ranges for Account Groups: -
SPRO
Financial Accounting
Accounts Receivable and Accounts payable
Customer Accounts
Master Data / Records
Preparations for creating customer master data / record
Create number ranges for customer accounts [XDN1]
Go to change intervals
Select the button insert interval and define a number range.
NOTE: - If we check the field external for a number range it becomes an external assignment. Otherwise it becomes internal assignment.
Assigning the number ranges for Customer Account Groups: -
SPRO
Financial Accounting
Accounts Receivable and Accounts payable
Customer Accounts
Master Data / Records
Preparations for creating customer master data / record
Assign number ranges for customer account groups.
Assign the required number range to the account group.
Partner determination procedure: -
SPRO
Sales and Distribution
Basic Functions
Partner determination
Setup partner determination
Select setup partner determination for customer master
Step 1: -
Defining the Partner Functions: - Here we must not define any partner function.
Go to partner functions.
While defining the partner functions if we check the field Unique that partner faction has to be unique in the customer master i.e. we cannot have multiple partners of that function in a customer master.
Step 2: -
Assigning the partner functions to the Account group: -
Go to account groups function assignment.
Go to new entries and assign the required partner functions to the required account group and save it.
Step 3: -
Defining the partner determination procedure: -
Go to partner determination procedures
Go to new entries and define and save it
NOTE: - Procedure contains all the required partner functions.
Step 4: -
Placing the required partner functions in the procedure: - select the defined procedure and go to partner functions in procedure.
Go to new entries and place the partner functions
If we check the field Not Modifiable for a partner function it cannot change in the customer master.
If we check the field Mandatory Function it becomes a mandatory in the customer master and save it.
Step 5: -
Assigning the procedure to the Account Group: - Go to partner determination procedure assignment. Assign the procedure to the account group and save it.
2. Material Master Data: -
Logistics
Sales and Distribution
Master Data
Products
Material
Other Material
Create
MM01
Change
MM02
Display
MM03
Material master contains different views.
Enter the material number
Enter the industry sector
Enter the material type
Go to select views
Select the following views:
Basic Data 1
Basic Data 2
Sales Organisation Data 1
Sales Organisation Data 2
Sales General and plant data
Sales text
MRP 1
Accounting 1 and select organisational levels
Enter the plant
Enter the sales Organisation then distribution channel
Basic Data 1: -
Base unit of measure: - Specifies the unit of measure in which stocks of the material are managed.
Material Group: - Key that we use to group together several materials or services with the same attributes.
Defining Material Group: -
SPRO
Logistics General
Material Master
Setting for key fields
Define Material groups [OMSF]
Division: - Specifies in which division the material falls.
Gross Weight and Net Weight: - Specify the weight of the material.
Weight Unit: - Specifies the weight unit.
Sales Organisation Data 1: -
Base Unit of Measure: -
Sales Unit: - Here enter the unit of measure in which the material sold. We need to enter a value in this field if the sales unit differs from base unit of measure.
Note: - If the sales unit differs from the base unit we can maintain the conversion factors. To see that information go to additional data.
Delivering Plant: - Specifies the plant from which the material is delivered to the customer.
Cash Discount: - If we check this field we can give cash discounts for this material.
Tax classification: - Specifies whether the material is liable for tax or not.
Note: - To leave the tax both the customer and the material must be liable for tax.
Minimum Order quantity: - Specifies the minimum quantity in the base unit of measure that a customer may order for base material.
Minimum Delivery quantity: - Specifies the minimum quantity that can be delivered to the customer.
Rounding Profile: - Key that the system uses to adjust the order proposal quantity to the deliverable units.
Sales Organisation Data 2: -
Account assignment Group: - This field along with other fields determines the General Ledger Accounts to which different sales values are to be posted.
Item Category Group: - It determines the nature of the material we are defining.
Ex: -
NORM  Standard Item
LEIS  Service or Delivery
BANS  Third party Item
ERLA/LUMF  BOM Item
VERP  Packaging
Sales general / plant: -
Availability check: - Specifies whether and how the system checks the availability of the material and generating the requirement for the materials planning.
Batch Management: - Specifies whether the material is managed in Batches.
Transportation Group: - Grouping of the materials that share the same transportation requirement
Defining Transportation Group: -
SPRO
Logistics Execution
Shipping
Basic shipping functions
Routes
Route determination
Define transportation Group
Loading Group: - Grouping of the materials that share the same loading requirement.
Defining Loading Group: -
SPRO
Logistics Execution
Shipping
Basic Shipping Functions
Shipping point and Goods Receiving point determination scheduling
Define loading Group
MRP: - Material Requirement Planning
MRP 1: -
MRP Type: - Specifies how the requirement of the material can be planned.
Accounting 1: -
Valuation Class: -
Note: - Before creating the material master we should activate company code for material master.
Maintain Company codes for Material Management: -
SPRO
Logistics General
Material Master
Basic settings
Maintain company codes for material management [OMSY]
Define Storage Location: -
SPRO
Enterprise Structure
Definition
Materials Management
Maintain storage location [OX09]
Enter the plant number
Go to New entries
Extending the Organisational views for the Material Master: -
MM01-Create.
Enter the material, which you have already created.
Copy from material = material
Select the organisational views
Select the organisational levels
In the copy from fields enters the values in which the material has been already created.
In the fields on the left side of the screen enter the values to which we would like extend the material.
3. Customer Material Information Record: - We need to maintain this record then the customers are having their own names for the material rather the original names.
Note: - We need to enter the customer material number in the sales order on
the Ordering Party tab page, when we enter the customer material number in the sales order the system will automatically take the original material number.
Creating Customer Material Information Record: -
Logistics
Sales and Distribution
Master Data
Rebate Arrangements
Customer Material Information
VD51 Create.
Material Number: - In this field enter the original name of the material
Customer Material: - Here enter the material number by which the customer places order.
Creating Sales Order: -
Logistics
Sales and Distribution
Sales
Order
VA01 Create
Enter the order type OR & Enter the sales area.
Note: - To maintain the currency conversion rates use the transaction code
OC41.
4. Conditions Master Data: -
Condition Elements: -
a. Price
b. Discount or Surcharge
c. Tax
d. Freight
Ex: - for Condition Types: -
PR00  Price
K004  Material Discount
K007  Customer Discount
K005  Customer Material Discount
KF00  Freight
Maintaining the values for these condition types is called condition records.
Maintaining the condition records for condition types is conditions master data.
Maintaining Condition Records: -
Logistics
Sales and Distribution
Master Data
Conditions
Selecting using condition type
VK11 create
Enter the condition type for which you are maintaining conditions Record.
Select the required key combination
In the material field enter the material for which we are maintaining the conditions record.
Enter the amount the system will automatically take currency and the calculation type.
Valid on and valid to: - The condition record is valid for those orders, which comes from the customer in the specified validity period.
Scales: - If we want to reduce or increase the amount as the quantity is increase select the condition record and go to scales.
Note: - Dont enter any value in the first line.
Setting upper limit and lower limit: - Select the condition record and go to details.
Note: - The price information in the sales order can be seen on the conditions tab page.
3. SALES DOCUMENT PROCESSING (SDP)
Structure of the Sales Document:
Header Data: - The general data that is valid for the entire document is recorded in the document header. For Ex: - Sold-to-party, Ship to party, Document date .
Item Data: - The data in the document header applies to all items in the document but same data applies only two specific items. This data is stored at item level.
Ex: - Material number, order quantity, ship to party, pricing, plant and
storage location.
Scheduling Line Data: - It gives the information about the delivery dates and the corresponding conformed quantities.
Note: - An item can have multiple schedule lines.
To see the header data in the sales document. Select the Icon Display Document Header Details or select Go to Header and select any tab page.
To see the Item data select Go to Item and select any tab page or double click on the item.
Note: - To Change the Ship to party at the item level select the partner
tab page and change it.
To see the schedule line data go to item data and select the tab page schedule lines.
Creating the Sales Documents with Reference:
Creating Quotation: -
Logistics
Sales and Distribution
Sales
Quotation
VA21 Create
Creating Order with reference to Quotation: -
Logistics
Sales and Distribution
Sales
Order
VA01 Create
Enter the order type OR and the sales area.
Select the button Create with Reference.
Specify the quotation number and say copy.
Document Flow: - When we create the documents with reference to some preceding documents it forms a document flow. In this flow if we know one document number with the help of Document Flow. We can know the remaining document numbers.
Note: - To See the remaining document numbers, go to the any sales
document in the flow and select the icon Display document flow.
Note: - If we get the error the order type is not defined for sales area.
SPRO
Sales and Distribution
Sales
Sales documents
Sales documents header
Assign sales area to sales document types
Sales Document Types: -
SPRO
Sales and Distribution
Sales
Sales Document
Sales Document Header
Define Sales Document type [VOV8]
Ex: -
IN  Inquiry
QT  Quotation
OR  Order
RE  Returns sales documents
CS  Cash Sale
RO  Rush Order
DS  Scheduling Agreement
Functionality of the sales document type: -
Sales Document Category: - Its a classification for the different types of documents that we can process in the sales and distribution system
Ex: -
A  Inquiry
B  Quotation
C  Order
Sales Document Block: - Determines whether the sales document is blocked for use. If we block a sales document type users cannot create new sales documents of this type.
Number range internal assignment and Number range external assignment: - Number that determines how the documents are to the numbered by the system. It indicates which number range is relevant for document type.
Creating Number ranges for sales Documents: -
SPRO
Sales and Distribution
Sales
Sales Documents
Sales Document header
Define number ranges for sales documents [VN01]
Item Number Increment: - Specifies the increment by which you want the item numbers in the sales document to increase when the system automatically generates the item number.
Sub Item Increment: - This is for sub items.
Reference Mandatory: - Indicates whether a reference document is mandatory when we create a sales document. If so the indicator also specifies which type of reference document we should use.
Item Division: - If we check this field the division at the item level is proposed from the material master record of the item otherwise the division we enter in the sales document header also counts for all the items.
Check Division: - Controls how the system reacts during the sales order processing when the division at the item level differs from the division in the document header.
Read Info Record: - Determines whether the system read the customer material information record for the sales document type.
Check Credit Limit: - Specifies whether the system runs credit checks and how it response to the check during the sales order processing.
Check purchase order number: - Specifies whether the system should check if the purchase order number entered is already existing for other sales document.
Screen Sequence Group: - Controls which screen we see during a particular transaction and in which sequence they appear.
Transaction Group: - Its a grouping that allows you to control certain characteristics of a transaction according to sales document type.
Document Pricing Procedure: - This field along with few other fields determines the pricing procedure that is proposed by the system.
Display Range: - Specifies whether the system displays only main items or sub items or all the items in the sales document.
F code for over view screen: - Determines which overview screen we reach during the sales order processing after we enter the data in the initial sales document screen.
Quotation Messages: - Set an indicator here if you want to receive a message informing you that open quotations exist when we create a sales document. Depending on the indicator we select the system searches for open quotations in the sales document either at the header level for the customer or item level for the material.
Outline agreement messages: - This is for agreements.
Incomplete Messages: - Specifies whether an incomplete document can be saved. If we check this field we cannot save the incomplete document until we enter the missing data.
Delivery type: - specifies the corresponding delivery document type for the sales document.
Ex: - LF  Outbound delivery with reference to order.
Delivery Block: - Indicates it the entire sales document is blocked for delivery.
Shipping Conditions: - If we specify the shipping condition here the value from the customer master record is over return by this value.
BILLING: -
Delivery related billing type and order related Billing type: - Specifies the corresponding billing document types.
Ex: - F2  Invoice
Billing Block: - Indicates whether the item is blocked for billing or not.
Propose Delivery Date: - If we check this field the system automatically proposes the current date as the delivery date.
Lead-time in days: - Specifies the number of days after the current date that the sales document uses for the proposal of the requested delivery date.
Propose P O Date: - If we check this field the system automatically proposes the current date as the purchase order date.
Contract Data allowed: - This field controls whether we can enter the contract data for the sales document type.
Item Categories: -
AFN  Inquiry
AGN  Quotation Standard Item
TAN  Sales Order
AFNN  IN
AGNN  QT Free of charge Item
TANN  OR
TAS  Third Party Item
Defining Item Categories: -
SPRO
Sales and Distribution
Sales
Sales Documents
Sales Document item
Define item categories
Functionality of the Item Categories: -
Billing Relevance: - Specifies the reference document to create the billing document.
Pricing: - Specifies whether an item is relevant for pricing or not
Business item: - If we check this field during the sales order processing the business data that we enter an item is allowed to differ from the business data in the header.
Schedule Line allowed: - Indicates whether we can create schedule lines for the item.
Item relevant for delivery: - Indicates whether a text item is relevant for delivery processing.
Note: - We need to check this field in the item category TATX. Which is
for text items.
Returns: - If we check this field it becomes a returns item.
Note: - We need to check this field in the item category REN. Which is
for returns.
Weight / Volume Relevant: - Indicator that controls whether the system calculates weight and volume for the item in the sales document.
Credit Active: - Indicates whether the credit management functions are active for the document items.
Determine Cost: - Indicates whether the system determines the cost of a sales document item during pricing.
Note: - The cost condition type is VPRS.
Automatic Batch Determination: - If we want to use automatic batch determination for materials handled in the batch active this field.
Rounding Permitted: - Indicates whether rounding is permitted or not.
Note: - Depending on the rounding profile specified in the material master the order quantity can be rounded in the sales order.
Order Quantity = 1: - If we check this field the order quantity for each line item is limited to one.
Item Category Determination: -
SPRO
Sales and Distribution
Sales
Sales Documents
Sales Document Item
Assign Item Categories
We have to assign the item category to the combination of
Sales Document type
Item category group
Usage
Higher lever item category
Schedule line categories: -
Defining Schedule line categories: -
SPRO
Sales and Distribution
Sales
Sales Documents
Schedule Lines
Define schedule line categories [VOV6]
CS  Third party item
AT  Inquiry schedule line
CP, CV, CN  Sales order schedule lines
BN  Quotation
Functionality of a Schedule Line Category: -
Movement type: - Specifies the physical or logical movement of materials leading to a change in the stock levels or resulting in the consumption of the material.
601  Goods Issue Delivery
602  Returns
561  Posting the stock in the plant
301  Plant to plant stock transfer
302  Return of the stock transfer
Item relevant for Delivery: - Indicates whether the item that is related to a schedule line is relevant for delivery or not.
Order type: - Specifies the order type NB purchase requisition.
Note: - We need to specify, NB in this field for the schedule line category CS which is used for third party item.
Requirement/Assembly: - If we check this field the transfer of requirements will take place into the inventory management for a better planning of material requirement.
Availability: - Specifies whether the system should check the availability of the material.
Schedule line category determination: -
SPRO
Sales and Distribution
Sales
Sales Documents
Schedule Lines
Assign schedule line categories
We need to assign the schedule line category to the combination of Item category and MRP Type.
Item category group  NORM
Sales Document
IN
AFN
+MRP Type
AT Item Relevant Delivery
QT
AGN
+MRP Type
BN Item Relevant Delivery
OR
TAN
+MRP Type
CP Item Relevant Delivery
4. PRICING (PG)
This concept is based on condition technique.
Its the combination of:
1) Condition Tables
2) Access Sequence
3) Condition Types
4) Pricing Procedure
1. Condition Tables: - Condition table contain the key fields for maintaining condition records. I.e. in other words condition records are stored in condition table.
Note: - A condition type can have multiple condition tables.
Note: - A condition table can be used for multiple condition types.
Defining condition tables: -
SPRO
Sales and Distribution
Basic functions
Pricing
Pricing control
Define condition tables [V/03]
Create condition tables
Enter a table number beyond 600
From the field catalogue, which is there on the right side of the screen select the required key fields.
To get the valid on / valid to fields while maintaining the condition records we need to check the field with validity period.
Go to icon Technical View
The fields which are marked, as footer field appears at the footer level at the condition records and the remaining fields appears at the key level.
Select the Icon Generate for generating the condition table.
To save the condition table, select the button Local object.
2. Access Sequence: - Access sequence is a search strategy with the help of which the system gets the valid condition records. It contains the required condition tables in the required order.
Note: - If required an access sequence can be used or assigned to multiple
Condition types.
Note: - The order in which the condition table are placed in access sequence
is important generally it is most specific to most generic
Defining Access Sequence: -
SPRO
Sales and distribution
Basic functions
Pricing
Pricing control
Define access sequences
Maintain access sequences
Go to new entries and define the access sequence.
Select the defined access sequence and go to accesses.
Go to new entries and place the condition tables in the required order
While placing the condition tables check the field exclusive. By doing so if the system finds a valid condition record in the first condition table it will not go to the next condition table
Select the condition table and go to fields the system gives the warning message the field assignment has not yet been made say enter till we get the fields.
Repeat the same step for all the condition tables and save it.
Note: - After defining the access sequence assign it to the corresponding condition type.
3. Condition Types: -
Defining condition types: -
SPRO
Sales and Distribution
Basic functions
Pricing
Pricing control
Define condition types.
Maintain condition types.
Functionality of a condition type: -
Access Sequence: - In this field specify the corresponding access sequence for the condition type.
Condition class: - It is the preliminary structuring of condition types.
Ex: - Surcharges or discounts and price
Plus/Minus: - If we specify negative here a condition type becomes discount and if we specify positive it becomes surcharge.
Calculation type: - Determines how the system calculates price discounts and surcharges in a condition type.
For Ex: - the system can calculate a price as a fixed amount or as a percentage based on the quantity, weight, or volume.
Condition Category: - Its a classification of conditions according to pre-defined categories.
Rounding Rule: - The rule that determines how the system rounds of condition values during pricing.
Manual Entries: - Indicator which controls the priority with in a condition type between a condition enter manually and a condition automatically determined by the system.
Amount / Percent: - If we check this field the amount / percentage of a condition type can be change during the document processing.
Quantity Relation: - Specifies whether the conversion factors for the units of measure in the condition type can be change during document processing.
Delete: - If we check this field the condition type can be deleted during the sales document processing.
Value: - If we check this field the condition value can be changed during the document processing.
Calculation type: - If we check this field the calculation type can be change during the document processing.
Item condition: - If we check this field for a condition types it becomes item condition, which has to be enter at the item level only.
Header condition: - If we check this field for a condition type it becomes header condition, which has to be entered at the header level only
Ex: - RB00 (Discount).
Note: - After entering the header condition type click on the button activate.
Note: - The condition amount of the header condition is copied as it is to all the line items in the document
Group conditi
Maybe you are looking for
-
Itunes 9.2 not downloading
I updated my iphone 3gs to the new software which worked successfully. I then tried to download the new itune 9.2 but it doesnt work and it comes up with the error message 'could not access network location %APPDATA%\.' or 'The installation of QuickT
-
Need Information about templates provided by SAP to Lumira
Hi, I would like to know if SAP provides any templates or pre built models (like BI content) that can be readily used by SAP lumira. If so, I need details about those models or templates or any related information. Thanks
-
Archive log mode required for async. CDC?
Hello there, I have tried to set up asyn. HotLog CDC on my 10g database but after creating a publisher I get the following error Message when creating a change set with the publisher: BEGIN DBMS_CDC_PUBLISH.CREATE_CHANGE_SET( change_set_name => 'MY_C
-
Images don't display in custom stationary
I'm trying to create a custom stationary template in Mail, but the images do not appear, only a missing picture icon.
-
How can I tell which drive I am currently using...muptiple drives.
I am very new to Mac and multiple drives. I have 2 internal drives - one is a bootable partition ( a Sandbox or safe clone ) - made with Super Duper that shows up on my desktop as a seperate Drive. So, I have 3 drives mounted - is there any way to te