How do I return a numeric value to a Sapscript

Hi,
I'm calling a subroutine from a sapscript using the perform command. I'm passing a material number to the routine and it is suppose to return the unit price of the material to the sapscript form. This is not working because the field is a currency field and according to the documentation I read so far, the return values must be character strings, so how can I pass his non-character string value back to the sapscript form.
Please assist.
Thanks
Chris

In column D I will insert the formula:
=IF(OR(ISBLANK(B),ISBLANK(C)),"",IF(C>B,"",1))
In A1 I will insert:
=SUM(D)<0
or
in column D
=IF(OR(ISBLANK(B),ISBLANK(C)),"",C>B)
in A1
=COUNTIF(D,FALSE)=0
Yvan KOENIG (from FRANCE mardi 2 septembre 2008 12:11:28)

Similar Messages

  • How do u convert a numeric value to char

    hi,
    how do u convert a numeric value NUMBER(22) to a character value.... like a to_char() function?
    i've tried the CAST function it won't work.

    Hi,
    Use of CAST function will convert NUMBER to CHAR but it takes a lot of time if there are large number of recrods.
    Syntax:
    CAST(col_name AS char)
    I have tried this, it worked fine for less records.
    Are you getting any error while using cast function or while querying..
    As far as I know it won't give error in these cases (if correct syntax used) but it will take very much time (depending on the number of records) while querying.
    -Vency

  • How do I return the displaysleep value from the console?

    I know that I can do pmset -g to list all the settings, including displaysleep, but I  was hoping there was a command similar to that for the screensaver which only returns the numerical value:
    defaults -currentHost read com.apple.screensaver idleTime
    Any possibility there is a console function that will return the value only?
    Thanks.

    Hi RavensFan,
    Thank you for your help.
    I have seen this Max/Min function, and I tried it, but I get an error becuase my signal is apprently "dynamic data" and the max/min function accepts double precision data, so thats the problem I am encountering at this moment. I have modified the block diagram to convert the "dynamic data" into a double and then do the same thing you suggested, but I will test it tomorrow in the lab. 
    I am currently working around this by using a numeric input, which the user would simply watch the sensor output over the calibration period and manually input that value into the formula.
    Thanks again!
    PackersFan btw...
    Cheers

  • How to represent a -1 numeric value with text?

    Hi All,
    Question: How do I get the value of negative one (-1) in a numeric column to display as "all"?
    Background: For our lottery players, they are able to opt in to various automated alerts.  One column is an integer value representing one of five different thresholds for sending an alert: 10,000, 50,000, 100,000, 500,000, and -1.  The -1 value
    actually represents all of the other 4 values, or simply "all thresholds," meaning "send me an alert at every one of these thresholds."
    What is the best way to represent the -1 value in the cube?  A user won't understand that -1 is equivalent to "all choices".  I could change the view so that the column is a string instead of an integer, but I assume this is going to
    affect the cube in a negative way, such as unexpected sorting, etc.
    I asked our resident SSAS guy if a numeric value could be displayed (not read) as "all values" while actually storing the -1 value, but all he could suggest was changing the data type and using a case statement to replace -1 with "all values." 
    This does not seem like a fix to me.
    Is there a way to make SSAS display a negative one value as "all choices" without changing the data type of the source column itself?
    Thanks,
    Eric B 

    Normally you would have a lookup on the number and a text value for the result displayed to users in the cube.
    KeyValue
    DisplayValue
    10000
    $10,000
    50000
    $50,000
    100000
    $100,000
    500000
    $500,000
    -1
    All Values

  • How do I assign a numerical value to text cells in cartesian products?

    Hi, this is more of a two part question.
    Question 1
    I need to be able to assign numerical values (Table Value £ of set up) to text cells (Set Up).
    1. The table "Combinations" then uses the formula
    IF($A3≤Information::$B$8, MOD(INT((ROW(cell)−3)÷PRODUCT(C$1:$G$1)), B$1), "")
    to take info from the "Information" table and create all possible permutations of "Set Up"
    2."List" is the printed list of "Combinations"
    3."Output of list" concatenates the data from "List".
    Question 2
    4. How do I print out the total numerical value of the concatenated string of "Output of List" into Output (£) of List"?

    >
    When posting code or code snippets. HTML/XML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.
    Here is how the first code snippet would have appeared in code tags.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    float num1, num2, num3, result;
    num1 = Float.valueOf(jRadioButton1.getMnemonic());
    num2 = Float.valueOf(jRadioButton2.getMnemonic());
    num3 = Float.valueOf(jRadioButton3.getMnemonic());
    result = num1+num2+num3;
    jTextField1.setText(String.valueOf(result));And while I'm on the subject of retaining the indentation of the original sample, please use one of the two common conventions for indenting code blocks. E.G.
    Convention 1:
    class TheClass {
        TheClass() {
    }Convention 2:
    class TheClass
        TheClass()
    }

  • How do I allocate a numerical value to a 5 part likert scale question

    I have a survey questionaire and the 15 questions are all arranged on a 5 part 'Liket scale' of strongly agree to strongly disagree.
    How do I allocate numerical values to each question response? 
    I don't want the respondents to see the scoring.
    The reason I need to do this is some response lines are reverse scored. That is to say some lines would be scored 1 to 5 and other lines 5 to 1.
    I think this feature is available on survey monkey.
    Is it available in Acrobat X Pro or Formscentral?
    I'd appreciate your suggestions
    Kind regards
    spreid1

    Hi,
    You can assign numerical responses to the likert answers as follows:
    1. Go into the response table and select the "Table" toolbar button:
    2. Select the header for your Likert questions in the response table.
    3. Click the "Choices" button on the toolbar and select "Edit choice list..."
    4. Select the checkbox for "Assign data values to choices".
    5. Enter the choice data values in the right-hand column.

  • Given a string, how do you find the numeric value in sparse ring?

    Situation: I receive the string value of the sparse ring, and a control reference to the same type of control, but not the control that sourced the string. How can I convert the string, into the actual numeric value of the ring? For example:
    Using the "VISA Select Event Type" ring (Functions -> Instrument I/O -> VISA -> Advanced -> Event -> Select Event Type.ctl), lets say I get the string "ServiceRequest" how do I convert that into 1073684491, the actual value of the ring?
    This is a rework of an existing function that worked fine with "normal" rings.
    Thanks.

    Unfortunately this method will not work, its a generic routine that must be able to take any ring, so I can't hardwire the cases to known outputs. And, of course, searching the array of Strings[] will just find me a useless index.
    My interm solution is this:
    1) pick a small, but likely range of possible values for the ring
    2) iterate through these values, assigning each one in turn to ring
    3) read the RingText property to see if it matches the passed string
    4) if it does, then exit. If it doesn't keep looping.
    5) if no value produces a matching string, declare defeat (raise an error or produce other output that indicates a match could not be found).
    The routine only runs in the UI so I am not too concerned about the time delay this method will i
    mpose, but I would greatly appreciate a smoother solution.
    Thanks for your suggestions.

  • How do I apply a numerical value to a word in numbers

    For example - decision maker = .75

    What is the relationship between the 'word' and the numerical value?
    If it's a mathematical relationship, your use a formula.
    If it's arbitrary, then you need a table showing the value associates with each word (or in this case, phrase).
    Formula in column B of Main:
    B2: =VLOOKUP(A,Lookup :: A:B,2)
    Filled down to B10.
    To avoid the error messages in B6 to B10, Enclose the formula in an error trap as below:
    B2: =IFERROR(VLOOKUP(A,Lookup :: A:B,2),"not found")
    This will replace the error triangle with the words 'not found'.
    Regards,
    Barry

  • How do I return a true value for multiple expressions?

    Hi, I hope this question makes sense...
    In, for example, cell A1, I would like to return a True value when:
    C1>B1, and
    C2>B2, and
    C3>B3, and
    C4>B4, and
    C5>B5
    That is, if all column C values are greater than all corresponding column B values, then I would like to return a True value in cell A1.
    If one or more C values are less than or equal to their corresponding B values, e.g. B4<=C4, then I would like to return a False value in cell A1.
    Can this be achieved using a single formula in cell A1? If so what would that formula be?
    Thanks

    In column D I will insert the formula:
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",IF(C>B,"",1))
    In A1 I will insert:
    =SUM(D)<0
    or
    in column D
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",C>B)
    in A1
    =COUNTIF(D,FALSE)=0
    Yvan KOENIG (from FRANCE mardi 2 septembre 2008 12:11:28)

  • How can i return a SDO_GEOMETRY value in a Java-Stored-Function?

    For a example, Ive got a java-function witch returns a
    oracle.sdoapi.geom.Geometry like:
    public static Geometry GetQPoint(String sF_TABLE_NAME, long lFID)
    And now, Ill try to deploy this function as a PL-SQL stored-function like:
    GET_Q_POINT(
    F_TABLE_NAME IN VARCHAR2,
    FID IN NUMBER
    ) RETURN MDSYS.SDO_GEOMETRY;
    I can't deploy this above mentioned java-function with Oracle9i JDeveloper because oracle.sdoapi.geom.Geometry can not mapped in any PL-SQL data type.
    Is there any possibility to do it in a other way?
    Please help me.

    a quick example that takes as input a longitude and latitude,
    and return a point geometry in wgs 84:
    CREATE OR REPLACE FUNCTION get_geom (
         longitude IN          NUMBER,
         latitude     IN          NUMBER )
         RETURN mdsys.sdo_geometry
         DETERMINISTIC IS
         BEGIN
    RETURN mdsys.sdo_geometry (2001,8307,
              mdsys.sdo_point_type (longitude, latitude, NULL), NULL, NULL );
    END;
    other pl/sql examples:
    REM
    REM This function doesn't really do anything, but demonstrates some simple
    REM mechanisms on how to manipulate the array portion of the geometry object, and
    REM also how to write a function that returns a geometry object.
    REM
    REM The function demonstrates:
    REM 1) .EXTEND (there is also .DELETE)
    REM 2) .COUNT
    REM 3) Any function that returns an object (including the SDO_GEOMETRY object)
    REM should be declared as DETERMINSTIC (see below).
    REM
    create or replace function create_geometry return mdsys.sdo_geometry deterministic as
    temp_geom mdsys.sdo_geometry := mdsys.sdo_geometry (2002, 8307, null,
    mdsys.sdo_elem_info_array (1,2,1),
    mdsys.sdo_ordinate_array ());
    begin
    for i in 1 .. 10 loop
    temp_geom.sdo_ordinates.extend (2);
    temp_geom.sdo_ordinates(temp_geom.sdo_ordinates.count-1) := i;
    temp_geom.sdo_ordinates(temp_geom.sdo_ordinates.count) := i+1;
    end loop;
    return temp_geom;
    end;
    select create_geometry from dual;
    set linesize 80
    set pages 1000
    drop table TEST_MODIFY;
    create table TEST_MODIFY (geom mdsys.sdo_geometry);
    insert into TEST_MODIFY values
    (mdsys.sdo_geometry (2002, 8307, null,
    mdsys.sdo_elem_info_array (1,2,1),
    mdsys.sdo_ordinate_array (1,1, 2,2, 3,3, 4,4)));
    insert into TEST_MODIFY values
    (mdsys.sdo_geometry (2002, 8307, null,
    mdsys.sdo_elem_info_array (1,2,1),
    mdsys.sdo_ordinate_array (21,21, 22,22, 23,23, 24,24)));
    REM
    REM Select values before update.
    REM
    select geom from TEST_MODIFY;
    REM
    REM This PL*SQL block updates all the ordinates of a geometry by adding 10 to each x value
    REM and 20 to each y value.
    REM
    declare
    i NUMBER;
    cursor c1 is select geom, rowid
    from TEST_MODIFY;
    begin
    for r in c1 loop
    i := 1;
    while (i < r.geom.sdo_ordinates.count) loop
    r.geom.sdo_ordinates(i) := r.geom.sdo_ordinates(i) + 10;
    r.geom.sdo_ordinates(i+1) := r.geom.sdo_ordinates(i+1) + 20;
    i := i + 2;
    end loop;
    update TEST_MODIFY set geom = r.geom where rowid = r.rowid;
    end loop;
    end;
    REM
    REM Select values after update.
    REM
    select geom from TEST_MODIFY;

  • How to generate password alpha numeric value

    dear friends,
    i have written a simple pl/sql to generate a password.
    declare
    cursor c1 is select * from passwd;
    begin
    for I in c1
    loop
    if I.pfno < 3000 then
    update passwd set pwd=I.pfno where i.pfno=pfno;
    ELSe
    update passwd set pwd=lpad(round(I.pfno/20520),4,'0') where i.pfno=pfno;
    commit;
    end if;
    end loop;
    end;
    In this the pfno is 8 digit alpha numeric. I get password generated when it is only numeric but how could i get if pfno is like 04MAS155.
    Kindly help as i have to generate the same as early as possible. I have already been given with procedure to generate random password by our guys but still as i had already generated password to some employees in my concern based on querries like above i request your help to generate for alpha numeric 8 digit number.

    -- get a random string
        FUNCTION string (opt char, len NUMBER)
              /* "opt" specifies that the returned string may contain:
                 'u','U'  :  upper case alpha characters only
                 'l','L'  :  lower case alpha characters only
                 'a','A'  :  alpha characters only (mixed case)
                 'x','X'  :  any alpha-numeric characters (upper)
                 'p','P'  :  any printable characters
            RETURN VARCHAR2;  -- string of <len> characters (max 60)
        PRAGMA restrict_references (string, WNDS);

  • How do I assign a numeric value to an alpha character within a form and still run a total?

    I am trying to build an attendance sheet where P=Present, A=Absent and so on.  I've created the summary field correctly however the individual fields will only take numeric characters.  I would like for the user to be able to enter P, the P stay there visually but have a "real value" of 1 and then have a numerical total at the end.  In other words, P=1, A=0, etc...
    Thanks in advance for your help!
    Lucy

    Hi Lucy
    Create a text field called "Total" and make the following its custom calculation script:
         var presentDays = [];
         for (var i=0; i<this.numFields; i++) {
             var f= this.getField(this.getNthFieldName(i));
             if (f.value=="P" || f.value=="p")
             presentDays.push(1);
         var p = presentDays.length;
         this.getField("Total").value = p;
    The above will search through your form and find all fields with "P" or "p" in them, in which case it adds 1 to the total and displays it in the "Total" field.
    I hope this helps.
    Michael

  • How do I get a numerical value for the number of tick boxes or "true / false" in a column?

    Hi,
    Any help for my very simple brain appreciated...
    All I want to do is add in a formula for adding up the ticks in column B i.e. B2 - B46 so the answer of ticks is in B47!?
    And what's doing my head in is I can't even copy and paste a section to show on here!!
    Thanking anyone that can help.

    dominic.birch wrote:
    Hi,
    I just can't do it - it's doing my head in!!
    I'm adding the footer as suggested but the =COUNTIF(B, TRUE) isn't working; it just shows as I've typed it i.e. doesn't add up the ticks??
    D
    It would appear that you are typing it in as text, not creating a formula.  On the iPad, you don't type an "=" nor do you type the function name. You press the "=" button which then lets you start a formula. You choose the function by pressing the "functions" button then choosing it from the list. The function shows up in the editting bar with words in colored ovals for the parameters. You click on the various parameters in the formula to edit them. And you use the mathematical operators and click on cells or choose formulas to create mathematical operations.

  • If..then formula requiring numeric values

    Post Author: scd07
    CA Forum: Formula
    I have the need to create a formula that will analyze one field in order to determine the value of another field.  Below is a formula that follows the correct logic, but as it is a Boolean formula, it returns a  True/False answer, instead of the correct (numeric) data.  I do not know how to rephrase the formula that will return the numeric value.
    if {TLORDER.BILL_NUMBER} = previous ({TLORDER.BILL_NUMBER}) then {TLORDER.TOTAL_CHARGES} = 0 else {TLORDER.TOTAL_CHARGES} = {TLORDER.TOTAL_CHARGES}
    I appreciate any help!  Thank you!

    Post Author: scd07
    CA Forum: Formula
    Ok, this formula also works well, and I can now go in and create a Running total.  But again, I barely know what I am doing!  Here is what I put in the formula:
    Whileprintingrecords;Currencyvar Amount;
    if {LEGSUM.LS_TRIP_NUMBER}={LEGSUM.LS_TRIP_NUMBER} then Amount := Amount + {@Total Charges}
    This is providing a running total of the Last entry for each group.  It is not totaling All the records within the group.  I certainly appreciate your help with this.  I am actually a network person being impressed into reporting duty, and I am definitely experiencing "Trial by fire".  Thanks!
    Sara

  • Query only non numeric values in a column

    How to query only non numeric values in a cloumn.
    For example:
    Table1 has a column1(col1)
    Values:
    Row Value
    1 27376
    2 47D99
    3 83039
    4 DKFI*
    5 3J6
    Query should retrieve only rows(2,4,5).
    Thanks! for help
    Murali

    Version 2(PL/SQL) above is not clear enough, It can be tuned to the following:
    -- Create a function
    Create or replace function IsVARCHAR(pCol VARCHAR2) return VARCHAR2
    AS
    vNumber NUMBER := 0;
    begin
      vNumber := to_number(pCol);
      RETURN NULL;
    Exception
      When Others Then
        RETURN pCol;
    End;
    -- To See VARCHAR values (alpha-numeric) only!
    SELECT col1 FROM tab1
    WHERE IsVARCHAR(col1) IS NOT NULL;
    -- To See NUMBER values only!
    SELECT col1 FROM tab1
    WHERE IsVARCHAR(col1) IS NULL;Versatility here with PL/SQL, but I personally like SQL versions.
    Thx,
    SriDHAR

Maybe you are looking for