Formula for Editing String Values

Post Author: jhogan
CA Forum: Formula
I am trying to figure out a formula to remove trialing zeros from a string field.
The data set that I am matching contains data like:
317
v71.09
V65.2
I need an exception report that matches this list to a list of data entered into our database that allows data entry of
317 or 317.0 or 317.00
V71.09
V65.2 or V65.20
In other word, trailing zeros are acceptable in the database, but are not listed in our list of acceptable values.
Any suggestions?

Post Author: yangster
CA Forum: Formula
just noticed on my formula if you have 2 zeros after the decimal place you'll probably want to get rid of the decimal place tooso just subtract one extra digit from the length of the stringthis shouldn't be a problem with only one zero at the end of the string since you want to do a literal match so the initial field will also have that decimal in the stringhope this helps

Similar Messages

  • Is there any native method for converting String value to Hungarian notat..

    Hello. there.
    This might be very simple question. but I'm just curious about this.
    I am wondering if Java API offer the any native method for converting uppercased string value to lowercase which obey the Hungarian notation.
    What I'm going to do is using Reflection for excuting RFC function on SAP. I was found it is very similar to JDBC Programming.
    Please refer to blow codes.
    //mTable
    JCoTable mTable = function.getTableParameterList().getTable(rtnTblNm);
        for (int i = 0; i < mTable.getNumRows(); i++) {
         mTable.setRow(i);
         HashMap tmpData = new HashMap ();
              for (int j=0; j < mTable.getNumColumns(); j++) {
                     // I want to set key String [userNo] instead of  [USER_NO] here.
              tmpData.put(mTable.getMetaData().getName(j).toLowerCase(), mTable.getString(j));
              result.add(tmpData);
    } Basically, The idea was from ibatis framework [com.ibatis.common.beans.classInfo] dropcase();
    Any idea would be very helpful for me. Thank you.
    Edited by: hosung.seo on Aug 30, 2009 10:42 PM
    Edited by: hosung.seo on Aug 30, 2009 10:50 PM

    ejp wrote:
    Hungarian notation is a representation of logical/arithmetic expressions in postfix form. Not what you're talking about.
    So your title is very confusing to the people here who know what it means, which is probably all of them, because people read threads based on their title.From now on, I will pay more attention when I post an question.
    If the titile as " +Is there any native method for converting String value to camelcase?"+ would be easier to what i'm pointing at.
    As I mentioned in above sorce code, converting [USER_NO] to [userNo] isn't relevant Hungarian notation. yes, it was ambiguous. Agree! :)
    But some answer wasn't fit to converting case or recognizing "underscore" delimiter. I was expecting toCamelCase() such as blew. Thanks.
        public static String toCamelCase(String name) {
            String lowerName = name.toLowerCase();
            String[] pieces = lowerName.split("_");
            if (pieces.length == 1) {
                return lowerName;
            StringBuffer result = new StringBuffer(pieces[0]);
            for (int i = 1; i < pieces.length; i++) {
                result.append(Character.toUpperCase(pieces.charAt(0)));
    result.append(pieces[i].substring(1));
    return result.toString();

  • I'm using TestStand/Labview to do a string value test. Is there any way to use a variable in the edit string value test?? This forces you to hard code a string to test against.

    I'm using TestStand 2.0/Labview 6i to do a string value test. Is there any way to use a string variable in the edit string value test instead of an actual string?? This forces you to hard code a string to test against.

    Hi ART,
    You can also use the LimitLoader step to load your string into to step similar to the Numeric Step type.
    There should be an example of this in the Resource Library | TestStand
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Alternative formula for condition base value in cross-application

    Hi,
    I need inputs regarding an issue as:-
    In "TAXINJ" Tax pricing procedure, for a ZXXX  excise related condition type the alternate condition base value (Alternative formula for condition base value) must be of  YXXX condition type of MM Purchase pricing Procedure.
    How to acheive Alternative formula for condition base value in cross-application area as both condition type belongs to different Application area i.e.  ZXXX belongs to TX and YXXX belongs to M.
    One way or only way is thro' routine but I do not know How it works? 
    Thanking you.
    Prashant

    routine is only the best way for u in this case
    u will have to use subtot may be 6 or 4 in MM pricing procedure
    and write a routien in Tax procedure, i n that u will have to write a code where in ur sustem will featch this value in sub total and act a a base for ur cond type in Tax proc for ue condition type.
    what is your excat requirement
    there might be other work around that can help u around
    hope this works
    or write t routines one in MM and Other in Tax proc for ur issues

  • Used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    Dear
             what is the  used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    362 is used for to pick base value to BASB condition type from MM pricing procedure
    363 is used for all sales tax {VAT (Inventory or set -off) & CST}.
    Tax Calculation on Freight - Different Scenarios
    Please  go through this  link  and  you will know  very well a bout  362 and  363  usage

  • Alternative formula for condition base value -correct  routine

    Hi ,
    We need  correct standard routine number in "Alt. formula  for condition base value " in transaction V/08 pricing control .
    Requirement As follow :
    We have one header freight condition which is header condition and group condition in V/06 condition type setting . Lets Say " ZFRIG " the value in this condition should equally approtionate to all the items in SO .
    Ex: ZFRIG = $100 in SO header
    item 10 = ZFRIG should be  $20
    item 20 = ZFRIG should be  $20
    item 30 = ZFRIG should be  $20
    item 40 = ZFRIG should be  $20
    item 50 = ZFRIG should be  $20
    Suitable standard  routine solution  will be appreciated.
    Thanks in Advance
    Sunil

    Hi ,
    Without any Routine it adds $100 to all the line iteam , so total fright discount becomes $500.
    Thanks and regards.
    Sunil

  • How to use execute immediate for character string value 300

    how to use execute immediate for character string value > 300 , the parameter for this would be passed.
    Case 1: When length = 300
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    length : 300
    PL/SQL procedure successfully completed.
    Case 2: When length > 300 ( 301)
    SQL> set serveroutput on size 2000;
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 6

    result varchar2(300);Answer shouldn't be here ? In the greater variable ?
    Nicolas.

  • Formula for calculating Quarter value in current calendar Year

    Hi All,
    I have a requirement where in i need to display values for Q1 of Current Calendar Year, Q1 of Previous Calendar Year,Variance in Value and % Variance in Value...Similarly for Q2,Q3,Q4.
    We have built the report directly from Bex Query from the SAP tab in Crystal Reports. The formula for Quarter1,Variances etc are defined in Bex Structures and i am unable to get 'em individually here rather i am getting them as a whole in a single object with the structure name. Now is there a way that i can define my own formula in Crystal Reports so that i can get the values for the constraints defined above???
    If yes please give me the syntax or an example formula so that i can work around.
    please Help,
    Thanks & regards,
    R.N

    What fields are you getting?
    or what is the data you are working with is it
    transID, date, value......
    or is it
    Q1, Year1, Value.......

  • How to write a formula for display the value by group

    Post Author: abadugu
    CA Forum: Formula
    Hi
    Could any one please help me on writing the formula for the below senario.
    I'm creating Crystal report Via using ClearQuest (IBM tool) since this tool is not supporting subreport function. I'm planning to write a formula.
    I have grouped report by request_type field (request_type field contains Validation Defect, Production Defect, Known Defect  etc..)
    right now my report output is grouped by request_type
    ex:
    Validation Defect
                         SUMMARY                                                          COMMENTS
    Production Defect
                       SUMMARY                                                          COMMENTS
    my question was
    If request_type = Production Defect  display  pm_number value field otherwise display null
    ex
    Production Defect
    PM#          SUMMARY                                                       COMMENTS
    Validation Defect
                     SUMMARY                                                       COMMENTS
    could you please help me writing a formula.
    Thanks
    Anand

    Post Author: abadugu
    CA Forum: Formula
    It worked Thank you and I appreciated your help
    Thanks

  • Can you listen for a string value to change?

    Is there any easy way to see if a string changes value? I have a public static string in one instance of a class that I wish to be notified when it changes. An object of another class will have the listener.
    Edited by: sarcasteak on Dec 8, 2009 1:40 PM

    jverd wrote:
    sarcasteak wrote:
    jverd wrote:
    sarcasteak wrote:
    In the class that has the value, I create a new ObservableValue object and in the constructor I pass it the string. Now whenever I update the value I assume I do ov.setValue(search), so then the class that wants to get this value would implement observer.. but how does it get access to the ov instance?It registers itself as an observer. Did you read up on Observer/Observable?An observer for just that one instance of the ObvservableValue?Yes.
    The problem is that I am not sure how to access the value from the secondary class.Your Observer must have an update() method. You understand that you have to implement the Observer interface, right? And you understand that to do so, you have to provide that method right? Have you looked at that method's signature? It provides you a reference to the Observable. You just cast it to whatever your class is and call the get method for the property you're interested in.
    I understand that I need to add the observer, but I am not sure how I can do that if the secondary class(object) isn't being instantiated in the same object that passes the value.I have no idea what you mean by the last half of that sentence.
    Have you tried maybe googling for java observer observable pattern? I'm sure there are plenty of examples available.Thanks, but I just ended up taking the easy way out and using an eclipse preference to pass values back and forth, not ideal since the values change so much.

  • Formula for comparing string and setting text object to visable?

    I have a report that is pulling data from a database and listing multiple records, one on each page. I am wanting to compare a value that is stored in a database field for each record and setting a text object visible based on the text.
    I'm very new to Crystal Reports and not quite sure on the type of syntax needed to perform what I'd like below and can't find much information online about it. The type of formula I want would be something like:
    if (vDetailReport.BoardAction = "Board Action w/Committee Action")
        txtBox1.Visible = True;
    else if (vDetailReport.BoardAction = "Board Action w/o Committee Action")
        txtBox2.Visible = True;
    else if (vDetailReport.BoardAction = "Committee Discussion Only")
        txtBo3.Visible = True;
    etc.
    The txtBoxes are text objects with an "X" as the string that are inside the boxes to appear as a checkbox. I'm wanting this to work for every record in the report.
    Example:
    http://img.photobucket.com/albums/v57/kaje103/boardaction.png
    Any help would be much appreciated!

    I believe that what you want to do here is place an text item consisting of an "X" at each location you want. Then select "Format Text", go to the Common Tab, and click on the button next to "Suppress". That allows you to put in a formula such as:
    {vDetailReport.BoardAction} &lt;> "Board Action w/Committee Action"
    that will suppress the X unless it's the value you want checked.

  • Help to search for a string value and return the index in the arraylist

    Hello,
    I just start java programming for the last three weeks and I cannot find a solution for this problem. I have the following List with string and integer value as shown below:
    List<Empl> list= new ArrayList<Empl>();
         list.add(new Empl(1,"Jim", "Balu",88);
         list.add(new Empl(3,"Bob", "Howards",2);
         list.add(new Empl(2,"Chris", "Hup",8);
    I have no problem of sorting this arraylist either by firstname or lastname. However, I cannot think of a way to search for a firstname or lastname and returing the whole row. I do not want to use index since I am asking user to enter the name to search. Here is my code to search for an empl based on index.
    System.out.print("Please enter index to search or (q)uit: ");
              String ans = sc.next();
              System.out.println();
              int ians = Integer(ans);
              if (ans.equalsIgnoreCase("q"))
                        choice = "n";
              else
              System.out.println("index " + list.get(ians)); //this will print out the whole row based on the index
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?
    Please advice and thank you.
    Bob.

    user11191663 wrote:
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?Another possibility is to set up an ArrayList for each thing you want to search on and then every time you add an employee, add the piece of data you want as well, viz:
    Empl e = new Empl(1,"Jim", "Balu",88);
    list.add(e);
    firstNames.add(e.firstName());As long as you always add them in the same order, the indexes will match, so you could do something like
    ians = firstNames.indexOf(nameToFind);to return the index of the name, if it's there (if not, it will return -1).
    I wouldn't recommend this as standard practise, but it should be OK for the level you're at.
    NOTE: indexOf() returns the index of the FIRST matching item. You may want to think about what you want to do if there are more than 1.
    Winston

  • Formula for finding channel value

    Hi all,
    Assumption : Dat file containing time and acceleration value. NOw there are only two channles.  Channel 1 is time . Channel 2 is Acceleration.
    Step 1: Create two more channels. channel 3 and channel 4
    Step 2:  go to analysis and search in accleration channel where its value is reached 1.xxxxxxxx
    Step 3: Where ever it has reached 1.xxxxxxxx in accleration channel from that point in channel 3 and 4, Paste all the std values. Std values are in the attached excel file.
    How do i do this?? what is the formula or script to do this?
    Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    curve linear final limits ECE-AIS.xls ‏91 KB
    Dat file.zip ‏38 KB

    Hi Brad,
    Thank you very much for working with my dat file. I posed the same question to my engineer. So many empty cells exist after copying 1587 values from excel files. but I wonder they use the same strategy for testing their dat file.
    Now I have to create a script for that. I have recored a script for that. I am sending it in attachment.
    1. After copying the values 1587 values from excel file to channel table , from the beginning, it gives report in 2nd attachment format. ( All 3 curves overlapp on each other)
    2. After copying the values 1587 values from excel file to channel table ( 3 and 4) , 5 or 6 rows before , where ever the acceleration value of 2nd channel has reached 1.xxxxxx , it gives report in 3rd attachment format. (expected report format)
    3. Now I have to create a script to generate report in the 2nd format. What are your comments on this?? Whether it is a correct metrhod of checking the correctness of a test or not?
    4. HOw will i make script more interactive(If possible)?
    Attachments:
    VBS.zip ‏4 KB
    When attached from beginning.JPG ‏179 KB
    WANTED RESULT FORMAT.JPG ‏158 KB

  • Modify MVGR4 in formula for condition value

    Hello everyone,
    I want to modify komp-mvgr4 in a formula for condition value. Changes in komp structure are not saved, any idea which field I have to modify?
    Many thanks!
    Andreas

    Sure. I have a new formula for a condition value which checks a lot of things to calculate the condition value. The result can also be zero. In all other cases than zero, I want to set an additional flag on the position to show that the condition is used. For this I choosed the material group 4. Now I have to modify the materialgroup 4 MVGR4 in the formula, if I change komp-mvgr4 is does not save the changes...
    Andreas

  • Now to define new formulas for pricing?

    can any one please tell me a business scenario where one needs to define a new pricing formula, and how can one can do that in the system?
    points will be rewarded immediately.
    thanks
    PR

    Hi,
        As our friends suggested you can create new formulas for pricing with the Transaction code VOFM.
    Process is use VOFM(Transaction code)------>in top menu you can see Formulas, select appropriate option in Formulas lke.. Condition base value, Condition Value etc.,
    Please go through detail information:-
    Formulas are represented as FORM routines. They are used in pricing and influence the determination of prices according to predefined rules. You can specify them in pricing control. The following groups of formulas exist:
    Scale base value
    The scale base value includes FORM routines which determine the scale base value according to criteria that are not defined in the standard system. You enter the scale base value in the Scale formula field. A formula for the scale base value can define, for example, that partial quantities are taken into account.
    Condition base value
    Formulas for the condition base value take into account criteria not defined in the standard system. You enter them in the Alternative formula for condition base value field in the pricing procedure. A formula for the condition base value can define, for example, that the condition determination is based on net value or volume.
    Condition value
    Formulas for determining of the condition value include routines which determine the condition value according to criteria not defined in the standard system. You enter the formulas for the determination of the condition value in the Condition formula for alternative calculation type field in the pricing procedure. A formula for the condition value can define, for example, that the system determines the best price for the customer.
    Structure of group key
    Using this menu entry, you can edit routines that determine the base value for the scale value if group conditions are used in pricing. The system then calculates the base for the scale value from more than one document item. You can enter the routines in the Group condition routine field on the screen for defining condition types. A routine for the determination of the scale valuecan define, for example, that only a particular condition type is taken into acount.
    Rounding rules
    Using this entry, you can create and edit FORM routines that carry out a particular type of rounding in the condition record during a price change. A rounding rule could round a price that was increased by 1% to the last two places behind the decimal point, for example.
    Procedure
    To define your own formulas, proceed as follows:
    1. First check whether you can use the formulas delivered with the standard system.
    2. Either overwrite an existing formula or select a group number from the number range reserved for customer modifications (600-699) and enter the corresponding description.
    3. Program the formula in the editor.
    4. Activate the formula.
    5. Enter a long text that describes the meaning of the formula in more detail.
    6. Enter an application if you want to use the formula in a particular application area only (pricing, for example).
    7. Enter the formula in the appropriate place of the control
    NOTE:- to create new routine get Access key from Basis.
    I hope it will help you to define formulas for pricing.
    Regards,
    Venkat

Maybe you are looking for

  • How can I access a wider variety of fonts that I can install on my computer? (Designer)

    I'm a junior Designer working for a Digital agency with 30+ developers. The company does not have a font library but a type kit account. I have used Google fonts a few times but the selection there is quite scarce. Type kit is great for web fonts how

  • Window that slides into view

    Hi all, I'm looking to add a little bit of Swing eye-candy. I have a little pop-up window that informs the user that their file has saved after they hit "save" or Ctr-S. I need it to be noticeable (so that they are assured that their file did indeed

  • Roles and Permissions in Oracle BI Publisher

    Hi, I am trying to do Role based access in the Oracle BI reporting.The roles will be in the OVD/OID and OBIR reports access should be controlled as per those roles. The document I refered is http://docs.oracle.com/cd/E14571_01/bi.1111/e13880/T539768T

  • Real World Camera Raw CS4 File Access

    Hi, I recently purchased a copy of Jeff Schewe's Camera Raw book for CS4. One reason among many that I purchased the book was to work through the example files in the book that are available on the website. For some reason I am having trouble downloa

  • Managed Preferences issue

    I have an unusual problem. My managed preferences are coming down perfect from my server. I am running 10.6.6 on the server. 10.6.5 on the client machines. I'm not running any machine based policies, just user based. When I set one of the preferences