Optimizing a program (experts with a lot of time)
The following code is most of the code for a sale program. This is something i have been working on for a while now and it's almost finished. It does work, and with no errors that I have found so far, but it seems too complicated and long. I am asking that some of you more experienced programmers take a look at it and give me some advice or tips. It's quite a bit of code, so you don't have to look at all of it, just whatever you see.
This is the super class. It will soon be a full Log In for cashiers but right now it is just has two buttons for running the other two classes. It contains the open and save file methods that the others use to open the inventory file.
/** Java core packages*/
import java.util.*;
import java.text.*;
import java.awt.*;
import java.awt.event.*;
/** Java extension packages*/
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.event.*;
import java.io.*;
/** This program is used to calculate the sale price
* of selected items and update the inventory with
* each sale. It opens and saves into a file "inventory.dat".
* @author Davin Green
public class LogIn extends JFrame
/** JTextField objects for the text fields that are used in these programs.*/
public JTextField jTextField1, jTextField2, jTextField3,
jTextField4, jTextField5, jTextField6;
/** JButton objects for the buttons that are used in these programs.*/
public JButton jButton1, jButton2, jButton3, jButton4,
jButton5, jButton6, jButton7;
/** JScrollPane object for the scrolling pane that is used in this program.*/
public JScrollPane jScrollPane1, jScrollPane2;
/** Label objects for the labels that are used in these programs.*/
public Label label1, label2, label3, label4,
label5, label6, label7;
/** Vector objects for the three vectors that are used in these programs.*/
public Vector id, qty, price, saleItems, saleItemsQty;
/** JList object for the list of Items from vector id used in this program.*/
public JList jList1;
private double salePrice;
/** Document objects for the three text fields that are used in this program.*/
public Document jText1, jText2, jText3;
/** DeciamlFormat object used to format display of money.*/
private DecimalFormat toMoney;
/** ObjectInputStream object for later inputing a stream.*/
private ObjectInputStream objectInput;
/** ObjectOutputStream object for later outputing a stream.*/
private ObjectOutputStream objectOutput;
private static LogIn window;
public static void main( String args[] )
window = new LogIn();
window.setSize(450, 400);
window.show();
public LogIn()
/** Get JFrames content pane and set layout to null.*/
Container container = getContentPane();
container.setLayout( new FlowLayout() );
jButton1 = new JButton();
jButton1.setText("Inventory Editor");
container.add(jButton1);
jButton2 = new JButton();
jButton2.setText("Make Sale");
container.add(jButton2);
jButton1.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
Inventory inventory = new Inventory();
inventory.runInventory();
window.hide();
window = null;
jButton2.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
Computer computer = new Computer();
computer.runComputer();
window.hide();
window = null;
public LogIn( String title )
super( title );
/** The openFile() method opens inventory.dat and saves it's information into three vectors.*/
public void openFile() throws IOException, ClassNotFoundException
Item item;
toMoney = new DecimalFormat( "0.00" );
id = new Vector();
qty = new Vector();
price = new Vector();
try {
int i = 0;
/** Opens file inventory.dat and saves data into buffer.*/
try {
objectInput = new ObjectInputStream( new FileInputStream( "C:/inventory.dat" ) );
catch ( FileNotFoundException fnfException )
objectOutput = new ObjectOutputStream( new FileOutputStream( "C:/inventory.dat" ) );
objectOutput.close();
objectInput = new ObjectInputStream( new FileInputStream( "C:/inventory.dat" ) );
JOptionPane.showMessageDialog( null, "Inventory file has been created.", "File Created", JOptionPane.INFORMATION_MESSAGE );
while ( true )
/** Reads one item object from inventory.dat.*/
item = ( Item ) objectInput.readObject();
String idString = item.getID();
String qtyString = "" + item.getQty();
String priceString = "" + toMoney.format (item.getPrice());
id.add( i, idString );
qty.add( i, qtyString );
price.add( i, priceString );
i++;
/** Closes file when end of file is reached.*/
catch ( EOFException eofException )
objectInput.close();
/** The Method exitForm() sets what to do when window is closed.*/
public void saveFile() throws IOException
/** Makes file inventory.dat.*/
objectOutput = new ObjectOutputStream( new FileOutputStream( "C:/inventory.dat" ));
/** Saves three vectors as objects of the Item class into inventory.dat.*/
for ( int i = 0; i < id.size(); i++ )
String idString = (String)id.get(i);
int qtyInt = Integer.parseInt( (String)qty.get(i) );
double priceDouble = Double.parseDouble( (String)price.get(i) );
Item item = new Item( idString, qtyInt, priceDouble );
objectOutput.writeObject( item );
/** Closes inventory.dat.*/
objectOutput.close();
}This is the computer class. It is used to calculate sale prices and print the reciept for each sale. It does everything it's supposed to except update the inventory, which I just haven't written the code for yet.
/** Java core packages*/
import java.util.*;
import java.text.*;
import java.awt.*;
import java.awt.event.*;
/** Java extension packages*/
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.event.*;
import java.io.*;
/** This program is used to calculate the sale price
* of selected items and update the inventory with
* each sale. It opens and saves into a file "inventory.dat".
* @author Davin Green
public class Computer extends LogIn
private double salePrice;
private JTextArea jTextArea1;
private Choice choice1;
private JSeparator jSeparator1;
private static Computer window;
/** Default constructor.*/
public Computer()
super("Sale Program");
try{
try {
openFile();
createGUI();
registerCompEventHandlers();
salePrice = 0.0;
catch ( ClassNotFoundException e )
catch ( IOException e )
/** The createGUI() methods creates and displays GUI components in the JFrame.*/
private void createGUI()
jList1 = new JList();
saleItems = new Vector();
saleItemsQty = new Vector();
/** Get JFrames content pane and set layout to null.*/
Container container = getContentPane();
container.setLayout(null);
choice1 = new Choice();
makeChoiceMenu();
container.add(choice1);
choice1.setBounds(40, 50, 130, 20);
jButton1 = new JButton();
jButton1.setText("Add Item");
container.add(jButton1);
jButton1.setBounds(270, 50, 130, 20);
jButton2 = new JButton();
jButton2.setText("Remove Item");
container.add(jButton2);
jButton2.setBounds(270, 80, 130, 20);
jButton2.setEnabled( false );
jButton3 = new JButton();
jButton3.setText("Print Reciept");
container.add(jButton3);
jButton3.setBounds(270, 110, 130, 20);
jButton3.setEnabled( false );
jButton4 = new JButton();
jButton4.setText("New Sale");
container.add(jButton4);
jButton4.setBounds(270, 140, 130, 20);
jButton4.setEnabled( false );
jButton5 = new JButton();
jButton5.setText("Change Cashier");
container.add(jButton5);
jButton5.setBounds(410, 240, 130, 20);
jButton6 = new JButton();
jButton6.setText("Edit Inventory");
container.add(jButton6);
jButton6.setBounds(410, 270, 130, 20);
jButton7 = new JButton();
jButton7.setText("Edit Qty");
container.add(jButton7);
jButton7.setBounds(100, 80, 100, 20);
jButton7.setEnabled( false );
jScrollPane1 = new JScrollPane();
jTextArea1 = new JTextArea();
container.add(jScrollPane1);
jScrollPane1.setBounds(10, 190, 390, 100);
jScrollPane2 = new JScrollPane();
jScrollPane2.getViewport().add( jList1 );
container.add(jScrollPane2);
jScrollPane2.setBounds(410, 40, 130, 190);
jSeparator1 = new JSeparator();
container.add(jSeparator1);
jSeparator1.setBounds(10, 40, 390, 10);
jTextField1 = new JTextField();
jTextField1.setEditable(false);
jTextField1.setText("Cashier Name");
container.add(jTextField1);
jTextField1.setBounds(60, 10, 170, 20);
jTextField2 = new JTextField();
jTextField2.setEditable(false);
jTextField2.setBounds(240, 10, 80, 20);
jTextField3 = new JTextField();
jTextField3.setEditable(false);
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
jTextField3.setText(dateFormat.format(new Date()));
container.add(jTextField3);
jTextField3.setBounds(330, 10, 70, 20);
jTextField4 = new JTextField();
jTextField4.setText("");
container.add(jTextField4);
jTextField4.setBounds(60, 80, 30, 20);
jText1 = jTextField4.getDocument();
jTextField5 = new JTextField();
jTextField5.setText("$0.00");
container.add(jTextField5);
jTextField5.setBounds(100, 140, 100, 20);
jTextField6 = new JTextField();
jTextField6.setEditable(false);
jTextField6.setText("$0.00");
container.add(jTextField6);
jTextField6.setBounds(100, 110, 100, 20);
label1 = new Label();
label1.setText("Cashier");
container.add(label1);
label1.setBounds(10, 10, 48, 20);
label2 = new Label();
label2.setText("Item");
container.add(label2);
label2.setBounds(10, 50, 28, 20);
label3 = new Label();
label3.setText("Selected Item");
container.add(label3);
label3.setBounds(410, 20, 90, 20);
label4 = new Label();
label4.setText("Reciept");
container.add(label4);
label4.setBounds(10, 170, 50, 20);
label5 = new Label();
label5.setText("Quantity");
container.add(label5);
label5.setBounds(10, 80, 50, 20);
label6 = new Label();
label6.setText("Amount Paid");
container.add(label6);
label6.setBounds(10, 140, 80, 20);
label7 = new Label();
label7.setText("Sale Price");
container.add(label7);
label7.setBounds(10, 110, 60, 20);
pack();
/** The method registerEventHandlers() sets what each GUI object does.*/
private void registerCompEventHandlers()
ActionListener al = new ActionListener(){
DateFormat fmt = DateFormat.getTimeInstance(DateFormat.SHORT);
public void actionPerformed(ActionEvent evt) {
jTextField2.setText(fmt.format(new Date()));
new javax.swing.Timer(1000, al).start();
getContentPane().add(jTextField2);
SwingUtilities.invokeLater(new Runnable(){
public void run() {
/** Sets program to call method exitForm() when window is closed.*/
addWindowListener( new WindowAdapter()
public void windowClosing(WindowEvent evt)
try {
saveFile();
System.exit(0);
catch ( IOException ioException )
/** Tells what to do when an item is selected on the drop down menu.*/
final ItemListener choiceListener;
choice1.addItemListener(
choiceListener = new ItemListener()
public void itemStateChanged( ItemEvent event )
boolean itemNotExist = true;
for ( int i = 0; i < saleItems.size(); i++ )
if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
itemNotExist = false;
jList1.setSelectedIndex( i );
jTextField4.setText( (String)saleItemsQty.get( i ) );
if ( itemNotExist == true )
jTextField4.setText( "" );
jButton1.setEnabled( itemNotExist );
jButton7.setEnabled( false );
/** When an item is selected, the items information is
* displayed in the corresponding text field.*/
jList1.addListSelectionListener(
new ListSelectionListener()
public void valueChanged( ListSelectionEvent event )
if ( event.getSource() == jList1 && !event.getValueIsAdjusting() )
int selection = 0;
String selectionQty;
try {
for ( int i = 0; i < choice1.getItemCount(); i++ )
if ( choice1.getItem(i) == jList1.getSelectedValue() )
selection = i;
selectionQty = (String)saleItemsQty.get( jList1.getSelectedIndex() );
choice1.select( selection );
catch ( ArrayIndexOutOfBoundsException aoobException )
selectionQty = "";
jTextField4.setText( selectionQty );
jButton1.setEnabled( false );
jButton2.setEnabled( true );
jButton3.setEnabled( true );
jButton4.setEnabled( true );
jButton7.setEnabled( false );
/** Listens to jTextField and detects changes. */
jText1.addDocumentListener(
new DocumentListener()
public void changedUpdate(DocumentEvent e)
if ( saleItems.size() > 0 )
for ( int i = 0; i < saleItems.size(); i++ )
if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
jButton1.setEnabled( false );
if ( jTextField4.getText() != saleItemsQty.get( i ) )
jButton7.setEnabled( true );
else
jButton7.setEnabled( false );
else
jButton1.setEnabled( true );
jButton7.setEnabled( false );
public void insertUpdate(DocumentEvent e)
if ( saleItems.size() > 0 )
for ( int i = 0; i < saleItems.size(); i++ )
if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
jButton1.setEnabled( false );
if ( jTextField4.getText() != saleItemsQty.get( i ) )
jButton7.setEnabled( true );
else
jButton7.setEnabled( false );
else
jButton1.setEnabled( true );
jButton7.setEnabled( false );
public void removeUpdate(DocumentEvent e)
if ( saleItems.size() > 0 )
for ( int i = 0; i < saleItems.size(); i++ )
if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
jButton1.setEnabled( false );
if ( jTextField4.getText() != saleItemsQty.get( i ) )
jButton7.setEnabled( true );
else
jButton7.setEnabled( false );
else
jButton1.setEnabled( true );
jButton7.setEnabled( false );
/** When "Add Item" button is clicked, a new element
* is added to each vector.*/
jButton1.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
String quantity = jTextField4.getText();
jTextField4.setText( "" );
try{
for ( int i = 0; i < id.size(); i++ )
if ( (String)id.get(i) == choice1.getSelectedItem() )
salePrice += ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( quantity ) );
String newPrice = "$" + salePrice;
saleItems.add( choice1.getSelectedItem() );
saleItemsQty.add( quantity );
jList1.setListData( saleItems );
jScrollPane2.revalidate();
jScrollPane2.repaint();
jTextField6.setText( newPrice );
jButton1.setEnabled( false );
catch ( NumberFormatException num )
JOptionPane.showMessageDialog( null, "Please enter a valid quantity!", "Error", JOptionPane.ERROR_MESSAGE );
jList1.setSelectedIndex( saleItems.size() - 1 );
/** When "Remove" button is clicked, the selected item is removed
* from all vectors.*/
jButton2.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
try {
int selection = jList1.getSelectedIndex();
for ( int i = 0; i < id.size(); i++ )
if ( (String)id.get(i) == choice1.getSelectedItem() )
salePrice -= ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( (String)saleItemsQty.get( selection ) ) );
String newPrice = "$" + salePrice;
saleItems.removeElementAt( selection );
saleItemsQty.removeElementAt( selection );
jList1.setListData( saleItems );
jScrollPane2.revalidate();
jScrollPane2.repaint();
jTextField6.setText( newPrice );
if( selection >= id.size() )
selection = id.size() - 1;
jList1.setSelectedIndex( selection );
catch ( ArrayIndexOutOfBoundsException exception )
JOptionPane.showMessageDialog( null, "Please select an item to remove!", "Error", JOptionPane.ERROR_MESSAGE );
if ( saleItems.size() == 0 )
jButton2.setEnabled( false );
else
jButton2.setEnabled( true );
/** When "Set Qty" button is clicked, the quantity of
* the selected item is changed to the integer in
* the qty text field.*/
jButton7.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
int selection = jList1.getSelectedIndex();
String newQty = jTextField4.getText();
try {
int numbertest = Integer.parseInt( newQty );
for ( int i = 0; i < id.size(); i++ )
if ( (String)id.get(i) == choice1.getSelectedItem() )
salePrice -= ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( (String)saleItemsQty.get( selection ) ) );
salePrice += ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( newQty ) );
String newPrice = "$" + salePrice;
saleItems.set( selection, choice1.getSelectedItem() );
saleItemsQty.set( selection, newQty );
jScrollPane2.revalidate();
jScrollPane2.repaint();
jTextField6.setText( newPrice );
jButton7.setEnabled( false );
catch ( NumberFormatException badinput )
JOptionPane.showMessageDialog( null, "Please enter an integer!", "Error", JOptionPane.ERROR_MESSAGE );
/** When "Print Reciept" button is clicked, the price of
* the selected item is changed to the double in
* the price text field.*/
jButton3.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
try{
String reciept = "\tStore Name";
String items = "";
String temp = jTextField5.getText();
String amountPaidString = "";
double amountPaid = 0.0;
double change;
for ( int i = 1; i < temp.length(); i++ )
char a = temp.charAt(0);
char b = temp.charAt(i);
if ( a == '$' )
amountPaidString += b;
else
amountPaidString = "Error";
amountPaid = Double.parseDouble( amountPaidString );
if (amountPaid >= salePrice)
change = amountPaid - salePrice;
reciept += "\nDate: " + jTextField3.getText()
+ "\t\tTime: " + jTextField2.getText()
+ "\nCashier: " + jTextField1.getText()
+ "\n\n\tItems:";
for ( int i = 0; i < saleItems.size(); i++ )
items += "\n" + saleItems.get( i ) + "\t\t$";
for ( int h = 0; h < id.size(); h++ )
if ( (String)id.get(h) == (String)saleItems.get( i ) )
items += ( Double.parseDouble( (String)price.get(h) ) * Double.parseDouble( (String)saleItemsQty.get(h) ) );
reciept += items + "\n\nTOTAL:\t$" + salePrice
+ "\nAmount Paid:\t$" + amountPaid
+ "\nChange:\t$" + change;
jTextArea1.setText( reciept );
jScrollPane1.getViewport().add( jTextArea1 );
jScrollPane1.revalidate();
jScrollPane1.repaint();
jButton1.setEnabled( false );
jButton2.setEnabled( false );
jButton3.setEnabled( false );
jButton7.setEnabled( false );
jTextField4.setEditable( false );
jTextField5.setEditable( false );
choice1.removeItemListener( choiceListener );
else
JOptionPane.showMessageDialog( null, "Amount Paid is not enough!", "Error", JOptionPane.ERROR_MESSAGE );
catch ( NumberFormatException badinput )
JOptionPane.showMessageDialog( null, "Please enter a valid amount paid!", "Error", JOptionPane.ERROR_MESSAGE );
jButton4.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
int select = 3;
select = JOptionPane.showConfirmDialog( null, "Are you sure you want quit this sale?" );
if (select == 0)
String[] run = {"xxx","yyy"};
window.hide();
main( run );
jButton5.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
/* Code for what to do when "Change Cashier" button is clicked*/ /*
jButton6.addActionListener(
new ActionListener()
public void actionPerformed( ActionEvent event )
Inventory inventory = new Inventory();
try{
saveFile();
catch ( IOException e )
window.hide();
inventory.runInventory();
window = null;
private void makeChoiceMenu()
for ( int i = 0; i < id.size(); i++ )
choice1.add( (String)id.get( i ) );
/** The main method.*/
public static void runComputer()
window = new Computer();
window.setSize(555, 335);
window.show();
}This is the inventory class. It's used to make and edit the items in the inventory and then save them into the inventory file.
/** Java core packages*/
import java.util.*;
import java.text.*;
import java.awt.*;
import java.awt.event.*;
/** Java extension packages*/
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.event.*;
import java.io.*;
/** This program displays the inventory of a store and
* allows user to edit each items name, quantity, and
* price. It opens and saves into a file "inventory.dat".
* @author Davin Green
public class Inventory extends LogIn
private static Inventory window;
/** Default constructor.*/
public Inventory()
super("Inventory Editor");
try{
try{
openFile();
createInvGUI();
registerInvEventHandlers();
catch ( IOException e )
catch ( ClassNotFoundException e )
/** The createGUI() methods creates and displays GUI components in the JFrame.*/
private void createInvGUI() throws IOException
/** Get JFrames content pane and set layout to null.*/
Container container = getContentPane();
container.setLayout(null);
/** List of items displayed in scrolling pane.*/
jList1 = new JList( id );
/** Put JList into the scrolling pane, add scrolling pane
* to content pane, and set position and size.*/
jScrollPane1 = new JScrollPane();
jScrollPane1.getViewport().add( jList1 );
container.add(jScrollPane1);
jScrollPane1.setBounds(0, 0, 210, 370);
/** Button for adding a new item.*/
jButton1 = new JButton();
jButton1.setText("Add Item");
container.add(jButton1);
jButton1.setBounds(240, 10, 90, 30);
/** Button for deleting a selected item.*/
jButton2 = new JButton();
jButton2.setText("Delete");
container.add(jButton2);
jButton2.setBounds(290, 50, 90, 30);
/** Button for setting the quantity of an item.*/
jButton3 = new JButton();
jButton3.setText("Set Qty");
container.add(jButton3);
jButton3.setBounds(240, 100, 90, 30);
/** Button for setting the price of an item.*/
jButton4 = new JButton();
jButton4.setText("Set Price");
container.add(jButton4);
jButton4.setBounds(240, 150, 90, 30);
/** Text field for inputing and displaying the id (name) of an item.*/
jTextField1 = new JTextField();
container.add(jTextField1);
jTextField1.setBounds(340, 10, 93, 30);
jText1 = jTextField1.getDocument();
/** Text field for inputing and displaying the quantity of an item.*/
jTextField2 = new JTextField();
container.add(jTextField2);
jTextField2.setBounds(370, 100, 43, 30);
jText2 = jTextField2.getDocument();
/** Text field for inputing and displaying the price of an item.*/
jTextField3 = new JTextField();
container.add(jTextField3);
jTextField3.setBounds(370, 150, 43, 30);
jText3 = jTextField3.getDocument();
/** Displays "Qty" before the quantity text field.*/
label1 = new Label();
label1.setText("Qty");
container.add(label1);
label1.setBounds(350, 100, 20, 20);
/** Displays "Price" before the price text field.*/
label2 = new Label();
label2.setText("Price");
container.add(label2);
label2.setBounds(340, 150, 30, 20);
/** Button to change cashier (return to cashier log-in panel).*/
jButton5 = new JButton();
jButton5.setText("Change Cashier");
container.add(jButton5);
jButton5.setBounds(260, 270, 130, 30);
/** Button to make sell (open make sell panel).*/
jButton6 = new JButton();
/** JTextField objects for the text fields that are used in these programs.*/
public JTextField jTextField1, jTextField2, jTextField3,
jTextField4, jTextField5, jTextField6;Your variable names don't mean anything.
So the person who has to maintain this program when you leave has a difficult task.
If there was some indication that the operator would key in (say) a quantity, that would
make it easier. You might name it "quantityText" in that case, or something like that.
Similar Messages
-
Optimal use of iTunes with Apple TV and Time Capsule
I’m undertaking a major “infrastructure” upgrade. This will involve Time Capsule and Apple TV. My current environment consists of 1 PowerBook and 1 Desktop PC running WIN XP. I’m running on a wireless network based off of an old Linksys Gateway (G-Cable). I’m backing up each device with separate external hard drives which are quite old. Shortly, I’ll be adding a 2nd Powerbook to the mix.
My configuration plan is to install Time Capsule to backup all of the devices. I will then add Apple TV to stream iTunes content to my TV. My current Powerbook contains my iTunes Library which is nearing 70G.
In regards to Apple TV, is it recommended to go with the 40G model and maintain the iTunes library on Time Capsule or other external drive?5 Ghz may help avoid interference, but it also has shorter range, it depends on the circumstances surrounding your location whether it's a better option or not.
-
How to perform Data Collection on single SFC with QTY = 1 with material lot size 1?
Dear experts,
We are working with SFC qty>1 on a relaxed routing. At a given operation we want to collect the data on single quantity; i.e. SFC qty on that operation, where the collection will happen, will be 1.The corresponding material lot size is for ex 10. The operator must be able to collect data on SFC with qty=1 multiple times until the quantities will be consumed. He must be also able to collect other values on the remaining quantities on the same operation with the same DC group or other DC groups. How many times the data must be collected is dependent on the shop order build quantity. The data may be collected several time but not more than the build qty. In other words some specific data will be collected on a qty of a product while others will be collected against remaining quantity. The data collection must be also done in a serialized manner.
Here's what we have set up so far:
1) 3 DC groups, each DC group has 3 data fields.
2) Each data field has the following restrictions: Required Data Entries = 0 and Optional Data Entries = 1
3) All DC groups are attached on the same combination of operation\material\routing
4) we are using relaxed routing
Process description:
The operator must be able to collect any data field on single product. For that he will enter the operation where the data collect are attached, he will enter the SFC with qty=1 then he will run the data collection after selecting the appropriate DC Group and entering the needed information. The operator will complete the SFC with qty=1.
The operator will pick the next product, select the same SFC and enter qty 1 and collect other value against this product.
Problem is:
Once the first collection is done on a given SFC with entered qty=1, the system is not allowing the operator to do further collects on the same SFC with qty=1 or any other quantity. He cannot select any DC group from the DC group list. We tried also with the table selection menu on the DC Group list but nothing can be selected.
So we tried to play around with the DC group definitions as follows:
A) we set Required Data Entries = 0 and Optional Data Entries = 10. Still the operator was not able to select any DC group after collecting data the first time. We tried to reopen the pod and list again. But we get the same blocking behavior.
B) we set Required Data Entries = 10 and Optional Data Entries = 1. The operator was able to select the DC group after collecting data the first time. BUT operator must enter the data fields 10 times on one SFC quantity, which is not what we want. Besides again he cannot collect other information on remaining quantities on the same operation.
C) There's an option to serialize the SFC before reaching the operation where the collection is happening, then merging ofter complete. Automation is needed here; hence customization. We are highly avoiding customization now, since we expect the data collect to work well on single quantities even when the main SFC has qty>1
Questions:
1) Are we missing any kind of further configuration\setup?
2) Or the current system design does not allow collecting data on single quantities of an SFC which main quantity is greater than 1?
3) Looking at this link Approaches to Collection of Data - SAP Manufacturing Execution (SAP ME) - SAP Library, there's nothing mentioned about same SFC number with multiple quantities!!!
We are using SAP ME 15.0.3.0.
Thanks in advance for your help
AliAli
to collect data for the same SFC multiple times, your system rule "Allow Multiple Data Collection" needs to be set to true for the site.
Stuart -
Another connection problem (with a lot of solution advices tried o
hi everybody,
since yesterday i'm a proud owner (more or less) of a zen x-fi. the only thing that dri'ves me crazy is that i can't get it working with windows.
first of all the system config:
Desktop PC (P4 on 95P Express chipset)
Windows XP Pro SP3
Media Player
i searched the web and am trying to solve this problem: "there was a problem installing ..." for quite a long time now.
here's what i did up until now:
- deinstalling Media Player and installing v0 - couldn't deinstall v
- installing newest version of the WMP (v - 5th Oct. 2008) from Microsoft to get the newest MTP support
- deinstalling the "Creative Centrale" and reinstalling it (at the moments it's uninstalled)
- installing Microsoft User Driver Framework v.0 (wouldn't allow me - of course, because it's implemented with WMP or rather it's drivers are older)
- setting USB ENUM to "read" and "full control"
- deinstalling and reinstalling the USB drivers (motherboard support as well as chipset vendor newest drivers)
- checking every single USB port (front and back)
- settings for USB HUBs to "full power supply" (no Power Management)
- reinstalled SP3
- got all new Updates from Windows (critical updates) including all up to date .Net Framework versions
- tried the Media Transfer Protocol Porting Kit (quite sure that this doesn't do anything since it seems to be the sdk version and i know to little of programming to try something out)?
- downloaded the fixup (found it in different posts to have been a workaround) and there was a little success: i got a working driver (no "there was a problem installing ...") until i realized that it doesn't show anything inside the folder (mtp/portable device) neither does it say "zen x-fi" in the device manager (it's only called "mtp device"). checked the .inf in the fixup package and realized that it couldn't work as long as i don't know the x-fi's Product ID, which i searched for on the internet (linux forums etc.) but the x-fi seems to be too new
now: i of course tried it on another PC to be sure (Laptop with Windows XP Pro SP3 and WMP 0!) - and it works ...
downside is: my library is fairly big and would fit on the Laptop's harddri've. i found a little workaround and imported the folder into the laptop's winamp library (via Network) and got some songs onto the Zen but it takes a lot of time getting them through the network connection (WLAN).
as i see it there's only two chances: either the USB is not suitable (which i can't believe, since everything else that i attach is working fine and without any issues) or the problem has something to do with the Media Player's MTP.
so does anyone have another idea or would i have to wait for either Windows or Creative to come up with a solution(maybe another hotfix)?
thanks in advance
regards
alIve been having hell with this aswell, although i think my computer is to blame. It "should" work if i could install wmp, but i cannot because my computer needs me to install some update rollup 2 which doesnt install and i cant install sp3 either... i've been contacting microsoft but they cant sort it.. maybe my pc is just reaching its old age and cannot cope with so many new things going on.
but from what you have said i cant see why it shouldnt work with your current system. -
Reverse a Return Delivery with inspection lot posted (QM)
Hello experts,
I want to reverse with transaction VL09 a good movement of a return client delivery with inspection lot. I posted the inspection lot and transferred the material to Unrestricted use (transaction QA11).
Then I began the cancel Return Process and I transferred the material to Quality (movement type 322) to run VL09 with material in Quality stock, but the system displays the following error message:
You cannot cancel GR, since inspection lot is already partly posted
Message no. QA046
Diagnosis
You are attempting to reverse a goods receipt although quantity postings have already been made from the inspection lot. This means that stock for the goods receipt has already been transferred and, for this reason, a cancelation of the document is no longer possible.
Procedure
Ensure that the postings in QM (within the usage decision transactions) are carried out.
Please let me know what can I do to reverse the return delivery.
Thanks in advance.
PabloYou are trying to do the process which you ahve already transferred through Transaction QA11.
The role of Cancel return Process has already been done by this transaction as the Stock has already been into Un- restricted.
Best Regards,
Ankur -
Case study: "Large?" labview programs flooded with different VIT's
Case study: "Large?" labview programs flooded
with different VIT's
Type of application:
Computer with loads of individual hardware connected or other software (either
onsite (different buses) or offsite (Satelite/GSM/GPRS/radio etc.).
Hardware
description: little data "RPM" but communications to all devices are intact.
More "RPM" when many VITs are involved.
Size: 1000+
VITS in memory (goal). Total software has been tested and simulated with 400.
I'm posting
this post after reading this thread (and actually I cant sleep and am bored as
hell).
Note: I do
not use LVOOP (but sure post OOP examples, am starting to learn more and more
by the day.)
Things I
will discuss are:
Case 1: Memory usage using a plugin
architecture
CASE 2: memory usage using VITs (!)
CASE 3: updating datastructures:
CASE 4: shutdown of the whole system
CASE 5: stability & heath monitoring
CASE 6: Inifiles
CASE 7: When the hardware is getting crappy
Total
application overview:
We have a
main application. This main application is mainly empty as hell, and only holds
a plugin functionality (to register and administer plugins) and holds an
architecture that holds the following items:
Queue state
machine for main application error handling
Queue state
machine for status messages
Queue state
machine for updating virtual variables
Event state
machine for GUI
Some other
stuff
Other
global functionality is:
User
logins, user configurations and unique access levels
Different
nice tools like the good old BootP and other juicy stuff
Supervision
of variables (like the NI tag engine, but here we have our own datastructures)
Generation
of virtual variables (so that the user can configure easy mathematical
functions and combining existing tags)
Licensing
of plugins (hell we free-lance programmers need some money to don't we?)
Handles
all communication between plugins themselves, or directly to a plugin or vice
versus.
And now we don't
talk about that (or marketing) the main application .
Message Edited by Corny on 01-20-2010 08:52 AMCASE 3: updating datastructures:
As we do NOT use clusters here (that would
just be consuming) we only use an 1D array of data that needs to be updated in
different functional globals. If the the number of VITS exceeds so that the
updating of this datastructures becomes the bottleneck, this would cause
delays. And since in this example we use 250 serial interfaces (lol) we do not
want to disrupt that by any delays. When this happends, does anyone know a good
solution to transfer data?
A thought:
perhaps sending it down to the plugin and let the plugin handle it, this should
save some time, but then again if more VITs are added again this would become a
bottleneck and the queue would fill up after a while unable to process it fast
enough. Any opinions?
CASE 4: shutdown of the whole system
Lets say we
want to close it all down, but the VITs need perhaps to do some shutdown
procedure towards the hardware, that can be heavy.
If we ask
them to shutdown all together we can use an natofier or userevent to do this
job. Well, what happends next is that the CPU will jump to the roof, and well
that can only cause dataloss and trouble. The solution here was to let the
plugin shut them all down one by one, when one has been shutdown, begin at the
next. Pro; CPU will not jump to the moon. Con's: shutdown is going to take a
while. Be ready with a cup of coffee.
Also we
want the main application not to exit before we exit. The solution above solved
this as the plugin knows when all have been shut down, and can then shut itself
down. When all plugins are shutdown - the application ends.
Another
solution is to use rendovous (arg cant spell it) and only shut the system down
when all rendezvous have met.
CASE 5: stability & heath monitoring
This IS
using a lot of memory. How to get it down. And has anyone experienced any
difficulties with labview using A LOT of memory? I want to know if something
gets corrupt. The VITs send out error information in case, but what if
something weird happens, how can I surveillance all the VIT's in memory to know
one is malfunctioning in an effective way/code (as backup
solution so the application knows
something is wrong?
CASE 6: Inifiles
Well, we
all like them. Even if XML is perhaps more fahionally. Now Ive runned some
tests on large inifiles. And the labview Inifile functions use ages to parsing
all this information. Perhaps an own file structure in binary format or
something would be better? (and rather create an configuration program)?
CASE 7: When the hardware is getting crappy:
Now what if
the system is hitting the limit and gradually exceeds the hardware req. of the
software. What to do then (thinking mostly of memory usage)? Needing to install
it on more servers or something and splitting configurations? Is that the best
way to solve this? Any opinions?
Wow. Time for a coffee cup. Impressive if someone
actually read all of this. My goal is to reach the 1000 VIT mark.. someday.. so
any opinions, and just ask if something unclear or other stuff, Im open for all
stuff, since I see the software will hit a memory barrier someday if I want to
reach that 1000 mark hehe -
How to download a module pool program along with its screens ,includes etc
Hello Experts,
How can I download a module pool program along with its screens ,includes etc to my presentatio0n server and then upload it back when needed.
When I searched , I got a program which is satisfying my partial requirement because it only downloads
the module pool program first(ie.just the main program) and then the include needs to be downloaded to the system separately.Screen and statuses wont be downloaded.
Is there a way to download all the objects for the corresponding program store in some format and then upload it back when required.
Please Help.Hello,
Go to the layout of the modulepool to be uploaded or downloaded. choose the menu path utilities->upload/download.
The same file which is downloaded can be used to upload
1.the screen flow logic and
2.layout
Using this you can upload as well as download
Cheers,
Vasanth -
Program is taking lot of time for execution
Hi all,
TYPES: BEGIN OF TY_MARA,
MATNR TYPE MATNR, " Material Number
ZZBASE_CODE TYPE ZBASE_CODE, " Base Code
END OF TY_MARA,
BEGIN OF TY_MAKT,
MATNR TYPE MATNR, " Material
MAKTX TYPE MAKTX, " Material Description
END OF TY_MAKT,
BEGIN OF TY_MARC,
MATNR TYPE MATNR , " Material Number
WERKS TYPE WERKS_D, " Plant
END OF TY_MARC,
BEGIN OF TY_QMAT,
MATNR TYPE MATNR, " Material Number
ART TYPE QPART, " Inspection Type
END OF TY_QMAT,
BEGIN OF TY_MAPL,
MATNR TYPE MATNR, " Material
PLNTY TYPE PLNTY, " Task List Type
END OF TY_MAPL,
BEGIN OF TY_PLKO,
PLNTY TYPE PLNTY, " Task List Type
VERWE TYPE PLN_VERWE, " Task list usage
END OF TY_PLKO,
BEGIN OF TY_KLAH,
CLASS TYPE KLASSE_D, " Class Number
END OF TY_KLAH,
BEGIN OF TY_FINAL,
MATNR TYPE MATNR, " Material Number
MAKTX TYPE MAKTX, " Material Description
ZZBASE_CODE TYPE ZBASE_CODE, " Base Code
WERKS TYPE WERKS_D, " Plant
CLASS TYPE KLASSE_D, " Class Number
ART TYPE QPART, " Inspection Type
VERWE TYPE PLN_VERWE, " Task list usage
MESSAGE TYPE STRING, " Message
END OF TY_FINAL.
DATA: I_MARA TYPE STANDARD TABLE OF TY_MARA ,
I_MAKT TYPE STANDARD TABLE OF TY_MAKT ,
I_MARC TYPE STANDARD TABLE OF TY_MARC ,
I_QMAT TYPE STANDARD TABLE OF TY_QMAT ,
I_MAPL TYPE STANDARD TABLE OF TY_MAPL ,
I_PLKO TYPE STANDARD TABLE OF TY_PLKO ,
I_KLAH TYPE STANDARD TABLE OF TY_KLAH ,
I_FINAL TYPE STANDARD TABLE OF TY_FINAL ,
WA_MARA TYPE TY_MARA,
WA_MAKT TYPE TY_MAKT,
WA_MARC TYPE TY_MARC,
WA_QMAT TYPE TY_QMAT,
WA_MAPL TYPE TY_MAPL,
WA_PLKO TYPE TY_PLKO,
WA_KLAH TYPE TY_KLAH,
WA_FINAL TYPE TY_FINAL.
DATA: V_MTART TYPE MARA-MTART,
V_MATNR TYPE MARA-MATNR,
V_ZZBASE_CODE TYPE MARA-ZZBASE_CODE,
V_WERKS TYPE T001W-WERKS,
V_BESKZ TYPE MARC-BESKZ.
*selection-screen
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_MTART FOR V_MTART DEFAULT 'halb' TO 'zraw',
S_MATNR FOR V_MATNR,
S_ZZBASE FOR V_ZZBASE_CODE,
S_WERKS FOR V_WERKS OBLIGATORY,
S_BESKZ FOR V_BESKZ.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
SELECT MATNR
ZZBASE_CODE
FROM MARA INTO TABLE I_MARA
WHERE MTART IN S_MTART "Material Type
AND MATNR IN S_MATNR "Material
AND ZZBASE_CODE IN S_ZZBASE."Base Code
IF NOT I_MARA IS INITIAL.
SELECT MATNR
MAKTX
FROM MAKT INTO TABLE I_MAKT FOR ALL ENTRIES IN I_MARA
WHERE MATNR = I_MARA-MATNR.
ENDIF.
IF NOT I_MARA IS INITIAL.
SELECT MATNR
WERKS
FROM MARC INTO TABLE I_MARC FOR ALL ENTRIES IN I_MARA
WHERE MATNR = I_MARA-MATNR
AND WERKS IN S_WERKS "plant
AND BESKZ IN S_BESKZ."Procurement Type
ENDIF.
IF NOT I_MARA IS INITIAL.
SELECT MATNR
ART
FROM QMAT INTO TABLE I_QMAT FOR ALL ENTRIES IN I_MARA
WHERE MATNR = I_MARA-MATNR
AND WERKS IN S_WERKS.
ENDIF.
IF NOT I_MARA IS INITIAL.
SELECT MATNR
PLNTY FROM MAPL INTO TABLE I_MAPL FOR ALL ENTRIES IN I_MARA
WHERE MATNR = I_MARA-MATNR.
ENDIF.
IF NOT I_MAPL IS INITIAL.
SELECT PLNTY
VERWE
FROM PLKO INTO TABLE I_PLKO FOR ALL ENTRIES IN I_MAPL
WHERE PLNTY = I_MAPL-PLNTY.
ENDIF.
LOOP AT I_MARA INTO WA_MARA.
CALL FUNCTION 'CLFC_BATCH_ALLOCATION_TO_CLASS'
EXPORTING
MATERIAL = WA_MARA-MATNR
PLANT = WA_MARC-WERKS
CLASSTYPE = '023'
I_IGNORE_MATMASTER = ' '
I_BATCHES_ONLY =
I_IGNORE_BUFFER = ' '
IMPORTING
CLASSTYPE =
CLASS = WA_KLAH-CLASS
EXCEPTIONS
WRONG_FUNCTION_CALL = 1
NO_CLASS_FOUND = 2
NO_CLASSTYPE_FOUND = 3
OTHERS = 4 .
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
APPEND WA_KLAH TO I_KLAH.
ENDLOOP.
LOOP AT I_MARA INTO WA_MARA.
WA_FINAL-MATNR = WA_MARA-MATNR.
WA_FINAL-ZZBASE_CODE = WA_MARA-ZZBASE_CODE.
APPEND WA_FINAL TO I_FINAL.
SORT I_MAKT BY MATNR.
READ TABLE I_MAKT INTO WA_MAKT WITH KEY MATNR = WA_MARA-MATNR BINARY
SEARCH.
IF SY-SUBRC EQ 0.
WA_FINAL-MAKTX = WA_MAKT-MAKTX.
ENDIF.
APPEND WA_FINAL TO I_FINAL.
SORT I_MARC BY MATNR.
READ TABLE I_MARC INTO WA_MARC WITH KEY MATNR = WA_MARA-MATNR BINARY
SEARCH.
IF SY-SUBRC EQ 0.
WA_FINAL-WERKS = WA_MARC-WERKS.
ENDIF.
APPEND WA_FINAL TO I_FINAL.
SORT I_QMAT BY MATNR.
READ TABLE I_QMAT INTO WA_MARC WITH KEY MATNR = WA_MARA-MATNR BINARY
SEARCH.
IF SY-SUBRC EQ 0.
WA_FINAL-ART = WA_QMAT-ART.
ENDIF.
APPEND WA_FINAL TO I_FINAL.
SORT I_MAPL BY MATNR.
READ TABLE I_MAPL INTO WA_MAPL WITH KEY MATNR = WA_MARA-MATNR BINARY
SEARCH.
IF SY-SUBRC EQ 0.
SORT I_PLKO BY PLNTY.
READ TABLE I_PLKO INTO WA_PLKO WITH KEY PLNTY = WA_MAPL-PLNTY BINARY
SEARCH.
ENDIF.
WA_FINAL-VERWE = WA_PLKO-VERWE.
APPEND WA_FINAL TO I_FINAL.
ENDLOOP.
LOOP AT I_KLAH INTO WA_KLAH.
WA_FINAL-CLASS = WA_KLAH-CLASS.
APPEND WA_FINAL TO I_FINAL.
ENDLOOP.
LOOP AT I_FINAL INTO WA_FINAL.
WRITE:/ WA_FINAL-MATNR,
WA_FINAL-MAKTX,
WA_FINAL-ZZBASE_CODE,
WA_FINAL-WERKS,
WA_FINAL-CLASS,
WA_FINAL-ART,
WA_FINAL-VERWE.
ENDLOOP.
This is my program. it is giving out put.but it is taking lot of time for execution. what might be the porblem.pls let me know.
Thanks,Hi Mythily,
Try the following code.
TYPES: BEGIN OF ty_mara,
matnr TYPE matnr, " Material Number
zzbase_code TYPE zbase_code, " Base Code
END OF ty_mara,
BEGIN OF ty_makt,
matnr TYPE matnr, " Material
maktx TYPE maktx, " Material Description
END OF ty_makt,
BEGIN OF ty_marc,
matnr TYPE matnr , " Material Number
werks TYPE werks_d, " Plant
END OF ty_marc,
BEGIN OF ty_qmat,
art TYPE qpart , " Inspection Type
matnr TYPE matnr , " Material Number
werks TYPE werks_d, "Plant
END OF ty_qmat,
BEGIN OF ty_mapl,
matnr TYPE matnr , " Material
werks TYPE werks_d , "Plant
plnty TYPE plnty , " Task List Type
plnnr TYPE plnnr , " Key for Task List Group
plnal TYPE plnal , " Group Counter
zkriz TYPE dzkriz , " Counter for additional criteria
zaehl TYPE cim_count, " Internal counter
END OF ty_mapl,
BEGIN OF ty_plko,
plnty TYPE plnty , " Task List Type
plnnr TYPE plnnr , " Key for Task List Group
plnal TYPE plnal , " Group Counter
zaehl TYPE cim_count, " Internal counter
verwe TYPE pln_verwe, " Task list usage
END OF ty_plko,
BEGIN OF ty_klah,
class TYPE klasse_d, " Class Number
END OF ty_klah,
BEGIN OF ty_final,
matnr TYPE matnr, " Material Number
maktx TYPE maktx, " Material Description
zzbase_code TYPE zbase_code, " Base Code
werks TYPE werks_d, " Plant
class TYPE klasse_d, " Class Number
art TYPE qpart, " Inspection Type
verwe TYPE pln_verwe, " Task list usage
message TYPE string, " Message
END OF ty_final.
DATA: i_mara TYPE STANDARD TABLE OF ty_mara ,
i_makt TYPE HASHED TABLE OF ty_makt
WITH UNIQUE KEY matnr,
i_marc TYPE SORTED TABLE OF ty_marc
WITH NON-UNIQUE KEY matnr,
i_qmat TYPE SORTED TABLE OF ty_qmat
WITH NON-UNIQUE KEY matnr werks,
i_mapl TYPE SORTED TABLE OF ty_mapl
WITH NON-UNIQUE KEY matnr werks,
i_mapl_tmp TYPE STANDARD TABLE OF ty_mapl ,
i_plko TYPE SORTED TABLE OF ty_plko
WITH NON-UNIQUE KEY plnty
plnnr
plnal,
i_final TYPE STANDARD TABLE OF ty_final,
wa_mara TYPE ty_mara,
wa_makt TYPE ty_makt,
wa_marc TYPE ty_marc,
wa_qmat TYPE ty_qmat,
wa_mapl TYPE ty_mapl,
wa_plko TYPE ty_plko,
wa_klah TYPE ty_klah,
wa_final TYPE ty_final.
DATA: v_mtart TYPE mara-mtart,
v_matnr TYPE mara-matnr,
v_zzbase_code TYPE mara-zzbase_code,
v_werks TYPE t001w-werks,
v_beskz TYPE marc-beskz.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_mtart FOR v_mtart DEFAULT 'halb' TO 'zraw',
s_matnr FOR v_matnr,
s_zzbase FOR v_zzbase_code,
s_werks FOR v_werks OBLIGATORY,
s_beskz FOR v_beskz.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
SELECT matnr
zzbase_code
FROM mara
INTO TABLE i_mara
WHERE mtart IN s_mtart "Material Type
AND matnr IN s_matnr. "Material
AND zzbase_code IN s_zzbase."Base Code
IF NOT i_mara[] IS INITIAL.
SELECT matnr
maktx
FROM makt
INTO TABLE i_makt
FOR ALL ENTRIES IN i_mara
WHERE matnr EQ i_mara-matnr
AND spras EQ sy-langu.
SELECT matnr
werks
FROM marc
INTO TABLE i_marc
FOR ALL ENTRIES IN i_mara
WHERE matnr EQ i_mara-matnr
AND werks IN s_werks "plant
AND beskz IN s_beskz."Procurement Type
IF sy-subrc EQ 0.
SELECT art
matnr
werks
FROM qmat
INTO TABLE i_qmat
FOR ALL ENTRIES IN i_marc
WHERE matnr EQ i_marc-matnr
AND werks EQ i_marc-werks.
SELECT matnr
werks
plnty
plnnr
plnal
zkriz
zaehl
FROM mapl
INTO TABLE i_mapl
FOR ALL ENTRIES IN i_marc
WHERE matnr EQ i_marc-matnr
AND werks EQ i_marc-werks.
IF NOT i_mapl[] IS INITIAL.
i_mapl_tmp[] = i_mapl[].
SORT i_mapl_tmp BY plnty
plnnr
plnal.
DELETE ADJACENT DUPLICATES FROM i_mapl_tmp
COMPARING
plnty
plnnr
plnal.
SELECT plnty
plnnr
plnal
zaehl
verwe
FROM plko
INTO TABLE i_plko
FOR ALL ENTRIES IN i_mapl_tmp
WHERE plnty EQ i_mapl_tmp-plnty
AND plnnr EQ i_mapl_tmp-plnnr
AND plnal EQ i_mapl_tmp-plnal.
ENDIF.
ENDIF.
ENDIF.
LOOP AT i_mara INTO wa_mara.
wa_final-matnr = wa_mara-matnr.
wa_final-zzbase_code = wa_mara-zzbase_code.
READ TABLE i_makt INTO wa_makt
WITH KEY matnr = wa_mara-matnr
TRANSPORTING
maktx.
IF sy-subrc EQ 0.
wa_final-maktx = wa_makt-maktx.
ENDIF.
REFRESH i_final.
LOOP AT i_marc INTO wa_marc
WHERE matnr EQ wa_mara-matnr.
CLEAR wa_klah-class.
CALL FUNCTION 'CLFC_BATCH_ALLOCATION_TO_CLASS'
EXPORTING
material = wa_mara-matnr
plant = wa_marc-werks
classtype = '023'
IMPORTING
class = wa_klah-class
EXCEPTIONS
wrong_function_call = 1
no_class_found = 2
no_classtype_found = 3
OTHERS = 4.
IF sy-subrc EQ 0.
wa_final-class = wa_klah-class.
ENDIF.
READ TABLE i_qmat
WITH KEY matnr = wa_mara-matnr
werks = wa_marc-werks
TRANSPORTING NO FIELDS.
IF sy-subrc EQ 0.
LOOP AT i_qmat INTO wa_qmat
WHERE matnr EQ wa_mara-matnr
AND werks EQ wa_marc-werks.
wa_final-art = wa_qmat-art.
READ TABLE i_mapl
WITH KEY matnr = wa_marc-matnr
werks = wa_marc-werks
TRANSPORTING NO FIELDS.
IF sy-subrc EQ 0.
LOOP AT i_mapl INTO wa_mapl
WHERE matnr EQ wa_marc-matnr
AND werks EQ wa_marc-werks.
LOOP AT i_plko INTO wa_plko
WHERE plnty EQ wa_mapl-plnty
AND plnnr EQ wa_mapl-plnnr
AND plnal EQ wa_mapl-plnal.
wa_final-verwe = wa_plko-verwe.
APPEND wa_final TO i_final.
ENDLOOP.
ENDLOOP.
ELSE.
APPEND wa_final TO i_final.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT i_mapl INTO wa_mapl
WHERE matnr EQ wa_marc-matnr
AND werks EQ wa_marc-werks.
LOOP AT i_plko INTO wa_plko
WHERE plnty EQ wa_mapl-plnty
AND plnnr EQ wa_mapl-plnnr
AND plnal EQ wa_mapl-plnal.
wa_final-verwe = wa_plko-verwe.
APPEND wa_final TO i_final.
ENDLOOP.
ENDLOOP.
ENDIF.
ENDLOOP.
CLEAR wa_final.
ENDLOOP.
LOOP AT i_final INTO wa_final.
WRITE:/ wa_final-matnr ,
wa_final-maktx ,
wa_final-zzbase_code,
wa_final-werks ,
wa_final-class ,
wa_final-art ,
wa_final-verwe .
ENDLOOP. -
When a program starts with /cc... what does it signify??
Hi experts,
When a program starts with /cc... what does it signify??For example if it is like /ccaev/casdfge.
Thanks in advance
regards,
AshwinHEllo,
Check this
Reservation Procedure
Any customer or partner with a development system which has Release 4.0A or later can use SAPNet - R/3 Frontend to apply for a reservation for their own development namespace. You need to give the following information:
Namespace name (recognizably connected to your company)
Purpose of the namespace (for example, central group development, or the name of a planned specific enhancement to SAP)
Installation numbers of the SAP Systems in which you want to develop
Available Names
Names for namespaces are selected freely from the pool of names that have not yet been reserved and should have a recognizable reference to the company making the reservation. The names must have at least 5 characters and can be up to 10 characters long. The first and last character is a slash "/". Names beginning with "/SAP" or "/n" (n = digit) are not available. Only individual names are given.
Development of a specific SAP solution by the system reseller ABCD
Reserved namespace: "/ABCD/"
SAP enhancements by SAP customer ABC123
Reserved namespace: "/ABC123/"
To go through completely about the naming convention then check this link:
http://help.sap.com/saphelp_nw04/helpdata/en/2a/6b0afe547a11d189600000e829fbbd/frameset.htm
Vasanth
Message was edited by:
Vasanth M -
When i use the firefox 12.02 beta version its hangs lot of time and theres no program was running at the time only i am open 4 tab the sites gmail yahoomail facebook twitter why i am using HP 512 MB ram and 40 gb hard disk and intel pentium 4 cpu 3.20GHZ this 11 stable firefox also hanging pls help i am a firefox lover i am using firefox for 4 years
please answer the solution :(
[http://farm8.staticflickr.com/7074/7108695957_a7cd035fd3_b.jpg hangup the tap]
[http://farm8.staticflickr.com/7125/6962618028_b32ecdc8c0_b.jpg Not respond]
[http://farm8.staticflickr.com/7055/7108688293_4916dbe0e6_b.jpg Remember password box not hide ]
[http://farm8.staticflickr.com/7110/7108684531_b394182705_b.jpg hangups on browsing with G+ page]I should have explained further. The game opens in a new window over to the upper left of my screen, leaving the original page underneath. I tried minimizing it so that I could get to my toolbar and did the View > Zoom > Reset. This has no effect. The lower portion of the game is still not showing. Using other browsers the window or frame of the game is much larger, therefore everything shows.
-
Lot for lot(EX) with minimum lot size
Hi Experts,
Is it possible to have Ex with minimum lot size. I have a situation where an FG cannot be produced over a certain qty but can be produced in any numbers beyond that. Please explain.
Regards,
SachinHi,
You can use Lot size key EX- lot for Lot order and Minimum lot size as per the requirement. If the lot size is smaller than the Minimum lot size qty procurement proposals will be created for the minimum lot size quantity.
Hope it resolve your issue. Kindly revert for further clarification.
thanks and regards
muru -
Hi,
While trying to open a folder on my Windows 7 Home Premium, an error comes "This file does not have a program associated with it for performing this
action. Please install a program or, if one is already installed, create an association in the Default Programs control panel." I tried searching on the net but did not get great support for the issue when it happens with folder opening.Hi Nikunj Shah,
First, I suggest you download
Microsoft Safety Scanner or
Malicious Software Removal Tool to run a full scan.
The error messages here seems to be caused by the corrupted registries, which related with the folder association.
You may take a try to merge the following registry settings to reset the folder association, before that, remember to backup your registry settings first:
How to back up and restore the registry in Windows
Copy and paste the following commands into Notepad, and save it to a .reg file:
=================
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder]
"ContentViewModeLayoutPatternForBrowse"="delta"
"ContentViewModeForBrowse"="prop:~System.ItemNameDisplay;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;System.DateModified"
"ContentViewModeLayoutPatternForSearch"="alpha"
"ContentViewModeForSearch"="prop:~System.ItemNameDisplay;System.DateModified;~System.ItemFolderPathDisplay"
@="Folder"
"EditFlags"=hex:d2,03,00,00
"FullDetails"="prop:System.PropGroup.Description;System.ItemNameDisplay;System.ItemTypeText;System.Size"
"NoRecentDocs"=""
"ThumbnailCutoff"=dword:00000000
"TileInfo"="prop:System.Title;System.ItemTypeText"
[HKEY_CLASSES_ROOT\Folder\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,00,00
[HKEY_CLASSES_ROOT\Folder\shell\explore]
"MultiSelectModel"="Document"
"ProgrammaticAccessOnly"=""
"LaunchExplorerFlags"=dword:00000018
[HKEY_CLASSES_ROOT\Folder\shell\explore\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
[HKEY_CLASSES_ROOT\Folder\shell\open]
"MultiSelectModel"="Document"
[HKEY_CLASSES_ROOT\Folder\shell\open\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
65,00,00,00
[HKEY_CLASSES_ROOT\Folder\shell\opennewprocess]
"MUIVerb"="@shell32.dll,-8518"
"MultiSelectModel"="Document"
"Extended"=""
"LaunchExplorerFlags"=dword:00000003
"ExplorerHost"="{ceff45ee-c862-41de-aee2-a022c81eda92}"
[HKEY_CLASSES_ROOT\Folder\shell\opennewprocess\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
[HKEY_CLASSES_ROOT\Folder\shell\opennewwindow]
"MUIVerb"="@shell32.dll,-8517"
"MultiSelectModel"="Document"
"OnlyInBrowserWindow"=""
"LaunchExplorerFlags"=dword:00000001
[HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\BriefcaseMenu]
@="{85BBD920-42A0-1069-A2E4-08002B30309D}"
[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location]
@="{3dad6c5d-2167-4cae-9914-f99e41c12cfa}"
[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Offline Files]
@="{474C98EE-CF3D-41f5-80E3-4AAB0AB04301}"
[HKEY_CLASSES_ROOT\Folder\ShellEx\DragDropHandlers\{BD472F60-27FA-11cf-B8B4-444553540000}]
@=""
[HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\BriefcasePage]
@="{85BBD920-42A0-1069-A2E4-08002B30309D}"
[HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\Offline Files]
@="{7EFA68C6-086B-43e1-A2D2-55A113531240}"
[-HKEY_CLASSES_ROOT\Folder\ShellNew]
[HKEY_CLASSES_ROOT\Folder\ShellNew]
"Directory"=""
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
00,68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,\
00,00
"ItemName"="@shell32.dll,-30396"
"MenuText"="@shell32.dll,-30317"
"NonLFNFileSpec"="@shell32.dll,-30319"
[HKEY_CLASSES_ROOT\Folder\ShellNew\Config]
"AllDrives"=""
"IsFolder"=""
"NoExtension"=""
==================
Once done, right-click the REG file and choose Merge. Alternately, you can open the Registry Editor and then using the
Import option from the File menu, to merge the REG file contents.
Let me know if you need any further help.
Best regards
Michael Shao
TechNet Community Support -
I recently upgraded our family's mac to OS X. I thought this was the perfect time to create and use "user accounts". We had always used 1 main account. So how do I use software or applications with a lot of data like Quicken under my own user account? I wanted to be able to manage my own itunes library, iphone apps, messages. But I still really need to use the Stuff I have in Quicken essentials. I don't want to have to restart all my work done in Quicken already.
I haven't used Quicken in a while, but most applications store your files in your Documents folder. Is that where your Quicken data file is? What you do next depends on how many family members need to get at that data.
If multiple family members need to use the Quicken data file, try moving it to the Documents folder in the Shared account. That is an account that all accounts can see. It's at the same level as the other accounts. In other words, Shared is one level up from your Home account, or Hard Drive/Users/Shared.
If you're the only one allowed to see that Quicken data, move the Quicken data file from the old main account to your account, and don't leave a copy behind. You can use the Shared folder as a way station for the transfer since you won't be able to see both accounts' Documents folders at the same time (because you're not allowed to peek into other people's accounts). Or you can use another disk or server for the transfer, as long as you can get to it when logged into either account. -
EVERYTIME I UPDATE SOFTWARE OR GO INTO THE CONTROL PANEL TO ITUNES TO REPAIR OR CHANGE IT GIVES ME AN ERROR MESSAGE
THIS FILE DOES NOT HAVE A PROGRAM ASSOCIATED WITH IT FOR PERFORMING THIS ACTION. PLEASE INSTALL A PROGRAM, IF IT IS INSTALLED CREATE AN ASSOCIATION TO THE DEFAULT PROGRAMS CONTROL PANELSTOP SHOUTING! Or at the very least, get the CAPS lock key fixed.
Remove iTunes.
Download and install the current version of iTunes from http://www.apple.com/itunes/download -
am tTying to install itunes and I get error message "This file does not have a program associated with it for performing this action. Please install a program, or if one is already installed, create an association in the Default Programs control panel. Can anyone help me?
Hi,
Here is a similar thread for your reference:
There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default programs control panel
http://social.technet.microsoft.com/Forums/en/w7itproappcompat/thread/036e3cf6-bff7-4ef2-bd0a-555cd2399ad4
Hope this helps
Vincent Wang
TechNet Community Support
Maybe you are looking for
-
2wire problem on macbook pro 2011!
I have the most recent macbook pro and the moment I received it I have been reading through endless amounts of forum pages. My problem is my Airport being able to recognize my network but unable to get an IP address. It keeps self-assigning one and c
-
Canupus 110 video convertor will it work with Tiger and i Movie HD 5 or 6.
I am going to buy a video convertor box for my i Mac G5. I am just having way to much probloms with my Director's Cut 2. I got my Mac Christmas and it came with Tiger already built in. I am wondering will the Canupus 110 work with i Movie HD and Tige
-
HT1339 i restored my iPod but it never turned on again it just keeps loading help!
i need help
-
I bought my macbook a year before snow leopard came out. I have since upgraded my OS to S.L. and I am buying windows 7. i want to know if I can us my OS start-up disk (which has OS 10.5 [leopard]) or do I need Snow Leopard to complete the process
-
Recently, I attended a conference and sat next to someone who was using iBook on his iPad and the book had a black background. He explained that he could choose from white, sepia, and black for page backgrounds. I got my own iPad today and downloaded