Need to strip the leading ZERO using ABAP code.

Hi Friends,
I got a situation where i got customer number called 011. I need to write an ABAP in Transformation to strip the leading ZERO , 11 should be posted to the master data attribute. could you help me in the logic pls.
Thanks in advance,

hi friends, i got a prob again, as i mentioned if i got 0 as prefix its deleting but if any 3 digit is comming it's converting in to 2 digit, as i mentioned if the prefix is 0(zero) then only i need to delete the zero.
Is there any other solution for this..
thansk in advance.

Similar Messages

  • How can I keep the leading zero in zip codes from disappearing in Numbers spreadsheet?

    I have a spreadsheet with addresses, and the leading 0 of the zip codes (thanks New Jersey) keeps disappearing... How do I correct this?

    Penny,
    It's easy for 5-digit ZIP codes to use the Number System format. Set to Base 10 and 5 places. Part of the goodness of this approach is that if you have already lost the zeros to the Automatic Format, this will reconstitute them.
    ZIP 5 plus 4 codes are not a problem because the dash in the middle causes a default to Text.
    Jerry

  • How to maintain the leading zeros

    Hi all,
    I need help on this.
    I have field KNB1-KUNNR its real value for example is 0000000001,so there is leading zeros,but then everytime the program output the report leading zeros are removed. I need to display the leading zeros as is.
    By the way KNB1-KUNNR is declared as knb1-kunnr LIKE knb1-kunnr.
    thanks!

    Hi..
    Use this code for adding leading zeros for a particular field.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               input         =  p_kunnr
            IMPORTING
              OUTPUT     = p_kunnr.
    Use this code for removing leading zeros for a particular field.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
             EXPORTING
               input         =  p_kunnr
            IMPORTING
              OUTPUT     = p_kunnr.

  • Truncating the leading zero's

    Hi experts,
    I have an ALV output, in which one of the fields is equipment number (equi-equnr).
    There are some leading zero's that I need to truncate from the ALV output.
    How can I achieve this? The code is as given below:
      fieldcatalog-fieldname   = 'EQUIPMENT_NUMBER'.
      fieldcatalog-seltext_m   = 'Equipment Number'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    Thanks,
    Ajay.

    Hello,
    Your requirement is that you need to display the equipment number in the ALV without the leading zeroes.
    Ypur code is
    fieldcatalog-fieldname = 'EQUIPMENT_NUMBER'.
    fieldcatalog-seltext_m = 'Equipment Number'.
    fieldcatalog-col_pos = 5.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    Just before append statement add the following
    fieldcatalog-no_zero = 'X'.
    Now try the same it should solve your problem.
    Regards,
    Sachin
    Edited by: Sachin Dargan on Jan 19, 2010 7:34 AM

  • About FF_5(RFEBKA00), how to delete the leading zero by using user exit

    The program RFEBKA00  can handle input files that don't carrry the leading zeros on the check number field.
    But the Table PAYR stores check number with leading zeros
    While inbound, the program will don't work well.
    How should i enhance the program?
    Thanks a lot
    Daniel

    Hi,
    Create a new program that will read the fields..
    Then put the leading zeroes in the check number field..
    And then modify the file..
    You can use the FM CONVERSION_EXIT_ALPHA_INPUT to put leading zeroes..
    Thanks,
    Naren

  • About FF_5(RFEBKA00), how to delete the leading zero by using user ex

    The program RFEBKA00 can handle input files that don't carrry the leading zeros on the check number field.
    But the Table PAYR stores check number with leading zeros
    While inbound, the program will don't work well.
    How should i enhance the program?
    Thanks a lot
    Daniel

    Hi,
    Please do not open duplicate threads for the same question..
    Please close this thread..
    Thanks,
    Naren

  • Document Templates in MS Word - how to cut the leading zeroes in number

    Hello CRM gurus !
    We use document templates in MS Word but have the document number printed with the leading zeroes.
    example we have now:
    0005000681
    example we want to have:
    5000681
    Question - how to do that?
    Is that in standard? The document number is the ObjectID tag as far as I know. Do I need to create another tag?
    Or may be just call a function? Do I need to change my current Web Service Tool? Is that some extra ABAP to be inserted?
    Thank you very much.

    Hi,
    have you tried to use this function call to delete de leading zeros?:
         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
             input  = value
           IMPORTING
             output = value.
    Best regards
    Manfred

  • Remove the leading Zero from the Query output in SAP BW ?

    Hi
    Experts,
    Vendor Number loaded  as   (0000010076) from R/3 to SAP BW.
    How to remove  Prefix  of Zero for  the Vendor Number(0000010076)  from Quey outpt.
    Regards.
    ASIT

    Hi,
    Please check out this thread.
    Remove leading zeros
    Also check if there is any conversion routine used for that particular infoobject.
    If ALPHA conversion is selected for your infoobject then it will automatically take away the leading zeros at query level.
    Regards,
    AL
    Edited by: AL1112 on Sep 16, 2011 9:15 AM

  • How can we put the leading zeros for the extract file.

    hello experts..
           Iam extracting values from one ztable in this for one filed length will be 2, for this field i need leading zero s at the time of extract... please help me....

    Hi,
    Declare the field as NUMC data type, automatically you will get the leading zeroes.
    Regards,
    Subramanian

  • How can I remove the leading zeros on jpg files?

    I'm looking for a way to remove the leading zeros on over 1000 jpg files, without changing the remaining digits in the file name. Is there some automated "batch" script?
    i.e going from 003405607.jpg  to  3405607.jpg

    You could write an AppleScript. but it will be easier to get and use a third-party file renaming utility. I use the freeware NameChanger which works quite well.
    https://www.macupdate.com/app/mac/21516/namechanger
    Regards.

  • Leading zeroes in ABAP

    How to remove leading zeros in ABAP?

    shift <field> left deleting leading '0'.
    U write ur code like this
    data a(9) value '000012345'.
    SHIFT a LEFT DELETING LEADING '0'.
    write:/ a.
    Output will be : 12345
    Or use this method also
    data a(9) value '000012345'.
    Call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
    Exporting
    input = a
    Importing
    output = a.
    write a.
    output:
    12345.
    Thanks and best of luck
    Reward if useful
    Ankesh

  • How to suppress the leading zeros , -ve sign in scripts

    Hi all,
    I was asked to suppress the leading zeros in a field while using a script.
    also how to suppress the negative sign in the scripts.
    Regards,
    Saroja.

    hi Saroja,
    <u>Sign</u>
    &ITCDP-TDULPOS& -> 100.00-
    &ITCDP-TDULPOS(S)& -> 100.00
    <u>zero</u>
    &DAY& -> 01
    &DAY(Z)& -> 1
    Hope this helps,
    Sajan Joseph.

  • Remove leading zeros using MDX function

    Hello,
    BO XI R3.1 SP2 FP2.5, SAP BW 7.0
    This seems simple, but I cannot find a solution.
    How do I remove leading zeros from a character field in a OLAP universe. Is there any MDX function?
    I tried
    <EXPRESSION>
    Value([0MATERIAL].[LEVEL01].[[20MATERIAL]].[Value])
    </EXPRESSION>
    <EXPRESSION>
    StrToValue([0MATERIAL].[LEVEL01].[[20MATERIAL]].[Value])
    </EXPRESSION>
    I can remove the leading zeros in Webi, but we require it for ad-hoc reporting? Is there a way to do this in the universe?
    Thanks,
    Nikhil

    Hi,
    SAP BW MDX only allows calcuated expressions that return numeric values: this is one if the main SAP MDX limitations.
    By the way there is the abilitiy to return string only for those expressions:
    [Dimension].currentmember.name
    [Dimension].currentmember.uniquename
    So you can do this:
    <EXPRESSION>
    (right([0MATERIAL].currentmember.name, 4))
    </EXPRESSION>
    <EXPRESSION>
    (right([0MATERIAL].currentmember.uniquename, 4))
    </EXPRESSION>
    <EXPRESSION>
    (left([0MATERIAL].currentmember.name, 3))
    </EXPRESSION>
    <EXPRESSION>
    (left([0MATERIAL].currentmember.uniquename, 3))
    </EXPRESSION>
    Otherwise you can use WebI formulas as described in the thread.
    Regards
    Didier

  • The leading zero in serial number..

    Hi all,
    Does anyone happen to know how to stop SAP from erasing the leading zero when entering a Serial number. I'm using profile 0003 (standard) and when a GR is posted the leading zeros are removed?
    Any help would be greatly appreciated.
    Best regards
    Begüm A.

    In the Standard SAP system, it is not possible to stop it from truncated the leading zeros.
    But if you are using  ECC6.0 and using Industrial Solutions, you may use the modification
    introduced by note 198285 to achieve this functionality.

  • Need to truncate extra leading zeros

    Post Author: dougatrueb
    CA Forum: Formula
    Dear Crystal Report Gurus,  I am trying to trucate the leading zeros in a feild that I am pulling from and ODBC table name {Inventory.ItemNumber}.  The item number will be similiar to 0000003785768 as an example, and I need it to trancate the leading zeros so the data looks like; 3785768.  Is there such a way to this easily? Thanks. Dougatrueb 

    Post Author: SKodidine
    CA Forum: Formula
    I am assuming that the itemnumber is a string.  If you want it as a string but truncate the leading zeros then do this:
    If NumericText({Inventory.ItemNumber}) thentotext(tonumber({Inventory.ItemNumber}),0,'','')else{Inventory.ItemNumber};

