Sapscript - Using numeric value in condition

Within the sapscript I need to code it like this
IF &KOMVD-KAWRT& = '0'
Where KAWRT is CURR     15
What is the correct syntax for this?

Hi Megan,
Use the below syntax:
IF &KOMVD-KAWRT& = '                0.00'
Regards,
SB.

Similar Messages

  • Logical Comparisons Using Numerical Values

    Hello:
    I am trying to create an if statement that tests when two variables equal zero. My problem is that I'm trying to use a logical & both variables are numeric, not boolean. Is there another way to do this? My code is below:
    if (released.getX() = 0) & (released.getY() = 0)
    Thanks!

    More precicely with && if the first expression is not true then the second expresion is not evaluated, however if the first expresion is true then the second part must be evaluated to determine if it is true too. Therefore if you have two conditions to check for and you expect one to be false more often then not, then by placing it first in the expresion it could help to reduce overall execution time.
    Secondly you may not always want to use &&. For instance if the expresions on each side of the & invoke a method that does some work before returning a true or false and your code relys on the added work that the function(s) perform then using the && could result in unexpected results.

  • Numeric value in order by

    please highlight me the significance of numeric value in order by clause.
    or can we use numeric values in order by clause?

    Obviously if you have a union/union all, you have to specify the column_numberAre you sure ?
    SQL> select 'Oracle' col1 from dual
      2  union
      3  select 'DB2' col2 from dual
      4  order by col1;
    COL1
    DB2
    OracleNicolas.

  • Can you use the value from a numeric indicator in a numeric control?

    Hi!
         I have to develop a code where I have to find the maximum value of a waveform and draw a line at 50% of the value. So I chose to find the amplitude of say 10 cycles of waveforms and found the maximum value out of the amplitudes. 
    But my real problem is, I have to use the maximum amplitude value that I get from the max. array VI and put it back in program to calculate the 50% value. 
    So is it possible to use the value from a numeric indicator and put it in a numeric control? Like in MATLAB or C, you give the variable a name and use it later to do any computations. Is it possible to do something similar in LabVIEW? 
    Solved!
    Go to Solution.

    Hi!
         Thank you very much for taking some time out. I have been trying to do this since 2 months and I am stuck right where I am.
    The situation is, I have to calculate the amplitude of the irregular waveform for a few trials and then find the maximum amplitude out of the trials and display a line at whatever % of amplitude the user chooses. I tried using property nodes but I am getting Error 1055 for some unknown reason. Then I decided to draw the line using DC offset but it turns out it calculates the amplitude each time and so the line keeps dancing everytime. Now my challenge is to have the amplitude calculated for say, 20 loops and then calculate the max from that. I ran out of ideas so I am posting here. I am using LabVIEW version 8, and I'll upload a few of my attempts. I hope I am not troubling you'll much.
    Attachments:
    amplitude display.vi ‏217 KB
    amplitude display 1.vi ‏148 KB
    Using property node.vi ‏56 KB

  • 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)

  • How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values?

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

  • Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API. This is a serious error and contributes to an overall degradation of system stability and reliability. This notice is a courtesy

    Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API. This is a serious error and contributes to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

    This console log is a note to the developers of whatever application you are using. You can safely ignore it.

  • I need to create a image using some numeric values and i want to display values in image,

    I need to create a image using some numeric values and i want to display values in image, Numeric values be enterd by text file, excel file or user input by dialog box,
    this is the sample if image.
    http://s17.postimg.org/5xvtzbztn/5_01_03_I.png
    128 x 16 Pixels , Back ground Black, Numbers in Red, Should be same as above picture.
    Because i have hundreds of images to create like this.
    If any one can make a script for this it is very good.
    Sorry about my English.
    Thank you.

    Have you checked out data driven graphics?
    https://helpx.adobe.com/photoshop/using/creating-data-driven-graphics.html

  • How can I hold a value of voltage, which can be used as a numeric value

    Hi, I'm trying to read in a voltage value and then hold it when i press a button. This value should then be able to be used as a numerical value, e.g. I can divide it or add constants etc. I realise this is probably a totaly remedial question, but it's for my dissertation at uni and my tutor thought it would be a great idea to program part of it in Labview, which NOONE in the uni knows how to use, and we've never been taught it.
    Any help would be awesome,
    Grant

    Thanks JoeLabView, but maybe I should start by describing the purpose of the program.
    I'm reading the voltage going into a DC motor (max 200V) so i'm using a 10:1 voltage divider to reduce the voltage seen by my labjack since it can only measure up to 20V. I read the voltage seen at the voltage divider, e.g.  20V at 200V and then, in labview, multiply this by a multiplying factor to get it back to 'actual' voltage. e.g. 20*10 = 200. But since resistors aren't made perfect, (especially not 5A ones) my divider actually works out at something like 9.8756:1. Therefore I have to set the voltage to the motor to something known (e.g. 100V), then tell labview that value, it reads the voltage input to it through the labjack, and MultFactor = UserInputVoltage/LabjackVoltage.
    Using the multiplying factor, I can then display the 'Actual' voltage over the motor.
    The motor is also being controlled by LabView, but this is simply using a slider, attached to an analogue_out VI for the LabJack, so shouldn't be too consequential.
    Now to answer your questions.
    1) The LabJack is a USB device which 'instantaneously' reads the voltage, so as the voltage input to it changes, so does the value output by its VI in LabView. It changes in real time.
    2) I will need to continue to use the input from the LabJack once I have generated the mulitplying factor, multiplying the LabJack input by the multiplying factor in real time, so I can plot a graph of the change in voltage with 'real' values.
    3) Do you mean what does my program do just now when i release the button, or what i want it to do?
    4) I don't know how to structure the program, but hopefully what i've said above should help.
    5) The interface will include;
    Numeric Control to set the 'actual' input voltage
    A button to tell the program when to generate the mulitplying factor
    A waveform chart displaying the 'actual' voltage (0-200V)
    A slider that I can use to control the motor. (this part i can do myself, it's a reference for a PWM circuit connected to a buck converter)
    Thanks again man, hope this is what you need.

  • Using substring to pick the numeric value from a string failing

    Hi,
    I have a string like fffd_1234.com from this I need to pick the numeric value from which is in between the _ and . , for that I have wriiten the expression as
    Reverse(SUBSTRING( REVERSE( "fgfg_asdd.com" ),
    FINDSTRING(Reverse( "fgfg_asdd.com" ), ".", 1 )+1 ,findstring(
    Reverse( "fgfg_asdd.com" ),"_",1 )-FINDSTRING(Reverse("fgfg_asdd.com"
    ), ".", 1 )-1))
    This is throwing me the error or its giving me with the result with _123.

    Why all the "reverse" calls?  Do you expect underscores or periods to occur more than once in the file name?
    This should work:
    SUBSTRING("fffd_1234.com", FINDSTRING("fffd_1234.com", "_", 1) + 1, FINDSTRING("fffd_1234.com", ".", 1) - FINDSTRING("fffd_1234.com", "_", 1) - 1)
    Talk to me now on

  • Popup Key LOV, NULL and "Invalid numeric value undefined for column"

    Hello.
    I've created an item based on database column of NUMBER type and set the following properties:
    Display As = Popup Key LOV (Displays description, returns key value)
    List of values definition=select 'display_value' d, 1 r from dual
    Null display value=%
    Null return value=
    Display Null=Yes
    When I select "%" in the LOV and try to apply changes to database I get error:
    ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
    Error Unable to process row of table TTT.
    If I set Display As = Select List, all works fine. But I need Popup Key LOV.
    Could anybody help me?
    I use Application Express 2.2.1.00.04

    Hi all,
    I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
    Here's what I did:
    1. Create an Application Process.
    Name: RemoveNulls
    Sequence: 0
    Point: On Submit: After Page Submission - Before Computations and Validations
    Process Text:
    BEGIN
        FOR rItem IN
          ( SELECT ITEM_NAME
              FROM APEX_APPLICATION_PAGE_ITEMS
             WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
               AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
               AND LOV_DISPLAY_NULL = 'Yes'
               AND LOV_DEFINITION   IS NOT NULL
               AND LOV_NULL_VALUE   IS NULL
        LOOP
            IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
            THEN
                Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
            END IF;
        END LOOP;
    END;Error Message: #SQLERRM#Condition: None
    2. You should be able to submit a Popup Key LOV with a NULL value now.
    Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
    Georger

  • Creating a sound from an array of numeric values and playing it on speakers

    How do I create take a sound I have stored as an array (or could be an arraylist if needed) of numeric values (at the moment as doubles) whiten my program and output it to speakers? I am using blueJ.
    for example (0, 0.1, 0.4, 0.8, 0.9, 1, 0.8, 0.6, 0.3, 0.1, etc...) would be a very high frequency sin wave.
    Edited by: alan2here on Feb 6, 2008 11:28 AM

    I stumbled upon this thread with a question somewhat related:
    I've recorded a wave file from microphone. But what I would like is an array of numbers in the same way alan said. I'm also working on my own project involving signal processing (i'm trying to do speech recognition).
    I can't really find a nice way of getting that array of numbers. I've tried to find out how wave file stores it's data, and directly read from the File object, but i figured there should be an easier way...
    I used this code to read the sound:
    *     SimpleAudioRecorder.java
    *     This file is part of jsresources.org
    * Copyright (c) 1999 - 2003 by Matthias Pfisterer
    * All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * - Redistributions of source code must retain the above copyright notice,
    *   this list of conditions and the following disclaimer.
    * - Redistributions in binary form must reproduce the above copyright
    *   notice, this list of conditions and the following disclaimer in the
    *   documentation and/or other materials provided with the distribution.
    |<---            this code is formatted to fit into 80 columns             --->|
    import java.io.IOException;
    import java.io.File;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.TargetDataLine;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.AudioFileFormat;
    public class SimpleAudioRecorder
    extends Thread
         private TargetDataLine          m_line;
         private AudioFileFormat.Type     m_targetType;
         private AudioInputStream     m_audioInputStream;
         private File               m_outputFile;
         public SimpleAudioRecorder(TargetDataLine line,
                             AudioFileFormat.Type targetType,
                             File file)
              m_line = line;
              m_audioInputStream = new AudioInputStream(line);
              m_targetType = targetType;
              m_outputFile = file;
         /** Starts the recording.
             To accomplish this, (i) the line is started and (ii) the
             thread is started.
         public void start()
              /* Starting the TargetDataLine. It tells the line that
                 we now want to read data from it. If this method
                 isn't called, we won't
                 be able to read data from the line at all.
              m_line.start();
              /* Starting the thread. This call results in the
                 method 'run()' (see below) being called. There, the
                 data is actually read from the line.
              super.start();
         /** Stops the recording.
             Note that stopping the thread explicitely is not necessary. Once
             no more data can be read from the TargetDataLine, no more data
             be read from our AudioInputStream. And if there is no more
             data from the AudioInputStream, the method 'AudioSystem.write()'
             (called in 'run()' returns. Returning from 'AudioSystem.write()'
             is followed by returning from 'run()', and thus, the thread
             is terminated automatically.
             It's not a good idea to call this method just 'stop()'
             because stop() is a (deprecated) method of the class 'Thread'.
             And we don't want to override this method.
         public void stopRecording()
              m_line.stop();
              m_line.close();
         /** Main working method.
             You may be surprised that here, just 'AudioSystem.write()' is
             called. But internally, it works like this: AudioSystem.write()
             contains a loop that is trying to read from the passed
             AudioInputStream. Since we have a special AudioInputStream
             that gets its data from a TargetDataLine, reading from the
             AudioInputStream leads to reading from the TargetDataLine. The
             data read this way is then written to the passed File. Before
             writing of audio data starts, a header is written according
             to the desired audio file type. Reading continues untill no
             more data can be read from the AudioInputStream. In our case,
             this happens if no more data can be read from the TargetDataLine.
             This, in turn, happens if the TargetDataLine is stopped or closed
             (which implies stopping). (Also see the comment above.) Then,
             the file is closed and 'AudioSystem.write()' returns.
         public void run()
                   try
                        AudioSystem.write(
                             m_audioInputStream,
                             m_targetType,
                             m_outputFile);
                   catch (IOException e)
                        e.printStackTrace();
         public static void main(String[] args)
              if (args.length != 1 || args[0].equals("-h"))
                   printUsageAndExit();
              /* We have made shure that there is only one command line
                 argument. This is taken as the filename of the soundfile
                 to store to.
              String     strFilename = args[0];
              File     outputFile = new File(strFilename);
              /* For simplicity, the audio data format used for recording
                 is hardcoded here. We use PCM 44.1 kHz, 16 bit signed,
                 stereo.
              AudioFormat     audioFormat = new AudioFormat(
                   AudioFormat.Encoding.PCM_SIGNED,
                   44100.0F, 16, 2, 4, 44100.0F, false);
              /* Now, we are trying to get a TargetDataLine. The
                 TargetDataLine is used later to read audio data from it.
                 If requesting the line was successful, we are opening
                 it (important!).
              DataLine.Info     info = new DataLine.Info(TargetDataLine.class, audioFormat);
              TargetDataLine     targetDataLine = null;
              try
                   targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
                   targetDataLine.open(audioFormat);
              catch (LineUnavailableException e)
                   out("unable to get a recording line");
                   e.printStackTrace();
                   System.exit(1);
              /* Again for simplicity, we've hardcoded the audio file
                 type, too.
              AudioFileFormat.Type     targetType = AudioFileFormat.Type.WAVE;
              /* Now, we are creating an SimpleAudioRecorder object. It
                 contains the logic of starting and stopping the
                 recording, reading audio data from the TargetDataLine
                 and writing the data to a file.
              SimpleAudioRecorder     recorder = new SimpleAudioRecorder(
                   targetDataLine,
                   targetType,
                   outputFile);
              /* We are waiting for the user to press ENTER to
                 start the recording. (You might find it
                 inconvenient if recording starts immediately.)
              out("Press ENTER to start the recording.");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually started.
              recorder.start();
              out("Recording...");
              /* And now, we are waiting again for the user to press ENTER,
                 this time to signal that the recording should be stopped.
              out("Press ENTER to stop the recording.");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually stopped.
              recorder.stopRecording();
              out("Recording stopped.");
         private static void printUsageAndExit()
              out("SimpleAudioRecorder: usage:");
              out("\tjava SimpleAudioRecorder -h");
              out("\tjava SimpleAudioRecorder <audiofile>");
              System.exit(0);
         private static void out(String strMessage)
              System.out.println(strMessage);
    }Daniel

  • Type conversion from numeric value to time format

    hi guys,
    i hvae column called (Time in seconds).i need to convert the numeric value of one column into time format HH:MM:SS. for example 3012 =00:50:12.
    how can i proceed the same in the front end.
    Thanks & Regards,
    Nandu

    Hi..
    here is the code.. (assuming 10000 in the following code is your seconds, replace that with your value...)
    cast(TRUNCATE(10000/3600,0) as varchar(2)) || ' : ' || cast(TRUNCATE(60*((10000/3600)-(TRUNCATE(10000/3600,0))),0) as varchar(2)) || ' : ' ||cast(60*((60*((10000/3600)-(TRUNCATE(10000/3600,0))))-(TRUNCATE(60*((10000/3600)-(TRUNCATE(10000/3600,0))),0))) as varchar(2)) You can also use floor instead of truncate...
    Above will give only h:m:s format if hh (or) mm (or) ss are between 0 and 9. So, you may need to add case when condition before each concatenation: if hh is between 0 and 9 then need to concatenate with 0 else the same code...
    Thanks...

  • Get numerical values from 2D array of string

    Hello! 
    I start by saying that I have a base knowledge of LabView. I'm using LabView 2011. I'm doing some communications test via Can-Bus protocol. As you can see in pictures of the block diagram and of the front panel that I've attached I'm using "Transmit Receive same Port" LabView example. It works very good but I would need to insert the 8 data bytes that I receive from the server in 8 different numerical variables so that I could use them to make some operations. How can I get numerical values from the 2D array of string that I attached? 
    Every example that you can provide is important! 
    Thank you very much! 
    Attachments:
    1.jpg ‏69 KB
    2.jpg ‏149 KB

    Hi martiflix,
    ehm: to unbundle data from a cluster I would use the function Unbundle(ByName)…
    When you are new to LabVIEW you should take all the FREE online resources offered by NI on their website!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • BEx report hangs- selecting Alpha numeric values

    I am working on the existing customer report
    customer is the selection parameter for my report.
    Issue is Customer has numerical and alpha numerical values.
    If i give parameter rangs of value is numerical
    01 - 500 query works fine
    01-50cust1
    50 cust1 - 195 cust2
    query hangs.
    Is their any way we can improve the query performance .
    for searching alphanumerica values.
    I have a workbook is built based on the query.
    morethan 6 queries attached in the sheet 1....sheet2
    each sheet has it is own query with values.
    when I refresh and execute the workbook with the customer alphanumerica values it hangs.
    Query is built based on the multiprovider.
    Please help me onthis

    Hello,
    Try exporting in the 'fully formated grids and text'. It shouldl give you the 'member alias' used in the report.
    Looks like if you export in the 'querry ready grids and text' it will show the 'member name' as in database although the report may have used the 'member alias'.
    Regards

Maybe you are looking for

  • Flash Player installed but not working....

    had a virus 3 days ago which was resolved with assistance from Microsoft.  Now Adobe Flash does not work (when I go to Youtube, it says I do not have the latest version.  I have unistalled, restarted, installed at least 10 times.  Sites still say I n

  • Podcast feed problem

    I have a podcast, Worship Ministry Catalyst, that used to be available for search & download via the iTunes store, I got an email saying there was a problem with the feed. I followed all the steps to fix the problem, checked to make sure my feed woul

  • Cut, Copy, and Paste doesn't work for some Project files

    We have some Project files where the Cut, Copy, and Paste function is not working.  Suspecting corruption, I tried doing a "Save for Sharing", to no avail. Is there a switch setting that we are missing? We are using Project Server v2010 with SP2.  Ou

  • Change number report for a BOM

    dear sir where can i get the list of change numbers for a BOM i.e i want to know how many change numbers exists for a BOM and the list of change numbers for that BOM thanks in advance srinivas pai

  • Problems with User names and Password

    For some reason iWeb does not want to accept my user name and password: I enter it in the programm, update the whole website (which by the way didn´t occur incrementally), and then when I try to call up the page it won´t let me in - instead I have to