How to delete decimal values zeros

Hi experts,
i am using mseg-menge field ( lenth13 and decimals 3) in my alv grid report.
eg: 2.3456.000
user wants only  2.3456 no decimals.
how we can aviod decimals 0 s in report.
thanks in advance.
mahahe

I search this ways in the forums:
Shift
SHIFT varb1 RIGHT DELETING TRAILING '0'.
write: gv_variable decimals 0.
SHIFT VALUE LEFT DELETING LEADING '0'.
Shift2
DATA: T(14) VALUE ' abcdefghij',
STRING LIKE T,
STR(6) VALUE 'ghijkl'.
STRING = T.
WRITE STRING.
SHIFT STRING LEFT DELETING LEADING SPACE (or use 0 to detete 0).
WRITE / STRING.
STRING = T.
SHIFT STRING RIGHT DELETING TRAILING STR or 0.
WRITE / STRING.
Shift3
data amt(6) type p decimals 3 value '123.450'.
data amt1(6) type p decimals 2.
data amt_c(6) type c.
unpack amt to amt_c.
shift amt_c right deleting trailing '0'.
pack amt_c to amt1.
write amt1.
use FM
FTR_CORR_SWIFT_DELETE_ENDZERO
this FM will remove all the zeros from decimal values like
value - 234.8000000
output - 234.8
IF
data: var1 type p decimals 3,
      var2 type p decimals 2,
      var3 type p decimals 1.
move '12345.100' to var1.
move var1 to var2.
move var1 to var3.
if var2 = var1.
  if var3 = var1.
    write var3.
  else.
    write var2.
  endif.
else.
  write var1.
endif.
I hope that this solve your problem.
Cordial greetings.

