Komvd-kbetr field automatically divided by 10?

Hi all,
I hope someone can help me on this one.
Since recently I have a problem when I try to write the field komvd-kbetr to SAP-script. For some reason it sometimes automatically divides this value by 10.
A little bit more explanation:
I created 2 invoices and a set them up for printing (creating an iDoc with SapScript, so no layout attached).
Both invoices are identical to each other and contain discount conditions. In this case the field komvd-kbetr is a percentage and should be divided by 10. I do this manually in the print program. When I print only 1 invoice, everything works perfectly.
When I process the two invoices using the RSNAST00 progam, the first iDoc is created ok (percentages shown are 1% discount and 21% tax, = OK), but the next invoice shows these values divided by 10 (0.1% discount and 2.1% tax). During debugging the values are shown ok in ABAP (1% and 21%), and immediately after that I call the function WRITE_FORM with the element that should print this value.
Here's an exerpt from the coding I use:
DATA: hkomvd TYPE TABLE OF komvd.
REFRESH hkomvd.
Collect price conditions etc., fill hkomvd table
   CALL FUNCTION 'RV_PRICE_PRINT_HEAD'
     EXPORTING
       comm_head_i = komk
       language    = nast-spras
     IMPORTING
       comm_head_e = komk
       comm_mwskz  = print_mwskz
     TABLES
       tkomv       = tkomv
       tkomvd      = hkomvd.
Because these values are percentages, divide them by 10
   hkomvd-kbetr = hkomvd-kbetr  / 10.
After performing this action, the kbetr values are shown as 1% and 21% which is OK.
Write the data, including hkomvd-kbetr
   CALL FUNCTION 'WRITE_FORM'
     EXPORTING
       element   = 'MISC_COSTS'
     EXCEPTIONS
       element   = 1
       function  = 2
       type      = 3
       unopened  = 4
       unstarted = 5
       window    = 6
       OTHERS    = 7.
After performing this action, the iDoc contains values 1% and 21% for the first invoice, 0.1% and 2.1% for the second (and following) invoice(s).
I don't know for sure if this error occured since the upgrade to ECC 5.0, according to the users it might have been there before as well.
Does anyone know what might be the problem or can give me a hand in the right direction?
Thanks in advance!
Dave Verkoelen

Hi Anurag,
This is what my first thought was as well, but sadly enough this is not the case.
Just before filling the hkomvd structure with function call RV_PRICE_PRINT_HEAD I refresh and clear the structure.. Debugging shows that the structure is then completely empty before it is filled.
Just to be sure I tested with 2 different invoices (values), but it made no difference. The values on the second invoice are still a factor 10.
The weird thing is still:
During debugging the values are shown OK in ABAP, but AFTER the WRITE_FORM function call, the values are divided by 10.
I debugged the sapscript as well, here the values are already wrong. In the WRITE_FORM everything is OK.
I expect something happens in or direcly after the write_form function but I cannot figure out what it is.
Thanks anyway for the suggestion!
Message was edited by: Dave Verkoelen

