Remove zeros from a channel

Hi Diadem experts!
I am trying to concote a script that basically does exactly what the ChnNovHandle function does. ChnNovHandle removes NoValue numbers from a channel, optionally with multiple channels. I want to use this function, except that I have zeros instead of NaNs.  Any suggestions? Much appreciated!
Aart-Jan
Message Edited by aartjan on 01-15-2008 05:41 PM

Hello Art-Jan!
The solution is to convert your zeros to NOVALUEs. Therefore you can use the DIAdem behavior that the result of an undefined mathematical operation NOVALUE is. If you use this line of code the zeors will be converted to NOVALUE:
Call FormulaCalc("Ch('Output') := 1 / (1 / Ch('Input'))")
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  

Similar Messages

  • Removing zeros from data stream

    Hi
    I have incoming data (plz see attached diagram which shows the 2 states of the for loop '0' and default) which is a 1-D array of 64 bit real data .....it goes through the loop which removes zeros from the array.
    As I have 3 elements in the 1-D array (call them x,y,z ), the loop works very well for all values of 'y' and 'z' .
    However when x gets towards 1 and below say 10e-3 (it never is a negative number), the loop is rounding everything to 1 and then when the value gets between 1 and 0 (10e-3 for example) the loop leaves it out altogether and I just get y,z  values saved.
    Plz help me sort this out .
    Cheers
    Baz
    Attachments:
    zeros.PNG ‏25 KB
    zeros.PNG ‏25 KB

    If you want a tolerance comparison, try the attached VI.  I rewrote it from one in vi.lib after an earlier post.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    CheckForEquality(DBL).vi ‏23 KB

  • How to eliminate or remove zeros from 1D array

    How to eliminate or remove zeros from 1D array. Let say I have 1D array having foolowing elements
    "0 0 0 0 0 4 0 0 9 0 0 1 4 0 0 0 0 0 0 0 0 10 9 0 0"
    So after removing or eliminating zeros it will become as follow
    "4 9 1 4 10 9"
    So can any body guide me how can I do that? See attached Image for details.
    Thanks 
    JK

    altenbach a écrit :
    hchiam wrote:
    Here are 2 example .vi's I made based on altenbach's removeZeroes.png in this discussion thread: 
    It seems pretty pointless to post those because no new useful information is given.
    Currently, only the input is defined in the connector pane, making them useless as subVIs.
    unlike my example using integers, an "=0", like any "equal" comparison, is potentially dangerous with DBLs.
    Reshaping a 2D array to 1D before removing zeroes is pretty pointless because a 2D output cannot be recovered. A more interesting scenario would be to remove some columns or rows (e.g. that are all zeroes) from a 2D array.
    You should also clean up the front panel, e.g. properly zero the upper left corner, make the controls/indicators nicely labeled, sized and arranged, and maybe even add scrollbars to the arrays.
    Thank you for those comments.
    Now the input and output are defined (in the updated attachments) for use as example subVI's.  I also cleaned up a few visual details, but I leave the rest for others to cater to their specific uses if they don't want to use this as a subVI (or at least as-is), such as changing the icons or changing to integers instead of doubles.
    I'm not sure about what you mean exactly with "=0" being "potentially dangerous with DBLs".  I'm guessing you had a certain case scenario in mind.  Although the subVI's seem to work fine within my larger program and situation, my situation may not generalize with regards to this point.
    I reshaped from 2D to 1D, with a 1D output, because it could be helpful for things like when later processing just needs a 1D array.  For example, in my situation I had to remove a huge spike of unnecessary "0"'s from a previous subVI that were affecting the output display of a certain histogram.  So it turned out a 1D array output was helpful, and you never know what problems come up, so I included the 2nd example.
    Hopefully if someone is looking for this, they can just use or play with an example subVI (granted that they know how to plug things in for their context).  I was hoping to post a subVI people could put to direct use.

  • Remove zeros from right side

    Hi all,
    I want to remove zeros from right side.
    like : if value is '0.055500000000E+04'.
    then the output should be '0.0555'.
    How can i get such output.
    Plz help me....

    Hi,
    the problem here is u are dealing with a datatype of format F (i.e floating point ) and the output u desire is in packed format .
    You cannot delete the zeros of such data typesas type F instead u can move them to the packed datatype and get the result.
    do one thing declare a variable of type p and move the value of type f which u have right now to the variable u have declared as type p.
    data : v_val type p decimals 4.
    v_val  =  "               <------ assign the type f to type p over here .
    hope this helps .
    regards,
    vijay.

  • SQL*Loader sqlldr removes zeros from character field

    Hello,
    I am using SQL*Loader to load an Oracle table, and am having a problem. One of the fields is defined as VARCHAR2 and contains comments entered by a user. There may be numbers or dollar amounts included in this text. When I execute the sqlldr script below, the result is that all of the zeros on the text field disappear. There is a translate function invoked for this field (bolded statement) in an attempt to remove imbedded newlines from the text. Wherever there was a zero in the original text, it ends up being removed after I run this script. Can anyone suggest why this is occurring, and how to prevent it? Can it be related to the translate function?
    Thanks for your help!
    OPTIONS (READSIZE=20971520, BINDSIZE=20971520, ROWS=20000)
    LOAD DATA
    INFILE 'R24.REGION.ERL.N1E104' "str X'5E5E220A'"
    BADFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_BADDATA.TXT'
    DISCARDFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_DISCARDDATA.TXT'
    REPLACE
    INTO TABLE TESTM8.CONV_BUT_RS_ASSGN_TXT
    FIELDS TERMINATED BY '~' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    RST_RS_EXT_TXT_OID DECIMAL EXTERNAL,
    RST_RS_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_RS_ASSGN_OID = 'NULL',
    RST_TXT_SEQ_NBR INTEGER EXTERNAL,
    RST_RS_COMM_OID DECIMAL EXTERNAL,
    RST_DIF_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_DIF_ASSGN_OID = 'NULL',
    RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#0x0A', '#'), 1, 248)"
    --------------------------------------------

    Never mind, found my mistake. In the TRANSLATE function, I had assumed that the 0x0A would be interpreted as a single hex value. Instead, it is interpreted literally as the character '0', the character 'x', the character 'A', etc. The result is that the transformed text had no '0', 'x', or 'A' characters, which is exactly what I inadvertently told it to do. I changed it to the following, which works better ;-)
    RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#'||CHR(10), '#'), 1, 250)"

  • Removing Zeros from a quantity field in ALV

    HI ,
    i have req of removing the zeros after decimal point in while displaying in ALV.
    e.g 3.000 --> '3' .
    I do not need the decimal values.
    Is there any FM or field catalogue parameter to control this.
    I am using CL_GUI_ALV_GRID for ALV display.
    Thaks.

    Hi,
      Whay you can do is...
    Copy the Quantity with out zeros into Char field and display.
    Thanks & Regards,
    Vamsi.

  • Best Practice for Removing Zeroes from Database

    Does anyone have some clever bits of code or best practices for evaluating a database and instances of zeroes? I'm working on cleaning up our rules file and am thinking the best way to start would be to write some code to look for zeroes and write them to a log file. This would at least indicate if there was even a problem with zeroes (which there may or may not be).
    Any suggestions out there / utilities / code samples?
    Thanks.

    We accomplished this using data extracts from a subset of scenarios/years/entities/accounts to ensure that all of our potential rules could be checked to ensure they were not writting zero's. This worked pretty well for our purposes, a text editor called EmEditor allows for VB macros in it pretty easily and we could write a quick macro to check for strings ending in "; 0." You may also want to review your check box of calculated in your extract and see if the zeros are a result of calculations. A rule output could work pretty well, although it would take some defining as you would have to write it out in a sub and make sure that you capture the data of all subroutines if your zero's are rule driven or actual inputs. May want to review some if you have very small insignificant values getting written, seen items that have one value 13 places to the right of the decimal that were not really signficant.
    JTF

  • Remove "zero" from word reports in nav 2015

    Hello Friends,
    I have a problem with reports made in Word nav 2015.
    When a texts is added to the salesline with no items or prices attached, the report generated in Word shows a "zero" at the end of the line for each field in the report.
    In the RDLC report builder there is a function BlankZero, how do you get this functionality in Word ?
    Hope you have some tricks to solve this issue :) 

    Hi
    you can use the function Module
    CONVERSION_EXIT_ALPHA_OUTPUT in the start routine
    to test this go to SE37  --- give the CONVERSION_EXIT_ALPHA_OUTPUT -
    >display -
    > F8
    in the input give 000000456
    and execute
    the out put will be 456
    for getting Zeros you can use
    CONVERSION_EXIT_ALPHA_INPUT--- to remove leading zeros
    Santosh
    Edited by: Santhosh Nagaraj on Oct 29, 2009 10:52 PM
    Edited by: Santhosh Nagaraj on Oct 29, 2009 10:54 PM

  • Removing Zeros from Packed with decimals value

    Declaration is as follows:  var1(3) type p decimals 1
    i am passing value from database var1 value is 10.0
    In the above case i want to remove decimal value 0 in 10.0 if var1 value is 10.50 then my required value is 10.5 only.
    var1 is not used in clasical reports.
    I would like to export the variable var1 into smartforms and print.

    try this code and adopt it according to your needs:
    DATA:
      gv_p_init         TYPE p DECIMALS 2 VALUE '10.1',
      gv_dec_separator  TYPE char1,
      gv_tmp1           TYPE char1024,
      gv_len_dec        TYPE i,
      gv_tmp2           TYPE char1024,
      gr_dref           TYPE REF TO data,
      gr_datadescr      TYPE REF TO cl_abap_datadescr.
    FIELD-SYMBOLS:
      <gv_new_p>        TYPE p.
    * determine user specific decimal separator
    PERFORM get_dec_separator
      CHANGING gv_dec_separator.
    WRITE gv_p_init TO gv_tmp1.
    SEARCH gv_tmp1 FOR gv_dec_separator.
    * create new anonymous data object -> GR_DREF of type P with same length
    * as GV_P_INIT and decimals depending on relevant decimals of GV_P_INIT
    IF sy-subrc EQ 0.
      MOVE gv_tmp1+sy-fdpos TO gv_tmp2.
      SHIFT gv_tmp2 LEFT DELETING LEADING gv_dec_separator.
      SHIFT gv_tmp2 RIGHT DELETING TRAILING space.
      SHIFT gv_tmp2 RIGHT DELETING TRAILING '0'.
      SHIFT gv_tmp2 LEFT DELETING LEADING space.
      gv_len_dec = STRLEN( gv_tmp2 ).
      gr_datadescr ?= cl_abap_datadescr=>describe_by_data( gv_p_init ).
      gr_datadescr ?= cl_abap_elemdescr=>get_p(
                                        p_decimals = gv_len_dec
                                        p_length   = gr_datadescr->length ).
      CREATE DATA gr_dref TYPE HANDLE gr_datadescr.
      ASSIGN gr_dref->* TO <gv_new_p>.
      MOVE gv_p_init TO <gv_new_p>.
      WRITE: / gv_p_init,
             / <gv_new_p>.
    ENDIF.
    FORM get_dec_separator
      CHANGING cv_sep TYPE char1.
      DATA:
        lv_one_thousand TYPE i VALUE 1000,
        lv_tmp          TYPE char20.
      WRITE lv_one_thousand TO lv_tmp.
      IF lv_tmp CA '.'.
        MOVE ',' TO cv_sep.
      ELSE. "IF lv_tmp CA '.'
        MOVE '.' TO cv_sep.
      ENDIF. "IF lv_tmp CA '.'
    ENDFORM. "FORM get_dec_separator
    reward points if helpful

  • Replace Function removing Zero from the end.

    Hi ALL,
    I'm runing following query
    select REPLACE(52000.50,'.') from dualwhich is giving me output as
    *520005*
    But I need last zero also in the output. like *5200050*
    Please help me if you have any solution.

    user2988171 wrote:
    Thanks it worked only small chane in the above query..
    select REPLACE(to_char('52000.50','999999.99'),'.') from dual Edited by: user2988171 on Jul 30, 2010 4:38 PMYou broke it again.
    If you have a string and not a number right from the beginning then there is no reason to use TO_CHAR.
    Simply run
    select REPLACE('52000.50','.') from dual;Or use the correct version from Toon if you enter a number value.
    Btw. If it is a number you could also simply muliply it by 100.
    select 52000.50 * 100 from dual;Edited by: Sven W. on Jul 30, 2010 2:58 PM

  • To Remove Zeros from a field

    Hi All,
    I have Material Number in my screen which is displayed as tree node in the tree control.In the display Material number comes with zeros i.e. if material number 1111 is there it is displayed with 000000000000001111 .It is displayed with 14 zeros and then material number.I want to nullify the 0s and just need the number to be  displayed .What should i do?
    Vijay

    There is a number of ways to do this.
    report zrich_0001.
    data: matnr type mara-matnr value '000000000000001111'.
    *  This is one way
    shift matnr left deleting leading '0'.
    * Here is another
    matnr = '000000000000001111'.
    call function 'CONVERSION_EXIT_MATN1_OUTPUT'
         exporting
              input  = matnr
         importing
              output = matnr.
    check sy-subrc = 0.
    Regards,
    Rich Heilman

  • Removing zeros from the application

    hi, we have several users that have loaded zeros instead of blanks or #missing into their webforms and have lots of zeros that are taking up needless space. i was originally thinking of locking and sending #missing where there are zeros, but have realized this will be a very long chore. we have mitigated the issue with users by changing "0" into blanks in user's excel sheets before pasting results in their sv webforms but i'm most concerned about data already in the db.
    what would be the best course of action? could we create a calc script that could replace the "0"s with #missing? that seems like an easy solution if we know the correct syntax and all that good stuff. i pose this question as i imagine others have seen this issue and probably know a really good fix.
    we are on planning and EAS 9.3 as our administrative tools. please let me know if you need additional info.
    thanks, tom

    There are two options that come to me
    1. Export the data in column format and create a rules file that converts zero values to #missing when loading. This way you have a backup in case anything goes wrong
    2. Write a calc script on a dense member where it divides by itself. Something like Local = Local/Local * Local; Any division by zero is #missing. Of course you have to pultiply by the value to get the original value back
    5/5 * 5 = 5
    0/0 * 0 = #missing
    If you do the first option, you would have cleared the database so the reload will defrag it. IF you do the second option, you will need to run a forse restructure to reep the benefits.

  • Removing zeros on the excel download

    I wanted to know how we can remove zeros from the kebtr at the excel download through ALV without converting it to a type c. for now I am converting it to type c and then validating it this way :
    if tb_main-kebet = 0.
        tb_main1-kebtr = space.
      endif.
    But because of this the formats are not ok and user insists that it should be a numberic field for him.
    Thank you very much.

    Hello Kris,
    I am able to see the data properly in XLS File.
    Use fieldcatlog no_zero = 'X'.
    Now run the transaction -> click on XL Icon ( if you do not get the data properly using navigation),now see the results here.
    you can save same xls file into local machine too.
    Thanks
    Seshu

  • How can we remove the following zeros from quantity field ?

    Hi All.
    how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
    eg:getting output zqty = 2.000
    but i need           zqty = 2.
    help me to reslove this issue.
    Regards.
    jay

    Hi,
      While populating the field catlog do the following thing to   avoid zeros.
      wa_fieldcat-tabname = 'I_OUTPUT'.    " Curr
      wa_fieldcat-fieldname = 'FWAER'.
      wa_fieldcat-seltext_l = text-023.
      wa_fieldcat-no_zero = 'X'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR  wa_fieldcat.
    Thanks,
    Khushbu.

  • Impact of selecting "Removing Query from Selection List" in 2 channels.

    HI All ,
    I have customized a query in one channel (My Agreements and Contract Documents query in Master Agreements List channel) and have removed the standard query from the channel by checking the  "Remove Query from Selection List" and introduced my custom query in that query group .
    But  it resulted in break in chain for  "Master Agreements" link in "Contracts To Do List" channel as the link was pointing to standard  "My Agreements and Contract Documents" query and is displaying "The query can not be executed. Contact your system administrator" when ever I click on that.
    Any pointers on how to overcome above scenario wud be gr8!
    Regards,
    Uday

    Hi Uday,
    In order for To Do List channel to work, the query definition should be in the Master Agreement List query group. Do you still want the standard query in the To Do List? If so, you would have to leave it on the Query Group as To Do list is pointing to it. May be change the display name of the query so you can differentiate between the 2 queries. The other option is change the To Do channel to point to the custom query.
    Regards,
    Vikram

Maybe you are looking for

  • Change default and other printer presets

    I recently had to Refresh the printer's connection with my Wireless Router and laptop and (with help from HP tech support, thank you!) that was successful.  Now, however, when I click File, Print (while in a document) I no longer have the print optio

  • Order music by year

    Hi there, is it possible to order my iPod touch music library by year? Inside the Artists view, all albums are ordered by name, I think it's such a stupid thing, music should be ordered by year of release. Indeed on iTunes there's a dedicated option,

  • How do you make square brackets with the keyboard on this thing?

    Needed for Matlab!

  • How can I get NVrotate to work in WIN98 on FX5200

    The only place I can find this with the latest driver is in Hotkey options, but it doesn't work. this is with the most recent driver. Under XP and the most recent driver, this option is easily available and works great, but I want to use NVrotate wit

  • [SOLVED]af:tableSelectOne help

    <af:tableSelectOne text="Select and"                    binding="#{backing_site_empSearch.tableSelectOne1}"                    id="tableSelectOne1" autoSubmit="true">   <af:panelGroup partialTriggers="tableSelectOne1">     <af:commandButton text="#{r