Similar Messages

  • How to delete null values in a table

    hi all,
    tell me please any one how to delete null values in a table
    example:
    in emp table is there
    empno ename job mgr sal deptno
    7900 scott 7902 2000 10
    7499 clerk 7900 20
    7834 james manager 3000 30
    like this in the above emp table there are some null values are there
    so how to delete the null values in emp table
    thanks,
    regards.
    Edited by: user9195968 on Feb 25, 2010 6:30 AM

    not too sure what you mean, perhaps you could supply a table description and some sample data
    but, consider
    delete from table_1 where column_1 is null
    commit
    /

  • How to delete the trailng zeros in my table

    Hai
    I had a serious problem
    My table name called nrgp_main
    Here nrgpno declared as char(8) i had changed as 10 by mistake and i have update two times
    the number is like this 003800001 i need to cut the first '0' and update it
    Thanks & regards
    Srikkanth

    Duplicate post
    how to delete the trailng zeros in my table

  • How to delete duplicate value in movement type 541 & 542(alv report)

    hi experts,
    i have some problem in alv report,
    input we can give some movement type for ex(101,102,541,542, etc)
    how to delete duplicate value in 541 and 542.
    regards
    gunasekaran.

    Try:
    Delete adjacent duplicates from ITAB comparing FIELD1, FIELD2.
    to do this the ITAB must be Sorted first.!

  • How to delete the values from TKOMV at runtime after creating PO

    Hi,
      How to delete the values from TKOMV at runtime after creating PO from IDOC. I am creating PO through IDOC, subsequently need to create Sales order and again need to create 2nd PO with reference of Purchase Requestion(created with sales order). At the time creation of 2nd PO the Header conditions are appearing twice and net price value is appearing wrong.
    Thanks in advance.

    Hi Padma
    Can you do this activity once the company code is in to production. I guess you can not do this activity, if the company code is already in to live. Setting or resetting of the recon accounts will hinder the previous actitivity. Infact resetting of the company code is also not a good option.
    Any how, thanks for the inputs. Please let me know whether i can do this activity only at the subledger level which will not impact other modules. The one solution i can figured out is , reverse all the transactions for the corresponding asset in the year of takeover and pass the entries again in the same year correctly which will have effect in Subledger and also in general ledger. But the business people will not allow this, since for a big client it will require lot of authorizations and approvals. Infact the vendor also, is cleared. So we have to reverse the cleared documents as well which is again a task and require approvals as well.
    Thanks and regards
    Seshu.

  • Everyone is how to delete repeating values?

    There is a column,values are repeated,everyone is how to delete repeating values?
    Assuming that this set of numerical many, can not directly determine whether there is a duplicate value.
    Thank you~
    Message was edited by: Tao.
    Message was edited by: Tao.

    Hi Tao,
    I've found that a short AppleScript provides a convenient way to identify duplicates (repeating values) in a range.
    Just select the range of cells you want to check for duplicates and click. It will turn the duplicates red.
    --select range, run, turns duplicates red
    tell application "Numbers" to tell front document to tell active sheet
              set selected_table to first table whose class of selection range is range
              tell selected_table
                        set selected_range to the selection range
                        tell selected_range
                                  set values_list to {}
                                  repeat with i from 1 to count cells
                                            set this_value to value of cell i as text
                                            if values_list contains this_value then set text color of cell i to "red"
                                            set end of values_list to this_value
                                  end repeat
                        end tell
              end tell
    end tell
    --end of script
    Just copy and paste the above script into AppleScript Editor, and run it from there. Or place it in your scripts menu. Or download this  Automator Service (Dropbox download) and double-click it to install it in your Services menu.
    Similarly, if you want to get a list of just the distinct values in a range (i.e. with duplicates removed) this Copy Distinct Automator Service (Dropbox download) is very convenient.
    Select the cells, make the menu pick, then paste the distinct values wherever you want in a table by single-clicking a cell and typing command-v to paste.
    These functions become, in essence, a customized menu.  That way you don't have to set up formulas to do this each time you work with a new Numbers document.
    SG

  • How to delete duplicate values in a column?

    consider a table contains 2 columns(NAME & DEPARTMENT)
    NAME DEPARTMENT
    santhosh finance
    santhosh marketing
    rahul sales
    stephen IT
    stephen sales
    In the above table how to delete only the duplicate values(santhosh,stephen) in the column?

    If you don't care??
    delete emp
      where 1 < (select row_number() over(partition by deptno order by 1) from emp)
    Error at line 1
    ORA-01427: single-row subquery returns more than one rowI'd use something like
    delete emp e1
    where exists
             (select null
                from (select deptno, rowid rid, row_number () over (partition by deptno order by 1) rn from emp) e2
              where e1.rowid = e2.rid
                 and  1 < rn)

  • How to delete photos with Zero KB size that were downloaded onto mac pro osx vers 10.5.8, 2x2.8 quad core intel Xeon ?

    How to delete picture files ( nikon NeF and jpeg )  with Zero  KB  size that were downloaded onto mac pro osx vers 10.5.8, 2x2.8 quad core intel Xeon
    -- have not been able to move them or move them to trash without  crashing  Finder  ?

    Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive & clear caches.)
    Try trashing them in Safe Mode, reply if that doesn't help.

  • How to load decimal values into a file using bcp in SQL Server 2000?

    Hi everyone,
    I'm trying to load data from a database table to a text file using bcp on SQL Server 2000. When I'm loading the decimal values, the values before the decimal are not being loaded into the file. How could I load the values before decimals?
    Here are the DDLs and DMLs of what I'm trying to run:
    CREATE TABLE [dbo].[Product_Sales](
    [Year_of_Sale] [smallint] NOT NULL,
    [Product_Type] [varchar](25) NOT NULL,
    [Product_Group] [varchar](25) NOT NULL,
    [Category_Type] [varchar](25) NOT NULL,
    [Category_Group] [varchar](10) NOT NULL,
    [Product_Count] [bigint] NOT NULL,
    [Product_Amount] [decimal](19, 2) NOT NULL,
    [Category_Count] [bigint] NOT NULL,
    [Category_Amount] [decimal](19, 2) NOT NULL,
    CONSTRAINT [PK_Product_Sales] PRIMARY KEY CLUSTERED
    [Year_of_Sale] ASC,
    [Product_Type] ASC,
    [Product_Group] ASC,
    [Category_Type] ASC,
    [Category_Group] ASC
    ) ON [PRIMARY]
    ) ON [PRIMARY]
    INSERT INTO [Yearly_Sales].[dbo].[Product_Sales]
    VALUES(2010, 'Online', 'Web', 'Cameras', 'Electronics', 547, 0.00, 0, 0.00)
    EXEC [master].[dbo].[xp_cmdshell] 'bcp "SELECT * FROM [Yearly_Sales].[dbo].[Product_Sales]" queryout D:\Yearly_Sales\Product_Sales.dat -c -T -S'
    And the output I see in the file is:
    2010 Online Web Cameras Electronics 547 .00 0 .00
    The values before decimals are being truncated.
    Thanks,
    Bangaaram
    Known is a DROP, Unknown is an OCEAN.

    You can modify the decimal column(s) in the table to varchar type before export. But it does not look good.
    alter table [dbo].[Product_Sales]
    Alter column [Product_Amount] varchar(20)
    alter table [dbo].[Product_Sales]
    Alter column [Category_Amount] varchar(20)
    Does that make any sense?
    Known is a DROP, Unknown is an OCEAN.
    Basically you modify the decimal column to a varchar type before you run the bcp command for export. You can modify your source table or you can modify them on the fly. It is just a workaround.
    Modifying the source wouldn't be a good idea. Never do that if you can't get your desired output.
    Known is a DROP, Unknown is an OCEAN.

  • How to display decimal values (8.00, 8.01, 8.10)

    Can you please tell me anyone how to display the decimal values.
    Ex: amount number(5,2)
    inserted the table value 300.00
    when I am select the value using it has to display as the same 300.00.
    Thanks,
    Ramesh

    I suggest you read oracle documentation about TO_CHAR function and number format models.
    SQL> select to_char(0.00, '99990.99') from dual ;
    TO_CHAR(0
    0.00
    1 row selected.
    SQL> select to_char(99.78, '99990.99') from dual ;
    TO_CHAR(9
    99.78
    1 row selected.
    SQL>

  • How to delcare decimal value in selection screen

    hi all,
    in my selection screen, how to declare parameter  type decimal value of 2 places default value 99.00 %
    points will be rewarded
    thanks in advance

    Hi,
    Create a domain for that variable.
    ex: val type P decimals 2.
    Assign it to data element.
    Then use that data element in u r selection screen.
    Reward if useful.
    Regards,
    Narasimha

  • How to delete a value from the nested structure?

    Hi Friends!
    I have a nested structure such as
    multimap<int, map<int ,set<int>>> FinalMul
    It contains sample values
    1=>4--->1
    6=>4--->1
    6=>9--->4
    11=>4--->1
    11=>5--->1   4
    11=>9--->4
    12=>2--->1   4   5
    I want to delete the value 4 from the second and third column,
    So, it looks like
    1=>
    6=>
    6=>9--->
    11=>
    11=>5--->1 
    11=>9--->
    12=>2--->1  5
    after deleting 4, if I have a key(first) (1, 6, 11) and secondkey (second)(6=>9--->,  11=>9--->) with no values, then delete them also.
    Finally it looks like
    11=>5--->1 
    12=>2--->1  5
    Can anyone help me how to solve it?
    I just tried something;
    set<int> tempV;
    map<int, set<int>> tempM;
    multimap<int, map<int, set<int>>> FinalMul
    tempV.insert(1);
    tempM.insert(make_pair(4, tempV));
    FinalMul.insert(make_pair(1, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1);
    tempM.insert(make_pair(4, tempV));
    FinalMul.insert(make_pair(6, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(4);
    tempM.insert(make_pair(9, tempV));
    FinalMul.insert(make_pair(6, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1);
    tempM.insert(make_pair(4, tempV));
    FinalMul.insert(make_pair(11, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1); tempV.insert(4);
    tempM.insert(make_pair(5, tempV));
    FinalMul.insert(make_pair(11, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(4);
    tempM.insert(make_pair(9, tempV));
    FinalMul.insert(make_pair(11, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1); tempV.insert(4); tempV.insert(5);
    tempM.insert(make_pair(2, tempV));
    FinalMul.insert(make_pair(12, tempM));

    Check this attempt:
    typedef
    set<int>
    SET;
    typedef
    map<int,
    SET>
    MAP;
    typedef
    multimap<int,
    MAP>
    MULTIMAP;
    // remove '4' from second column
    for_each( FinalMul.begin(), FinalMul.end(),
    []( MULTIMAP::value_type
    & mmv )
    MAP & m =
    mmv.second;
    m.erase( 4 );
    // remove '4' from third column and remove empty entries
    for_each( FinalMul.begin(), FinalMul.end(),
    []( MULTIMAP::value_type
    & mmv )
    MAP & m =
    mmv.second;
    for(
    auto i = m.begin(); i != m.end(); )
    SET & s = i->second;
    s.erase( 4 );
    if( s.empty() )
    i = m.erase( i );
    else
    ++i;
    // remove empty entries
    for(
    auto i = FinalMul.begin(); i != FinalMul.end(); )
    MAP & m = i->second;
    if( m.empty() )
    i = FinalMul.erase( i );
    else
    ++i;

  • How to trim decimal values in a string?

    Hi
    How do i trim decimal value in a string..
    suppose i have 1.00, i want it to be displayed as 1
    Is there any Round off functionality in WD ABAP?
    Regards,
    Puneet

    hi,
       Try using the mathematical function abs().
    ABS( VAR1 ). Which will return the numeric value only.
    Thanks
    Yogesh

  • How to check decimal value in numeric field

    Is there any way to find number of decimal digit is being used.
    999.444
    444.45
    344.23
    33.666666666666
    Query provide rusult after the decimal value.
    thanks.

    user-Keen wrote:
    Query provide rusult after the decimal value.
    thanks.
    your_col - trunc(your_col)Do you have negative numbers?
    For negative values what do you want to display?
    If just the decimal part, you could use ABS(col) - trunc(ABS(col))
    Edited by: jeneesh on Apr 4, 2013 3:29 PM

  • How to delete decimal point and adding leading zeros....

    Hi,
    I have one requirement in the report   i.e.
            <b>Present Value    :</b>  44567.98
            <b>Expected Value  :</b> 0000004456798
    In the present Value how will I remove that decimal point and how to add those six ing zeros. I tried with CONVERSION_EXIT....but it is not giving. Help me...
    Thanks in advance.
    Regards,
    Kumar.

    Hi,
    Use SPLIT and COMCATENATE fnctions.
    Eg:  split l_v at '.' into l_v1 l_v2
            concatenate l_v1 l_v2 into l_v.
    For adding leading zeros
    Use FM CONVERSION_EXIT_ALPHA_INPUT.
    Eg:
    data: tknum type vttk-tknum value '99156'.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
         exporting
              input  = tknum
         importing
              output = tknum.
    Sri
    Message was edited by:
            Sri Tayi

Maybe you are looking for

  • Multiple iTunes on External Hard Drive?

    I am wondering if I can have multiple iTunes libraries on a Maxtor External Hard Drive? My husband has one for his desktop and there is PLENTY of space and now my laptop is low on disk space so I need to move my iTunes to an external drive as well. I

  • Lost capabilities since OS upgrade

    Hi all, I have a Curve 8520, with Orange on the Dolphin package. I upgraded last week via the Blackberry website to version 5.0.0.681. Since then it's as if I have no data plan - no Facebook icon, no browser unless I'm in a wifi area, etc. Any ideas

  • I want to integrate to WebDynpro applications using callable object

    Hi i created Dc and i want to add one  Dcs using Add Used Dcs in that cau/eu/gp/api was nto found what should i do please suggest

  • Email cannot be used to unlock this iphone

    ihave apple id but email cannot be used to unlock this iphone

  • Osdbattery won't start "Cannot open ACPI"

    Error when starting osdbattery after upgrading to Linux 3.x kernel: WARNING:can not open config file, using defaults Cannot open ACPI info! Is ACPI supported by the kernel? I have tried manually modprobe-ing video,button,battery,ac etc.. which all pa