Chemical Forumlae

Hi....I was wondering if any-one could help me with this problem I'm having.
Basically what I'm trying to do is create a program that allows the user to enter a chemical forumulae such as CaCO3
and the output to that should be, C is the symbol for Carbon and there is 1 atom of this element, Ca for Calcium (1 atom),
O for Oxygen (3 atoms)
There is a text file with all the elements in it.
eg of text file:
Ag Silver
Al Aluminium
Au Gold
C Carbon
Ca Calcium
etc...
Below I've created a program that doesn't use a file to read the data from, I put some of the contents of the file in
a string. ((I have to change this later))
Anyway, I need to use an IDE to run the program...through some help from some java tutorials, I've created a program that
almost works. However, I made the program so It has to have 'arguments'.
IE... if I type in; java ChemicalFormulae CaCO3 ((In DOS MODE)) brings out the right result.
and if I also click on the run tab, then click on 'arguments' and type in 'H2O', it would bring out the right result.
You see...the program needs parametres to run successfully...
import java.util.regex.*;
public class ChemicalFormulae {
/* names should be loaded dynamically from that file */
private String[] names = {"H", "C", "Ca", "O"};
private Matcher matcher = null;
private Pattern pattern = null;
static java.io.PrintStream p = System.out;
public static void main(String[] args) {
ChemicalFormulae inoh = new ChemicalFormulae();
for (int i = 0; i < args.length; i++) {
if (inoh.isValid(args[ i])) {
inoh.check(args[ i]);
} else {
System.out.println("Illegal formula: " + args[ i]);
public ChemicalFormulae() {
String regex = "([A-Z][a-z]?+)([0-9]*+)";
pattern = Pattern.compile(regex);
matcher = pattern.matcher("");
/* Element name needs real solution, current implementation is too static ;) */
private String getElementName(String s) {
if ("H".equals(s)) {
return "Hydrogen";
} else if ("O".equals(s)) {
return "Oxygen";
} else {
return s;
private String getElementCount(String s) {
if ("".equals(s)) {
return "1";
} else {
return s;
private static void order() {
p.println("Would you like fries with that?");
public boolean isValid(String formula) {
String regex = "((";
for (int i = 0; i < names.length; i++) {
regex += (i == 0 ? "(" : "|(") + names[ i] + ")";
regex += "){1}[0-9]*)+";
return formula.matches(regex);
/* check needs better name and should be redesigned to just collect data */
public void check(String formula) {
int end = 0;
matcher = matcher.reset(formula);
while (matcher.find(end)) {
end = matcher.end();
System.out.println("Element " + getElementName(matcher.group(1))
+ " occured " + getElementCount(matcher.group(2)) + " time(s)");
}

I later created this program, so the user has a GUI interface and can type in the parametres in the text box.
However, I later found out that whatever I tried, the user cannot type in parametres at run-time mode.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.regex.*;
public class ChemicalF
JFrame userInputGUI;          //frame to take some input from user
JLabel userPrompt;          //display prompt
JTextField userInput;     //for entry of text
JTextField echoBack;          //display back to user
JButton endProgram;          //ends program
String userChemical;          //stores the chemical entered
//ButtonListener buttonListen;          //listen for button press
/* names should be loaded dynamically from that file */
private String[] names = {"H", "C", "Ca", "O"};
private Matcher matcher = null;
private Pattern pattern = null;
static java.io.PrintStream p = System.out;
public static void main(String[] args) {
ChemicalF inoh = new ChemicalF();
for (int i = 0; i < args.length; i++) {
if (inoh.isValid(args[ i])) {
inoh.check(args[ i]);
} else {
System.out.println("Illegal formula: " + args[ i]);
public ChemicalF()
userInputGUI = new JFrame();          //create a window
userInputGUI.setTitle("Simple Demo of Swing JFrame");          //give window a title
userInputGUI.setBounds(100,100,500,300);          //set its size
Container cPane = userInputGUI.getContentPane();          //can only operate on content Pane
cPane.setLayout(null);          //suppress layout features
userPrompt = new JLabel("Enter a Chemical Formulae");          //add a label
userPrompt.setBounds(50,60,200,30);          //size and position it
cPane.add(userPrompt);          //add a label to content pane
userInput = new JTextField();          //text field to enter input
userInput.setBounds(250,60,100,30);          //size and position it
cPane.add(userInput);          //add a label to content pane
echoBack = new JTextField();          //echo back entered text
echoBack.setEditable(false);          //user can't alter
echoBack.setBounds(100,130,300,110);
cPane.add(echoBack);
endProgram = new JButton ("End");
endProgram.setBounds(300,100,100,30);
cPane.add(endProgram);
userInputGUI.setVisible(true);          //make window visible
userInput.addActionListener(new TextEventListener());          //to listen for event
class TextEventListener implements ActionListener          //nb inner class
               public void actionPerformed(ActionEvent eve)
if (eve.getSource()==userInput)          //was cursor in userInput when enter pressed
userChemical = userInput.getText();
System.out.print("user inputed " + userChemical); //puts whatever the user enters into the String called userChemical
echoBack.setText(userChemical);          //transfer to echo back
if (eve.getSource()==endProgram)
System.exit(0);
// public static void main(String[]args)     //main method
String regex = "([A-Z][a-z]?+)([0-9]*+)";
pattern = Pattern.compile(regex);
matcher = pattern.matcher("");
/* Element name needs real solution, current implementation is too static ;) */
private String getElementName(String s) {
if ("H".equals(s)) {
return "Hydrogen";
} else if ("O".equals(s)) {
return "Oxygen";
} else {
return s;
private String getElementCount(String s) {
if ("".equals(s)) {
return "1";
} else {
return s;
public boolean isValid(String formula) {
String regex = "((";
for (int i = 0; i < names.length; i++) {
regex += (i == 0 ? "(" : "|(") + names[ i] + ")";
regex += "){1}[0-9]*)+";
return formula.matches(regex);
/* check needs better name and should be redesigned to just collect data */
public void check(String formula) {
int end = 0;
matcher = matcher.reset(formula);
while (matcher.find(end)) {
end = matcher.end();
System.out.println("Element " + getElementName(matcher.group(1))
+ " occured " + getElementCount(matcher.group(2)) + " time(s)");
}

Similar Messages

  • How to create Protein or Chemical structures in .pdb or .mol format for use with iBooks Author. Please help.

    Dear Community,
           There are a large variety of software packages used by Chemists and Biologists to view and manipulate Protein and Chemical structures in 3D. They typically have formats such as .pdb, or .mol. I have looked around and none of the software packages that I currently use allow me to export to the COLLADA (.dae) format.
            Does anyone have any idea where to begin to allow me to do this. I would like to try and put in some of the 3D objects into the iBook Author program.
    Thank you. Chase

    I believe that Apple should have provided an easily way to get Pymol images into iBooks Author as VRML has been the de facto standard.  After a number of days, I have a method which works, but this much effort should not be necessary.  Anyway here it is.
    1)  Set the viewport in Pymol to 512,384 to do this in the command window type
    viewport 512,384
    Note, I'm not totally sure you need to do this.
    2) Draw you image in Pymol and output the image in VRML format, to do that
    File -> Save Image As -> VRML 2 ...
    I'll assume that you have given the file the name "pymol_output", you actual get pymol_output.wrl
    3) In a terminal window go to the folder where the above file is located and issue the following command.  This removes some stuff that messes up the lightening
    sed '9,15d' pymol_output.wrl > bender_in.wrl
    4) Next you need blender.  You can download it from
    http://www.blender.org/download/get-blender/
    5)  Open Blender.  In the upper right corner in the Scene section
    right click on Lamp and delete it
    right click on Cube and delete it
    right click on Camera and delete it
    Save this file so you don't have to do this every time.  I called mine empty_blender_file.blend
    6) Either open empty_blender_file.blend or continue from #5 and read in the file from #3
    File -> import->X3D Extensible 3D (.x3d/.wrl)
    this reads in the file
    7) Write out the file in collada .dae format
    File->export->collada (.dae)
    Done.  This file will read into iBooks Author and have somewhat uniform lighting.  By the way, .dae files can be opened an checked in Preview.  Its easier than going back and forth into the iPad, since you can rotate the image in Preview.
    Hope this helps, let me know if it works for you and if you have any suggestions.
    Finally someone needs to write a one step VRML and X3D to collada converter that will work with PyMol and Chimera etc.
    Have fun!

  • Looking for an app that will convert written chemical formulas to text. Any suggestions?

    Looking for an app that will convert written chemical formulas to text. Any suggestions?

    I could not find any app that would do this. There are different types of message apps but nothing that I could find to do what I am looking for. For a specific contact I would like the message to have a notification that will not go away until I acknowledge it. Just like you would do if it was a pager.

  • Running an old MacBook Pro 2.5ghz core 2 Duo. Battery went chemical meltdown and expanded out of its housing. Removed it and was running off the power cord. This worked for a while. Now it won't start up. Have a Replacement on order. Is there a bigge

    Running an old MacBook Pro 2.5ghz core 2 Duo. Battery went chemical meltdown and expanded out of its housing. Removed it and was running off the power cord. This worked for a while. Now it won't start up. Have a Replacement on order. Is there a bigger issue or does a battery need to be in the compartment to boot up? Appreciate any help. Thanks.

    Working battery needs to be in for the computer to function.

  • Pdfs from American Chemical Society do not open in Safari

    I frequently download article pdfs from scientific journals. Recently I discovered that clicking on the pdf link of an article from the American Chemical Society site (in Safari 2.04 (419.3)) opens a nonsense page, It neither downloads the article nor opens it in Acrobat reader. This sounds like some kind of browser incompatibility. It works fine in FireFox but I prefer Safari. Is there a fix for this somewhere? Does the Public Beta 3 fix this?

    I have the same problem. I upgraded the Safari 3.0.3 beta and the problem remains.
    An example file that is not downloading is
    http://pubs.acs.org/journals/mamobx/ed_board.pdf

  • STRONG CHEMICAL SMELL FROM NEW MAC MINI ?

    Hi all,
    Just bought a mini. I am very impressed with the build quality, the functionality and the BSD UNIX/Mach guts!
    However, from the second I took it out of the box, it has emitted a strong offensive and very toxic smelling chemical odor. I have left it near an open window to deal with that in the hopes that it burns off.
    Is that normal?
    Thank you.

    Welcome, Avraamjack.
    It's a hard question to answer, because sensitivity to smells varies hugely from person to person.
    In general, new computers have a "new computer smell", just like cars have a "new car smell".
    If the smell is really out of the ordinary for new electronic equipment, then there might be a component that is failing.
    At the very least, get a second or third opinion from some friends, or take the Mini in to an Apple store, if such is available to you.
    The Mini shouldn't smell any different from most other new computers.

  • BI Best Practice for Chemical Industry

    Hello,
    I would like to know if anyone is aware of SAP BI  Best Practice for Chemicals.And if so can anyone please post a link aswell.
    Thanks

    Hi Naser,
    Below information will helps you in detail explanation regarding Chemical industry....
    SAP Best Practices packages support best business practices that quickly turn your SAP ERP application into a valuable tool used by the entire business. You can evaluate and implement specific business processes quickly u2013 without extensive Customization of your SAP software. As a result, you realize the benefits with less Effort and at a lower cost than ever before. This helps you improve operational efficiency while providing the flexibility you need to be successful in highly demanding markets. SAP Best Practices packages can benefit companies of all sizes, including global enterprises creating a corporate template for their subsidiaries.
    Extending beyond the boundaries of conventional corporate divisions and functions, the SAP Best Practices for Chemicals package is based on SAP ERP; the SAP Environment, Health & Safety (SAP EH&S) application; and the SAP Recipe Management application. The business processes supported by SAP Best Practices for Chemicals encompass a wide range of activities typically found in a chemical industry
    Practice:
    u2022 Sales and marketing
    u2013 Sales order processing
    u2013 Presales and contracts
    u2013 Sales and distribution (including returns, returnables, and rebates, with quality management)
    u2013 Inter- and intracompany processes
    u2013 Cross-company sales
    u2013 Third-party processing
    u2013 Samples processing
    u2013 Foreign trade
    u2013 Active-ingredient processing
    u2013 Totes handling
    u2013 Tank-trailer processing
    u2013 Vendor-managed inventory
    u2013 Consignment processing
    u2013 Outbound logistics
    u2022 Supply chain planning and execution Supply and demand planning
    u2022 Manufacturing planning and execution
    u2013 Manufacturing execution (including quality management)
    u2013 Subcontracting
    u2013 Blending
    u2013 Repackaging
    u2013 Relabeling
    u2013 Samples processing
    u2022 Quality management and compliance
    u2013 EH&S dangerous goods management
    u2013 EH&S product safety
    u2013 EH&S business compliance services
    u2013 EH&S industrial hygiene and safety
    u2013 EH&S waste management
    u2022 Research and development Transformation of general recipes
    u2022 Supplier collaboration
    u2013 Procurement of materials and services (Including quality management)
    u2013 Storage tank management
    u2013 E-commerce (Chemical Industry Data Exchange)
    u2022 Enterprise management and support
    u2013 Plant maintenance
    u2013 Investment management
    u2013 Integration of the SAP NetWeaver Portal component
    u2022 Profitability analysis
    More Details
    This section details the most common business scenarios u2013 those that benefit most from the application of best practices.
    Sales and Marketing
    SAP Best Practices for Chemicals supports the following sales and marketingu2013related business processes:
    Sales order processing u2013 In this scenario, SAP Best Practices for Chemicals supports order entry, delivery, and billing. Chemical industry functions include the following:
    u2022 Triggering an available-to-promise (ATP) inventory check on bulk orders after sales order entry and automatically creating a filling order (Note: an ATP check is triggered for packaged material.)
    u2022 Selecting batches according to customer requirements:
    u2022 Processing internal sales activities that involve different organizational units
    Third-party and additional internal processing u2013 In this area, the SAP Best Practices for Chemicals package provides an additional batch production step that can be applied to products previously produced by either continuous or batch processing. The following example is based on further internal processing of plastic granules:
    u2022 Purchase order creation, staging, execution, and completion
    u2022 In-process and post process control
    u2022 Batch assignment from bulk to finished materials
    u2022 Repackaging of bulk material
    SAP Best Practices for Chemicals features several tools that help you take advantage of chemical industry best practices. For example, it provides a fully documented and reusable prototype that you can turn into a productive solution quickly. It also provides a variety of tools, descriptions of business scenarios, and proven configuration of SAP software based on more than 35 years of working with the
    Chemical industry.
    SAP Functions in Detail u2013 SAP Best Practices for Chemicals
    The package can also be used to support external toll processing such as that required for additional treatment or repackaging.
    Tank-trailer processing u2013 In this scenario, SAP Best Practices for Chemicals helps handle the selling of bulk material, liquid or granular. It covers the process that automatically adjusts the differences between the original order quantities and the actual quantities filled in the truck. To determine the quantity actually filled, the tank trailer is weighed before and after loading. The delta weight u2013 or quantity filled u2013 is transmitted to the SAP software via an order confirmation. When the delivery for the sales order is created, the software automatically adjusts the order quantity with the confirmed filling quantity.The customer is invoiced for the precise quantity filled and delivered.
    Supply Chain Planning and Execution
    SAP Best Practices for Chemicals supports supply chain planning as well as supply chain execution processes:
    Supply and demand planning u2013 Via the SAP Best Practices for Chemicals package, SAP enables complete support for commercial and supply-chain processes in the chemical industry, including support for integrated sales and operations planning, planning strategies for bulk material, and a variety of filling processes with corresponding packaging units. The package maps the entire supply chain u2013 from sales planning to material requirements planning to transportation procurement.
    Supplier Collaboration
    In the procurement arena, best practices are most important in the following
    Scenario:
    Procurement of materials and services:
    In this scenario, SAP Best Practices for Chemicals describes a range of purchasing processes, including the following:
    u2022 Selection of delivery schedules by vendor
    u2022 Interplant stock transfer orders
    u2022 Quality inspections for raw materials, including sampling requests triggered
    by goods receipt
    Manufacturing Scenarios
    SAP Best Practices for Chemicals supports the following sales and
    Manufacturingu2013related business processes:
    Continuous production u2013 In a continuous production scenario, SAP Best Practices for Chemicals typifies the practice used by basic or commodity chemical producers. For example, in the continuous production of plastic granules, production order processing is based on run-schedule headers. This best-practice package also describes batch and quality management in continuous production. Other processes it supports include handling of byproducts,co-products, and the blending process.
    Batch production u2013 For batch production,
    SAP Best Practices for Chemicals typifies the best practice used by specialty
    chemical producers. The following example demonstrates batch production
    of paint, which includes the following business processes:
    u2022 Process order creation, execution, and completion
    u2022 In-process and post process control
    u2022 Paperless manufacturing using XMLbased Process integration sheets
    u2022 Alerts and events
    u2022 Batch derivation from bulk to finished materials
    Enterprise Management and Support
    SAP Best Practices for Chemicals also supports a range of scenarios in this
    area:
    Plant maintenance u2013 SAP Best Practices for Chemicals allows for management
    of your technical systems. Once the assets are set up in the system, it focuses on preventive and emergency maintenance. Tools and information support the setup of a production plant with assets and buildings.Revenue and cost controlling u2013 The package supports the functions that help you meet product-costing requirements in the industry. It describes how cost centers can be defined, attached
    to activity types, and then linked to logistics. It also supports costing and settlement of production orders for batch and continuous production. And it includes information and tools that help you analyze sales and actual costs in a margin contribution report.
    The SAP Best Practices for Chemicals package supports numerous integrated
    business processes typical of the chemical industry, including the following:
    u2022 Quality management u2013 Supports integration of quality management concepts across the entire supplychain (procurement, production, and sales), including batch recall and complaint handling
    u2022 Batch management u2013 Helps generate batches based on deliveries from vendors or because of company production or filling, with information and tools for total management of batch production and associated processes including batch  derivation, batch information cockpit, and a batchwhere- used list
    u2022 Warehouse management u2013 Enables you to identify locations where materials
    or batch lots are stored, recording details such as bin location and other storage information on dangerous goods to help capture all information needed to show compliance with legal requirements
    Regards
    Sudheer

  • Best Practices for Chemical Industry

    I am searching for documentation for Best Practices Package for Chemical Industry
    e.g. file SMB18_XK15_O002_Q36_01.TXT but could not find it on SAP Marketplace.
    Can someone hint me where i can get those files.

    Yogesh,
    I suspect that the exact file you are looking for was part of an earlier release.
    Why not just download the latest version?
    https://websmp210.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700001465742009E
    US version/zip file format..
    Best Regards,
    DB49

  • How to implement in chemical plant

    Hi SCN Gurus,
    currently i have one scenario for implementation in a chemical factory. Below are the details.
    Finished product- Sodium Tungstate(ST)
    Raw Materials- Tungsten Ore Concentrate (TOC), caustic soda(NaOH)
    Auxiliary Raw Materials-
           a.       Coal
           b.      Sulphuric Acid
           c.       Aluminum Sulphate
           d.      Magnesium Sulphate
           e.       Sodium Hydro-sulphate
           f.        Isodecanol
           g.       Mineral Turpentine
           h.      Ditridecylamine
           i.         Hydrocholic Acid
    Strategy should be Make to Stock(10)
    Process- Initially they are taking raw material Tungsten Ore Concentrate(TOC) from their group company as baggage shape. Each bag having 1000KG and at the time of charging for one cycle they are charging 4 bag at a time. They have 3 operations. First leaching, second crystallisation and third blending and packaging. Finally after all process they are making Sodium Tungstate Finished product. Manually they are filling finished product into a bag upto 1100kg and then packing into a pallet. At the time of finished product packaging they are generating a batch number manually. They have no by product or co product. For each leaching operation time duration is 12hr and for crystallisation operation 8hr.
    So how to map this in SAP? Please help me in this regard.
    Thanks and Regards,
    Siva

    Hi Siva!
    SAP ME solution is originally designed for discrete production that does not look to be your case. Though, it might be mapped into a process production too. But for this, you'd rather contact SAP ME Consulting team or check the available documentation on SMP, for example, Business Scenario Description.
    Regards,
    Sergiy

  • Business Process in Chemical Industry.

    Hi,
    I want to  gain domain knowledge in Chemical Industry.So,please suggest from where should I start
    and how to get complete business knowledge in Chemical industry.
    Thanks & Regards,
    Divya.

    Hi Divya,
    You could also check out the Chemicals area on SAP.com. We have loads of relevant industry information there. Also, stay tuned to our BPX page as we are always posting new and relevant material here every week. Please let me know more details and I will try to fnd you some more material to suit your needs.
    Monica
    [http://www.sap.com/industries/chemicals/index.epx]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/2628a6bd-0e01-0010-5e94-b0315e4a9ca8 [original link is broken]]

  • Gap analysis with respect to chemical/paint/textil

    what are the gaps found in a Chemical/Paint manufacturing and a Textile company? can anyone explain that please

    Hi,
    Once you will start discussing with client, then only you can identify the Gaps in SAP for any kind of industry.
    It depands upon client requirement.
    Regards,
    manish

  • Chemical plant process mapping

    Hi gurus
    Which mapping senario to be selected for the Soda ash manufacturing plant. Is it REM OR PP-PI.
    What are the merits and demerits of the above .
    Best wishes
    Murali

    Hi Daram,
    PPPI - Production planning in process industry.
    It is one of the production process,where in the product is produced and controled by a DCS or one of the process controlling system, Which can be directly intergated to SAP system.
    Here many level of process approvals required example ...shift operateor is given the instuction in SAP PI sheet and he does the production booking,,,which will be approved by shift incharge and then psoted to invenory, same way quality of the product also can be approved....
    In the chemical industry, you coordinate the communication between PP-PI and process control during the execution of a process order.
    So some process contorl activity are there so better you should go with PP-PI.
    Hope it is now clear to you.
    Regards
    R.Brahmankar

  • ECC 6.0 upgrade to  Best practise for chemical industry implementation

    Dear All.,
    Please tell me what all the  EHP3 must be updated in the SAP erp ecc 6.0. I have already updated
    SAP_APPL 60304.
    Tell me what is the next Ehp3 required before i start best practise in saint.
    Thanks & Regards,
    Manju

    Dear sir.,
    I have  installed SAP ECC 6.0 for a chemical industry, now am planning to implement Best practise to reduce implementation time.
    1) As per the SAP Quick quide i have downloaded best practise for chemical industry(IS) and implemented through SAINT,  and the prerequisites were maintained as per the SAP notes 774615,1301301,1064635,
    2)The above mentioned notes explains minimum stack11 and sapka=18,sapkb=18,sapbw=20,PI_Basis-2005_1_700=20 and sap_ap=15 to update Ehp3 for SAP_APPL603.
    3) After updating all the above mentioned patch level i implemented the Best practise in saint and that was successful.
    But still  the problem persist in activation of BP by tcode /n/smb/bbi only 70% has been completed and activation stoped with *ABAP program error ASSIGNSUBSTRING_NOT_ALLOWED and relevent note is 1295083*_
    Please  any one tell me, is that required to update all the EHP3 components since i have maintained only SAP_APPL60304.
    What all Ehp3 components should be updated to get a smooth activation og BP for chemical industry.

  • (solved) removing gnome-mime-data and chemical-mime-data

    Hi. I  would like to remove gnome-mime-data. I executed the command #pacman -Rs gnome-mime-data. The result warned that chemical-mime-data depends on gnome-mime-data. So I have to execute the command #pacman -Rsc gnome-mime-data to get rid of gnome-mime-data but also of chemical-mime-data. If I remove both do I run the risk of making the entire system crash?
    I have kde installed. I forget to edit /etc/pacman.conf to IgnoreGroup = gnome before running #pacman -Syu. so now I would like to get rid some gnome stuff I found on the system. I have absolutely nothing against gnome. I just want to run only kde.
    Thanks for your attention.
    Last edited by cezarrangel (2014-06-21 13:18:32)

    You don't have to have chemical-mime-data.  You must've install some chemistry related software. 
    Read up mime types so that you're more familiar with them.  Basically, chemistry-mime-data would allow you to double-click a protein databank (pdb) file in a file manager and launch pymol automatically, for example.
    https://wiki.archlinux.org/index.php/De … op_entries

  • Material number for chemical with different packing sizes

    A same chemical that we purchase from supplier can be in 25Kg bag, 1000kg bag and 50 kg bag. When we receive the chemicals, the physical goods of the chemical are in 25 KG Bag, 1000kg Bag and 50Kg bag store in the warehouse.
    When we sell to customer, it can be in those 3 standard bag size or in KG depend the order quantity from customer.
    For the above Chemical what is the best way to catalogue the material number, should it be 3 material numbers for the 3 different pack size, or 1 material number only?

    you can have two solution for this with both pros & cons with one material master:
    1. You can have three different unit of measure for 25KG, 1000KG & 50KG bag and you can maintain the relationship in the material master. This will help you to get the total stock in KG in your company and you can sell to the customer. Only problem is you will not be able to determine how much of each type of packaging you have.
    2. You can define the material relevant for batch management. Create three batches 25KG,1000KG & 50KG, also create three different unit of measures as explained above. Now whenever you are doing the GR just put the material in correct batch, by doing this you can easily track you material along with the type of packaging. Also you can sell the material, while delivery you can use the functional of batch determination based on some log. Only problem is manual intervention which can be covered if you use some exit while doing GR so that correct batch is selected based on the Order Unit.
    Hope this will help you..
    Enjoyyyyyyyyyyyyy
    Akshit

Maybe you are looking for