Check overdue items 2!!!!!!!!!!!!!!!!!1

i have a new version of my program which im gonna post in full here and illd like someone to provide de code to make buttom"check overdue items " to work taking in consideration that a book is borrowed only for 15 day max from the date it was borrowed.i hope this is more espacific.ive got 4 classes and the program works ,so you can try it on you IDE. there we go.this is fully functional.
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
public class Library extends JFrame
     private Container container;
     private JLabel statusLabel,Label;
     private static Properties table;
     private JTextArea displayArea;
     private JTextField nameField,typeField,noField,tempField;
     private  UIManager.LookAndFeelInfo looks[];
        //Constructor
     public Library()                   
          super( "Departmental Library" );
                //  Set Up GUI
          statusLabel = new JLabel();
          table = new Properties();
          displayArea = new JTextArea( 4,8 );
          displayArea.setEditable( false );
          JPanel northPanel = new JPanel();
          JPanel eastPanel = new JPanel();
          eastPanel.setLayout( new GridLayout( 8,1 ) );
          northPanel.setLayout( new BorderLayout( ) );
          JButton insertButton = new JButton( "Insert Item" );
          eastPanel.add( insertButton );
          insertButton.addActionListener( new ActionListener(){
                    public void actionPerformed( ActionEvent event )
                         BookInsert bookInsert = new BookInsert();
          JButton removeButton = new JButton( "Remove Item" );
          eastPanel.add( removeButton );
          removeButton.addActionListener( new ActionListener(){
                    public void actionPerformed( ActionEvent event )
                         ItemRemove itemRemove = new ItemRemove();
          JButton listItemsButton = new JButton ( "List Items" );
          eastPanel.add( listItemsButton );
          listItemsButton.addActionListener(
               new ActionListener(){
                    public void actionPerformed( ActionEvent event )
                         listProperties();
          JButton borrowButton = new JButton("Borrow an Item");
          eastPanel.add(borrowButton);
          borrowButton.addActionListener(new ActionListener(){
                    public void actionPerformed(ActionEvent event)
                         ItemBorrow itemBorrow = new ItemBorrow();
          JButton returnButton=new JButton("Return an Item");
          eastPanel.add(returnButton);
          returnButton.addActionListener(new ActionListener(){
                    public void actionPerformed(ActionEvent event)
                         JOptionPane.showMessageDialog( null, "Return!" );
          JButton overdueButton = new JButton( "Check overdue Items" );
          eastPanel.add( overdueButton );
          overdueButton.addActionListener(new ActionListener(){
                    public void actionPerformed( ActionEvent event )
                         JOptionPane.showMessageDialog( null, "Incomplete!!!!\n\n\n" );
          JButton saveButton = new JButton ( "Save Contents" );
                eastPanel.add( saveButton );     
          saveButton.addActionListener( new ActionListener(){
                    public void actionPerformed( ActionEvent event )
                         try {
                              FileOutputStream output = new FileOutputStream( "libraryContents.dat" );
                              table.store( output, "" );
                              output.close();
                              listProperties();
                         catch( IOException ioException ) {
                              ioException.printStackTrace();
                         JOptionPane.showMessageDialog( null, "The current contents in the library are saved" );
          JButton loadButton = new JButton ( "Load Contents" );
          eastPanel.add( loadButton );
          loadButton.addActionListener( new ActionListener(){
                    public void actionPerformed( ActionEvent event )
                         try {
                              FileInputStream input = new FileInputStream( "libraryContents.dat" );
                              table.load( input );
                              input.close();
                              listProperties();
                         catch ( IOException ioException ) {
                              ioException.printStackTrace();
          int valBold      = Font.BOLD;
          int valItalic     = Font.ITALIC;
          Label = new JLabel( "The Library", SwingConstants.CENTER);
          Label.setFont( new Font( "Courier New", valBold, 24 ) );
          northPanel.add( Label );
          container = getContentPane();
          container.add( northPanel, BorderLayout.NORTH );
          container.add( new JScrollPane( displayArea ), BorderLayout.CENTER );
          container.add( eastPanel, BorderLayout.EAST );
          setSize(750,300);
          setLocation(10,120);
          setVisible(true);
          looks = UIManager.getInstalledLookAndFeels();
          try{
               UIManager.setLookAndFeel( looks[ 2 ].getClassName() );
               SwingUtilities.updateComponentTreeUI( this );
          catch ( Exception exception )
               exception.printStackTrace();
     public static void insertItem( String name, String type )
          LibraryItem libraryItem = new LibraryItem( name, type );
          Object value = table.setProperty( name, type );
          JOptionPane.showMessageDialog( null, "Stock Item " + name + " was inserted in the Library. Press \"Save contents\" to insert it permanently to file" );
     public static void removeItem(String name)
          Object value = table.remove(name);
          if ( value != null ){
               JOptionPane.showMessageDialog( null, "Library item " + name + " removed. Press \" Save contents \"to remove it permanently" );
          else {
               JOptionPane.showMessageDialog( null, "Library item " + name + " was NOT FOUND in the Library!" );
     public static void borrowItem(String name)
          String value=table.getProperty(name);
          if (value !=null){
               String date = "" + new java.util.Date();
               String day     = date.substring( 8,10 );
               String month= date.substring( 4,7 );
               String nmonth = "";
               if (month.equals("Jan")){
                    nmonth = "01";
               else if (month.equals("Feb")){
                    nmonth = "02";
               else if (month.equals("Mar")){
                    nmonth = "03";
               else if (month.equals("Apr")){
                    nmonth = "04";
               else if (month.equals("May")){
                    nmonth = "05";
               else if (month.equals("Jun")){
                    nmonth = "06";
               else if (month.equals("Jul")){
                    nmonth = "07";
               else if (month.equals("Aug")){
                    nmonth = "08";
               else if (month.equals("Sep")){
                    nmonth = "09";
               else if (month.equals("Oct")){
                    nmonth = "10";
               else if (month.equals("Nov")){
                    nmonth = "11";
               else if (month.equals("Dec")){
                    nmonth = "12";
               String year     = date.substring( 24,date.length() );
               String allDate=day+"/"+nmonth+"/"+year;
               String elems[] = {"-","-","-","-","-"};
               int el=0;
               int stopper=0;
               for (int i=0; i<value.length();i++)
                    if (value.substring(i,i+1).equals(" "))
                         elems[el]=value.substring(stopper,i);
                         stopper=i;
                         el+=1;
               elems[el]=value.substring(stopper,value.length());
               elems[2] = "Borrowed";
               String newValue = elems[0]+" "+elems[1]+" "+elems[2]+" "+allDate;
               LibraryItem item = new LibraryItem( name,newValue );
               Object aValue = table.setProperty(name,newValue);
               JOptionPane.showMessageDialog( null, "Item " + name + " is borrowed on " + allDate + "\nand must be returned within 15 days" );
          else {
               JOptionPane.showMessageDialog( null, "Library item " + name + " NOT found among Stock!");
          //JOptionPane.showMessageDialog( null, "Works so far. Now borrow" );
          //Object value = table.setProperty( name, type );
     public void listProperties()
          StringBuffer buffer = new StringBuffer();
          String name="", value = "";
          Enumeration enumeration = table.propertyNames();
          while ( enumeration.hasMoreElements() ) {
               name = enumeration.nextElement().toString();
               value = table.getProperty( name );
               buffer.append(name).append("\t\t");
               String elems[] = {"-","-","-","-","-"};
               int el=0;
               int stopper=0;
               for (int i=0; i<value.length();i++)
                    if (value.substring(i,i+1).equals(" "))
                         elems[el]=value.substring(stopper,i);
                         stopper=i;
                         el+=1;
               elems[el]=value.substring(stopper,value.length());
               String output="";
               for (int i=0;i<elems.length;i++)
                    buffer.append(elems[i] + "\t");
               buffer.append("\n");
          String output=buffer.toString();
          displayArea.setText(output);
     public static void main( String args[] )
          Library library = new Library();
          library.addWindowListener(
               new WindowAdapter() {
                    public void windowClosing( WindowEvent event )
                         System.exit( 0 );
class LibraryItem
     private String name, code, type;
     public LibraryItem( String itemName, String itemType )
          name = itemName;
        type = itemType;
     public String toString()
          return name + " " + type;
-=-------------------------------------------------------------------------------------------------------------------------------------------------mport java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ItemRemove extends JFrame
     private static JButton removeButton;
     private static JTextField nameField;
     public ItemRemove()
          super( "Remove a Library Item" );
          Container container = getContentPane();
          container.setLayout( new GridLayout( 4,1 ) );
          container.add( new JLabel( "Book title: ", SwingConstants.LEFT) );
          nameField = new JTextField( 10 );
          container.add( nameField );
          container.add( new JLabel( "  " ) );
          removeButton = new JButton( " Remove " );
          container.add( removeButton );
          removeButton.addActionListener(
               new ActionListener() {
                    public void actionPerformed( ActionEvent event )
                         Library.removeItem( nameField.getText() );
          setSize( 280, 150 );
          setLocation( 250,150 );
          setVisible( true );
//     public static void main( String args[] )
//          ItemRemove itemRemove = new ItemRemove();
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ItemBorrow extends JFrame
     private static JButton borrowButton;
     private static JTextField nameField;
     public ItemBorrow()
          super( "Borrow a Library Item" );
          Container container = getContentPane();
          container.setLayout( new GridLayout( 4,1 ) );
          container.add( new JLabel( "Book title: ", SwingConstants.LEFT) );
          nameField = new JTextField( 10 );
          container.add( nameField );
          container.add( new JLabel( "  " ) );
          borrowButton = new JButton( " Borrow " );
          container.add( borrowButton );
          borrowButton.addActionListener( new ActionListener(){
                    public void actionPerformed( ActionEvent event )
                         Library.borrowItem( nameField.getText() );
          setSize( 250, 150 );
          setLocation( 250,150 );
          setVisible( true );
//     public static void main( String args[] )
//          ItemBorrow itemBorrow = new ItemBorrow();
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class BookInsert extends JFrame implements ActionListener
     private JTextField nameField, codeField;
     private static JComboBox itypesBox;
     public static int day, month, year;
     private static JButton insertButton;
     private static boolean toggle = true;
     public static String itemName, itemCode, itemType, itemTypeCode;
     private String names[] = { "Computing", "Mathematics", "Poetry", "Literature", "Programming", "Science Fiction", "Economics", "Physics", "Engineering" };
     public BookInsert()
          super( " Insert a Book Item in the stock" );
          Container container = getContentPane();
          container.setLayout( new GridLayout( 6,3 ) );
          container.add( new JLabel( " " ) );
          container.add( new JLabel( " " ) );
          container.add( new JLabel( " " ) );
          container.add( new JLabel( "Book title: ", SwingConstants.RIGHT) );
          nameField = new JTextField( 10 );
          container.add( nameField );
          container.add( new JLabel(" "));
        container.add( new JLabel( "Book code: ", SwingConstants.RIGHT ));
        codeField = new JTextField( 10 );
        container.add( codeField );
        container.add( new JLabel( "    " ) );
        container.add( new JLabel("Book Subject:", SwingConstants.RIGHT) );
          StringBuffer buffer = new StringBuffer();
          itypesBox = new JComboBox( names );
          itypesBox.setMaximumRowCount( 4 );
          itypesBox.setSize( 7,8 );
          container.add( itypesBox );
          container.add( new JLabel( " " ) );
          container.add( new JLabel( " " ) );
          container.add( new JLabel( " " ) );
          container.add( new JLabel( " " ) );
          container.add( new JLabel( " " ) );
          insertButton = new JButton( " Insert " );
          container.add( insertButton );
          insertButton.addActionListener( this );
          setSize( 300, 150 );
          setLocation( 220,150 );
          setVisible( true );
     public void actionPerformed( ActionEvent event )
          itemType = names[ itypesBox.getSelectedIndex() ];
                    itemName = nameField.getText();
                itemCode = codeField.getText();
                itemTypeCode = itemCode + " " + itemType + " " + "notBorrowed";
                executeInsertion();
     public static void executeInsertion()
          Library.insertItem( itemName, itemTypeCode );
     public static void main( String args[] )
          BookInsert bookInsert = new BookInsert();
          bookInsert.setVisible( true );
}thanks a lot in advance.

Please attempt solving your problem first. If you come across specific problems, feel free to ask the advise of this forum then.

Similar Messages

  • Check overdue items!!!!!!!!!!!!!!!!!!

    i have a new version of my program which im gonna post in full here and illd like someone to provide de code to make buttom"check overdue items " to work taking in consideration that a book is borrowed only for 15 day max from the date it was borrowed.i hope this is more espacific.ive got 4 classes and the program works ,so you can try it on you IDE. there we go.this is fully functional.
    -------------------------------------------------------------------import java.awt.*;import java.awt.event.*;import java.io.*;import java.util.*;import javax.swing.*;public class Library extends JFrame {          private Container container;     private JLabel statusLabel,Label;     private static Properties table;     private JTextArea displayArea;     private JTextField nameField,typeField,noField,tempField;     private  UIManager.LookAndFeelInfo looks[];          //Constructor     public Library()      {          super( "Departmental Library" );                //  Set Up GUI          statusLabel = new JLabel();          table = new Properties();          displayArea = new JTextArea( 4,8 );          displayArea.setEditable( false );                    JPanel northPanel = new JPanel();          JPanel eastPanel = new JPanel();                    eastPanel.setLayout( new GridLayout( 8,1 ) );          northPanel.setLayout( new BorderLayout( ) );                                                  JButton insertButton = new JButton( "Insert Item" );          eastPanel.add( insertButton );          insertButton.addActionListener( new ActionListener(){                    public void actionPerformed( ActionEvent event )                    {                                        BookInsert bookInsert = new BookInsert();                    }               }          );                         JButton removeButton = new JButton( "Remove Item" );          eastPanel.add( removeButton );          removeButton.addActionListener( new ActionListener(){                    public void actionPerformed( ActionEvent event )                    {                                        ItemRemove itemRemove = new ItemRemove();                    }               }          );                              JButton listItemsButton = new JButton ( "List Items" );          eastPanel.add( listItemsButton );          listItemsButton.addActionListener(                new ActionListener(){                                        public void actionPerformed( ActionEvent event )                    {                                        listProperties();                    }               }          );          JButton borrowButton = new JButton("Borrow an Item");          eastPanel.add(borrowButton);          borrowButton.addActionListener(new ActionListener(){                    public void actionPerformed(ActionEvent event)                    {                         ItemBorrow itemBorrow = new ItemBorrow();                    }               }          );          JButton returnButton=new JButton("Return an Item");          eastPanel.add(returnButton);          returnButton.addActionListener(new ActionListener(){                    public void actionPerformed(ActionEvent event)                    {                         JOptionPane.showMessageDialog( null, "Return!" );                    }               }          );           JButton overdueButton = new JButton( "Check overdue Items" );          eastPanel.add( overdueButton );          overdueButton.addActionListener(new ActionListener(){                    public void actionPerformed( ActionEvent event )                    {                                        JOptionPane.showMessageDialog( null, "Incomplete!!!!\n\n\n" );                    }               }          );           JButton saveButton = new JButton ( "Save Contents" );           eastPanel.add( saveButton );               saveButton.addActionListener( new ActionListener(){                    public void actionPerformed( ActionEvent event )                    {                                        try {                              FileOutputStream output = new FileOutputStream( "libraryContents.dat" );                                                       table.store( output, "" );                              output.close();                                                            listProperties();                                                       }                         catch( IOException ioException ) {                              ioException.printStackTrace();                         }                         JOptionPane.showMessageDialog( null, "The current contents in the library are saved" );                    }               }          );               JButton loadButton = new JButton ( "Load Contents" );          eastPanel.add( loadButton );          loadButton.addActionListener( new ActionListener(){                    public void actionPerformed( ActionEvent event )                    {                                        try {                              FileInputStream input = new FileInputStream( "libraryContents.dat" );                              table.load( input );                              input.close();                              listProperties();                         }                         catch ( IOException ioException ) {                              ioException.printStackTrace();                         }                    }               }          );                         int valBold      = Font.BOLD;          int valItalic     = Font.ITALIC;          Label = new JLabel( "The Library", SwingConstants.CENTER);          Label.setFont( new Font( "Courier New", valBold, 24 ) );          northPanel.add( Label );          container = getContentPane();          container.add( northPanel, BorderLayout.NORTH );          container.add( new JScrollPane( displayArea ), BorderLayout.CENTER );          container.add( eastPanel, BorderLayout.EAST );                                                  setSize(750,300);          setLocation(10,120);          setVisible(true);          looks = UIManager.getInstalledLookAndFeels();          try{               UIManager.setLookAndFeel( looks[ 2 ].getClassName() );               SwingUtilities.updateComponentTreeUI( this );          }          catch ( Exception exception )          {               exception.printStackTrace();          }     }     public static void insertItem( String name, String type )     {          LibraryItem libraryItem = new LibraryItem( name, type );                    Object value = table.setProperty( name, type );                                        JOptionPane.showMessageDialog( null, "Stock Item " + name + " was inserted in the Library. Press \"Save contents\" to insert it permanently to file" );                              }     public static void removeItem(String name)     {          Object value = table.remove(name);          if ( value != null ){               JOptionPane.showMessageDialog( null, "Library item " + name + " removed. Press \" Save contents \"to remove it permanently" );          }          else {               JOptionPane.showMessageDialog( null, "Library item " + name + " was NOT FOUND in the Library!" );          }     }     public static void borrowItem(String name)     {          String value=table.getProperty(name);          if (value !=null){               String date = "" + new java.util.Date();               String day     = date.substring( 8,10 );               String month= date.substring( 4,7 );               String nmonth = "";               if (month.equals("Jan")){                    nmonth = "01";               }               else if (month.equals("Feb")){                    nmonth = "02";               }               else if (month.equals("Mar")){                    nmonth = "03";               }               else if (month.equals("Apr")){                    nmonth = "04";               }               else if (month.equals("May")){                    nmonth = "05";               }               else if (month.equals("Jun")){                    nmonth = "06";               }               else if (month.equals("Jul")){                    nmonth = "07";               }               else if (month.equals("Aug")){                    nmonth = "08";               }               else if (month.equals("Sep")){                    nmonth = "09";               }               else if (month.equals("Oct")){                    nmonth = "10";               }               else if (month.equals("Nov")){                    nmonth = "11";               }               else if (month.equals("Dec")){                    nmonth = "12";               }                              String year     = date.substring( 24,date.length() );               String allDate=day+"/"+nmonth+"/"+year;                              String elems[] = {"-","-","-","-","-"};               int el=0;               int stopper=0;               for (int i=0; i<value.length();i++)               {                    if (value.substring(i,i+1).equals(" "))                    {                         elems[el]=value.substring(stopper,i);                         stopper=i;                         el+=1;                    }               }               elems[el]=value.substring(stopper,value.length());                              elems[2] = "Borrowed";                              String newValue = elems[0]+" "+elems[1]+" "+elems[2]+" "+allDate;                    LibraryItem item = new LibraryItem( name,newValue );               Object aValue = table.setProperty(name,newValue);                         JOptionPane.showMessageDialog( null, "Item " + name + " is borrowed on " + allDate + "\nand must be returned within 15 days" );          }          else {               JOptionPane.showMessageDialog( null, "Library item " + name + " NOT found among Stock!");          }          //JOptionPane.showMessageDialog( null, "Works so far. Now borrow" );          //Object value = table.setProperty( name, type );     }                         public void listProperties()     {          StringBuffer buffer = new StringBuffer();          String name="", value = "";                    Enumeration enumeration = table.propertyNames();          while ( enumeration.hasMoreElements() ) {               name = enumeration.nextElement().toString();               value = table.getProperty( name );               buffer.append(name).append("\t\t");               String elems[] = {"-","-","-","-","-"};               int el=0;               int stopper=0;               for (int i=0; i<value.length();i++)               {                    if (value.substring(i,i+1).equals(" "))                    {                         elems[el]=value.substring(stopper,i);                         stopper=i;                         el+=1;                    }               }               elems[el]=value.substring(stopper,value.length());               String output="";               for (int i=0;i<elems.length;i++)               {                    buffer.append(elems<i> + "\t");               }               buffer.append("\n");          }          String output=buffer.toString();          displayArea.setText(output);     }     public static void main( String args[] )     {          Library library = new Library();          library.addWindowListener(               new WindowAdapter() {                    public void windowClosing( WindowEvent event )                    {                         System.exit( 0 );                    }               }          );     }}class LibraryItem {     private String name, code, type;     public LibraryItem( String itemName, String itemType )     {          name = itemName;        type = itemType;     }     public String toString()     {          return name + " " + type;     }}-----------------------------------------------------------------------------------------------------------------------------------------------mport java.awt.*;import java.awt.event.*;import javax.swing.*;public class ItemRemove extends JFrame{               private static JButton removeButton;     private static JTextField nameField;               public ItemRemove()     {               super( "Remove a Library Item" );                    Container container = getContentPane();          container.setLayout( new GridLayout( 4,1 ) );                    container.add( new JLabel( "Book title: ", SwingConstants.LEFT) );          nameField = new JTextField( 10 );          container.add( nameField );          container.add( new JLabel( "  " ) );          removeButton = new JButton( " Remove " );          container.add( removeButton );          removeButton.addActionListener(                new ActionListener() {                    public void actionPerformed( ActionEvent event )                    {                         Library.removeItem( nameField.getText() );                    }               }          );                                        setSize( 280, 150 );          setLocation( 250,150 );          setVisible( true );     }//     public static void main( String args[] )//     {/          ItemRemove itemRemove = new ItemRemove();//     }               }---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------import java.awt.*;import java.awt.event.*;import javax.swing.*;public class ItemBorrow extends JFrame{               private static JButton borrowButton;     private static JTextField nameField;               public ItemBorrow()     {               super( "Borrow a Library Item" );                    Container container = getContentPane();          container.setLayout( new GridLayout( 4,1 ) );                    container.add( new JLabel( "Book title: ", SwingConstants.LEFT) );          nameField = new JTextField( 10 );          container.add( nameField );          container.add( new JLabel( "  " ) );          borrowButton = new JButton( " Borrow " );          container.add( borrowButton );          borrowButton.addActionListener( new ActionListener(){                    public void actionPerformed( ActionEvent event )                    {                         Library.borrowItem( nameField.getText() );                    }               }          );                                        setSize( 250, 150 );          setLocation( 250,150 );          setVisible( true );     }//     public static void main( String args[] )//     {/          ItemBorrow itemBorrow = new ItemBorrow();//     }               }---------------------------------------------------------------------------------------------------------------------------------------------------import java.awt.*;import java.awt.event.*;import javax.swing.*;public class BookInsert extends JFrame implements ActionListener{     private JTextField nameField, codeField;     private static JComboBox itypesBox;     public static int day, month, year;     private static JButton insertButton;     private static boolean toggle = true;     public static String itemName, itemCode, itemType, itemTypeCode;          private String names[] = { "Computing", "Mathematics", "Poetry", "Literature", "Programming", "Science Fiction", "Economics", "Physics", "Engineering" };                    public BookInsert()     {               super( " Insert a Book Item in the stock" );                    Container container = getContentPane();          container.setLayout( new GridLayout( 6,3 ) );                    container.add( new JLabel( " " ) );          container.add( new JLabel( " " ) );          container.add( new JLabel( " " ) );          container.add( new JLabel( "Book title: ", SwingConstants.RIGHT) );          nameField = new JTextField( 10 );          container.add( nameField );          container.add( new JLabel(" "));                        container.add( new JLabel( "Book code: ", SwingConstants.RIGHT ));        codeField = new JTextField( 10 );        container.add( codeField );        container.add( new JLabel( "    " ) );                        container.add( new JLabel("Book Subject:", SwingConstants.RIGHT) );          StringBuffer buffer = new StringBuffer();          itypesBox = new JComboBox( names );          itypesBox.setMaximumRowCount( 4 );          itypesBox.setSize( 7,8 );          container.add( itypesBox );          container.add( new JLabel( " " ) );                    container.add( new JLabel( " " ) );          container.add( new JLabel( " " ) );          container.add( new JLabel( " " ) );          container.add( new JLabel( " " ) );          insertButton = new JButton( " Insert " );          container.add( insertButton );          insertButton.addActionListener( this );                              setSize( 300, 150 );          setLocation( 220,150 );          setVisible( true );     }                    public void actionPerformed( ActionEvent event )      {          itemType = names[ itypesBox.getSelectedIndex() ];      itemName = nameField.getText(); itemCode = codeField.getText(); itemTypeCode = itemCode + " " + itemType + " " + "notBorrowed"; executeInsertion();     }     public static void executeInsertion()     {          Library.insertItem( itemName, itemTypeCode );     }          public static void main( String args[] )     {          BookInsert bookInsert = new BookInsert();          bookInsert.setVisible( true );     }               }

    sorry for this !!!!!!!!! what a mess. ill try to fix it.

  • Customer open item analysis by balance of overdue items

    Hi All,
    Is there any provision for knowing the customer open items by balance of overdue items in the customer line item display in the t-code FBL5N. The standard process is through the S_ALR_87012178
    Regards,
    Arvind

    Dear friend
    You may not get as ggod as report but u check ,there are some lay out. one lay out name is dunning data.
    you can get there  day of arrers.
    hope it will help you
    Jain

  • Query for checking overdue payments and trigger approval process

    Hi All
    I need a query to be executed when a user is tries to add a AR Delivery Document for a customer with invoices that have overdue DocDueDates.
    Regards
    Bongani

    You probably want to check overdue dates against closed and canceled items, too:
    (This allows a zero dollar document to go through, for repairs or replacements)
    SELECT DISTINCT 'TRUE' FROM DBO.OINV T0
    WHERE T0.[DocStatus] = N'O' AND T0.[CANCELED] = N'N' AND ($[$22.0.Number]) > 0
    AND T0.CardCode = ($[$4.0.0])  AND T0.[DocDueDate] < GETDATE()

  • Preventing disabling of check box - item okay in MIGO

    Dear all,
    In the MIGO transaction - during goods receipt for subcontractor material, when the item (incoming) is checked as item okay - automatically the child material (Material sent to subcontractor) is also activated thereby to enable 543 movement.
    Unfortunately some of the users are disabling the check box (for the material sent to the subcontractor). This prevents depletion of stock from the subcontractor but inflates the stock of the incoming material.
    Is there any way - either by authorisation check to prevent users disabling the check box or other methods?
    Experts suggestion is required in this regard.
    Thanks in advance.
    Regards,
    M.M

    Hi Magesh,
    it is possible. use Badi enhancement
    MB_MIGO_BADI goto
    IF_EX_MB_MIGO_BADI~POST_DOCUMENT
    tell your abaper to put the logic like
    parent ID and subcomponent ID need to select
    if either of two is not selected
    then error message will prompt not to save the GR doc since subcomponent is unselected.
    reference field EKPO check PSTYP
    hope this help you.
    regards,
    Maia
    Edited by: Maia on Apr 18, 2008 3:07 PM

  • Vendor Open Item Analysis by Overdue Items

    Hi Freinds,
    The users desire to generate the Vendor Open Item Analysis by Overdue Items. When the report is generated using the Program RFKOPR10, the report gives the list of Vendors with the details of overdues as per the buckets selected. However, along with the Vendor Codes, the list gives the short name of the Vendor, which is picked form the 'Search Feild' in the Vendor Master and is the short name, whereas the users desire to have the full name exhibited in the report.
    How can we have the full name in the report instead of the short name? Can any one help us in this matter?
    Thanks for the assistance.
    Regards

    Hello Pankaj,
    Thanks for the prompt response. Our problem is that we require an AP Aging Analysis giving the overdue amounts by days - such as 30/60/90/120/>120. We are able to get the report but the name is not appearing in full. How can we have the full name displayed in the Report?
    Regards

  • Need Drill down in Customer Open Item Analysis by Balance of Overdue Items

    In SAP there is one standard report by the name of
    'Customer Open Item Analysis by Balance of Overdue Items'
    Can I change the report according to my need.. I want to add drill down and customer name to this report. I am using summarisation 6 as my criteria.
    Thanks
    Sajid Hakeem

    Dave!
    Thanks for the help man
    Just one last thing
    can you help us to add  drill down facility in the prescribed report. what code we should write to make it drill down to a line item report.
    Regards
    Sajid Hakeem

  • FINT interest calculation on cust overdue items from net due date required

    Hi.
    I am running FINT option i am running interest calculation from net due date onwards whereas the system is calculating the interest from Next date of due date.
    For example: Customer invoice is raised on 01.01.2011 and Net due date is 01.01.2011. I gave the option in the interest calculation - SPRO - FINANCIAL ACCOUNTING(NEW) - ACCOUNTS RECEIVABLE AND ACCOUNTS PAYABLE - BUSINESS TRANSACTIONS - INTEREST CALCULATION - PREPARE ITEM INTEREST CALCULATION, Ref date as as 1 - Value date (Baseline date from Net Payment).
    Still the system is calculating the interest from 02.01.2011 instead of from 01.01.2011.
    Can anyone help me in this regard.
    Regards,
    Padmavathi

    Hi,
    We can calculate interest on items cleared with in the calculation period.
    When you are calculating interest on open items, system will check open items as on the Calculation Date.
    But if you want to calculate Interest on items cleared with in the calculation period., you have to check Calculate Interest on Cleared Items also.
    For Instance: If you are calculating Interest on 31st July for the period of 01.07.2009 to 31.07.2009, in this case
    some open items are already cleared with in this calculation period, even though you have to calcuate interest for those cleared items for that many days. System will calculate interest for that many days.
    Try with this option, still if you need any help please let me know.
    Thanks
    Chandra

  • How do  we check the check box items based on the databse fields.

    Hi All,
    I have a requirement like as mentioned below#
    1. I have a combox box whcih i will be populated from database.
    2. I have created two check box as "Stategric " and "Non Stategric".
    3. Now when i select the combox box condition i need to select the check box items.
    4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
    5. How do i need to map the database point of view and correlacte with javascript pont of view.
    6. Do we need to write any Application process to achieve this task and who we can do that.
    Thanks,
    Anoo..

    Hi VC,
    As per my understanding the code should be placed between --.
    Based on this i have placed the code
    function setCheckbox(pThis, pItem){
    alert('inside');
        var l_code = '';
        // Get checkbox name
        rName = document.getElementsById('P1_ENG_BAU').firstChild.name;
    alert("The value is"+rName);
        // Fire AJAX
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
        get.add('F120_COMPANY',pThis.value);
        gReturn = get.get('XML');
        if (gReturn) {
          var values = gReturn.getElementsByTagName('value');
          var messages = gReturn.getElementsByTagName('message');
          // Build the checkbox
          for (i=0; i<values.length; i++) {
            var rValue = values.firstChild.nodeValue;
    var rMessage = messages[i].firstChild.nodeValue;
    l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
    l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
    document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
    Correct me if iam understanding is wrong.
    Thanks,
    Anoo..
    Edited by: Anoo on May 31, 2012 11:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Check on Item Category

    Hello,
    I have a requirement where I need to perform a check on item category for each sales order line item. if the item category is u2018ZTASu2019 then before saving the document the user should be prompted to verify .
    I was thinking to use user exit USEREXIT_SAVE_DOCUMENT_PREPARE. But at this point I will have to loop through entire vbap. This may cause unnecessary load.
    Please let me know what would be the best way to achieve this?
    Thanks in advance.
    K.

    Hi Kathy
    If you Put Error message indicator then you cant save the sales order. So maintain Warning message  indicator . Also maintain Incompletion log as i said in my previous thread then your requirement can be fulfilled
    In the same way with the help of the technical consultant tell them that the message should be different when the warning message comes. Say if the end user is saving the sales order then he should get a message CHECK THE ZTAS  ITEM CATEGORY  IN THE ORDER and still if the end user tries to save the sales order then system should tell to maintain  incompletion log data
    Regards
    Srinath

  • In iTunes I'm having problems changing the "Media Kind" with a number of playlists in the OPTIONS menu from "music" to "audiobook". After going through the steps, the next time I check the items have reverted back to "music". What step am I missing?

    In iTunes I'm having problems changing the "Media Kind" in the OPTIONS menu from "Music" to "Audiobook". After going through the steps, the next time I check, the items have reverted back to "Music". What must I do to save it as an "Audiobook"?

    After more digging in the Support section here and some Google work, I turned off iTunes Match and lo and behold!  I can change the media kind to Audiobook!  So, it looks like iTunes Match locked the files up somehow and for some reason.
    I went into iTunes Store > iTunes Match > "No, Thanks" to disable it on the local PC.

  • What is line item datas,how can u check line item in Infocube?

    Hi friends,
    what is line item datas,how can u check line item in Infocube?

    hi konda,
    line item data
    i shall give u an example .
    consider a super market bill,
    the bill has 1.customer name        2. bill number   3. date of purchase
    the above line will be header.
    line item data are the items which u purchase.
    item 1 pencil  2 rubber  3. sharpner  4. cryon  5. sketch pens
    above are line item datas.  for a particular set of header data u may have many line item datas.
    reward points if helpful.
    bye.

  • Check list item

    hi
    is there any check list item (multi value lest item) in oracle forms 6i ......?

    Hi
    Full example and more* u can find here ..._
    Re: Dependent drop down lists in forms 6i
    Hope this helps...
    Regards,
    Amatu Allah.

  • Credit Management - Check for Item Payer

    Hi All,
    Credit management is checked at header payer level. For cleint requiremnt , we want this check for Item payers.
    Is there any possibility for the same.
    Thanks in advance
    Regs
    Madhu

    Hi,
    The credit check will happen with the credit account which you maintain in FD32, it can be any partner function. But, in standard SAP it happens for a sold-to-party.. which means we normally maintain SP as a credit account in FD32.. and logically it's the right way..
    Now, coming to your query.. if you maintain the credit account for the payer then system will perform the credit check for that payer only.. it doesn't matter if it is maintained at header level or item level.
    Hope this will clear your doubt along with the problem.
    Do let me know.
    Hrishi

  • Unable to update to Mavericks, app store shows error downloading, and check purchased items, but I still can't download it.

    Unable to update to Mavericks, app store shows error downloading, and tells me to check purchased items. I go there, but I still can't download it.

    Hi there Kkoski22,
    You may find the information in the article below helpful.
    Download past purchases
    http://support.apple.com/kb/ht2519
    If you are still experiencing issues downloading your purchase, take a look at the article below for information on how to report it to iTunes
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase
    http://support.apple.com/kb/ht1933
    -Griff W. 

Maybe you are looking for