Why mvt types needed

Please tell me what is the use of mvt types in sd.
I have seen so many mvt types like Normal Delivery - 601
Consignment Fillup - 631 etc.
why we need them? without them what will happen.
please tell me with an example why it so needed.

Hello,
When you enter a goods movement in the system, you must enter a movement type to differentiate between the various goods movements. A movement type is a three-digit identification key for a goods movement. The movement type is important because it controls the screen layout, adjustment of inventories, the GL account for financial purposes etc.
Eg: 601 Goods issue for delivery In Shipping, this movement type is created automatically with the Goods issue for delivery function. The quantity is taken from unrestricted-use stock.
631 Transfer posting unrestricted use - customer consignment stock (Shipping) The quantity is transferred from unrestricted-use stock to consignment stock at customer.
Prase

Similar Messages

  • Fault message types: Why do we need them?

    Hi guys,
    I have a bpm scenario created, tested and working.
    This bpm starts with a async receive, a Sync Send to a R3 system by an ABAP proxy and a final async send to the original system.
    I'm contemplating exception handling and other type of errors. Meaning, if the abap proxy dumps I can raise an exception and map it on the XI environment. The thing is, on  sxmb_moni I get the exception handler, with the exception texts, id's, etc... from the R3 being mapped to the XI fault message type.
    But the problem is I can't get to map the text from the fault message type into any field from the response of the original system.
    I've searched the forum and I've seen that this area is surrounded by doubts and questions...
    But in the end I'm forced to place the question, why do I need the fault message types? What use can I give them, besides of the cute little thunder on the sxmb_moni?
    Thanks for your attention guys

    Hi Krishna,
    I've read the SAP description about Fault Message Types but I'm still struggling on how to use them correctly.
    Why do we need them if I can't do nothing with it on the BPM side? After the mapping of the FMT, I'd like to acess it so that I can send a description back to the original system...The thing is, in BPM you can't acess the FMT, you can only create a new BRANCH (on a block step) for it...
    I've tried to acess the description text on trace which comes with the message, but it seems that the trace only serves for posting info, and not for getting any...
    The Mapping Runtime Constants have some information where you can read some descriptions, but nothing related to the errors....You can read the Receiver service, sender, interface_namespace, but nothing from the ERROR tag...
    Is there a way to get the description? Or anything related to the error tag?
    Thanks in advance

  • Order types, why do we need to create our order types and not use the stand

    HI
    Order types, why do we need to create our order types and not use the standard ones during implementation.

    Hi Raj,
    Well there is no hard and fast rule that you have to copy nad create a new order type. Its just to meet our own requirements that we copy the standard and make the changes if required to meet our business needs.
    And by this way we keep unchanged the standard order type for further use.
    If you are sure that the standard order type satisfies your need you can directly use that only.
    I hope this clarifies the issue.
    Do reward if find useful
    Regards,
    Abhi

  • Why do we need Interim Storage Type ?

    Why do we need Interim Storage Type ? If you say it's acting as an intermediatary  buffer location... Then why don't we need any Interim Storage for Bin to Bin stock movement??
    Any pointers will be appreciated .

    You have answered the for your question number 1.
    I am going to answer for your question number 2:
    We usually have interim storage bins in interim storage types. But these will disappear after the stock moved from interim bins.
    This interim storage type/bin concept is created to map the real business process. Let's talk about the examply GR from supplier. Usually,
    Warehouse personnel, unload the stock from truck and keep a place called staging area. This is in SAP called Interim storage area.
    At this time, transaction is completed for IM side, Ie the material document is created and MM-WM trigger point TR also created. and depends the SAP config settings, this TR may be converted to as a TO and waiting for the confirmation.
    Hope it helps.

  • Need a report_Batchwise Mvt type last transaction date qty

    Dear Gurus
    Please suggest me any standard report or Table for display below report.
    Batchwise>Mvt type>last transaction date>qty
    thanks in advance
    Mayur

    Hi,
    MB51 --- Material documents list.
    Regards,

  • Stock transfer 352 mvt type reversal issue

    HI
    In mb11 t.code 352 trfr pstng to stock in transit from unrestr.-use - reversal system asking account determination entry
    1000 AUM __ 3000 not possible why system asking AUM Expense/revenue from stock transfer GL account in obyc.
    same  price in supplying and receiving plant in material master while mb11 t.code 351 mvt type accounting document inventory posting (BSX) GL account is taking my system,so during reversal in mb11 352 mvt type which GL i need to assign in Expense/revenue from stock transfer (AUM) Whether i need to assign inventory posting (BSX) GL or price difference GL account.(PRD)which GL i need to assign wt is reason.plz suggest.
    Regards
    Sam

    Hello,
    Go to FS00 --> 62000026 --> Click on the edit cost element button, it will take you to cost element screen. If you have a cost element , enter the same. Otherwise create a cost element with KA01, give G/L account and controlling area, save.
    Prase

  • REG Mvt type related to order types

    Hi
        For our Prod orders , goods receipt will done with mvt type 101. i need to create a new order type for which i need a new mvt type have to be used for goods receipt for those orders. is it possible to change the mvt type as required for goods receipts.
    Regards,
    PradeepM.

    Hi,
        Such type of changes should not be preferred because it imapct alot.
    As you see that it depends upon package & package not depend upon any field value, it depends upon table & fileld, so PP order type package should be same, so you can't give seperate package for a specific order type.
    Order type package depends upon order category which u can check in OPJH, but u can't creat any new order category .
    because it has alot of technical settings so SAP not allow it.
    Now there is two way to resolve ur issue.
    1.  Brief why you want seperate movement type, if u want it for information then there were alot of fields u can use in place making so big changes.
          If u want seperate GL then you can easily made it by introducing new valuvation class etc. so check ur original requirement.
    2. If you hard & fast want to change Movement type then take it under process order category, and u can give seperate movement type for this order type, you can easily avoid control recipy in process order so it become very much similar to discrete order.
    Thanks........Rakesh

  • Mvt type 301 'o'

    Hi All,
    We have the issue in the subcontracting :
    we have 2 plants 0920 and 0931 . the subcontract vendor has assign to both the plant with the same vendor account number vc21707. 
    we do manufacturing one assmy by the above subcontract. for that we send the components of the assmy from the plant 0920. and they doing the process. after that we need to do GRIR for the assmy to the plant 0931. since we lock out the old palnt 0920.
    client do not want the classical process. reverse the material and sto b/w plants and send thru new plant.
    instead they need do the transfer the suncontrator stock which is given from 0920 to the new plant 0931
    i.e. need to tranfer the subcontractor stock account from one plant to other plant account ,in which the vendor no is same to both the plant
    how the mvt type 301 'o' type is used for this, do any configuration is needed.

    Hi kishore,
    we are doing this alone :
    You can use only 301 O if stcok is already insubcontractor stock and you are transferring to other plant in the same stcok type.
    but when doing this system check the restricted sub-contractor stock , but we have the unrestricted sub contractor stock. 
    thats why system show the error
    Deficit of Stock w. vendor rstr 1.000 PC : 54204118 0920 O 
    Message no. M7021
    HOW TO SOLVE THIS ISSUE.
    Edited by: raj on May 20, 2009 12:03 PM

  • Auomatic TO creation and confirmation from PCN with 321 MVT type

    Dear Friends,
    I am facing following WM issue, Kindly go through it and reply me with your valuable solution.
    In my plant QM is active, so while receiving goods against any Purchase Order (MVT TYPE 101), all my stock goes to quality. After UD check, 99% material move to unrestrictd stock (321 mvt.type) and 1% used for quality (331 mvt. type).
    For an example if I have received 1000 kg material (which initially goes to quality), after UD 995 kg material come to unrestricted stock and 5 kg used for quality check.
    In my existing system for material document with mvt. type 321, one PCN is generated in the background, and using LT05 we make TO from PCN and confirm it.
    But is it posible to create the TO and confirm from the PCN (Mvt. 321) in the backgroung itself, i mean to say that while my QM user is doing UD, material document with mvt 321, one PCN and TO will be generated and TO will be confirmd in the background itself.
    I don't want to use LT05  separetely to make TO from PCN.
    Please reply me soon.

    You need to make the config settings here in ur system.
    SPRO > Logistics execution >  WM > Interfaces > Inventory Management > Activate Automatic TO Creation
    Assign the relevent setting to movement types...
    Hope thsi helps
    Thanks & regards
    AHP

  • Why do I need to catch this exception?

    Hello all
    This is a question about exception handling. I have to build a diary application that lets you save reminders on particular dates using xml. Just to make it a little tougher, I was not allowed to use the Calendar class. This is the code I wrote:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.*; 
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import java.io.*;     
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;                                                                                                                                                                                                                         
    import static java.lang.Math.*;
    public class CalendarAssignment extends JFrame implements ActionListener
         int MonthLength [] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
         public JButton [] days = new JButton[43];
         private JLabel lbl, reminderlbl;
         private JPanel top, grid, remindercenter, reminderbottom;
         private JFrame reminderframe;
         private JTextField year1, reminderinput, dayno;
         private JComboBox months;
         private Container container;
         private JButton fetch, save, cancel;
         private Document doc;
         private File file;
         private Node node;
         private String year, month, day;
              public static void main( String[] args ) {
                   CalendarAssignment c = new CalendarAssignment( );
                   c.setSize( 400, 300 );
                   c.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                   c.show( );
              public CalendarAssignment( ) {
                   int CurrentYear, CurrentMonth;
                   String YearString, MonthString, Now;
                   Date today;
                   container = getContentPane( );
                   container.setLayout( new BorderLayout( ) );
                   SimpleDateFormat DateFormatter;
                   DateFormatter = new SimpleDateFormat( "MM.yyyy" );
                   today = new Date( );
                   Now = DateFormatter.format( today );
                   MonthString = Now.substring( 0,2 );
                   YearString = Now.substring( 3,7 );
                   CurrentMonth = Integer.valueOf( MonthString );
                   CurrentYear = Integer.valueOf( YearString );
                   top = new JPanel( );
                        String [] items = { "January", "February", "March", "April", "May", "June",
                                      "July", "August", "September", "October", "November",
                                      "December" };
                        months = new JComboBox( items );
                        months.setEditable( false );
                        months.setSelectedIndex( CurrentMonth - 1 );          
                        year1 = new JTextField( );
                        year1.setText( YearString );
                        year1.setEditable( true );
                        year1.setHorizontalAlignment( year1.CENTER );
                        fetch = new JButton( "Fetch Month" );
                        fetch.addActionListener( this );
                        top.setLayout( new GridLayout( 1, 3, 20, 0 ) );
                        top.add( months );
                        top.add( year1 );
                        top.add( fetch );
                   grid = new JPanel( );
                        grid.setLayout( new GridLayout( 7, 7, 0, 0 ) );
                        String [] week = { "Mon", "Tue", "Wed", "Thur", "Fri", "Sat", "Sun" };
                        for ( int a = 0; a < 7; a ++ ) {
                                  JLabel lbl = new JLabel( week[a], JLabel.CENTER );
                                  grid.add( lbl );
                        for ( int i = 0; i < 42; i ++ ) {
                                  days[i] = new JButton( );
                                  grid.add( days[i] );
                                  days.addActionListener( this );
                        DrawCalendar( CurrentMonth, CurrentYear );
                        container.add( top, BorderLayout.NORTH );
                        container.add( grid, BorderLayout.CENTER );
              private void DrawCalendar( int SelectMonth, int SelectYear ) {
                        int DisplayMonthLength, Buttons;
                        String ButtonID = "";
                        int OffSet = MonthStart( SelectMonth, SelectYear );
                        DisplayMonthLength = MonthLength [SelectMonth - 1];
                        if ( SelectMonth == 2 )
                             DisplayMonthLength += LeapYear( SelectYear );
                        for ( Buttons = 1; Buttons < 43; Buttons ++ ) {
                             if ( ( Buttons <= OffSet ) || ( Buttons > ( DisplayMonthLength + OffSet ) ) ) {
                                  ButtonID = "";
                                  days[Buttons-1].setEnabled( false );
                             else {
                                  ButtonID = Integer.toString( Buttons - OffSet );
                                  days[Buttons-1].setEnabled( true );
                        days[Buttons-1].setLabel( ButtonID );
                        grid.add( days[Buttons-1] );
              private int LeapYear( int year ) {
                        int FourHundred, OneHundred, Fourth;
                        FourHundred = year % 400;
                        OneHundred = year % 100;
                        Fourth = year % 4;
                        if( ( ( FourHundred == 0 ) ) || ( ( OneHundred != 0 ) && ( Fourth == 0 ) ) )
                             return ( 1 );
                        else
                             return ( 0 );
              private int MonthStart( int Month, int Year ) {
                        int OffSet, LastMonths, BeforeOrAfter, Years;
                        int AllDays = 0;
                        int YearDays = 365;
                        int YearMonths = 12;
                        BeforeOrAfter = Year - 2006;
                        Years = abs( BeforeOrAfter );
                        if( BeforeOrAfter != 0 )
                             BeforeOrAfter = BeforeOrAfter / Years;
                        switch( BeforeOrAfter ) {
                             case 1:
                                  for( int a = 2006; a < Year; a ++ ) {
                                       AllDays += YearDays + LeapYear( a );
                                  AllDays += LastMonthsCalc( Month, Year );
                             break;
                             case -1:
                                  for( int a = 2005; a > Year; a -- ) {
                                       AllDays += YearDays + LeapYear( a );
                                  for( LastMonths = YearMonths; LastMonths >= Month; LastMonths -- ) {
                                       AllDays += MonthLength[LastMonths - 1];
                                       if( LastMonths == 2 )
                                            AllDays += LeapYear( Year );
                             break;
                             default:
                                  if( Month > 1 )
                                       AllDays += ( LastMonthsCalc( Month, Year ) );
                        OffSet = AllDays % 7;
                        if( BeforeOrAfter ==( -1 ) )
                             return( 6 - OffSet );
                        else if( OffSet > 0 )
                             return( OffSet - 1 );
                        else
                             return( 6 );
              private int LastMonthsCalc( int Month, int Year ) {
                        int Counter;
                        int days = 0;
                        for( Counter = 1; Counter < Month; Counter ++ ) {
                             days += MonthLength[Counter - 1];
                             if( Counter == 2 )
                                  days += LeapYear( Year );
                        return( days );
              public void CreateReminder( String buttonID, String yearID, String monthID ) {
                        reminderframe = new JFrame( );
                        reminderlbl = new JLabel( );
                        reminderframe.setLayout( new GridLayout( 2, 1, 0, 0 ) );
                        remindercenter = new JPanel( );
                             reminderlbl = new JLabel( "Please type in reminder to be saved for " + buttonID + " " + monthID + " " + yearID + ":", JLabel.CENTER );
                             reminderinput = new JTextField( 30 );
                             reminderinput.setHorizontalAlignment( reminderinput.CENTER );
                             reminderinput.setEditable( true );
                             remindercenter.setLayout( new GridLayout( 2, 1, 0, 0 ) );
                             remindercenter.add( reminderlbl );
                             remindercenter.add( reminderinput );
                        reminderbottom = new JPanel( );
                             save = new JButton( "Save" );
                             save.addActionListener( this );
                             cancel = new JButton( "Cancel" );
                             cancel.addActionListener( this );
                             dayno = new JTextField( buttonID );
                             dayno.setEditable( false );
                             dayno.setEnabled( false );
                             dayno.show( false );
                             reminderbottom.setLayout( new FlowLayout( ) );
                             reminderbottom.add( save );
                             reminderbottom.add( cancel );
                             reminderbottom.add( dayno );
                        reminderframe.setSize( 500, 75 );
                        reminderframe.add( remindercenter );
                        reminderframe.add( reminderbottom );
                        reminderframe.pack( );
                        reminderframe.show( );
              public void SaveReminder( String dayID, String yearID, String monthID ) throws Exception {
                        file = new File( "Diary.xml" );
                        doc = DocumentBuilderFactory.newInstance( ).newDocumentBuilder( ).parse( file.toURL( ).toString( ) );
                        String year = yearID;
                        String month = monthID;
                        String day = dayID;
                        //System.out.println( year );
                        //System.out.println( month );
                        //System.out.println( day );
                        CreateEntry( doc.getDocumentElement( ) );
                        writeXmlFile( );
              public boolean CreateEntry( Node node ) {
                        Node searchNode;
                        searchNode = getYear( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Year" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", year );
                        node = searchNode;
                        searchNode = getMonth( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Month" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", month );
                        node = searchNode;
                        searchNode = getDay( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Day" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", day );
                        node = searchNode;
                        String entry = reminderinput.getText( );
                        Node textNode = doc.createTextNode( entry );
                        node.appendChild( textNode );
                        return true;
              private Node getYear( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if(node.getNodeName( ).equals( "Year" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == year )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private Node getMonth( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if( node.getNodeName( ).equals( "Month" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == month )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private Node getDay( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if( node.getNodeName( ).equals( "Day" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == day )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private void writeXmlFile( ) throws Exception {
                   Source source = new DOMSource( doc );
                        Result result = new StreamResult( file );
                   Transformer xformer = TransformerFactory.newInstance( ).newTransformer( );
                   xformer.setOutputProperty( OutputKeys.INDENT,"yes" );
                   xformer.setOutputProperty( OutputKeys.DOCTYPE_SYSTEM,"Diary.dtd" );
                   xformer.transform( source, result );
              public void actionPerformed( ActionEvent e ) {
                        String IDButton = e.getActionCommand( );
                        String IDYear = year1.getText( );
                        Object IDMonthObj = months.getSelectedItem( );
                        if( e.getSource( ) == fetch ) {
                             String YearText = year1.getText( );
                             int YearNumber = Integer.valueOf( YearText );
                             int MonthsIndex = months.getSelectedIndex( ) + 1;
                             DrawCalendar( MonthsIndex, YearNumber );
                        else if( e.getSource( ) == cancel ) {
                             reminderframe.hide( );
                        else if( e.getSource( ) == save ) {
                             String IDDay = dayno.getText( );
                             String IDMonth = String.valueOf( IDMonthObj );
                             SaveReminder( IDDay, IDYear, IDMonth );
                        else {
                             String IDMonth = String.valueOf( IDMonthObj );
                             Toolkit.getDefaultToolkit( ).beep( );
                             int n = JOptionPane.showConfirmDialog( null, "Set reminder on this date?", "Question", JOptionPane.YES_NO_OPTION );
                             if( n == JOptionPane.YES_OPTION ) {
                                  CreateReminder( IDButton, IDYear, IDMonth );
    If you compile it, you will realise that I get an error about exception handling. My lecturer gave me an example code of how to do the same thing without using a GUI:
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import java.io.*;
    import java.util.*;
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class CallDOM
         Document doc;
         File file;
         Scanner input;
         int year, month, day;
         String currentYear, currentMonth;
         public static void main(String args[]) throws Exception
              CallDOM cd=new CallDOM();          
         CallDOM() throws Exception
              file=new File("Diary.xml");
              //create DOM from file
              doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file.toURL().toString());
              input=new Scanner(System.in);
              System.out.println("1) Create entry");
              System.out.println("2) Read entry");
              System.out.println("3) Show Diary");
              System.out.println("4) Quit");
              int choice=input.nextInt();
              while(choice!=4)
                   switch(choice)
                        case 1: GetDate();CreateEntry(doc.getDocumentElement());break;
                        case 2: GetDate();ReadEntry(doc.getDocumentElement());break;
                        case 3: ShowDiary(doc.getDocumentElement());
                   System.out.println("1) Create entry");
                   System.out.println("2) Read entry");
                   System.out.println("3) Show Diary");
                   System.out.println("4) Quit");
                   choice=input.nextInt();
              writeXmlFile();
         public void GetDate()
              System.out.println("Enter date (dd mm yyyy)");
              day=input.nextInt();
              month=input.nextInt();
              year=input.nextInt();
         public boolean ReadEntry(Node node)
              node = getYear(node);
              if(node==null) return false;
              node = getMonth(node);
              if(node==null) return false;
              node = getDay(node);
              if(node==null) return false;
              node = node.getFirstChild();
              while(node!=null)
                   System.out.println(node.getNodeValue().trim());     
                   node=node.getNextSibling();
              return true;               
         public boolean CreateEntry(Node node)
              Node searchNode;
              searchNode = getYear(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Year");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(year));
              node = searchNode;
              searchNode = getMonth(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Month");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(month));
              node = searchNode;
              searchNode = getDay(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Day");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(day));
              node = searchNode;
              System.out.println("Enter Text");
              String entry=input.next();
              entry+=input.nextLine();
              Node textNode = doc.createTextNode(entry);
              node.appendChild(textNode);
              return true;               
         public void ShowDiary(Node node)
              Stack<Node> stack=new Stack<Node>();
              Node child;
              stack.push(node);
              while(!stack.empty())
                   node = stack.pop();
                   if(ProcessNode(node))
                        child = node.getLastChild();
                        while(child!=null)
                             stack.push(child);
                             child = child.getPreviousSibling();
         private boolean ProcessNode(Node node)
              if(node.getNodeName().equals("Year"))
                   currentYear=node.getAttributes().item(0).getNodeValue();
              if(node.getNodeName().equals("Month"))
                   currentMonth=node.getAttributes().item(0).getNodeValue();
              if(node.getNodeName().equals("Day"))
                   System.out.print(node.getAttributes().item(0).getNodeValue()+"/"+
                                            currentMonth+"/"+currentYear+": ");
                   node=node.getFirstChild();
                   while(node!=null)
                        System.out.println(node.getNodeValue().trim());
                        node=node.getNextSibling();
                   return false;
              return true;               
         private Node getYear(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Year")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==year)
                             return node;
                   node = node.getNextSibling();                    
              return null;
         private Node getMonth(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Month")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==month)
                        return node;
                   node = node.getNextSibling();                    
              return null;
         private Node getDay(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Day")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==day)
                        return node;
                   node = node.getNextSibling();                    
              return null;
         private void writeXmlFile() throws Exception
            Source source = new DOMSource(doc);
            Result result = new StreamResult(file);
            Transformer xformer = TransformerFactory.newInstance().newTransformer();
            xformer.setOutputProperty(OutputKeys.INDENT,"yes");
            xformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"Diary.dtd");
            xformer.transform(source, result);
    }My question is, why does the exceptions in the example code not need to be caught? And why do I have to catch the exceptions in my code? Several exceptions are thrown in the example code, but there is no catch statement.
    Thanks for any advice!!

    Since your question didn't come with any relevant details, and since you have huge steaming piles of irrelevant code, all I can give is a general answer to "Why do I need to catch this exception?"
    [url http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html]Exception tutorial at http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html
    Here's a quick overview of exceptions:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.

  • What Is, And Why do I need it: ExpressCard/34 Slot?

    In the very near future I will be obtaining a 17" MBP. That's just savvy, except for one minor detail. What is an ExpressCard/34 slot, why do I need one, why would it have been included in this particular size MBP and what can I shove in there?

    The expresscard slot is for expansion purposes. it allows a low cost esata connection to your macbook pro. you can plug an esata adapter in and then use one of many external esata enclosures. "apiotek ec-0003d" costs about 40 bucks and will let you add 2 non-bootable external esata enclosures then can run at 3Gbps. fw800 runs at 800Mbps..
    "OWC esatat sata expressCard/34Adapter" bootable 1 esata adapter is 19 bucks it will let you add 1 esata enclosure at speeds up to 3Gbps.
    so if you get the non bootable one you can add 2 enclosures like "sans digital towerStor Ts2ct". that would be up to 4Tb for each one total of 8tb far faster then fire wire. if you get the bootable 1 esata type you could add 1 external at 4tb. this lets you macbook pro boot from a 4tb external at internal speeds. kind of gives you the ability to make you laptop a real desk top when you want it to be that. Then back to a real lap top by unplugging it. Not trying to sell any of the above items I just happen to use them.
    This option was pulled from iMac's a real drag as iMacs could use more fast enclosures.

  • Why do I need to pass params. to getConnection when using OracleDataSource?

    Hi,
    I've been experimenting with Tomcat 5.5 and using Oracle proxy sessions. After many false starts, I finally have something working, but I have a question about some of the code.
    My setup:
    In <catalina_home>/conf/server.xml I have this section:
    <Context path="/App1" docBase="App1"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="App1ConnectionPool" auth="Container"
    type="oracle.jdbc.pool.OracleDataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    factory="oracle.jdbc.pool.OracleDataSourceFactory"
    url="jdbc:oracle:thin:@127.0.0.1:1521:oddjob"
    username="app1" password="app1" maxActive="20" maxIdle="10"/>
    </Context>
    In my App directory, web.xml has:
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>App1ConnectionPool</res-ref-name>
    <res-type>oracle.jdbc.pool.OracleDataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    And finally, my java code:
    package web;
    import oracle.jdbc.pool.OracleDataSource;
    import oracle.jdbc.driver.OracleConnection;
    import javax.naming.*;
    import java.sql.SQLException;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.util.Properties;
    public class ConnectionPool {
    String message = "Not Connected";
    public void init() {
    OracleConnection conn = null;
    ResultSet rst = null;
    Statement stmt = null;
    try {
    Context initContext = new InitialContext();
    Context envContext = (Context) initContext.lookup("java:/comp/env");
    OracleDataSource ds = (OracleDataSource) envContext.lookup("App1ConnectionPool");
    message = "Here.";
    if (envContext == null)
    throw new Exception("Error: No Context");
    if (ds == null)
    throw new Exception("Error: No DataSource");
    if (ds != null) {
    message = "Trying to connect...";
    conn = (OracleConnection ) ds.getConnection("app1","app1");
    Properties prop = new Properties();
    prop.put("PROXY_USER_NAME", "xxx/yyy");
    if (conn != null) {
    message = "Got Connection " + conn.toString() + ", ";
              conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME,prop);
    stmt = conn.createStatement();
    //rst = stmt.executeQuery("SELECT 'Success obtaining connection' FROM DUAL");
    rst = stmt.executeQuery("SELECT count(*) from sch_header");
    if (rst.next()) {
    message = "# of NJ schools: " + rst.getString(1);
    rst.close();
    rst = null;
    stmt.close();
    stmt = null;
    conn.close(); // Return to connection pool
    conn = null; // Make sure we don't close it twice
    } catch (Exception e) {
    e.printStackTrace();
    } finally {
    // Always make sure result sets and statements are closed,
    // and the connection is returned to the pool
    if (rst != null) {
    try {
    rst.close();
    } catch (SQLException e) {
    rst = null;
    if (stmt != null) {
    try {
    stmt.close();
    } catch (SQLException e) {
    stmt = null;
    if (conn != null) {
    try {
    conn.close();
    } catch (SQLException e) {
    conn = null;
    public String getMessage() {
    return message;
    My question concerns this line of code:
    conn = (OracleConnection ) ds.getConnection("app1","app1");
    Why do I need to pass in the user name/password? Other examples, that I see simply have:
    conn = (OracleConnection ) ds.getConnection();
    But when I use this code, I get the following error:
    java.sql.SQLException: invalid arguments in call
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:236)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
         at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:221)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:165)
         at web.ConnectionPool.init(ConnectionPool.java:32)
    ... more follows, but I trimmed to keep posting shorter :-)
    Is there anyway that I can avoid having to pass the user/password to getConnection()? It seems that I should be able to control the user/password used to establish the connection pool directly in the server.xml file and not have to supply it again in my java code. In earlier experiments when I was using "import java.sql.*" and using it's DataSource, I can use getConnection() without having to pass user/password, but then the Oracle Proxy methods don't work.
    I'm a java newbie so I guess that I should be happy that I finally figured out how to get proxy connections working. However it seems that I am missing something and I want this code to be as clean as possible.
    If anyone can point me to a better method of using connection pools and proxy sessions, I would appreciate it.
    Thanks,
    Alan

    Hi,
    Thanks for the replies.
    Avi, I'm not really sure what you are getting at with the setConnectionProperties. I looked at the javadoc and saw that I can specify user/password, but since I'm using a connection pool, shouldn't my Datasource already have that information?
    Maro, your comment about not having set the user/password for the Datasource is interesting. Are you referring to setting it in the server.xml configuration file? As you can see I did specify it in addition to setting the URL. In my code example, I'm not having to respecify the URL, but maybe I have a typo in my config file that is causing the username/password not to be read properly??
    The other weird thing is that I would have expected to see a pool of connections for user App1 in V$SESSION, but I see nothing. If I use a utility to repeatedly call a JSP page that makes use of my java example, then I do see v$session contain brief sessions for App1 and ADAVEY (proxy). The response time of the JSP seems much quicker than I would have expected if there wasn't some sort of physical connection already established though. Maybe this is just more evidence of not having my server.xml configured properly?
    Thanks.

  • Automatic creation of Purchase order not possible for 103 mvt type

    Hi,
    If i could configure "create p.o automatically", while doing G.R for mvt type 101,
    why cannot i do the same with 103 mvt type.
    I checked the checkbox "create p.o automatically" for movement type 103 and tried to do G.R for others using Mvt type 103.
    It is throwing error as "Update control of movement type is incorrect (entry 103 x x).
    Which entry controls the above my requirement?
    Please advise .
    Thank you.

    Hi,
    These are std which is provided my SAP, you can configure for automatic PO creation for 101 movt type only..........

  • Automatic creation of Batch using mvt type 311

    when i am trying to transfer material from one storage location to another using mvt type 311. the system is not creating the batch automaticcally.
    I have already maintained allthe basic configuration required for this.even in IMg ->logistic general->batch management---->creation of new batch in this path also for mvt type 311 i mainatined (automatical/manual without check)batch creation.but still the system is not generating the new batch.
    Can anybody help in this issue.
    Thanks in advance

    Hi,
    When you do transfer postings, SAP will set the batch number same as the one from which you are issuing the stock. To avoid this you can set the creation of batch to B (Automatic/ Manual with check in user exit)
    You need to use following user exit at batch creation
    EXIT_SAPLV01Z_001
    EXIT_SAPLV01Z_002
    Hope this helps, reward if useful,
    Best Regards VS

  • Why do I need to Clone a drive partition...

    ...if I'm installing a new OS to another one??
    I've got Panther--my current, albeit outdated, boot OS--installed on one partition of my Dual G4 (and yes, the limitations of this computer is one reason I'm not on Leopard yet)--and trying to install Tiger onto the 2nd partition (which will hopefully tide me over until I upgrade to a new iMac or Powerbook w/ Leopard). I don't have much experience upgrading to a new OS while one is working, so hopefully the older/current one will act as a backup safeguard if the newer one acts up.
    Anyway, I haven't been able to install it yet--for whatever reason, it's not progressing beyond "Verifying Destination Volume," and I can't seem to verify the partition in Disk Utility due to Authentication issues, but that's ANOTHER issue--but unless that directly relates, I can't figure out WHY everyone keeps telling me that I should clone either drive (using Carbon Copy).
    I already have all the important PERSONAL files from the current boot partition--and everything on the 2nd partition I'm trying to install to--backed up onto an external.
    So why do I need to clone either drive?? Just trying to clarify here...

    phasmatrope:
    I installed the new OS, Tiger, last night (which was actually fairly easy too... although it DIDN'T ask me if I wanted to do a Clean Upgrade, or an Archive & Install, which I'd heard were both options, which DOES worry me somewhat... but I suppose that's another post). It seems to be working fine thus far.
    It is hard to tell exactly what installation option was used in your installation, but it you are satisfied that your installation is working as it should, I don't think you need to be concerned about it.
    I figure in a few weeks, I may try deleting the clone from my partition (how long I should wait though, and whether or not I'll need to erase the drive entirely
    So long as your installation is working well, and all your data that you backed up has been restored, and you are sure you will not be losing anything of value, you may delete the clone/backup...but wait until I respond to another of your questions.
    what I'm wondering is: can I copy other material to that drive in the meantime without any problem?? After all, it IS a 300GB drive, and since I'd only cloned the 37 or so GB of my old boot partition there, I should be able to fit the 45 GB that are on the second partition onto there.
    I suggest that you partition your 300 GB external HDD so that it can accomodate all your needs.
    • Partition your HDD so that one partition is approximately the size of your internal HDD. Then you can clone your new installation to that partition, and make regular backups to that partition.
    • You can create a second partition to accomodate the material of the second partition of the drive you clone. Give yourself sufficient room for expansion.
    • Create other partitions one possibly just for scratch, saving odds and ends or whatever.
    Here is a step-by-step procedure for partitioning:
    Formatting, Partitioning Erasing a Hard Disk Drive
    Warning! This procedure will destroy all data on your Hard Disk Drive. Be sure you have an up-to-date, tested backup of at least your Users folder and any third party applications you do not want to re-install before attempting this procedure.
    Formatting an External HDD
    Connect external HDD to computer
    Turn on external HDD
    Start up computer and log in
    Go to Applications > Utilities > Disk Utility and launch DU.
    Select your HDD (manufacturer ID) of drive to be partitioned in left side bar.
    Select number of partition in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD. External HDDs usually have more than one. See Dr. Smoke’s FAQ Backup and Recovery for tips on partitioning external HDD
    Note 2: For more partitions than one, after you have selected the number of partitions you can adjust the size of the partition by selecting the top partition and typing in the size; then move down if more adjustments need to be made..)
    Type in name in Name field (usually Macintosh HD)
    Select Volume Format as Mac OS Extended (Journaled)
    Click Partition button at bottom of panel.
    Select Erase tab
    Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    Check to be sure your Volume Name and Volume Format are correct.
    Optional: Select on Security Options button (Tiger) Options button (Panther & earlier).
    Select Zero all data. (This process will map out bad blocks on your HDD. However, it could take several hours. If you want a quicker method, don't go to Security Options and just click the Erase button.)
    Click OK.
    Click Erase button
    Quit Disk Utility.
    Please do post back with further questions or comments.
    Cheers
    cornelius

Maybe you are looking for

  • Import to Pages 09

    Am considering purchase iWork 09 and want to know if there's a way to import prior Microsoft Power Point docs or single slide pages into the Pages 09 application?

  • Converting Smartform in Crycllic languages into PDF format

    Hi All, I have a smart form that needs to be converted into PDF and  sent by mail as an attachment. I have a problem with Cyrillic Languages (Bulgarian). When i use FM convert OTF to PDF its giving some garbage characters insteading of printing cyril

  • How to make list item multi select

    Hi all, I'm suing Oracle 10g and I want to make a TList multi-selectable and then how I can return the selected records Thanks in advance :)

  • PACMAN: Errors occurred, no packages were upgraded [SOLVED]

    First time trying to update the system after installing the new pacman, and I receive this error output: sudo pacman -Syu Password: :: Synchronizing package databases... core is up to date extra is up to date community is up to date multilib is up to

  • DVD Screen Captures Cannot Be Processed

    They can't be saved as a JPG - they just give a totally black blank image. They can't be resized or cropped. Enhance/Auto Levels does not work - blanks out the image. I want a screen capture in order to create a DVD label. I record a TV program on my