Chemical Formulae (contd.)

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)");
}This one here is my first attempt...However I need to run the program using an IDE not DOS....what this does is, it
needs arguments for the program to work corretly.... To make the Program work, TYPE "java ChemicalFormulae CaCO3" ((Or "H2O" or whatever))
Or in an IDE, go to RUN With ARFGUMENTS and type in there CaCO3 for example.
See what happens...
Now I need to be able to allow the user to enter in those arguments in run-time mode. ((The Program needs Arguments to Work Correctly))
You said earlier that 'system.in' works for this....I will experiment with this tomorrow morning. <<I'm tired>>
In CaCO3 for example, where each element in a compound is identified by a symbol corresponding an upper case character that may be followed by a lower case one. If there is a numerical character following a symbol, that indicates the number of atoms of that element. if there is no numerical value present, then there is 1 atom present.
EG... if the user enters... "CaCO3", The output should be:
Ca for Calcium (1 atom)
C for Carbon (1 atom)
O for Oxygen (3 atoms)
""I need to write a java application that asks the user for a chemical formulae...the application should then analyse the formuale and identify the symbols present together and the number of atoms of the corresponding element. the elements should then be identified from the file of element data and a table displayed showing the elemnts present with the corresponding number of atoms.""
The file looks something like this:
Ag Silver
Au Gold
Al Aluminium
C Carbon
Ca Calcium
etc....
I made a GUI interface in one of my later versions, so the user can enter in his chemical formulae (arguments) and the program would work...but I couldn't make the arguments work in run-time. ((System.In I was told works....so I'll look into it....thanks to whomever suggested it))
Also....about reading the file, your advice all sounds too complicated for a n00b like me....are there any tutorials on this that can help me.
Any Guidance would be appreciated....
Please try and run the program so you get a feel of what I mean.
Thanks Again...
(( To run the Program from DOS just type "java ChemicalFormulae CaCO3"
((Or H2O, or whatver))
:)

for beginners, you should use FileReader and a BufferedReader like so:
first import java.io.*;
make a method that loads the file into some global object.
BufferedReader in = new BufferedReader(new FileReader("Filename"));
in order to read the file, you can use in.readLine() which will give you one line at a time. Just remember when you are at the end of the file, in.readLine() will return null, so you have to watch out for that.
You could store the values in 2 equal size String arrays, which I'm sure you know how to do, but I'm sure everyone will agree that you should use a hashmap since all of the entries are unique.
The API for a HashMap is here:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html
The tutorial for all colections is:
http://java.sun.com/docs/books/tutorial/collections/index.html
I'm guessing you are a college student working on an assignment, eventually you will learn Collections eventually, might as well take a stab at it. You will find that once you learn it, you will find it is far easier to manage for this purpose than 2 arrays.

Similar Messages

  • 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)");
    }

  • Help with getting this to work!

    Hi,
    I am trying to get this Java application to work - but nothing seems to happen! Basically, its a chemical formulae analyser, e.g. in CaC03, C is the symbol for Carbon and there is 1 atom of this element, Ca for Calcium (1 atom), O for Oxygen (3 atoms). The application should ask the user for input (chemical formulae) and then analyse the formula and identify the symbols present together and the number of atoms of the corresponding element.
    The elements should then be identified and a table displayed showing the elements present together with the corresponding number of atoms. Appropriate error messages should be displayed for any invalid data.
    Now the code I have seems fine to me, but when you run the application, nothing happens! There are no error messages, but just nothing happens! I have two files, InNeedOfHelp.java and InNeedOfHelp.class, and the InNeedOfHelp.java file contains the following code (but nothin happens when run as I have stated!): -
    import java.util.regex.*;
    public class InNeedOfHelp {
    /* names should be loaded dynamically from that file */
    private String[] names = {"H", "C", "Ca", "O"};
    private Matcher matcher = null;
    private Pattern pattern = null;
    public static void main(String[] args) {
    InNeedOfHelp inoh = new InNeedOfHelp();
    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 InNeedOfHelp() {
    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)");
    So, if anyone could help me with this application I would be very grateful! Thanks guys.

    If nothing happens, as a first step I suggest putting in some System.out.println statements in the main method to find out what happens with isValid(). It usually makes sense to look for easy problems first. May be your command line arguments are not valid, or your isValid methods thinks they aren't anyway.

  • PDF creation with subscripts yields terrible results

    I have a document with several chemical formulae and when I create a pdf, the quality is absolutely terrible.
    Is there a fix for this, or am I doing something incorrectly?

    I have to apply all the substitutions manually to create the non-fake subscripts?
    The idea in the Unicode and TrueType project is that you keep your plain text plain. If you keep your plain text plain, content-based operations like searching, spell-cheching and sorting are not corrupted, no matter how complex the composition is. In other words, you insert a firewall between your character codes (the content) and your glyph codes (the appearance).
    Now, this won't work if you do not have a graphical desktop display and a graphic deskside printer. In other words, it won't work in the world of the nineteen-eighties. Fortunately, this is not the world in which we are working. Separate processing of character codes and glyph codes was first discussed at the WWDC in May 1989, and first demonstrated it at WWDC 1992 with Apple Hoefler Text, by the way. It has been in the OS since System 7.5 in August 1994.
    So, you use the GUI. You use Unicode / ISO-IEC 10646 as the space within which you code your text. And you use the simple glyph substitution of base TrueType and the smart glyph substitution and smart glyph shaping of advanced TrueType to get the appearance you want. Or in other words, you use Unicode to match the meaning and TrueType to match the mark.
    With a document window open and the cursor in the column, you specify the style for simple glyph shaping by selecting any TrueType/OpenType font. Inside the font there is an obligatory table, the CMAP Character Map. This table defines the character codes that the font is able to image, and the default glyph codes with which those character codes are imaged in that specific font.
    With your Typography Palette open, you can see if the font only has obligatory Character Map shaping to default appearances, in which case it says "No typographic features in this font," or there are substitutions for smart shaping and smart scaling. For instance, if you select Hoefler Text you will find that there are smart substitutions for superiors (superscripts) and inferiors (subscripts).
    If you want to see the glyph codes and corresponding glyph drawings in an intelligent font file, then you open the Apple Character Palette, from the View menu you select Glyph, from the Font menu you select the family name e.g. Hoefler Text, and from the style menu you select the family member. Take the time to move your cursor over the glyph drawings.
    In the co-ordinate system, e.g. click glyph code 801. You will see a popup that says GID 801, that is, glyph identifier 801. The glyph identifiers (glyph codes) are private to and specific to the font file. They are not cross-font. There is no corresponding character code! Is this a bug in the font? No, it is as designed, because you do not draw ligature long s, long s, and l as a character code.
    The font only draws default glyph codes by depicting them directly onto character codes. If the type designer wants alternate stylistic appearances for the default glyph codes and their glyph drawings, she uses the smart substitution support. The smart substitution support takes the output of the obligatory CMAP Character Map transform, which is default glyph codes, and remaps that to alternate glyph codes for alternate glyph design appearances.
    This means that the vast majority of glyph codes in a font file may be drawn by depiction onto other glyph codes and not onto character codes. For instance, try counting the number of glyph codes in Apple Hoefler Text or in Linotype Zapfino that are not directly depicted onto character codes. So, you can have perfect legibility at the level of appearance, and your character codes can be perfectly plant at the level of content. This has been possible since System 7.5 in 1994.
    What you cannot have today is searchable softcopy. Because the meaning of the glyph designs is in the indices of the intelligent font, and those indices are not supported at all in PostScript, and are not supported in PDF until versions higher than 1.3 which is the PDF version supported by OS X. These problems have existed for many, many years. PostScript does not support the intelligent separation model of the International Color Consortium, just as it does not support the intelligent composition model of the Unicode Consortium.
    /hh

  • 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.

  • JMOQ show eeror Inactive via formulae of incor

    Hi experts,
    My ckient requirement is the Excise duty caluated per kg, Iused JMOQ codition But show error in the PO creation
    Inactive via formulae of incorrect
    Please why show ingred colour after clicking taxes tab in the INvoice tab at item level
    Regards,
    Channa

    please let me know how you resolved it. i am facing the same problem

  • 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.

  • Unable to remove Workforce Planning formulae in Planning 9.3.1.1.16

    Hi All,
    We are on using Planning 9.3.1.1.16 and are unable to remove member formulae from Planning.
    Our Planning application is EPMA (9.3.1.3) enabled. When refreshing the Planning application we receive the following error:
    Error [1200497] detected in member formula for member "Regular Headcount".
    Error [1200497] detected in member formula for member "Departed Headcount".
    Error [1200497] detected in member formula for member "LOA Headcount".
    Error [1200497] detected in member formula for member "Maternity Headcount".
    Error [1200497] detected in member formula for member "On Sabbatical Headcount".
    Error [1200497] detected in member formula for member "Contractor Headcount".
    Error [1200497] detected in member formula for member "Temporary Headcount".
    Error [1200497] detected in member formula for member "Other Headcount".
    Error [1200497] detected in member formula for member "Turnover Headcount Adjustment".
    Error [1200497] detected in member formula for member "Regular FTE".
    Error [1200497] detected in member formula for member "Contractor FTE".
    Error [1200497] detected in member formula for member "Temporary FTE".
    Error [1200497] detected in member formula for member "Other FTE".
    Error [1200497] detected in member formula for member "Turnover Adjustment".
    STEPS TO REPRODUCE :
    -In EPMA Master Library, remove the formulae for the above members and save the changes every time
    - In Planning remove the member formulae for the above members (EDIT_DIM_ENABLED set to TRUE). This step may not be required however I tested it and was able to reproduce the issue
    - Deploy the EPMA applicatoin. Deployment is successful
    - Refresh Planning app. Refresh is successful
    - Now change any property for any of the above members in EPMA. For example add an alias of Turnover Adj to the "Turnover Adjustment" member and save.
    - Deploy the EPMA app => Successful
    - Refresh Planning app=> Fails with same above error
    Observation: The member formulae are back in Planning not EPMA. It looks like edit workforce members somehow causes the formulae to reappear in Planning.
    Has anyone come across this issue?
    Thanks for your help.
    Seb

    Just in case anyone has a similar issue...
    Thsi was reported as bug #7411035 (ie: Character Limit for Member Formulas ). Details from Oracle Dev below:
    The character limit was 2000 causing longer member formulas to fail during an application deployment. An underlying bug was found during investigation of the member formula limit and we think this is the cause of your particular issue. The problem was with empty member formula string. During the deployment process there are EAS side checks. EAS will only accept a member formula if it contains at least one character(length > 0), else the formula
    field is rejected in the deployment XML file.
    The script below copy the member formula to a different table and then delete the original. So it is quite a destructive query to run.
    Prior to executing the query, a full EPMA/Planning applications backup should be performed (including essbase side) and the EPMA Dimension Server services (particularly the Process Manager) should be stopped.
    ######### SQL SCRIPT #########
    insert into DS_Property_Member_Memo
    select i_library_id, i_dimension_id, i_application_id, i_member_id, i_property_id, c_property_value as x_property_value
    from ds_property_member pm
    where pm.i_property_id = (select i_property_id from ds_property
    where c_property_name = 'MemberFormula')
    and not exists (select * from ds_property_member_memo pmm
    where pmm.i_library_id = pm.i_library_id and pmm.i_dimension_id = pm.i_dimension_id
    and pmm.i_application_id = pm.i_application_id and pmm.i_member_id = pm.i_member_id
    and pmm.i_property_id = pm.i_property_id)
    delete from ds_property_member
    where i_property_id = (select i_property_id from ds_property where c_property_name = 'MemberFormula')
    ######### END OF SCRIPT #########
    Seb

  • VPRS: Inactive due to the formulae of incorrect

    Hi,
    I have the copy of vprs as the priceand upon which another price condition fworks as cost + price say for 120% of the vprs price. the copy of vprs is inactve due to the subsequent prices
    Along with all these i have the original condition type VPRS that is generate as in the "Red" status that is with "X"- Inactive due to the formulae of incorrect.
    both the vprs and copy of vprs are maintained as statistical only.
    This only happens in the billing and the sales order pricing show the condtions determined successfully.
    If any body has the similar experience, please share with inputs

    hi
    can Varada,
    The possible problem could be the system is picking the VPRS value from moving price and the moving price is may be zero for the material.
    Please update the moving price using MR21 and cancel teh existing document and create a new one.
    I hope this will work

  • Using formulae in abap, table tc25 etc.

    Hello,
    In production order I need to calculate total setup & labor time for operation with a designated workcentre.
    I see there are formulas for that: when you view Work Centre and open tab 'Costing'.
    I noticed that formulae are stored in table tc25, but what does e.g. sap_01 * sap_03 mean?
    And how can i make use of that in ABAP? I need that info to put it on a SAPScript form.
    Thanks for any suggestions.

    You can use the following function modules to valuate the formulae  
        CALL FUNCTION 'CHECK_FORMULA'
    and execute the formulae
         CALL FUNCTION 'EVAL_FORMULA'
    You can use function module CYTA_TC25_READ to read values from the table.
    Hope this helps.
    Franc

  • 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

  • How can I protect formulae in a newly created spreadsheet without locking the whole sheet ?

    How can I protect formulae from being overwritten on a newly created spreadsheet without locking the whole sheet ?

    Olly,
    I'll be picky here on nomenclature ;-)
    Tables and other Obects can be locked, but Sheets can't be locked.
    If you wish to shield some parts of your content from accidental modification, arrange your layout to put that sensitive content in tables separate from the tables that need to be accessed, and lock the sensitive ones. It's also possible, but rather clunky, to place shields over the sensitive area. A shield can be made by Inserting a Shape and positioning the shape over the sensitive area. With the shape selected, go to the Graphics Inpector and set the Opacity of the shape to zero. You will then be able to see through the shape but will no be able to Click through it to get at the cells below. This method is inconvenient because you have to worry about keeping the shape aligned with the table should the table need to change size or shape.
    Jerry

  • Issue in Pricing Formulae

    Hi Sap gurus,
    I am facing one issue in pricing. I am getting this error in my effective pricing condition.
    "Inactive via formulae of incorrect". Can any body please give me some lights on the issue?
    Thanks.
              chetali

    Hi Chetali,
    As per your error mssage I came to know that this is related to some routine issue which is assigned to that 'effective pricing condition'
              So, Please check the settings related to the requirement ,alternative calculation type and alternative condition base value routines of that condition type.
    Also check the logic involed in the routines with the ABAPer help.
    I hope it will help you
    Regards,
    Murali.

  • 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.

Maybe you are looking for