Final values

i need help on an assignment.
basically i just need an example of a basic program that utilizes
the final attribute for a number.
if its necesary i can post my code, but i would rather just see an example and learn to do it myself.
is that confusing?
i dont know much about finals.
thanks

basically what i know about finals is that they are constants,
and if you change them it changes the whole behavior of the program
kindof like storing a variable on your calculator?
thats what i think i know, if im wrong let me know
anyway.... my work so far hasn't implemented any final values, since i dont know how.
import chn.util.*;
import apcslib.*;
class Work{
        private double myHours;
        private double myWage;
     Work(){
        myWage = 1;
        myHours = 1;
    Work(double hours, double wage){
        myHours = hours;
        myWage = wage;
    public double calcGrossPay(){
        return Math.round(myWage*myHours);
    public double calcFedTax(){
        return Math.round(.04*calcGrossPay());
    public double calcStateTax(){
        return Math.round(.15*calcGrossPay());
    public double calcNetPay(){
        return Math.round(calcGrossPay() - calcStateTax() - calcFedTax());
import chn.util.*;
import apcslib.*;
    public class testWork {
        public static void main(String[ ]args){
            double wage, hours, fedTax, stateTax;
            int choice = 2;
          ConsoleIO keyboard = new ConsoleIO();
          do{
              System.out.println("Want to know how much you made this month?");
              System.out.println("What's your hourly wage?");
                wage = keyboard.readDouble();
              System.out.println("How many hours did you work?");
                hours = keyboard.readDouble();
            Work jobA = new Work(wage, hours);
              System.out.println("Gross Pay =   " + "$" + jobA.calcGrossPay());
              System.out.println("Federal Tax = " + "$" + jobA.calcFedTax());
              System.out.println("State Tax =   " + "$" + jobA.calcStateTax());
              System.out.println("Net Pay =     " + "$" + jobA.calcNetPay());
              System.out.println("Have another job? Type 1 for Yes   2 for No");
                choice = keyboard.readInt();
            }while (choice ==1);
                System.out.println("See ya! Hope you get a raise!");
    }all of this compiles and runs correctly

Similar Messages

  • Final value of outputs after program stop

    Hi,
    I want to have a output on my AO of 0 to get the controlled machine stopped when the labview program stops.
    Can I set a final value of outputs after the program stop.
    I use Labview 2014 myRIO Student edition with the hardware myRIO.
    Many thanks in advance!
    Andi

    You just need to set the output to 0V after your loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • What exactly is an ebay final value fee?

    Is ebay final value fee the final price the item sold for which is transacted into yoyr account? Or what is it exactly, im having trouble finding a definite answer

    You can often list for free on ebay up to a certain amount of items and as long as you don't choose any optional upgrades. BUT when your item sells you pay ebay 10% of the final value fee. eg if your item sells for £20 then you pay ebay £2. Your fees go into your ebay invoice which you can view in your "my ebay > account" and you are billed for it x1 per month. Normally your fees are deducted automatically via paypal. Then when your buyer pays you also pay paypal and you can view all fees at the bottom of both ebay and paypal pages.       *********************************** I give up my time to help you so a thank you or kudos would be cool.
    Marking one of my replies as a solution would be appreciated if I sorted your problem. 

  • Weird final value lost glitch

    Forgive me for pasting the raw code, rather than narrowing it down to a simple test case, but all things considered, I don't think a test case is needed to analyze something this simple:
    public static final class CandidateDepthDataIterator<T> extends ConversionIterator<Candidate,T>
         private final Class<T> ct;
         private final int depth;
         public CandidateDepthDataIterator(Iterator<CandidateBin> i, Class<T> t, int depth)
              super(new CandidateIterator(i));
              ct = t;
              System.out.println("Ctor " + depth);
              this.depth = depth;
         @Override
         protected T convert(Candidate c)
              System.out.println(c.depth + " = " + depth);
              return ct.isInstance(c.data) && c.depth == depth ? ct.cast(c.data) : null;
         }The above code prints:
    Ctor 10
    0 = 0
    I don't have a clue why it's doing that. I was hoping someone here might be able to fill me in on why it's doing that.
    For those of you still wondering what's going on, notice the "final int depth". It is marked as final, so whatever value it is assigned at constructor time, as I understand it, it should never change from that value. Yet, as you can see from the print statements, it has value of 10 at construction time, and value of 0 at the time of the call to validate(). Somehow, well beyond my comprehension, the value of a final int has changed.
    So why is it doing that? How do I make it stop doing that and stick with the value that I give it (10)?

    That is the complete code for that class. I'll also share the code for the superclass.
          * Abstract Iterator wrapper/implementation which allows the individual elements
          * to be converted or even bypassed as needed (by having convert() return null).
          * This implementation will not return null elements.
          * <p>
          * Note that due to the way this iterator is implemented,
          * dynamic removal of elements is not possible.
          * @param <T1> The type of the wrapped iterator.
          * @param <T2> The output (converted) type of the implementation iterator.
         public static abstract class ConversionIterator<T1, T2> implements Iterator<T2>
              /** The wrapped iterator */
              protected final Iterator<T1> iter;
              /** Stores the next element that was able to convert */
              protected T2 next;
               * Wraps the given iterator, and prepares the first converted element.
               * @param t1
              public ConversionIterator(Iterator<T1> t1)
                   iter = t1;
                   next = findNext();
              public boolean hasNext()
                   return next != null;
              public T2 next()
                   if (next == null) throw new NoSuchElementException();
                   T2 n = next;
                   next = findNext();
                   return n;
              public void remove()
                   // Simply doing ci.remove() here wouldn't work if hasNext has been called.
                   throw new UnsupportedOperationException();
               * Prepares the next available converted element for iteration.
               * @return The converted element.
              private T2 findNext()
                   while (iter.hasNext())
                        T1 c = iter.next();
                        T2 r = convert(c);
                        if (r != null) return r;
                   return null;
               * Converts a given element into the implementation type.
               * Implementations may return null to entirely skip the element.
               * The implementation iterator will skip to the next non-null conversion.
               * @param c An element from the wrapped iterator.
               * @return A converted element for the implementation iterator, or null.
              protected abstract T2 convert(T1 c);
              }I don't see anything in there that should affect it at all.

  • Line chart showing final value only?

    Is there a way to have a line chart that shows the value against the final data point only?
    eg something like this
    ----------------------74
    instead of
    1----13----28---42----74
    Thanks

    Thanks I appreciate your comments and agree I will have to put some effort in, I tend to try and work things out I need by messing around when I need a specific function or have a specific thing I want to do and focus on that without perhaps learning the underling basics.
    I've been spoiled by Excel, there is a lot of stuff its significantly easier (for me anyway) to do without undergoing any learning curve at all, with wizards for functions (for example) and in many cases if you right click on something you can alter it right there, rather than having to go up to the inspector and work out which of umpteen functions the bit you want to alter is hidden in. If the inspector was a person, I would have strangled them to death by now
    I'm not sure if this is my Mac or what, but if I go into numbers help and type anything in, I just get the spinning thing next to the magnifying glass, but it never comes back to me. It works OK if I follow links. For example I just typed 'charts' in help and hit enter, 5 minutes later I"m still waiting. Doesn't increase my confidence I'll have to look into that and see whats going on.
    Thanks to everyone for your help, the guys will be impressed with the new chart !

  • BI and ECC Reconciliation report giving blank value instead of ZERO

    Hi,
      We have a report for reconciliation where in if the ECC and BI balance  matches, it will show Zero (0) in the final field. My question is *for some of them it is showing Zero(0) and for few rows it is givng blank values* even after ECC and BI balance matching...Why is it giving blank instead of showing 0 (ZERO)  ....is there any setting  we need to make??
    point to be noted is only few rows are getting blank and few rows it is showing '0'
    pls suggest...
    Thanks

    Without additional details of the rows that have blanks vs zeros, here is a guess...
    The rows with blank final value have no records in ECC or BI. You can probably define the formula in such a way that it always gives zero for all rows.

  • Web UI - Value not getting selected from drop down list  .

    Hi  All ,
        I am facing a problem in one of the fields which is enhanced with a drop down functionality .
      I have created the GET_V_** method and also the GET_P_**  method for the same .And finally I am able to see the values in the drop down list . But the problem is , when I am trying to select a value from the drop down no values are selected .
    Can anyone plese help me in this as What has to be  done .
    I have taken references from few guides but I am not getting any clear idea of what has to be done .
    Regards,
    Ranjita

    Hi Ranjita,
                     To trigger a round trip, you must have given the event name in GET_P method.
    Same event handler would trigger.
      Please put a break point in Event Handler in IMPL class, and in SET_attr method of the attribute in CN class and see if value is getting set properly or not. Final value that would be displayed on UI would be there in GET_attr method of CN class.
      I hope it helps.
    Thanks,
    Rohit

  • Display value in MATLAB For loop on LabView

    Hi guys,
    I have a MATLAB script in my VI. The MATLAB script runs a For Loop. For each iteration of the For Loop, a variable say, count is incremented by 1.
    From what I am experiencing, the MATLAB script only outputs the final value of count when the script is done running.
    Is it possible to capture the value of count as each iteration is performed?
    PS : Using a LabView For loop is not possible for my case. Running the MATLAB code is mandatory.
    Thank you in advance!

    When the Matlab script gets called, it's actually passing control over to the Matlab ActiveX server. Thus, LabVIEW has to wait until that's done before it can proceed. What you're asking for is interprocess communication. That doesn't come provided "out of the box". You have to create it yourself. Some ideas were suggested here: http://forums.ni.com/t5/LabVIEW/Labview-Matlab-Exchange-Data/td-p/1408054

  • How to loop with varying values depending on where you are in the loop

    Hi,
    I have need of loops / nested loops that pick different figures depending on where you are in the loop.
    The whole function needs to run through 'ml' times. 'ml' is a dynamic figure.
    Loop 1 = While the loop is within the first 12 iterations, 'exconemp' must equal 100. For iterations 13 - 24, 'exconemp' must equal 102.5, for 25 - 36 it will be 105.06, for 37 - 48 it will be 107.69. This needs to change every 12th iteration until it has reached 'ml'. The calculation takes the value of the previous 'exconemp' and then multiplies that by 0.025.
    Loop 2 = While the loop is within the first 120 iterations, 'abc' must equal 0.015 and any further iterations must use 0.01. This must also work in a way to figure out whether 'ml' is higher or lower than 120 and work accordingly.
    My main issue is this - how do I get the loops to run through as this:
    While the iteration is < 12, do this, THEN take the final figure (12th iteration) and start on 13 - 24, do this THEN etc etc.
    How do I produce a THEN statement? I can get the code to pick up the final values, but not change along the way.
    I think that I may be better creating an array for Loop 1, but I am not entirely convinced of this. I also think it would be better/tidier if I can get 'month 1 total' and 'month 2 total' into the loops, but am not sure on how to do this.
    The values that I need to produce are (only first 36 shown):
    1 - 12 = 125.55, 251.65, 378.31, 505.52, 633.29, 761.63, 890.53, 1019.99, 1150.03, 1280.63, 1411.81, 1543.57
    13 - 24 = 1679.05, 1815.12, 1951.79, 2089.06, 2226.93, 2365.41, 2504.50, 2644.20, 2784.52, 2925.45, 3067.00, 3209.18
    25 - 36 = 3355.19, 3501.85, 3649.15, 3797.11, 3945.71, 4094.96, 4244.87, 4395.44, 4546.68, 4698.57, 4851.14, 5004.38
    var ml = 240 // dynamic figure, multiple of 12 up to 780
    var exconemp;
    var exconem = 100;
    var inf = 0.025;
    var tree;
    var tec;
    var power;
    var fvis;
    var abc;
    var fvee;
    var tfv;
    function myfunction() {
    //Loop 1
    //while (ml <= 12) {
      exconemp = exconem;
    //while (ml > 12) {
    // exconemp = exconem*inf;
    //end Loop 1
      trace("exconemp=", exconemp); // employees contribution
    tree = exconemp/(1-0.2)-exconemp;
    tec = exconemp + tree;
      trace("tree", tree);
      trace("tec", tec);
    power = Math.pow(1+0.07, 1/12);
    //Loop 2
    //while (ml <= 120) {
      abc = 0.015;
    //while {
      //abc = 0.01;
    //end Loop 2
    fvis = power*(1-abc/12);
    trace("fvis=", fvis);
    fvee = tec*fvis;
    trace("fvee=", fvee); // month 1 total
    tfv = (tec+fvee)*fvis;
    trace("tfv=", tfv); // month 2 total
    for (var i:Number = 0; i < ml; i++)
          tfv = (tec+tfv)*fvis;
      trace("tfvloop=", tfv);
    I hope that I have explained this well enough.
    Many thanks in advance.

    I think this will do it although I am not quite getting the numbers you posted.
    stop();
    var ml = 48; // dynamic figure, multiple of 12 up to 780
    var exconemp;
    var exconem = 100;
    var inf = 0.025;
    var tree;
    var tec;
    var power;
    var fvis;
    var abc = 0.15;
    var fvee;
    var tfv;
    myfunction();
    function myfunction()
        exconemp = exconem;
            for(var index:uint = 1; index <= ml; index++)
                trace(index + "--------------------------------");
                    tree = exconemp/(1-0.2)-exconemp;
                    tec = exconemp + tree;
                    power = Math.pow(1+0.07, 1/12);
                    fvis = power*(1-abc/12);
                    fvee = tec*fvis;
                        if(index == 1)
                            trace("month 1 total=", fvee);
                        else if(index == 2)
                            tfv = (tec+fvee)*fvis;
                            trace("month 2 total=", tfv); // month 2 total
                        else
                            tfv = (tec+tfv)*fvis; //now that we are here the tfv self perpetuates on itself
                            trace("month " + index + " total=", tfv); // month n total
                if(index % 12 == 0)
                    exconemp = exconemp*(1+inf);
                    trace("changed exconemp to: " + exconemp);
                if(index % 120 == 0)
                    abc = .01;
                    trace("changed abc to: " + abc);

  • Is there a way to apply noise reduction based on ISO value?

    I shoot a lot of sports using auto ISO which means I get hundreds of images from a day with a variety of different ISO values, including all sorts of intermediate values (like ISO 280, for example).  There are times when I'd like to apply LR noise reduction across the whole batch of images, but I'd like to apply it based on the ISO value of the image.  For example at ISO 1250 and above, I want a particular NR Luminance value.  From 640 to 1250, I want a different value.  From 400-640, a different value.  I know you can define some things at import time based on ISO, but that doesn't seem practical when the ISO value can be nearly anything as it would take hundreds of import profiles.
    So, any ideas how to apply NR based on the ISO across a batch of images?

    jfriend0 wrote:
    How do "defaults" interact with a preset applied upon import?  I shoot RAW and apply a preset upon import for every import I do.  If I apply a preset upon import will it override the "default" anyway?  If that's the case, then defaults are of no use to me.
    Yes - Lightroom presets are absolute, but unlike the default settings, presets don't have to specify all the settings. If a preset setting is specified, it will blindly overwrite the previous setting, if not specified then the previous value will remain unaltered.
    DevAdjust supports relative presets:  final-value = present-value +/- relative-preset-value
    Rob

  • How to get the value of a node content in XML Literal in BPEL 2.0?

    Hi!
    I have a Problem Build A Expression in activity allocation XML Literal one, I would like to help me ...
    Well, I have the same activity in BPEL 1.0 version and now is Different is BPEL 2.0,
    I have a Web Service < WSEjecutaComandos > Where to have a function Remote Commands That runs ,
    Inputs my Web Service: " numEquipo int , String [ ] comandos , int numCta , int publicar , int version ,  String fecha"
    The second argument is a string array type ..
    Now in my BPEL process , I make is the following assignment:
    <assign name="AssignCreaPath">
                        <copy>
                            <from>
                             <literal>
                                  <fnCRexecElement xmlns="http://servicios/">
                                       <numEquipo>2</numEquipo>
                                       <comandos>mkdir etl/entradas/mmkis/</comandos>
                                       <numCuenta>1</numCuenta>
                                       <publicar>0</publicar>
                                 </fnCRexecElement>
                            </literal>
                            </from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters</to>
                        </copy>
                        <copy>
                            <from>concat(ora:getContentAsString($InvokeClear_fnCRexec_InputVariable.parameters/comandos),$inputVariable.payload/client:fecha)</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/comandos</to>
                        </copy>
                        <copy>
                            <from>$InvokeVersion_fnGetVersionProcesoByFecha_OutputVariable.parameters/version</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/version</to>
                        </copy>
                        <copy>
                            <from>$inputVariable.payload/client:fecha</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/fecha</to>
                        </copy>
                    </assign>
    Well the conflict that I have is this,
    previously defined a assign with XML Fragment copied it to the payload to the input variable Web Service (WSEjecutaComandos),
    and the XML is copied in each of the variables ,
    Then concatenate input values ( I remarked in red) < comandos > with the value from "fecha" ( String) , and again copy Variable < comandos > and did not have any problems
    but now with the new BPEL 2.0, I do the same thing using now Literal XML ( that good!) but the option to concatenate (I remarked in red) and copied to the same variable ( I remarked in blue ), I mark the following error :
    I should know, I'm doing wrong That , or you need to make XPath Function That The Value They already have the variable < comandos> will concatenate fecha ,
    and is the final value for my entry my Web Service.
    must be defined as the type values array <comandos[i]>
    define the following activities before $InvokeClear_fnCRexec_InputVariable.parameters/comandos[1],
    but it seems that this BPEL 2.0 does not respect me as index brackets .
    Thank you...
    Cheers,

    thanks for your help , it served me!
    I need to get the value of XMLNodeList <comandos> to concatenate the date.
    Attempt to XPath function ( ora:getContentAsString(NodeList elementAsNodeList)), but returns me a String, but a nodoXML.
    Cheers,
    Maby

  • Sending a variable value to JTextField

    I am trying to put a value that was from an array which was pasted through the method calculateMean (which computes the mean of the array). I am trying to set the mean into a JTextField named meanString but I cant seem to get it to compile. I dont understand the error. It works when I just test it with System.out. I think its a syntax error. See Below. Thanks for any help.
        public void actionPerformed(ActionEvent event) {
           String action = event.getActionCommand();
            if(event.getSource() instanceof JButton){
              JButton clickedButton = (JButton) event.getSource();
                  if(clickedButton == meanButton) {
                     processButton(clickedButton.getText());
             if (event.getSource() instanceof JMenuItem) {
               String s = event.getActionCommand();
               if (s.equals("Load")) {
                   loadNumbers();
               else if (s.equals("Clear")) {
                   clearNumbers();
               else if (s.equals("Exit")) {
                 System.exit(0);
        public void processButton(String buttonCommand) {
        int [] meanList;
            meanList = getNumbersFromTextArea();
            calculateMean(meanList);
            //System.out.println(calculateMean(meanList));  //This prints fine (the mean of an array) so instead of using system.out, I want to put the value of calculateMean(meanList) into a JTextField I have named meanString
            meanString.setText(calculateMean(meanList));  //Error here (setText.java.lang.String) in javax.swing.text.JTextComponent cannot be applied to (double)
         

    Here is what I have done from what I asked about earlier. I keep getting a nullpointer exception when I attempt to test the try catch exception. The user enters in values in a jtextarea and then those values get put into an array and returned in getNumbersFromJTextArea() I am trying to make a try catch to tell the user to enter in integers if they attempt to compute the mean (using a JButton ---calculateMean() computes mean) without entering anything in the JTextArea. I want the final value of the array that was ran through calculateMean and converted to a string to print in a jtextfield called meanString. Everything works fine except for when I try to test the exception (enter in no numbers in the jtextarea).---I get a nullpointerexception, I close out that window with the error, then it works until I close the program and run it again :-\ Maybe its how my try catch is set up?
    public void processButton(String buttonCommand) {
    int [] meanList = null;
            while (true){
                meanList = getNumbersFromTextArea();
            try {            
                if (meanList == null){
                     throw new Exception("You must enter integers to compute Mean");
                else String.valueOf(calculateMean(meanList)); 
            }catch (Exception e) {
                JOptionPane.showMessageDialog(null, "Please enter integers to compute Mean");
                break;
        meanString.setText(String.valueOf(calculateMean(meanList)));
    }

  • Return order value is not coming properly

    Hi All,
    In Export Pricing Procedure we manually enter value for Freight and Insurance.For both condition types in V/06 we have maintained Fixed Amount in Calculation Type.So in  the  sales order condition screen Pricing is like
    Ordered Qty 10  pc
    Price         USD 100 (Entered manually)
    Freight      USD 10 ( entered manually)
    Insurance USD 20 (entered manually)
    Total order  Value is USD 120.Here price per item is 12 USD
    Now when we create a return order for 5 pc wrt above invoice, Freight and Insurance is not calculated properly.
    The system is calculating like
    Price         USD 50
    Freight      USD 10
    Insurance USD 10
    Total Credit Memo/returm order amount is 70 USD.And return price/item is 14 USD.
    Here the system calculate Freight and Insurance value by dividing the original value(10 USD 0r 20 USD / return qty.(5pc).
    But in the above process the return order value should come 60 USD.So what settings do we need to get the value 60 USD.
    Regards
    Debasish

    Dear Raj,
    Thanks for the reply.I am giving you a brief idea abt the PP and condition types.(For Freight and Insurance ).
    For Freight  condition type
    condition class  A
    calculation type B
    Condition Category F
    No Access sequence is assigned
    For Insurance Condition Type
    Condition class A
    Calculation Type B
    Condition Category C
    No Access sequence is assigned
    In PP for both my condition types manual, mandatory and statistics has not been checked.No From To step is maintained.
    Coming to your query can you pls elaborate how did u calculate  Freight 2 + insurance 4  and the final value should be 56 usd.
    Now in my first invoice the  invoiced qty was 10 . Freight value was 10 and Insurance value was 10(for the total invoiced qty).
    Now when i create return order  for 5 qty the system should calculate proportionately.I mean Insurance value should be 5 usd and freight value should be 5 usd.So price is (for 5 qty) 50 usd + Insurance 5 usd + freight 5 usd= 60 usd
    If i am wrong then pls correct me.
    Regards
    Debasish

  • Final price of the Sales Order calculation on payment term

    Hi,
    Out Business requirement  as follows.
    1) one ZNAP pricing condition will be maintained by the monthly wise by business for pricing. this is a  statistical condition only checking at sales order level only. this condition will check with Final price of the Sales order.
    Now the requirement is
    1) based on payment term of the Sales Order. plus if its a credit payment if the its CASH payment. these deduction should be added to ZNAP condition, and same will calculate with Final price, while creating Sales order.
    For Example:
    ZANP condition maintained  1000 USD.
    while creating the SO:
    If the payment term of the customer: PT30, ( it means payment with be in 30 days of the bill creation date)
    system should do the below calculations
    1) Scenario
    Sales Order: Final price :                                       1500  USD( maintained by the Sales User while creating the SO)
    ZNAP price                      :                                    1000  USD
    according payment term 30 days                            20 USD ( as per table maintenance for calculation of the payment term.)
    Calcuation:                                                          1000+20= 1020 (approximate need to add as interest rate)
    Then final it should display final price 1500-1020= 480 USD.
    2) Scenario:
    If the payment term Cash:
    ZNAP                                                            : 1000 - 20= 980 ( approximately and deduct, from the condition due to cash payment its like discount)
    calucalte"                                                       1500-980= 520 difference
    this purely internal pricing calculation with final price...
    pl let me know how to get this in the pricing. and payment could be 30 days, 45 days 60 days etc.
    Thanks.

    Hi M Sham,
    I believe your requirement can not be met with Standard pricing and you will have to create Routines for getting this result.
    From scenario I believe you will be doing below points:
    You should Create Z-Table with Payment Term and respective rates against those payment Term.
    You should create a statistical condition type(Ex. ZNP1) and create Calculation Type routine with Logic to get KOMK-ZTERM field and derive value from Z-Table and update XKWERT field.
    Calculate addition of ZNAP and ZNP1 (With +ve or -ve Signs)
    And then again make deduction of derived value from Finale Value.
    Do let me know if I have misunderstood your question.
    Regards,
    MJ.

  • Creation of a new Formula Routine for condition base value calculation

    hello people,
    i am stuck up in a situation where SAP has itself said that nothing can be done.
    but i know you all can guide me to some way or the other
    see, the scenario is like this
    1. i have to calculate the base value for a pricing condition.
    which will follow the formula
    net value + excise duty + freight
    2. in standard routines two things are normally bieng used
    xkwert for the value that has to be finally calculated(taking reference of routine 004)
    komp-netwr for the net value
    3. i have to calculate the excise duty by adding up all the base values of existing pricing conditions like JMOP, JEC1 etc that i have which i saw in internal table
    XKOMV on debugging
    4. now freight is to be calculated from all the values of condition types that are in KOMP which is a structure and no internal table is defined in standard main program
    now ppl
    can you guide me by looking at the standard program
    what is this xkwert field and where it is assigning the value.
    how to get field from other structure and table.
    please guide as to how to approach the problem.
    thanks and regards
    Nitin

    HI,
    the scenario u r talking abt is condition based value formuls of VOFM transaction.
    here the data is retrieved as 'X' structures and will hold normal tables with respective names. and in this case all the pricing data is in KOMV ie XKOMV
    Final amount including tax
    form frm_kond_basis_004.
      xkwert = komp-netwr + komp-mwsbp.
    endform.
    always calulation is done in xkwert field and final value is stoerd in xkomv.
    *.................. text ............................................. *
    Condition base value formula to get the assessable value of the     *
    saleable material from j_1iassval. If the value is not maintained   *
    then the selling price will be taken as the base                    *
    TABLES: J_1IASSVAL.
    DATA XXKOMV LIKE KOMV .
    XXKOMV = XKOMV.
    SELECT SINGLE * FROM J_1IASSVAL WHERE J_1IWERKS = KOMP-WERKS AND
                                         J_1IMATNR = KOMP-MATNR.
    IF SY-SUBRC EQ 0.
        IF J_1IASSVAL-J_1IVALNDP NE 0.
        XKWERT = J_1IASSVAL-J_1IVALNDP * KOMP-MGLME / 1000.
        ENDIF.
        IF J_1IASSVAL-J_1IVALASS NE 0.
        XKWERT = J_1IASSVAL-J_1IVALASS * KOMP-MGLME / 1000.
        ENDIF.
    ELSE.
       XKWERT = XXKOMV-KAWRT .
    ENDIF .
    XKOMV = XXKOMV .
    ENDFORM.
    and as far as ur  req select allthe condition type data and sum and take the average value and pass it.

Maybe you are looking for

  • C7 TV-out cable

    Does anybody know which cable should be used with Nokia C7 for TV-out? I have not found any compatible one on nokia websites. I have tried CA-75U but it did not work. Solved! Go to Solution.

  • How can I make address labels, preferably matching Avery sizes, in Pages please?

    How can I make address labels, preferably matching Avery sizes, in Pages please?  Please don't tell me there is no labels facility!!

  • Xperia Arc LT15i portrait keyboard 'phonepad' setting problem

    Have the very latest software update on the phone - 2.3.4 - which seems to have created a bug (software error) in the portrait keyboard 'phonepad' option.  Driving me crazy.  Fingers too big to be using the Full keyboard option so have happily been u

  • Does InDesign CS6 projects integrate with InDesign CC?

    I have one user that has InDesign CS6 and we looking at doing the subscription for InDesign CC for another user. If InDesign CS6 creates a project, can InDesign CC open, edit, and save  this project and visa versa? Thank you

  • Windows 10 Technical Preview 9926 activation

    I just upgraded my Windows 10 Techincal Preview 9879 to the new 9926 build, and it seems needs to be activated. I tried to use the product key displayed on the ISO download page (NKJFK-GPHP7-G8C3J-P6JXR-HQRJR), but it doesn't work. Also if I try to j