Is it possible to remove leading 0's?

If I have a column called id_inst in tableA of type String
and having a value of 0000203,is it possible to remove
the leading zeroes from it?
Select LTRIM(id_inst, ??
Is this possible?

There is of course no need to strip leading zeroes before storing a numeric value into a number datatype since Oracle will not store leading zeroes anyway.
How a numeric value retrieved from the database is display is completely under the control of the requester via the to_char function:
UT1 > select fld2, to_char(fld2,'009') as c2, to_char(fld2,'999.99') as c3
2 from marktest;
FLD2 C2 C3
1 001 1.00
2 002 2.00
3 003 3.00
5 005 5.00
6 006 6.00
HTH -- Mark D Powell --

Similar Messages

  • Removing Leading zeros from query output.

    Hello Experts,
    Is it possible to remove leading zeros from the query output for a particular column?
    I have a characteristics 'Reference Document' which has values like '000001386'. The users just need '1386' to be displayed and have asked us to remove the leading zeros.
    Is there something that can be done for this at a query level? I can't modify the underlying InfoProvider because this requirement is just for one set of users, the other users need the document nmber in the original format.
    Thanks
    Arvind

    Hi,
    you can use ALPHA conversion option in the definition of that particular characteristic.
    Try this code  in a routine.,in query designer;
    data a(9) value '000001386'.
    SHIFT a LEFT DELETING LEADING '0'.
    write:/ a.
    Output will be : 1386
    Or use this method also
    data a(9) value '000001386'.
    Call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
    Exporting
    input = a
    Importing
    output = a.
    write a.
    output:
    1386
    Regards
    CSM Reddy

  • Removing leading zeros in a column

    Hi,
    I would like to remove leading zeros of a column in a table. My Questions :
    1. Is it possible?
    2. Where is it better to truncate, in RFC or Web Dynpro?.
    3. If Possible, How can I do that.
    I appreciate your input.
    Thanks,
    Sunita.

    Hi Sunita,
           Please specify the datatype of the column that contains leading zeros, because if the data type of the column is integer then the leading zeros are automatically taken care.
    If your RFC return you int and you are assigning it to a String then the leading zeros will appear.
    For example, see the below simple ABAP Program. Just copy and execute it. You will see the difference.
    data: a type mara-matnr,
          str type string.
    select single matnr from mara into a.
    write a.
    str = a.
    write / str.
    Hope it helps you.
    Regards,
    Maheswaran.B
    Message was edited by: Maheswaran B

  • User define function-remove leading zeros

    Hi All,
    i want java coding for mapping function rule "remove leading zeros" early.
    kindly give me response as early as possible.
    regards
    Peera

    Hi  Mahaboob
    Write UDF to parse data .
    String dataVal="0230";
    int parseVal = Integer.parseInt(dataVal);
    System.out.println("parseVal is "+parseVal);
    result.addValue(parseVal); or return parseVal;
    Have a look at this thread...
    Re: User-defined function in multiple Message Mappings
    http://help.sap.com/saphelp_erp2005/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm
    Thanks !!!

  • Remove leading zeros coming from Active Directory

    Greetings all.  Our sapusername is stored in Active Directory with leading zeros.  Is there a way to remove these zeros in the portal so SSO will work?  I have had my AD team manually remove the zeros in front of my sapusername, so I'm sure that's the issue.
    Alternately, is there a setting in R3 that would allow leading zeros?

    Hi,
    I've seen the problem before and I think you only have two choices (haven't looked into if R3 can accept leading zeros)
    1. Since you are allready retrieving sapusernames from an R3 change that mapping to remove leading zeros and possibly put it in a new attribute.
    2. Create a JAAS login module which retrieves found username from the HeaderVariableLoginModule and trims leading zeros before putting the username back to shared state. This new LoginModule must be placed before the CreateTicketLoginModule.
    Note it is not very trivial to create a JAAS login module but an excellent guide can be found here http://help.sap.com/saphelp_nw2004s/helpdata/en/46/3ce9402f3f8031e10000000a1550b0/frameset.htm

  • Function mudule to remove leading zeros of curreny and decimal type field

    Hi Expers,
    can any body suggest me the function mudule to remove leading zeros of curreny and decimal type  fields.
    plz do reply as early as possible.
    Thanks .....
    sunil.

    Hi,
    Use this FM CNIF_CONVERT_CURRENCY2EXT
    Import parameters               Value
    I_CURRENCY                      USD
    I_AMOUNT                        00000001233
    I_DECIMALS                      2
    Export parameters               Value
    E_AMOUNT                                           1.233,0000
    Regards
    Shiva

  • Is it possible to remove the submit form button that's automatically created when you distribute a form?

    I have created a form for my boss and distributed it. She doesn't want the submit form button to appear as people don't need to submit the form to anyone, just fill it in and keep a copy. I can't figure out how to remove this button. It's not one I've created, it's the one that it automatically generates when you don't have a submit button in your form. Is it possible to remove this button or do we just have to live with it? I am using Adobe Acrobat X Pro.
    Thanks

    You can have more control on the email subject/ to and CC Email address, if you use a regular button and place the code in the click event.
    Refer to the attached sample below.
    https://acrobat.com/#d=HouRLov3lOntSbqAfsr5Hg
    Thanks
    Srini

  • Is it possible to remove my hard drive from the Macbook and install it in a new Macbook Pro?

    I currently have a 2009 Macbook and am wanting to upgrade to a new Macbook Pro.  I have upgraded my hard drive in the macbook to a 500gb and have a duel boot with Windows 7 installed with Boot Camp along with other software that I do not want to lose.  Is it possible to remove my hard drive from the Macbook and install it in a new Macbook Pro?

    A much better solution is to hook your two Mac together and the first time you start the new Mac and it asks if you wish to recover data from another Mac, answer yes. This will invoke Setup Assitant which will do the job for you but intelligently.
    I know because I just used Setup Assitant. It worked like  a charm.
    Allan

  • Remove Leading zeros for Material in Transformation

    Hi Experts,
    I'm using DTP first time. I don't have much exp on DTP & Transformations.
    I'm creating infocube with some objects. I want to remove leading zeros for zmaterial.
    In 3.x writen update routines as fallows:
    data: zmat(18) type c.
    zmat = COMM_STRUCTURE-/BIC/ZMAT.
    shift zmat left deleting leading '0'.
    result value of the routine
      RESULT = zmat.
    I'm confusing in Transfermation where to write this routines.
    I'm writing in Transformation as fallows:
    data: zmat(18) type c.
    zmat = SOURCE_FIELDS-/BIC/ZMAT.
    shift zmat left deleting leading '0'.
    RESULT = zmat.
    But it's getting remove zero's.
    Anybody suggest on this.
    Siri

    Dear Sir,
    No confusion at all.
    Just double click on the Target Infoobjct i,e Material object in Transformation, you will see a wizard popping up.
    There you will see a option called "RULE TYPE" and the default value will be "Direct Assignment". In the same check box click on the drop down icon and select "Routine".
    The moment you select the routine option, it will open up ABAP workspace where in you can write your routine and get the desired result.
    Hope it helps.

  • Is it possible to remove yellow text background in the entire document?

    I have the same problem as the one that is mentioned here:http://forums.adobe.com/message/1155089 In my case the yellow background is already in the pdf-file which was created with a virtual pdf printer and then manipulated with another pdf-editor.  I noticed accidentally that it is possible to remove the yellow background in Acrobat Pro as if I'd edit an object. Getting rid of it on each page by hand would be a daunting task. Is it possible to do this somehow with the entire document? All help would be much appreciated.
    cheers
    Btw: The yellowish background does not appear in other pdf viewers.

    I'll try to describe the process but the exact numbers will depend on your document - as I said earlier when I ran a test of your file I got 3.4%, but you may not.
    Your file has a mixture of color spaces (CMYK/RGB/etc.) and so you must first run the Convert Colors tool from the Print Production Panel to get everything into a consistent space, or Preflight will choke. Run the default profile to convert to the SWOP v2 profile.
    Open the Output Preview tool from the Print production Panel and hover over one of the yellow areas, write down the percentage of yellow. Hopefully nothing else in the document will have the same percentage.
    Now open Preflight from the Print Production Panel, switch to the Single Checks tab.
    Open the Options menu, choose "Create new Preflight Check".
    Name it "yellow boxes" and apply it to "Page contents" and "Current file".
    Select the Colors group and pick "object uses Yellow with a percentage of..." - press ADD.
    Configure it with "Equal to" and your percentage (no % sign)
    Click OK, then switch to the Single Fixups tab.
    Options menu > Create new Preflight Fixup
    Name it "move yellow  to layer"
    Choose the Layers category, "Put objects on layer" and press ADD
    In the "Objects identified by a check" dropdown, select your "yellow boxes" check.
    In the Layer name field, type "yellow boxes"
    Click OK, then click the Fix button to run it.
    You'll get a message to save/close and reopen the file.
    When you do, (hopefully) all your yellow boxes will now be in their own layer.
    Open the layers navigator on the left side of Acrobat's window and turn off the eyeball for that layer.
    Print

  • Is it possible to remove "Revision" from standard check in

    Hi,
    Is it possible to remove or disable the revision text box in the standard check in screen. This number can be changed by the user each time the document is checked in. It can be changed to go backwards and use duplicated is the user changes it without giving an error i.e. 1 - 3 - 2 - 3. The documentation says "The revision increments automatically with each check-in of the content item, so generally, you should not change this value"
    Is there a way to remove/disable this from the standard check-in to prevent people changing it.
    Thanks

    Kizume and Rhm Zanz it should be still there as that is what manages that specific feature.
    In the top menu bar, where is says:      Finder   File   Edit   View   Go   Windows   Help
    Click on the Go, and in the same time click the option key on your keyboard near the space bar.  In that the drop down menu list the word Library will appear.
    Click on Library and Finder will open, look for the Preferences folder. Within that folder which should be in alphabetical order look for the file named, com.apple.sharekit.recents.plist
    Drag that file out of finder and unto your desktop. Close out the Finder window and close out all other your applications, including Safari, and reboot your Mac and once it turns on, reopen Safari and look at your share sheet. Any recents should be gone. That file named com.apple.sharekit.recents.plist will recreate itself on a clean slate in that folder. Should you encounter that you shared something again to a contact with Safari's share sheet, be sure to follow the same directions.
    Cheers!

  • Report Builder: output to Excel removes leading zeros

    I'm trying to use the Report Builder to output a numeric
    field to EXCEL , but on numbers that start with zero EXCEL removes
    the leading zero's. ex. 00123 becomes 123.
    Is there something that I can put in the expression builder
    on the field to overcome this.
    I've tried concatonating a single quote on the front of the
    field but the single quote shows up on the output. I've tried this
    on both the SQL and on the expression builder.
    I've read on some of the posts where people have tried using
    'mso-number-format:"\@'" within a TD tag but I can't seem to get
    the syntax right inside the Expression Builder.
    Has anybody got any suggestions?

    Excel will remove leading zeros in a numeric field because it is treating the column as numeric. Putting a ' in front of the number forces Excel to treat the column as text.

  • In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    When formatting your column to date/time, pick Date & time, and then pick the letter i in the circle to the right. Then scroll down and pick "No time"
    Jason

  • To remove leading zeroes and take directly from IDOC(Segment field) to file

    Hi SapAll.
    i have got a simple requirement in a idoc to file Interface.
    here in a sender Idoc there will be one segment with one field,the requirement is to remove leading zeroes and take directly the data from this field and map to one of the field in  reciever  file structure.
    i had used the formatnumber (under arithmatic functions)in PI 3.0 but now when iam using it in PI7.1 it was raising some jave exception error.
    it would be preferable if any body can give me the solution without user defined functions.
    regards.
    Varma.

    from your first post:
    i had used the formatnumber (under arithmatic functions)in PI 3.0 but now when iam using it in PI7.1 it was raising some jave exception error.
    use the same formatting that you used in 3.0 .... try with just a # in the FormatNum function.
    Regards,
    Abhishek.

  • Is it possible to remove or edit gps data from photos?

    Just listened to a Mac Roundtable podcast and they were talking about removing or editing gps data from photos taken with an iPhone but they never explained how to do it.
    Is it possible to remove or edit out latitude and longitude info from photo files?

    Thanks for this, though after looking at it I'm not too inclined to use an app that requires getting into the terminal. Way too technical for me. But thanks.

