GPA Calculator

Hello all,
Thus far I have survived on scouring the internet for examples of code that closely resemble what I am trying to do. however, I have hit a roadblock, as I have yet to find this questions anywhere.
I am trying to create a GPA calculator and was able to easily formulate the code to calculate the GPA a few different ways. I have 40 numeric text fields and 40 dropdowns that correspond to each course a person can take. each numeric has enough room for 1 digit that denotes the number of credit hours the course is worth. each drop down has 6 options ( " ", "A", "B", "C", "D", and "<T>", the "<T>" is a transferred credit). A-D have specified values that correspond to GPA (4.0-1.0) and both the blank space and "<T>" have assigned values of 0.
I've tried using formcalc to just sum() all of the credit hours fields and then divide that number by the quality points i get from sum((#ofCreditHours1 * Grade1) + (#ofCreditHours2 * Grade2), .... etc )) This works great. I've also tried if statements that say
if(Grade1.rawValue ne 0) then
     $ + CreditHours.rawValue;
to get the total credit hours to add up. unfortunately, however, this continuously adds the number of credit hours entered into the field over and over as many times as Grade1 is changed (as long as it isn't 0)
Now that there is enough of a background story, my point. I need for the calculation to basically ignore the number of credit hours entered for a course if either " " or "<T>" are selected, because transferred credits do no affect GPA and therefore should be removed from the calculation. However, I still need the number of credit hours entered for a course to be displayed.
I'm sorry if this was long or confusing or both, but I would appreciate any inspiration or solutions at all!

it may not need to be said, but just in case, if a grade selection is made that removes the credit hours from the total credit hours and then it is changed to "A"-"D", the credit hours need to count in the total again.
Also, I have these scripts running in the calculate event

Similar Messages

  • Numbers: How do I add a new "Term" with all the formulas included to the GPA calculator template?

    I'm new to Numbers, and I am using the GPA calculator template. This includes 4 "terms" but I need 8. I have tried adding a new table but the formulas aren't included. How do I go about adding 4 new terms?

    Click on one of the four tables that represent Terms and click on the little circle that is in the very top left of the table, this will highlight the entire table.  Copy the table and paste a new one.  Relabel the table Term 5.
    In the GPA by term table, click in the cell that says Term 4, and add a new row; you can do this by holding Alt and pressing the down arrow.  Label the new cell Term 5, and in cell A6 and put the formula =Term 5::C6 and in B6 put the formula =Term 5::D6.
    Repeat for every term that you need.

  • PI and PI calc for GPA/CGPA

    Hi All,
    I wanted to calculate GPA and CGPA. As far as my knowledge goes its a standard functionality delivered by SLcM. We have to just make sure that we have done the right configuration to assign the performance indices to particular Calculation Point.
    In my case i have created 4 performance indeces and assigned PI calc as given below:
                 Attempted Credits ==                                  CPA1 (Total attempted credit)
                 Earned Credits==                                        CPE1 (Total earned credits)
                 Grade Point Average==                              GPA1(Average Grade)                Filter=== Appraisal completed
                 Cummulative Grade Point Average==         GPA1(Average Grade)                Filter=== Average Grade
    I just wanted to know which PI calculation shall be assigned to GPA and CGPA? Whether assigned filters are correct or not?
    Is it necessary to assign parameters and filters to Performance Index?
    Regards
    Vinod Kumar

    Vinod, the PI to use for Sessional GPA and Cumulative GPA is the same: GPA. For the first one (Sessional GPA) you should be filtering by academic year/session and by the "Appraisal complete" if you want (yo are already using that filter).
    The Cumulative GPA should use the same PI (GPA), and filter just by "Appraisal complete" (in your scenario).
    You should check that the GPA PI standard calculation (the one provided by SAP) fits into your client's GPA calculation requirements. If it doesn't, you should copy that PI and make the necessary changes.
    Diego

  • Can you set a letter as a number?

    i have to do a GPA calculator program, and i would like to set a=5, b=4, c=3, etc .. so i can multiply the letter grade by the # of credits. does anyone know how i would go about doing this ?

    A HashMap would work, a simple Grade class or better an Enum can work nicely too.
    I've used an enum like this before:
        private enum Grade
            A('A', 5.0),
            B('B', 4.0),
            C('C', 3.0),
            D('D', 2.0),
            F('F', 1.0);
            private char letter;
            private double score;
            private Grade(char letter, double score)
                this.letter = letter;
                this.score = score;
            ...........

  • Saving user input for later use ! How ?

    Hi ! I wrote a simple program called GPA Calculator. In the program, the user chooses the lessons he takes and he enters his grades on those lessons and the computer calculates his GPA. It was a simple task to do thanks to swing class.
    But the problem is , since the user always choose the same lessons, I want to add a user control interface by which , a user can save his information by pushing a button which will be called "save"and when he runs the program again and after logginning by his username , his lessons are shown automatically by the program.
    I know a bit C++. And the only solution that popped into my mind is saving the data in a text file.And after he logins again , checking if there is such a user in the saved text file. In C++ there was a file processing method called random access files and i am planning to use it exists in java (i am gonna look for it).
    Since i am new to java and programming, I want to ask you naively if you advise me any other methods.
    Thanks for your help iin advance.
    (I hope now it is the right place to put this message :)

    i am trying to use a database system (and learning it)
    i downloaded derby. but everytime i am trying to run the program , i encounter this error. i am trying to use derby in embedded mode .
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at SimpleApp.go(SimpleApp.java:64)
         at SimpleApp.main(SimpleApp.java:48)
    i tried to solve the problem but i couldnt.can you pleease tell me what to do step by step ?
    thanks for your help ....

  • Error in my applet..

    ok so i'm working on this small applet for an assignment for one of my programming classes. i've got it nearly completely written, But when i try to view it via the html page that its embedded in, all I get is a big blue square (blue isnt even supposed to be my applet's background...) When i view it on my machine, it doesnt give me any runtime errors, so I have no clue whats going on. I asked my professor for help on it but he wasnt able to give much..
    heres a copy of my code:
    import java.awt.*;
    import java.applet.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class gpacalc extends JApplet implements ActionListener
        Container contentPane = getContentPane();
        JTextField [] outfields;
        JLabel out1;
        JLabel out2;
        JLabel out3;
         JTextField course;
         JTextField hours;
         JTextField grdexpt;
         int count = 0;
         int tothours = 0;
         int grdpts = 0;
         int totcredits = 0;
         double gpavg = 0;
        public void init()
        // Create a panel object and set its layout manager to put
        // the components in a column
            JPanel mainpanel = new JPanel();
            mainpanel.setLayout(new GridLayout(15, 2, 5, 5));
            mainpanel.setBackground(Color.yellow);
       // Create a labels for the form
            JLabel title = new JLabel("GPA Calculator");
            JLabel spaceholder = new JLabel(" ");
            JLabel courselab = new JLabel("Enter Course Name");
            JLabel hrslab = new JLabel("Enter Course Hrs.");
            JLabel gradelab = new JLabel("Enter Expected Grade");
            JLabel total = new JLabel("Total Semester Hrs.");
            JLabel grade = new JLabel("Total Grade Credits");
            JLabel gpa = new JLabel("Est. Grade Point Avg.");
         // Creates all of the needed text fields       
            course = new JTextField(30);
            hours = new JTextField(30);
              grdexpt = new JTextField(30);
              out1 = new JLabel("0");
              out2 = new JLabel("0");
            out3 = new JLabel("n/a");
        // Creates the ADD button
            JButton add = new JButton("Add Course Info.");
            add.addActionListener(this);
         // Adds everything to the panel
            mainpanel.add(title);
            mainpanel.add(spaceholder);
            mainpanel.add(courselab);
            mainpanel.add(course);i
            mainpanel.add(hrslab);
            mainpanel.add(hours);
            mainpanel.add(gradelab);
            mainpanel.add(grdexpt);
            mainpanel.add(total);
            mainpanel.add(out1);
            mainpanel.add(grade);
            mainpanel.add(out2);
            mainpanel.add(gpa);
            mainpanel.add(out3);
            mainpanel.add(add);
            mainpanel.add(spaceholder);
              //creates the output text fields in the array
              for(int x=0; x<6; x++)
                   outfields[x] = new JTextField(30);
                   outfields[x].setEditable(false);
                   mainpanel.add(outfields[x]);
        // Now add the panel to the content pane
            contentPane.add(mainpanel);
         }  // End of init()
       public void actionPerformed(ActionEvent ev)
              int credits = 0;
              final int MAX = 6;
              String result = "";
              String grade ="";
              String hrs = "";
              count += 1;//count to see the number of courses added
                 if(count<=MAX)
                      //sets result = Coursename - grade
                   result = course.getText() + " - " +grdexpt.getText();
                   grade = grdexpt.getText();
                   //If-else stmts to assign grade point value for given grade
                   if(grade.equals("a") || grade.equals("A"))
                        grdpts = 4;
                   else if(grade.equals("b") || grade.equals("B"))
                        grdpts = 3;
                   else if(grade.equals("c") || grade.equals("C"))
                        grdpts = 2;
                   else if(grade.equals("d") || grade.equals("D"))
                        grdpts = 1;
                   else
                        grdpts = 0;
                     //Reads in the text for the #hours, and parses it to an int
                     // for calculation.
                     hrs = hours.getText();
                   credits = Integer.parseInt(hrs);
                   tothours += credits;
                   totcredits += (credits*grdpts);
                     gpavg = totcredits/tothours;//calculates GPA
                     //sets hours, credits, gpa fields
                     out1.setText(""+tothours);
                     out2.setText(""+totcredits);
                     out3.setText(""+gpavg);
                     //puts the result string into appropriate field
                   outfields[count].setText(result);
                   //clears out the input fields.
                   course.setText("");
                   hours.setText("");
                   grdexpt.setText("");
                }//end if
                else
                     course.setText("Max Number of courses");
                     hours.setText("entered, please refresh");
                     grdexpt.setText("your browser.");
    } heres the html file code that calls the applet:
    <!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <!--gpadispp.html
    A document to test the gpacalc JApplet
    -->
    <html>
    <head><title>HTML Document that calls a JApplet </title>
    </head>
    <body>
    <p>
    <object codetype="application/java"
      code= "gpacalc.class"
      width="300"
      height="400">
    </object>
    </p>
    </body>
    </html>the source file is named gpacalc.java (gpacalc.class after compiled..)
    if anyone can help me figure out where i've gone wrong, i'd be greatly appreciative.
    thanks,
    ceola

    thanks for the assistance!
    i went through what harmmeijer said, and this is the error it gave me.
    java.lang.NullPointerException
         at gpacalc.init(gpacalc.java:82)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Exception: java.lang.NullPointerException
    heres a snip of the code that threw the exception:
              for(int x=0; x<6; x++)
                   outfields[x] = new JTextField(30); //Exception thrown here
                   outfields[x].setEditable(false);
                   mainpanel.add(outfields[x]);
              }i have an idea of what the problem is, i'm going to try and fix it now. thanks again :)
    ceola

  • Selecting a specific running total

    I am trying to determine the GPA of the top 5 credits that student receives over a given set of terms.
    My code...
    CREATE TABLE #TEMP
    COURSE_ID INT,
    STUDENT INT,
    TERM CHAR(2),
    GRADE_PTS FLOAT,
    CREDITS FLOAT
    INSERT INTO #TEMP
    (COURSE_ID, STUDENT,TERM,GRADE_PTS,CREDITS)
    VALUES ('2436801','0441080','FA','86.00000','1.00000'),
    ('2379009','0441080','FA','82.00000','1.00000'),
    ('2379005','0441080','SU','41.50000','0.50000'),
    ('2487620','0441080','SU','41.00000','0.50000'),
    ('2487621','0441080','FA','40.50000','0.50000'),
    ('2483446','0441080','SU','40.00000','0.50000'),
    ('2458013','0441080','FA','40.00000','0.50000'),
    ('2379002','0441080','SU','40.00000','0.50000'),
    ('2379004','0441080','FA','39.00000','0.50000'),
    ('2379016','0551080','SU','38.00000','0.50000'),
    ('2458089','0551080','SU','37.00000','0.50000'),
    ('2379091','0551080','FA','86.00000','1.00000'),
    ('2379075','0551080','SU','43.00000','0.50000'),
    ('2379047','0551080','FA','76.00000','1.00000')
    ; with CTE as (
    SELECT ROW_NUMBER() OVER(PARTITION BY STUDENT ORDER BY GRADE_PTS DESC) AS RN,
    COURSE_ID, STUDENT, TERM,GRADE_PTS,CREDITS
    FROM #TEMP A
    WHERE TERM IN ('FA', 'SU') AND STUDENT = '0441080'
    SELECT A.STUDENT,(SELECT SUM(B.GRADE_PTS) FROM CTE B WHERE B.RN<=A.RN)AS RT_GRADE_PTS,---RUNNING TOTAL FOR STC_CUM_CONTRIB_GRADE_PTS
    (SELECT SUM(B.CREDITS) FROM CTE B WHERE B.RN<=A.RN) AS RT_CRED, ---RUNNING TOTAL FOR STC_CMPL_CRED
    (SELECT SUM(B.GRADE_PTS) FROM CTE B WHERE B.RN<=A.RN)/(SELECT SUM(B.CREDITS) FROM CTE B WHERE B.RN<=A.RN) AS GPA ---CALCULATION FOR GPA
    FROM CTE A
    WHERE (SELECT SUM(B.CREDITS) FROM CTE B WHERE B.RN<=A.RN)=5
    I would like the script to show 1 record for each STUDENT, GRADE_PTS (total), CREDITS (total) and GPA. The condition is that the calculatioins cannot be more than 5 total credits. Currently, I can only get the script to work for the first student based
    on 5 credits but if there are less than 5 (3.5 in the case of student 551080) it should calculate the GPA on the top 3.5 credits.
    Suggestions?

    CREATE TABLE #TEMP
    COURSE_ID INT,
    STUDENT INT,
    TERM CHAR(2),
    GRADE_PTS FLOAT,
    CREDITS FLOAT
    INSERT INTO #TEMP
    (COURSE_ID, STUDENT,TERM,GRADE_PTS,CREDITS)
    VALUES ('2436801','0441080','FA','86.00000','1.00000'),
    ('2379009','0441080','FA','82.00000','1.00000'),
    ('2379005','0441080','SU','41.50000','0.50000'),
    ('2487620','0441080','SU','41.00000','0.50000'),
    ('2487621','0441080','FA','40.50000','0.50000'),
    ('2483446','0441080','SU','40.00000','0.50000'),
    ('2458013','0441080','FA','40.00000','0.50000'),
    ('2379002','0441080','SU','40.00000','0.50000'),
    ('2379004','0441080','FA','39.00000','0.50000'),
    ('2379016','0551080','SU','38.00000','0.50000'),
    ('2458089','0551080','SU','37.00000','0.50000'),
    ('2379091','0551080','FA','86.00000','1.00000'),
    ('2379075','0551080','SU','43.00000','0.50000'),
    ('2379047','0551080','FA','76.00000','1.00000')
    --SQL Server 2012 or 2014
    ;with mycte as (
    select *, sum(credits) Over(Partition by STUDENT Order by Grade_PTS DESC, COURSE_ID) runningTotal from #TEMP)
    ,mycte1 as (
    Select * from mycte
    WHERE runningTotal<=5
    select STUDENT,SUM(GRADE_PTS) Grade_Pts , SUM(GRADE_PTS)/Max(runningTotal) GPA , Max(runningTotal) Credit from mycte1
    GROUP BY STUDENT
    --Prior SQL Server 2012
    ;with mycte as (
    select STUDENT ,GRADE_PTS, credits, row_number() Over(Partition by STUDENT Order by Grade_PTS DESC, COURSE_ID) rn
    from #TEMP
    ,mycte1 as (
    SELECT a.STUDENT, GRADE_PTS, (SELECT SUM( credits) FROM mycte b WHERE b.rn <= a.rn and b.STUDENT=a.STUDENT) as runningTotal
    FROM mycte a
    Select STUDENT, SUM(GRADE_PTS) Grade_Pts , SUM(GRADE_PTS)/Max(runningTotal) GPA , Max(runningTotal) Credit from mycte1
    WHERE runningTotal<=5
    GROUP BY STUDENT
    drop table #TEMP

  • Database architecture

    Hi everyone,
    I would like to know if this is the right place to ask about my database architecture and if not, can anyone please tell me where can I find a forum related to that.
    Thanks in advance!!

    user626836 wrote:
    Sorry,
    I didn't mean to offend anyone.
    Ok, I have 2 tables where one of them is used to store all the users information named user_table and the second one I'm going to used to store a calculation like a GPA calculator named GPA_CALC. So I just want to know how can I create my relationship between both tables. What I have done so far is to relate them like this:
    One USER_TABLE has many GPA_CALC
    Do you guys think this is ok?NO!
    It is bad design to store computed values within the DB; since values upon which the calculation may change later.
    ALWAYS compute at data presentation time!

  • Combo Box Calculation

    I'm trying to make a custom calculation Javascript for a combo box and can't figure out the calculation.
    There are a few variables at play. I would like to incorporate a sliding scale for a student's high school gpa that looks like this:
    Students GPA:          SAT Score                   ACT Score
    2.00                          1010                            86
    2.025                        1000                            85
    Students GPA=Combo Box1
    Combo Box2=(If GPA=2.022, event.value=1010/86)
    Combo Box2=(If GPA=2.028, event value=1000/85)
    and so on (the scale continues on up to GPA=3.525
    How would I calculate that?
    Thanks for your help

    Acrobat Scripting Forum http://forums.adobe.com/community/acrobat/acrobat_scripting

  • Tax Calculation of free goods

    Hi
    We have a requirement where the client wants only VAT to be posted in GL accounts and not the price.For this I tried free goods condition type R100 with AltCBV 28.But the VAT value is also coming zero. I want the VAT to be calculated on Pricing condition and then give 100% discount.
    Apart from this I also tried to make pricing condition statistical and calculate VAT on it but then also system gives zero value for VAT.
    Also wondering if the scenario can be addressed with Free of Change Dellivery.

    Hi
    Normally in scenario where you are dealing with samples , there are cases you have to charge only TAXES / EXCISE part.
    Here my SUGGESTION is you can handle this through a simple sales order process, where you have to configure a new pricing procedure.
    1. Create a new document type to handle samples.
    2. Create a New pricing procedure where you can keep the basic price condtion as Statistical and rest all same as wht is is there your main pricing procedure. Just juggle with the TO-FROM to capture the TAX part in the total.
    3. Doc pricing procedure will help you to pick the new Pricing procedure
    4. Now Process this as a normal sales order
    5. This new document type will help you to have a proper reporting.
    The only constraint here is USER has to punch a fresh order seperately for such scenario. He cannot give a free good in the same sales order which is used as standard.
    The other way is you can configure a FREE GOOD Determination procedure as suggested  where you need to then have your Single pricing procedure accomodating the same scenario.
    Thanks
    RB

  • IF statement in Calculated Field for Share point, doesnt calculate sum in my Excel Pivot table.

    Hi Everyone
    I used this in SP calculated column field.
    =IF([Shift Sched]="1pm to 10pm","0",IF([Shift Sched]="2pm to 11pm","1",IF([Shift Sched]="3pm to 12am","2",IF([Shift Sched]="4pm to 1am","3",IF([Shift Sched]="5pm to 2am","4",IF([Shift
    Sched]="6pm to 3am","5",IF([Shift Sched]="7pm to 4am","6",IF([Shift Sched]="8pm to 5am","7",IF([Shift Sched]="9pm to 6am","8",IF([Shift Sched]="10pm to 7am","8",IF([Shift
    Sched]="11pm to 8am","7",IF([Shift Sched]="12pm to 9am","6",IF([Shift Sched]="1am to 10am","5",IF([Shift Sched]="2am to 11am","4",IF([Shift Sched]="3am to 12pm","3",IF([Shift
    Sched]="4am to 1pm","2",IF([Shift Sched]="5am to 2pm","1",IF([Shift Sched]="6am to 3pm","0",IF([Shift Sched]="7am to 4pm","0",IF([Shift Sched]="8am to 5pm","0",IF([Shift
    Sched]="9am to 6pm","0",IF([Shift Sched]="10am to 7pm","0",IF([Shift Sched]="11am to 8pm","0",IF([Shift Sched]="12pm to 9pm","0"))))))))))))))))))))))))    
    it was able to work fine however my issue is when i extract the information to excel and use a pivot table the table is not able to calulate the sum of the value for this field. Can you please help me with this. this is for an Attendance traker for Night
    Differential pay for employees. they create a daily log of their shift schedule and if i summarize this in pivot the value in the calculated field for this is not getting the sum.
    Thanks,
    Norman

    Hi Everyone
    I used this in SP calculated column field.
    =IF([Shift Sched]="1pm to 10pm","0",IF([Shift Sched]="2pm to 11pm","1",IF([Shift Sched]="3pm to 12am","2",IF([Shift Sched]="4pm to 1am","3",IF([Shift Sched]="5pm to 2am","4",IF([Shift
    Sched]="6pm to 3am","5",IF([Shift Sched]="7pm to 4am","6",IF([Shift Sched]="8pm to 5am","7",IF([Shift Sched]="9pm to 6am","8",IF([Shift Sched]="10pm to 7am","8",IF([Shift
    Sched]="11pm to 8am","7",IF([Shift Sched]="12pm to 9am","6",IF([Shift Sched]="1am to 10am","5",IF([Shift Sched]="2am to 11am","4",IF([Shift Sched]="3am to 12pm","3",IF([Shift
    Sched]="4am to 1pm","2",IF([Shift Sched]="5am to 2pm","1",IF([Shift Sched]="6am to 3pm","0",IF([Shift Sched]="7am to 4pm","0",IF([Shift Sched]="8am to 5pm","0",IF([Shift
    Sched]="9am to 6pm","0",IF([Shift Sched]="10am to 7pm","0",IF([Shift Sched]="11am to 8pm","0",IF([Shift Sched]="12pm to 9pm","0"))))))))))))))))))))))))    
    it was able to work fine however my issue is when i extract the information to excel and use a pivot table the table is not able to calulate the sum of the value for this field. Can you please help me with this. this is for an Attendance traker for Night
    Differential pay for employees. they create a daily log of their shift schedule and if i summarize this in pivot the value in the calculated field for this is not getting the sum.
    Thanks,
    Norman

  • If statement in Custom Calculation Script

    I have 16 fields and if even one of them ="1" I have to list it in another field.  I do not want to count or sum.  If one of those fields has a 1 in it I just want the other field to display Y and if none have a 1 I want that field to display N.
    Please help.
    Thank you in advance~mjc

    You need to write a compound logical statement to evaluate all of the values and that statement needs to evaluate to true or false.
    Do you know how to write JavaScript?
    Do you know how to enter JavaScript calculations into a form field?
    For custom calculation of the text field I could write something like:
    // define an array of the field names to check
    var aNames = new Array("Text1", "Text2", "Text3", "Text4",
    "Text5", "Text6", "Text7", "Text8",
    "Text9", "Text10", "Text11", "Text12",
    "Text13", "Text14", "Text15", "Text16");
    // define a logical variable that is true if any field has a value of 1 - default is false or no field has a value of 1
    var bMatch = false;
    // value for text field
    var TextValue = 0;
    // logical value of field being equal to 1 test
    var FieldIs1 = false;
    // loop through all the fields and test the fields value
    for(i = 0; i < aNames.length; i++) {
    // logically OR the result of field i value equal to true with bMatch
    // get the value of field
    TextValue = this.getField( aNames[i] ).value;
    // test the value of the field
    FieldIs1 = Number(TextValue) == 1
    // logically OR the 2 values
    bMatch = FieldIs1 | bMatch;
    } // end field processing
    // set the field value
    if(bMatch == true) {
    event.value = "Y";
    } else {
    event.value = "N";
    You will need to change the field names to match your fields. You can add more field name or remove field names as needed and the script will adjust for the number of field names.

  • If statement in calculated batch characteristic (dependencies)

    I have a little problem with calculating a certain batch characteristic.
    The situation is the following:
    I have batch char A, batch char B and batch char C. Batch char C is the result of the sommation of char A and B. The problem I have now is that batch char C only should be calculated when batch char A and B are different from 0.
    I have a custom build interface that imports QM data to the batch chars. Default, all my batch chars are set to 0 so if I just say $self.charC = $self.charA + $self.charB, I always get a value.
    Is it possible to some sort of IF statement to check if the value is different from 0?

    Dear,
    You need to try with variant table
    take all the combination and enter in a variant table and see the result...it works
    example
    A     B      C
    0      0      space
    0      1      sapce
    1      1      space
    I hope you got it

  • Pension not calculated when EE is hired mid-month

    Hi All
    Please suggest for the following....
    When an Employee is hired in the middle of the month, the system doesn't calculate Pension Contribution.
    Like if an EE is hired on 10th April. The system will calculate all payments & deductions, but it is not calculating the Pension Contributions.
    I am maintaining IT 169, 171 for Pension Contribution.
    The problem I found behind this is.....(WIth the help of an ABAPer)
    -: System checks the Payroll Period Start Date with the Org. Assignment start date. When it doesnu2019t match, the system does not calculate the Pension Contribution.
    For the time being I solved this through the following action -: In debugging, I canceled this condition (skipped this check). Then it calculated the Pension Contribution.
    But, this is not the right solution for achieving that as we are changing standard SAP coding.
    Please suggest any solution for the same.
    Thanks & Regards

    If your schema has p0169 with BEG that will happen, try put below Param1 which fits your requirement.
    BEG                                                                               
    Infotype records are evaluated on the payroll period begin date.        
    No changes within the current payroll period are taken into             
    consideration.                                                          
    No proration of contributions takes place, even if the record ends      
    within the current payroll period.                                                                               
    END                                                                               
    Infotype records are evaluated on the payroll period end date.          
    No changes within the current payroll period are taken into             
    consideration.                                                          
    No proration of contributions takes place, even if the record begins    
    within the current payroll period.                                                                               
    CHK                                                                               
    Infotype records are evaluated on the payroll check date (the pay date),
    regardless of whether the check date falls into the payroll period      
    itself.                                                                 
    A record whose validity starts after the end date of the current payroll
    period is still evaluated if the check date (which lies in the future)  
    falls within the validity period of the infotype.                                                                               
    FRST                                                                               
    Infotype records are evaluated if there is any intersection of plan     
    infotype and payroll period. The first intersection is taken to         
    determine the full period deduction amount which is stored without      
    proration.                                                                               
    LAST                                                                               
    Infotype records are evaluated if there is any intersection of plan     
    infotype and payroll period. The last intersection is taken to determine
    the full period deduction amount which is stored without proration.

  • Mid-Month Calculations

    I am bringing a fixed asset system online in SAP and during the legacy conversion it was realized that the test system is not calculating the depreciation using a mid month convention.  That being said looking at the configuration the company code was setup in 2005 and is in production and is productive (since 2005).  So it appears that this setting is global and SAP will not allow me to change these settings to allow mid month calculations.  Is this correct? anyone ran across the same issue.

    Hi
    please read the note 2993 and 39416!
    Best Regards,
    Blaz

Maybe you are looking for