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.

Similar Messages

  • 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.

  • 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

  • How to get the leading zeros for decimal values?

    Hi,
      How i wil get the leading zeros for decimal values.For CONVERSION_EXIT_ALPHA_INPUT it is not working.Now iam using overlay condition for getting leading zeros.But iam getting the value like 00013.500.But as per my requirement i want to display this value 0000013.5.
    my code is
                    overlay w_MetLife_detail-rdempsalary with '000000000'
                    data :rdempsalary     type char9
    Please help me on this.
    Regards,
    Sujan

    Hi
    For more info,
    The function of the statement UNPACK is based on the fact, that the BCD display of a decimal place corresponds to the second half-byte of code of a digit in the most character representations. This conversion is commonly called "unpacking".
    The statement PACK to pack is obsolete and can be replaced by MOVE.
    If destination is specified as untyped field symbol or as untyped formal parameter and is not flat and not character-type during execution of the statement, then an untreatable exception occurs in Unicode programs. In non-Unicode programs, an exception occurs only with deep types, whereas flat types are treated as character-type types.
    Example
    After the assignments,char1 and char2 contain the values "123.456" and "0000123456".
    DATA: pack  TYPE p LENGTH 8 DECIMALS 3 VALUE '123.456',
          char1 TYPE c LENGTH 10,
          char2 TYPE c LENGTH 10.
    MOVE   pack TO char1.
    UNPACK pack TO char2.
    Regards

  • 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

  • How to retain the leading zeroes in a number in the excel output.

    Hi All,
    I have a requirement to display the numbers as text in the excel output. Ex: 001 should be displayed as 001 and not 1, as it happens in excel.
    I know displaying 001 as '001' works, but this is not acceptable.
    Also, I need to send a huge file (>20MB) through bursting as an Email, but the mail is not received even the bursting program finishes in success. I tried the zipping option as well but in vain. I know this can be done via FTP but I need to send it through email.
    Thanks,
    Rahul

    Maverick,
    See the admin these:
    Administration and Developer's Guide
    Report Designer's Guide
    Here:
    http://www.oracle.com/technetwork/middleware/bi-publisher/documentation/xmlpdocs-084437.html
    This will give details on how to split the output into multiple files during bursting. If my memory serves me correctly, it is in the admin guide.
    Kurz
    Edited by: Kurzweil4 on Dec 6, 2010 9:11 AM
    Edited by: Kurzweil4 on Dec 6, 2010 9:11 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.

  • How could I thoroughly close the Leading Zero function of Material No.?

    There are only a checkbox in SPRO with the function Leading Zeros of Material No. in
    Material Master->Basic Settings->Define Output Format of Material Numbers.
    But this function either make the Material ID full of Leading Zeros or delete all the Leading Zeros of it.
    Could I make the Material ID as normal string type without those functions?
    Because I want to set my Material ID as different between '0001234' or '00001234'.
    Could any one help me? Thank you very much.

    Hi,
    Yes, of course you can, on the screen "Define Output Format of Material Numbers", you can find an indicator "Lexicographical", If this indicator is set, material numbers are stored as follows:
    If the material number (numeric or not purely numeric) was assigned externally, it is stored left-justified as entered.
    Example
    Defined length: 8 characters
    Externally assigned number: 123
    Stored number: 123
    Note
    Any leading zeros that may have been entered are stored too. This makes it possible to distinguish between the material numbers 123 and 0123.
    If the material number (numeric only) was assigned internally, it is padded with leading zeros to the defined length and stored left-justified.
    Example
    Defined length: 8 characters
    Internally assigned number: 123
    Stored number: 00000123
    Activate it and make the number is assigned externally, then you can realize your request!
    Good luck
    Tao

  • EAN values truncationg the leading zeroes

    Hi experts,
    I have created two new EAN category for one category accepts one leading zeroes another category accepts two leading zeroes.
    In the material master i am trying to enter the same EAN values with different unit of measure system accepts the EAN value for one UOM and when i am trying to enter the same value for another UOM with two leading zeroes the leading zeroes are truncating.I can see the below warning message.When i press enter the leading zeroes are truncated.
    _EAN already used for unit of measure EA of this material_
    Please help me how to solve the issue.

    i guess this is coming because you have already mentioned the EAN no in one material amster and the data is maintained at client level so system is not allowing redundntcy

  • 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

  • Validation: How to maintain the entry in GB02C

    HI FI GURUS n EXPERTS,
    My requirement is that - We want to restrict Negative posting for some GL i.e. For some GL balance should not be Zero.
    When I have made the search on SDN, I found it can be done with the help of Validation: OB28 & GGB0.
    Currently we are not using any validation. When we use T-Code GGB0 --> Financial Accounting --> Line Item --> New Validation
    System shows a pop-up window to select Boolean Class & Message ID.
    I also found that this information is maintained in Table GB02C.
    When I use Se16 to see the detail of the table GB02C, I found there is only one entry Bool. Class: FP1 & Message ID 7F.
    But I don't know How to maintain the entry in table GB02C & What is the T-Code for it. which message ID I have to create.
    Please help.
    DSC

    Dear Alex,
    When I use: GGB0 --> Financial Accounting --> Line Item --> New Validation
    System shows a pop-up window to select Boolean Class & Message Class, I select the Message Class 9 and for Message Class Press F4 and select any message class. System gives an error message: Message ID must start with 'Z' Message no. GB116.
    Basically, My question is that: Which T-Code we have to use to maintain Boolean Class & Message Class.
    With thanks,
    DSC

  • How can i avoid leading zeros for a field in smartform?

    how can i avoid leading zeros for a field in smartform?

    Hi,
    Using the Symbols.
    &symbol(Z)&  Omit Leading Zeros  &symbol(S)&  Omit Leading Sign 
    &symbol(<)&  Display Leading Sign to the Left 
    &symbol(>)&  Display Leading Sign to the Right 
    &symbol(C)&  Compress Spaces 
    &symbol(.N)&  Display upto N decimal places 
    &symbol(T)&  Omit thousands separator 
    &symbol(R)&  Right justified 
    &symbol(I)&  Suppress output of the initial value 
    Regards,
    Shiva Kumar

  • 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.

Maybe you are looking for

  • Why doesn't a new event I make in iCal show up in iCloud or iPhone?

    I have iCloud activated everywhere!

  • Reloading a new JSP/Jar in Tomcat Server

    HI, I face these problems now. My environment is Oracle Jdev 3.2.3 for JSP development. Tomcat4.0.1 as Application server plugged into IIS webserver and Using oracle 8i as the database 1. Whenever I update my JSP's and Application jar files, I copy f

  • Get my IP delisted

    I've tried repeatedly to get my IP delisted. We got a new block of IP's from our ISP, and I have checked that we are not on any other blacklist.  Emails send everywhere else on the internet apart from 365 users. Emailing one of my customers is on 365

  • Moving User's Home Directory from one Xserve to another

    Does anyone know the procedure for moving users (Home Directory) from one server to another? Is there an application that can do this? Xserve G5   Mac OS X (10.4.4)  

  • Unicode question (# in file)

    Hi, I am uploading a file with GUI_UPLOAD and downloading this file again on the SAP Server with OPEN DATASET IN BINARY MODE / TRANSFER / CLOSEDATA SET on a UNICODE system. When I look in AL11 to the downloaded file I see a lot of # (#<#?#x#m#l# #v#e