Similar Messages

  • Tecnical problem field KOMVD-kbetr strange number conversion... why?????!!

    Good morning i'm using the standerd program RVADOR01 to print the order confirme.
    i have to do some modifications at the sapscript, i have also show the customer discount.
    I don't understand why in va02 the customer discount (KOMVD-kbetr ) is filled for excample with "20,000-" but when ii's readed the field in the program it read "200,00-"  but the user have inserted in va02 "20,000-"!!  How i print correctly the field?
    Help me thanks!

    kwert contains "KWERT     P     7               44.00-" i have to print the percentage of discount that is contained in the field "KBETR     P     6            200.00-". the sapscript when is called the element 'ITEM_LINE_PRICE_QUANTITY' contains "200.00-" but in the sapscript will be printed '20,000-', i debuged it.
    i report below the code:
          FORM ITEM_PRICE_PRINT                                         *
          Printout of the item prices                                   *
    FORM ITEM_PRICE_PRINT.
      LOOP AT TKOMVD.
        KOMVD = TKOMVD.
        IF SY-TABIX = 1 AND
         ( KOMVD-KOAID = CHARB OR
           KOMVD-KSCHL = SPACE ).
          CALL FUNCTION 'WRITE_FORM'
               EXPORTING
                    ELEMENT = 'ITEM_LINE_PRICE_QUANTITY'.
        ELSE.
          IF KOMVD-KNTYP NE 'f'.
            CALL FUNCTION 'WRITE_FORM'
                 EXPORTING
                      ELEMENT = 'ITEM_LINE_PRICE_TEXT'.
          ELSE.
            CALL FUNCTION 'WRITE_FORM'
                 EXPORTING
                      ELEMENT = 'ITEM_LINE_REBATE_IN_KIND'.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    And below the sapscript (MAIN WINDOW):
    /E           ITEM_LINE_PRICE_TEXT
    IP           ,,&KOMVD-VTEXT(17)&,,,,,,&KOMVD-KBETR(I12)&,,&KOMVD-KOEIN& ,,
    =           &KOMVD-KPEIN(I)&,,&KOMVD-KMEIN&,,&KOMVD-KWERT(I14)&
    The problem is that i want to print it in custom fields, in the element "ITEM_LINE" but the same value is not converted!  the custom field is declared like KOMVD-KBETR....
    thanks all experts

  • How to have a field automatically fill in another field when checked

    Does anyone know if there is a way to have a field automatically fill in another field with a specific dollar amount when a field is checked.
    I am doing a registration sheet for a charity event where we have to pay for each person that attends. I would like it set up so that when someone checks in the person at the registration table would just click the check box (E2) and then have it fill in the field next to it a dollar amount of $15.00 (F2) which would be owed to the place hosting the event.
    Attached is a picture of the spreadsheet: example: persons checks off E2 and the amount $15.00 would automatically fill in field F2. I would then do this for each line and have the F column total the amount owed to the place.
    I am VERY new to numbers and writing formulas so if you can be specfic with how to do the code would be greatly appreciated. THANK YOU!

    please remember to post the actual solution (equation in this case) so others that are searching for similar items see the solution, not just
    Got it, replaced 0 with '''.
    Thanks
    Jason

  • Identifying form fields automatically when word doc is imported

    Hi
    I am trying to convert a word document template to a PDF template using Adobe Live Cycle. There are 7 tables in the Word document. I saved the doc as PDF using Word. When i imported the PDF into the Live Cycle Designer, the form fields ( table rows and cells) are not being identified. All are kind of static text.
    However, when i opened the same PDF in Acrobat Pro, i was able to identify the form fields ( using Form > edit fields option).
    Is there something similar available in Live Cycle Designer. Can the LCD identify form fields automatically.
    Appreciate your help.
    Thanks and regards
    Ram

    I don't believe this functionality is built into LiveCycle Designer. However, you can start your form in Acrobat (Acroform) then import the PDF into LiveCycle. Keep in mind this is a one way process.

  • How to calculate KBETR field in SD pricing

    Hi Experts,
    I have one Alterante calculation routine to calculate KWERT field in SD pricing
    FORM FRM_KONDI_WERT_700.
    *{ INSERT LEDK900048 1
    if xworkd ne 0.
    xkwert = xworkd - komp-wavwr .
    endif.
    *} INSERT
    ENDFORM.
    My problem is, that after this calculation, I need to change KBETR field in the same condition as percetage: calculated value / net price.
    But KBETR field cannot be changed in the routine above. Is there any other choice how to do it?
    Thanks&regards,
    Jirka Faltin

    its a  perfect code.
    refer this
    IT_KONV-kbetr = abs( IT_KONV-kbetr ).
          if IT_KONV-kbetr > 0.
            IT_KONV-kbetr = ( IT_KONV-kbetr / 10 ).
          ENDIF.
          IT_REPORT-LV_SHARE2 = IT_KONV-KBETR .
    u will get kbetr in percentage.

  • How to remove a black border box that continously tabs to each field automatically till end of web page; restarts to top of page, cannot stop this box. Scroll bar cannot controlled with mouse, returns auto to top of scroll slide, never remaining at bottom

    how to remove a black border box that continously tabs to each field automatically till end of web page; restarts to top of page, cannot stop this box. Scroll bar cannot be controlled with mouse, scroll bar returns automatically to the top of scroll slide every time I move the bar to the bottom of the scale.  Also, there's a rectangular text box (with black background and white text) that is always on the desktop that emulates a typed text, HTML, or cmd function.

    cjuan1morb4ulv wrote:
    how to remove a black border box that continously tabs to each field automatically till end of web page; restarts to top of page, cannot stop this box. Scroll bar cannot be controlled with mouse, scroll bar returns automatically to the top of scroll slide every time I move the bar to the bottom of the scale.  Also, there's a rectangular text box (with black background and white text) that is always on the desktop that emulates a typed text, HTML, or cmd function.
    The first two problems (box cycling from element to element on page, scroll bar returning to top) can be caused by a stuck (or defective) Tab key on the keyboard. Such damage can be caused by a liquid spill; just one tiny droplet is enough to short a wafer switch under one key.
    The last issue (black box, white text - sounds sorta like a debugger window) I haven't seen, but could be caused by something similar.
    To check for that, try using a different keyboard. If you're using a wireless keyboard, turn it off and see if the oddities stop.

  • Dynamics AX 2012 R3: How to populate Payment Reference field automatically?

    Hi guys
    I am trying to configure AX 2012 (R3) to populate the Payment Reference field automatically when processing payments through a payment journal. I have looked for a number sequence in the AR/AP parameters but so far with no luck.
    Please advice
    André

    Unfortunately your post is off topic here, in the TechNet Site Feedback forum, because it is not Feedback about the TechNet Website or Subscription.  This is only one forum among the many that are on the TechNet Discussion Forums, and given
    your post, you likely chose the wrong forum.  This is a standard response I’ve written up in advance to help many people (thousands, really.) who post their question in this forum in error, but please don’t ignore it.  The links I share below I’ve
    collected to help you get right where you need to go with your issue.
    For technical issues with Microsoft products that you would run into as an
    end user of those products, one great source of info and help is
    http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products. Office related forums are also here:
    http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
    For Technical issues with Microsoft products that you might have as an
    IT professional (like technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
    http://social.technet.microsoft.com/forums/en-us, and search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the MSDN discussion forums at
    http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
    http://community.dynamics.com/
    If you really think your issue is related to the subscription or the TechNet Website, and I screwed up, I apologize!  Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots
    of the issue (do not include subscription information or product keys in your screenshots!), and/or links to the problem you’re seeing. 
    If you really had no idea where to post this question but you still posted it here, you still shouldn’t have because we have a forum just for you!  It’s called the Where is the forum for…? forum and it’s here:
    http://social.msdn.microsoft.com/forums/en-us/whatforum/
    Moving to off topic. 
    Thanks, Mike
    MSDN and TechNet Subscriptions Support
    Did Microsoft call you out of the blue about your computer?
    No, they didn't.

  • Can you update a web app's weighting field automatically??

    I'm having a real hard time understanding why we have the power in BC to build web apps but can't sort data the way we want through automation... I realize at this point, the only way to sort my items by date is to manipulate the weighting field. However, I’m building a user driven site with all user submitted content and it needs to be available immediately. Now, obviously results are posted online as soon as they are submitted but as of now, the only automatic way to display results that makes any sense is by a Recent Activity listing or Alphabetical. 
    Is there any way to automate updating an item's weighting field so that results can be available in order of, for example, Event Date (custom date field)?????
    HELP PLEASE - all this power sure seems like a waste if you can't manipulate your results accordingly!!

    Ok- two things--
    1.  You are missing a "(" at the beginning of your function-- you currently have:
    function($){
        var container = $(".sort-list");
        var items = $(".sort-item");
        items.sort(function(a,b){
            return new Date($(a).attr("data-event-date")) < new Date($(b).attr("data-event-date"));
        }).each(function(){
            container.prepend(this);
    })(jQuery);
    But you need a beginning parenthesis before the "function":
    (function($){
        var container = $(".sort-list");
        var items = $(".sort-item");
        items.sort(function(a,b){
            return new Date($(a).attr("data-event-date")) < new Date($(b).attr("data-event-date"));
        }).each(function(){
            container.prepend(this);
    })(jQuery);
    2.  Move the whole script in your page to after the "ul.sort-list" element.  Right now you have the javascript in the page before the UL element that holds your web app items, so the browser will read that javascript first and since it hasn't read the web app item list inside the UL element then it won't work, so move it to after the closing </ul> of your web app list.
    You should be all set if you fix those two issues. Good luck!

  • Is there a way to exchange fields automatically?

    Hi,
    I have a load of reports which currently get their information via a sql query in the command file. The Fields in the report are then adressed under: command.fieldname.
    Due to some changes in the organisation it is necessary to change the source from the command to a view. So far so good. I added the view in the Database Expert and now have both in the field explorer.
    My actual way to update the reports is to look up one field after the other, delete it from the report and add the corresponding one from the view and then reformat the field. This is not quite as efficient as I want it to be.
    So as the fields are named identically and in fact the only difference is that the new fields are adressed under viewname.fieldname in comparison to command.fieldname, is there a way to automatically change all fields in the report from command.fieldname to viewname.fieldname? Same question for all the formulas that refer to command.bla and have to be changed to viewname.bla.
    Any help is appreciated as some of the records are really huge -> talking bout 500+ fields in a single report I have to change manually.
    Regards
    Stefan

    Try changing the data source.   Database, set datasource location, select new, select your view, click on the datasoure at the top ( the command) click on the view in the bottom area click on update (near the middle on the right) CR should match them up for you....  It will let you know if it does not get an exact match, and may prompt you to choose a field.

  • Opening HyperLinked Files contained in a database field Automatically alongwith Crystal Report

    Hi
    I am using Crystal Report 2008. We have a database table which has Bill of Material for all the parts, the table also has additional field which contains LINK to PDF File (i.e. c:\PDFFiles\XPart.PDF) which is containing Part specifications. Now i am able to create a Hyperlink from this field and user is able to click on the field to open the file.
    Is there a way, that all the associated linked files open automatically whenever a user previews this report.Any help would be highly appreciated.
    Thanks
    Shekhar    

    You can achieve the desired behavior by adding a UFL (User unction library) that includes a function for triggering and passing parameters ot a different process.
    At least one of the 3rd-party UFLs listed at Crystal Reports viewer comparison, Crystal Reports scheduler comparison and other utilities ( viewer and scheduler compa… provides such a function.
    You would then be able to add Crystal formulas that result in opening linked documents as a byproduct of previewing the report.

  • Acrobat 9.3.2 printing hidden fields automatically

    We have a few clients internally running Acrobat Standard 9.0.0 and their documents are printing fine. One user upgraded to 9.3.2, and now when they try and print some of our documents, a hidden field area is automatically printing. I can't seem to find a way to turn it off. It doesn't appear in the document, or in print preview. Choosing to Examing the document and remove it removes the text, but not the spacing that the hidden area added. is there a setting to never print this? It's not something we want to have to adjust each time we open a document.

    Glad it helped; (for any nit-pickers out there I should have typed 8.2.2, sorry).
    There are others with similar issues:-
    http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=61489

  • Document Library set "Title" field automatically equal to "Name" field

    Hi,
    Is it possible to make Title field in document library automatically fill up with File name field? 

    Three ways you could do this really.
    #1 - Write a custom event receiver using .NET
    #2 - Write Javascript on the list form to update the field
    #3 - Create a custom workflow that kicks in when new items are added or modified and that would set the field
    Nikolas Charlebois-Laprade Microsoft Certified Professional Software Engineer and Senior SharePoint Advisor http://nikcharlebois.com

  • How do I have a yes/no field automatically update by a certain age?

    So I have a table for inputting volunteers information and I want to know at a glance which ones are teenagers at a glance.  I have a field for DOB and a Bool field labelled "Teen" which is true if they are over the age of say 14. 
    What I want is a way for the Boolean field to automatically update by calculating their age entered in the DOB.  Can anyone help me out and tell me where and how to set this in the table design?

    I think what I have to do is to select two columns in Table 2, say 31 rows deep, thus giving me a set size for the Graph. It seems then, that if I fill up each row it adds the information into the Graph. This will work fine for a monthly sheet, but obviously gets a wee bit unwieldily for a much longer spread of time. The system has obviously always been there, but I didn't realise the reason behind the automation of updating the Graph.
    As the meerkat says, "Simples!"
    Cheers
    altv

  • How do I make my text field automatically upper case?

    How do I make my text field in a form automatically upper case?

    Use the following as the text field's custom Keystroke JavaScript (choose a Format type of Custom):
    // Keystroke script for text field
    event.change = event.change.toUpperCase();

  • How to read XKOMV-EDATU, XKOMV-KBETR fields inside java

    How do get the 
    XKOMV-EDATU date and pass it to ItemUserExit.java for database read and filtering.
    a. The code in ItemUserExit has to filter ZCPI2-ZSPMON for this date XKOMV-EDATU, the delivery date.
    This does not work. prItem.getPricingTimestamp returns the current date always, NOT delivery date.
    What is the method call that will grab this date.?
    b. How do I have to pass this XKOMV-EDATU date to ItemUserExit.java for database read / filtering.
    c. The field XKOMV-KBETR has to be read based on the KSCHL = ‘ZCP1’ and / or KSCHL =’PR00’.
    These are abap structures. But I am not sure how to read this value inside java.
    How would I extract the structure XKOMV-KBETR(the rate) for KBETR(conditionType)=’PR00’ .
    Please note that I get an error mandatory condition PR00 is missing. (see attached error message ).
    d. “CPIW_A” set up in ItemUserExit.java :: itemUserExitAccess.addItemAttributeBinding("CPIW_A", ZVALUE_CPIW_A );
    is NOT available at PricingUserExits.java with the code:
    prItem.getItemAttributeBinding("CPIW_A") ,
    though they are registered in the method
    “determineRelevantAttributesForValueFormula” as per the help html pages.
    I had attached the code.
    Can you scan thru the code and give feedback.
    Can I call you in the morning.
    Thanks.
    TK
    PS:
    I get an error “PR00” mandatory condition is missing from the log file.
    ======
    OP="ChangeDocument" ID="34800003" STATUS="200" />objectIds[1]=07F9101FD1D0AD4686B2411E3EFB2DF1&messageTypes[1]=E&messages[1]=Pricing error: Mandatory condition PR00 is missing&areas[1]=SPE&numbers[1]=801&args1[1]=PR00&args2[1]=&args3[1]=&args4[1]=Nov 11, 2005 12:41:37... ...p.sxe.socket.server.rfc.RFCConnection JCO.ServerThread-3 Info: response time of command C
    However, I get the response header as:
    availableItemConditionTypeNames[1]=PR00&availableItemConditionTypeNames[2]=VA00&availableItemConditionTypeNames[3]=ZA00&availableItemConditionTypeNames[4]=ZOUT&availableItemConditionTypeNames[5]=ZCRT&availableItemConditionTypeNames[6]=K004&availableItemConditionTypeNames[7]=RA01&availableItemConditionTypeNames[8]=RB00&availableItemConditionTypeNames[9]=ZB00&availableH
    CODE:
    ItemUserExit.java snippet:
              qrypair2[0]  = new sys_query_pair("ZCPI", <b>"200501"</b>, sys_query_pair.GREATER); //
              projection = new String[] { "ZCPI" } ;
              sorting = new String[] { "ZCPI" } ;           res resultSet = database.db_read_first_row("ZCPI2", qrypair2, projection, sorting);
    I need to pass the XKOMV-EDATU date field in the above bolded date field.  I think this field is available thru the API for IPricingItemUserExit  inside the overwriteConditionValue method's parameter .
    METHOD
    overwriteConditionValue:
         public BigDecimal overwriteConditionValue(IPricingItemUserExit      prItem,
                                                             ILastPrice                lastPrice,
                                                             IPricingConditionUserExit prCondition,
                                                             int                       valueFormNo) {
              String sold2party = "", strCPIW_A = "", strCPIW_B = "";
              BigDecimal condValue = prCondition.getConditionValue().getValue();
              BigDecimal netValue  = prItem.getNetValue().getValue();
              String prod = (prItem.getProduct()!=null)? prItem.getProduct().toString(): "NULL";
              SAPTimestamp  priceTstamp = prCondition.getConditionFindingTimestamp(); //prItem.getDefaultConditionAccessTimestamp();  //getPricingTimestamp();
              String strTstamp = priceTstamp.formatYYYYMMDD();
              //KOMP-EDATU ??
              logInfo("valueFormNo: " + valueFormNo +  " Condition Table type:"  + prCondition.getConditionTypeName() +
                         ", condVal:" + condValue + ", netValue:" + netValue + ", KOMP-EDATU:" + strTstamp );
              switch (valueFormNo) {
                   case 601:
                             try{
                               sold2party = prItem.getHeaderAttributeBinding("SOLD_TO_PARTY").getValue().getValue();
                               IAttributeBinding iamCPIW_B  = prItem.getItemAttributeBinding("CPIW_B");
                               IAttributeBinding iamCPIW_A  = prItem.getItemAttributeBinding("CPIW_A");
                               if( iamCPIW_A !=null) strCPIW_A = iamCPIW_A.getValue().getValue();
                               if( iamCPIW_B !=null) strCPIW_B = iamCPIW_B.getValue().getValue();
                             }catch(Exception e) {
                                  logInfo("EXCEPTION @ GetAttributeBinding exception : " + e.getMessage());
                             logInfo("sold2party: " + sold2party + " strCPIW_A, strCPIW_B: " + strCPIW_A + ", " + strCPIW_B);
                             String CPIW_A = null, CPIW_B = null, BASE_PRICE = null;
                             logInfo("overwriteConditionValue " +
                                   "_CPIW_A: " + _CPIW_A + ", _CPIW_B: " + _CPIW_B + ", _BASE_PRICE: " + _BASE_PRICE );
                             double l_cpiw_a, l_cpiw_b, l_base;
                             if( _CPIW_A == null || _CPIW_B == null || _BASE_PRICE == null) {
                                  logInfo("overwriteConditionValue *tk* static _CPIW_A.... NULL. returning 999999L" );
                                  return BigDecimal.valueOf( 0L );
                             }else{
                                  l_cpiw_a = Double.valueOf(_CPIW_A).doubleValue();
                                  l_cpiw_b = Double.valueOf(_CPIW_B).doubleValue();
                                  l_base   = Double.valueOf(_BASE_PRICE).doubleValue();
                                  logInfo("overwriteConditionValue *tk* ???? using STATIC Class Variables" );
                             logInfo("overwriteConditionValue " +
                                   "cpiw_a: " + l_cpiw_a + ", l_cpiw_b: " + l_cpiw_b + ", l_base: " + l_base );
                             double fraction = (l_cpiw_a - l_cpiw_b)/l_cpiw_b;
                             logInfo("overwriteConditionValue " +
                                       "*tk* double fraction: " + fraction );                                               
                             double result = l_base * fraction;
                             logInfo("overwriteConditionValue " +
                                       "*tk* double calculated Result: " + result );                       
                             BigDecimal retValue = BigDecimal.valueOf (Math.round(result));
                             condValue = retValue;
                             try{
                                  prCondition.setConditionRate(retValue , "USD");     
                             }catch(Exception convEx){
                                  logInfo("overwriteConditionValue " +
                                                           "*tk* converstion Rate Exception " + retValue );
                             prItem.setObjectForUserExits("XKOMV_KBETR_C", retValue);
                             logInfo("overwriteConditionValue: 601 conditionRate Return Value: " + retValue );
                             return retValue;
                   case 602:
                             /* Forecasted CPI-W value = ( ( D * ( ( A – B ) / B ) )  – ( D + C ) ) */
                        double A = Double.valueOf( PricingUserExits.ZCPI2_ZCPI ).doubleValue();
                        double B = Double.valueOf( PricingUserExits._CPIW_B ).doubleValue();
                        double C=0, D=0;
                        BigDecimal bdC = (BigDecimal)prItem.getObjectForUserExits("XKOMV_KBETR_C");
                        C = bdC.doubleValue();
                        D = C * 0.8;  // just for calculation verification.
                        // C = Double.valueOf( PricingUserExits.XKMOV_KBETR_C ).doubleValue();
                        // D = Double.valueOf( PricingUserExits.XKMOV_KBETR_D ).doubleValue();
                        logInfo("overwriteConditionValue " +
                                                           "*tk* A, B, C, D: " + A + ", " + B + ", " + C + ", " + D);
                        double res1 =  A - B ;
                               res1 =  res1 /B ;
                               res1 =  D * res1;
                        double res2 =  D + C ;
                        double CPI_W ;
                               CPI_W = res1 - res2; //– res2;
                        BigDecimal retn =  new BigDecimal(CPI_W) ;
                       logInfo("overwriteConditionValue *tk* case 602 returning - " + retn );
                        return retn; // new BigDecimal(99999L);
                   default:
                        throw new FormulaNotImplementedException(prItem, "value formula", valueFormNo);

    Java != javascript.
    You can not call java directly from javascript.
    The lifecycle:
    Request received
    Java/JSP runs produces an HTML page
    Java stops running
    Javascript runs on page when page is loaded.
    The only way to call java code again is to submit a request and get the result back in a response. Traditionally the response is a new JSP page to replace the old one.
    Using AJAX the response can be just information that you then alter the current page with.
    The first example given by skp71 will probably NOT be what you are after. The java code is executed when you load the page, NOT when you push the button which is most probably what you are after.
    AJAX is a solution, as is loading a new page.
    Cheers,
    evnafets

Maybe you are looking for

  • Problem in dealing with special-character filename

    Hi, I am facing a weird problem while dealing with a file which has a special character in its name. That character is the big-hyphen, i.e. '–' (not the normal hyphen we can type from keyboard), you would have seen this character in MS Word. My java

  • Grid in Multitrack?

    Hi everyone, I'm currently doing a project that has a lot of quick cuts and am making a ton of markers. Ideally, I'd like to have markers every 0.125 seconds (1/16th note in 120 bpm) that my audio can snap to. I see in Edit mode there is a grid in th

  • On Comcast home page, I want to see TV Listings, but Firefox will not let me see the listing, Explorer will show the TV Listing, but I do not use Explorer.

    The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept c

  • Cross Company Code Charging Against WBS

    I am trying to understand if Company Code A can charge against a WBS that was created by Company Code B.  In the scenario I am working with, we have a single controlling area with multiple company codes.  The people reside in Company Code A.  Product

  • Change photo sources on Apple TV

    Hi, I used to access my Aperture photos (from a MBP 2008) from my Apple TV 2, but I've decided to switch to iPhoto for many reasons. How can I handle this to make the Apple TV get my photos from this new source? I'm using all the latest versions of O