Maybe you are looking for

  • How do I get to use Xerces 1.2.1 or higher w/ wls 6.0

    We are trying to port our software from WLS 5.1 to 6.0. I am running into a problem because our code uses Xerces 1.2.1 (or higher) and WLS 6.0 is using 1.2.0. Initially, I was getting a null pointer error way down in my code. I traced this to a Xerce

  • Install WebAccess 8 on Windows Server 2008 R2

    I am running the installation of the GroupWise WebAccess 8.0.2 Agent and Application on a Windows 2008 R2 Server. The domain is on a local drive, running IIS7, and installing to the Default Web Site in IIS. It appears that the installation completes

  • AGP Graphics cards and Final Cut Pro...?

    Hello everyone, I just received a new computer today. Dual G5...It comes with the PCI Graphics Card. My old computer was a G5 as well but had a AGP Graphics Card. I reinstalled FCP4 today and tried to use it, but it says that the AGP Graphics card is

  • InDesign missed to update a linked InCopy

    Hello the following happened in a InDesign/InCopy-Workflow: We have several Editors and a view Designers. Everyone is working with PC (Windows XP) InCopy CS2 and InDesign CS2. The Files (incx and indd) are stored on a centralized filestore, so no cop

  • Loading the JNDI Tree in a Cluster

    Is there any special processing that occurs with a Startup class when it           has been           started via the cluster level properties file?           We've got a class that loads the JNDI tree for various configuration for           our appl