Removing decimals when initial

i declared variable 'ulimit' as type p decimals 2.
ulimit  type p decimals 2.
now its printing as ulimit = 12.00 (when no decimals are there)
                           ulimit  = 13.76(when decimals are there)
but when no decimals are there i should print as ulimit = 12 only (not ulimit = 12.00).Please help.
Thanks
K Srinivas

Hi Srinivas,
Here is the sample code.
REPORT  ZCC_TEST.
DATA: ulimit type p decimals 2 VALUE '12.09'.
DATA: STR(10) TYPE C.
DATA: FINAL(10) TYPE C.
DATA: LEN TYPE I.
DATA: LEN1 TYPE I.
STR = ULIMIT.
CONDENSE STR.
IF STR CA '.'.
  LEN = SY-FDPOS.
ENDIF.
LEN1 = LEN + 1.
IF STR+LEN1(2) = '00'.
FINAL = STR+0(LEN).
WRITE: FINAL.
ELSE.
WRITE: ULIMIT.
ENDIF.
\[removed by moderator\]
Edited by: Jan Stallkamp on Jun 17, 2008 6:26 PM

Similar Messages

  • Remove decimals when equal to 0 SAPSCRIPT

    Hello all,
    When printing a quantity field in a sapscript form, I would like to remove the decimals if they are all 0, but retain them if at least one is non zero.  For example:
    Quantity    -   Value to print
    1000.000   - 1000
    1000.020   - 1000.020
    1000.200   - 1000.200
    1000.002   - 1000.002
    I have tried many different things including formatting options C and Z (i.e. kwmeng(C)) but neither provide the correct result.  Also, kwmeng(.3) will not work because sometimes I want kwmeng(.0).  I want to avoid ABAP code in the print program and I know that it is possible because a different form in our system performs exactly this way without parsing the value into mantissa and decimal (though I cannot determine how). 
    Please post any thoughts or ideas.  Thanks!

    Hi,
    I think that if the quantity field is linked in the DDic structure/table to a unit of measure field, which content at runtime refers to a unit with 0 decimals, then it should work exactly as you expect.
    Sandra

  • How to remove Decimals in Quantity Objects in SAP BO Explorer View created on top SAP Bex Query?

    Hi,
    I created SAP BO Explorer report on top of SAP BEx Query.
    In SAP BEx Query, Decimals were hided but when i created OLAP Universe on top that SAP BEx Query and Created Index on top of Information Space in SAP BO Explorer and then created Exploration Views. But i'm getting Decimals in my Exploration Views where as SAP BEx Query in RSRT, no decimals were appearing.
    Can anyone suggest me how to remove decimals in SAP BO Exploration Views.

    Hi Ramana,
    I am not use how you connect to SAP BEx query (Via universe or BWA or HANA)
    What I could say is BWA and HANA, you cannot adjust this
    For universe, you could try in universe layer, there is note about this
    For BWA and HANA, this function might be enhanced but you 'd better raise OSS to SAP to check with them
    Best regards
    Alex yang

  • Dreamweaver crashes when "initializing" Business Catalyst extension

    Hi,
    This was my first intent to use the the BC Extension for DW (CS4).
    First I was able to open DW and to to connect to BC via the extension panel. I uploaded my website to BC as a trail site and then the problems startet. DW would crash with almost any step I took.
    At least I was able to open DW again. But from the moment on, that I clicked "stay logged in" in the BC-Panel, DW crashes from the moment on, when "initializing" BC. That means, I just can´t use DW anymore, because the programme crashes before even opening.
    Anyone any idea?
    Thanks

    Hi Ginoem50,
    If you experience JavaScript error messages when using Business Catalyst extension with Dreamweaver clearing the cache of Dreamweaver almost always solves it.
    So there are two ways of solving this issues.
    The first one is to remove the extension through the Extension Manager and re-install it.
    The second one is to clear Dreamwaver's cache. Its cache is kept in a file in its Configuration folder. That file name depends on OS:
    For Windows  it is WinFileCache-<randomString>.dat
    For  MAC  it is MacFileCache-<randomString>.dat
    Deleting of that file clears the cache. After restarting Dreamweaver is creating new one.Location of the cache file defers for each version and operating system.
    Here is a list of locations depending on OS for Dreamweaver CS4
    Vista & 7: C:\Users\<username>\AppData\Roaming\Adobe\Dreamweaver CS4\<language>\Configuration
    XP: C:\Documents and Settings\<username>\Application Data\Adobe\Dreamweaver CS4\<language>Configuration\
    MAC: MacHD : Users : <username> : Library : Application Support : Adobe : Dreamweaver CS4 : <language> : Configuration :
    Note that folders AppData in Vista and Application Data in Win XP are normally hidden. In order to unhidden them you need to:
        For Vista:
            Open new Windows Explorer window.
            Press Alt to reveal the text menu.
            Choose "Folder Options" from "Tools" menu. In the pop-up window go to "View" tab.
            In the list of options find "Hidden fles and folders" section and mark "Show hidden files and folders". Press ok to Apply the change and to cloce the pop-up.
        For Windows XP:
            Same as for Vista except that you don't need to press Alt in order to reveal the text menu. It is always visible
    Andrei

  • I have songs on my iPhone 6 that I can't remove and when I plug into iTunes and go to "Summary" and "On This Device" the songs don't show up but they are on my phone. How do I remove them? Not even sure how they got on actually.

    I have songs on my iPhone 6 that I can't remove and when I plug into iTunes and go to "Summary" and "On This Device" the songs don't show up but they are on my phone. How do I remove them? Not even sure how they got on actually since I have a iTouch and keep all my music there. HELP!!

    Have you tried deleting the songs from Settings?
    Settings -> General -> Usage -> Manage Storage (not the iCloud link!) -> Music and then click Edit to enable you to be able to delete.

  • When initiating an e mail to someone with several addresses used in the past the one I use most often does not come up in the first position.  How can I get these multiple e mails prioritized?

    When initiating an e mail to someone with several addresses used in the past the one I use most often does not come up in the first position.  How can I get these multiple e mails prioritized?

    We are talking about the Mail app, right? In the Mail menubar, click on Window and then Previous Recipients:
    That eliminates the previous recipients. If you are talking about the suggestions because there are 10 people with the name 'Steve' in your Contacts, then I do not know how to eliminate those unless you change the name slightly or wait until you type the last name or some other differentiator.

  • How do I set a specific page to open when I open a new tab in Firefox? I can open the page when initially opening Firefox, but not for subsequent tabs/pages.

    How do I set a specific page to open when I open a new tab in Firefox? I can open the page when initially opening Firefox, but not for subsequent tabs/pages.

    You can use an extension to set which page to open in a new tab:
    *NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    *My Homepage: https://addons.mozilla.org/firefox/addon/my-homepage/

  • How can we resend AS2 MDN messages back to TP when initial try failed.

    Hi,
    We would like to auto retry a failed AS MDN messages back to our TP. We are connected with AS2 and at the channel level we set the retry interval and retry count, but it seems still the MDN is not retried automatically when initial try failed for any reason.
    Appreciate your help.
    Thanks,
    Levey

    I have and iPhone 6 and have been receiving the same error message. I have done all the trouble shooting possible, and still receive the message. Are there any other suggestions? Thank you kindly!

  • Very slow start when initially entering the service ticket in Web UI (2007)

    We seem to encounter a very slow start when initially entering the service ticket in Web UI (2007). Once in all seems speedy enough. I don't have my access arrange for the Service marketplace (OSS notes) yet so can't check if there is a known solution, which I suspect there is. Has anyone encountered this problem and possibly resolved it?.
    Jason.

    Previous posts have highlighted the following notes:
    1048388 General Performance improvements of BSP transactions
    1162605 Network performance for CRM 2007 Webclient
    1162685 SAP CRM 2007 Webclient Performance
    821045 Poor performance of MIME objects in BSP pages
    581316 BSP Delta-Handling for CRM (BASIS 620 SP17)
    However, I was wondering whether anyone has come across any other small changes that may have a major effect. A quick-win I guess you call it. From bitter experience I know there are rarely quick wins when it comes to optimisation due to the amount of re-testing etc.
    But any further advice would be welcome.
    Jas.

  • Workflow starts only when initiated by specific user

    hello,
    Workflow starts only when initiated by specific user...need to get started  who ever initiates it....
    any help would be appreciated !!!
    Thanks regards, Vignesh.

    Hi,
    Workflow start option:
    Mannually started
    Starts when item created
    Strarts when item changed
    please check which one of start option is set and also check whether selected "Require list mange permission" under mannual start option,if so uncheck or add users to have that permission
    Let me know if you need help
    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

  • Error when initiating a process

    Hello,
    when initiating a process, e.g. a Life & Work Process, i get an error at step 4 of the Process initiating road map. "Process could not be initiated: Set user context". The roles assignment should be ok.  Any ideas what could be the problem?
    cheers,
    Markus

    Hi Markus,
    You need to assign the default roles to the processes. Check this link for the details: http://help.sap.com/saphelp_erp2005/helpdata/en/43/9f2d87c0a86756e10000000a11466f/frameset.htm
    Regards,
    Shubham

  • Not able to remove items from initiative

    Hello All,
    We are on PPM 5.0 and I am trying to remove added items from the 'initiative' but I am not able to remove them.
    Can someone kindly help, as to what might be preventing from removing items from initiatives.
    Thanks,
    Sachin

    Hi,
    If you want to remove the Items from Intiative , you need remove the relationships object . Not possible to delete directly !
    Steps :
    Navigate to the Relationships tab , then go to the Sub tab Related Objects , select the Item  and click Delete Assignment. You will remove the Item from Initiative dashboard !
    Hope it works for you !
    Regards,
    Vincent
    Edited by: ddd002 on Oct 4, 2011 6:53 AM

  • Horizontal Axis not showing when initial loading

    Hi,
    We are on Dashboard 4.1 SP3.
    I have drilling down configured on the Dashboard report. The issue is when initial loading the dashboard. the horizontal text are not showing completly, untill I click the other column of the parent column, it shows the child horizontal text.
    Could you please help.
    Thanks,

    Hi Dave,
    There are some issues still in displaying the horizontal axis.
    1844514 - Dashboard X axis labels are cutoff
    As a workaround what you can do, use the range slider to make the date text to display vertically rather than horizontal or you can enlarge the size of the chart at the max to make them to display vertical.
    Hope this helps!!!
    --SumanT

  • I can't get my iphone to add OR remove photos when syncing

    I can't get my iphone to add OR remove photos when syncing

    darn.
    Move <G>
    seriously, keep asking. someone here will know and i'll learn something

  • In when I reply to sender in Email at times it can take 15sec for reply email to appear. Often same occurs when initiating a new email?????

    When I reply to sender in Email at times it can take 15sec (spinning beach ball) for reply email to appear. Often same occurs when initiating a new email? Anyway to eliminate this?

    Speak to your ISP. Check your internet connections.

Maybe you are looking for

  • Not printing: AEX + Win XP + HP LaserJET 1022

    Hello all I have received a great deal of information from browsing these forums before, but I'm a first-timer when it comes to questions. I have two laptops connected to an Airport Express. The first is a Powerbook G4, the second is a Sony Vaio runn

  • View Performance Issues

    Basically I have created a View that I can Select count(*) on and it returns the number of rows, I use the view for an Insert query to one table only pulling through several fields and after a bit of a pause it works... I then Insert the whole view t

  • How can I extend Adobe Viewer PDF plug-in for Browsers in order to extend saving or downloading propriety?

    I need, from the viewing of pdf file from the browser, to save the pdf in a specific directory of the server automatically with a button and not downloading the file and than importing the file downloaded. So for example I could change the propriety

  • Flash Player 11.6.602.180

    I  have Vista and Norton 360.  Flash Player will download sucessfully but not run.  No programs are running in the background.  Please help.  I have made repeated attempts and each time I retry I delete the previous attempted installation.  Thanks

  • How can I make "No Proxy" the default for accessing the internet?

    How can I make "No Proxy" the default for accessing the internet?