Maybe you are looking for

  • Protocol Adaptor Error while creating a DB manually

    Hi Friends, In my pc already a DB is running (DBCA created db). Now I want to create a new one manually by running "create database..." script. I try to login "sys as sysdba" (after setting oracle_sid=db1) but it is giving the "ORA-12560: TNS:protoco

  • Every time I click a link, it opens in a new tab instead of the existing one.

    Whenever I left click on any link, Firefox opens the link in a new tab. Previously it would only open a link in a new tab if I either middle clicked, or right clicked and specifically selected 'Open Link in New Tab.'

  • IOS 5.1 removes all the music from iPhone

    Updated my iPhone to iOS 5.1 and all the music got removed. No I need to spend hours to get it back. I'm not buying the music from iTunes because iTunes store is not available in my country. Even if it was avaiable still some of the music cannot be f

  • SEEBURGER BIC

    Hi All, I have a question regarding Seeburger BIC, I have read thru one of the Blogs (/people/bla.suranyi/blog/2006/06/08/sap-xi-supports-edifact) which tells that Native EDIFACT is converted into XML EDIFACT and the actual mapping is done in SAP XI.

  • How to add fonts to Font window

    I use a variety of fonts in Pages and I would like to know how to move fonts (really the names of fonts, like Baskerville, Helvetica, etc.) into that little box that appears when you click on Fonts .... I have about 6 in that box or window now but I