How to add leading zeros to a characteristic in CT04

The business is requesting that we change a class characteristic so that it adds leading zeros.  Currently the characteristic is set as numeric with length of 6, no decimals.  Is there any way via template or otherwise to force this characteristic to store leading zeros, as recorded against the characteristic?

Hi David,
1. If you are mentioning about the "Characteristics"This is Standard Field name.
2. You will not be able to influence the same,
3. Also i doubt if you are talking about the Characteristic Value - Since only in the Char Value we will be able to define the length, etc.
4. In case of Charvalues if you want leading zeros then create it as character , where you can store with leading zero
Reg,
Dsk

Similar Messages

  • How to add leading zeros to a packed variable

    Hi all,
    I have a to add leading zeros for a packed field.
    eg.
    Data : brgew like mara-brgew.
    brgew = '12.063'.
    but I have to display the field as '0000000000012.063'.
    How can we achieve this?
    Regards.

    Execute the code .
    REPORT zex13 .
    Data : brgew like mara-brgew.
    brgew = '12.063'.
    data:val(18) type c,
         in(13) type n ,
         dec(6) type c.
    data :  a type i ,
            b type i.
            a = TRUNC( brgew ).
            write:/ a .
    in = a.
    write:/ in.
            dec = frac( brgew ).
            write:/ dec.
            concatenate in  dec+2(4) into val separated by '.'.
            write:/ val.
    see if this works for u .
    regards,
    vijay

  • How to add leading zeros ?

    Hi Friends,
    I have a shipment no say 10 char long . Now the thing is in my program I need to add leading zeros if the shipment no is not 10 char long .
    For eg : if the tknum is 99919 . I need to make use of a command to make it 10 char long lke 0000099919.
    Also I need to be able to add zeros if tkum is 5 or 7 or 8 char long .
    How do i add these leading zeros to fill up the remaining positions ?
    Thanks,

    hi ,
      use the following code.
    data : lv_vbeln(10) type c.
           lv_sonumber like vbak-vbeln.
    <b>This function module will convert the data into the required format based on the data type of the variable that you are passing in import paramter of the funcation module.</b>
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
              EXPORTING
                        INPUT         = lv_vbeln
                     IMPORTING
                       OUTPUT        = lv_sonumber
    Thanks
    mahesh

  • Urgent........How to add leading zeros to negative values.....

    Hi,
    I want to add leading zeros to negative values.
    <b>Present Value    :</b> -567
    <b>Expected Value :</b> -0000000567
    I know to adding leading zeros with the help of CONVERSION_EXIT FM.
    Thanks in advance.
    Regards,
    Kumar.

    Hi
    Use below FM.
    CONVERSION_EXIT_ALPHA_INPUT
    Try out below FM with the above one.
    <b>CLOI_PUT_SIGN_IN_FRONT</b>
    <b>ISJP_GET_SIGN</b>
    or you can use
    <b>WRITE variable USING EDIT MASK '-___________'.</b>
    or
    <b>CONCATENATE syntax</b>
    Hope it will solve your problem
    <b>Reward Points if it is helpful.</b>
    Message was edited by:
            ilesh 24x7
    Message was edited by:
            ilesh 24x7

  • How to add leading zeros to kunnr field

    Hi All,
    I need to add leading zeros to KUNNR field runtime.
    i.e for some customer it is displaying '2001084606'
    some customer's it si displaying '10434'.
    I want add leading zeros when customer length is
    not equal to ten '10'.
    plz kind let me know this is urgent.
    Regards
    Bhaskar

    Hi there,,
    Kunnr is using a dataelement with Char 10.
    You can do in this fashion to resolve your issue.
    len = strlen (itab-kunnr).
    len is having the lenght of the customer number.
    if len < 10..
       while len < 10.
          concatenate '0'  itab-kunnr into temp_text.
          add 1 to len.
       endwhile.
    endif.
    now finally you can assign temp_text to your itab-kunnr.
    hope this way you can resolve your issue.
    if found helpful,, don't forget to reward points.
    Thanks-
    Rahul.

  • How to add leading zero using the toString() function?

    Hi,
    I've looked in the user manual and I can't find any reference to toString() for syntax information.  Isn't there a parameter for me to use to specify the string lenght?  And whether to add leading zeros or not?
    Here's the code I need to add leading zeros:
    playbutt.addEventListener(MouseEvent.CLICK, playSound);
    function playSound(e:Event)
    SoundMixer.stopAll();
    var num:Number = Math.ceil(Math.random()*43);
    bigNum.text = num.toString();
    var path:String = "Track No" + bigNum.text + ".mp3";
    trace(path);
    var s:Sound = new Sound(new URLRequest(path));
    s.play();
    The files I'm trying to open starts at "Track No01".
    Any ideas?
    Ron

    Thank you for the code replacement.
    By the way, instead of having the user click a button to start a random music file (MP3), I'd like to get the music going as soon as one loads a webpage and once the first tune is finished playing jump to another randomly selected music file (MP3).
    I've search via Google for ideas but couldn't find anything that came close to what I need done.
    Any ideas?
    Regards,
    Ronald

  • How to add leading zeros to hex string?

    Hi, I've got the following problem:
    I have a string that represents a 8-digits hexadecimal number. But if the number has less as 8 digits, I need to add the leading zeros. I can't use DecimalFormat, 'cause it works only with decimal numbers. Is there any elegant solution to add the leading zeros to hex string (for example "A3F" to "00000A3F")

    Or better use a StringBuffer for that, though I doubt it's a performance problem in your case.

  • How to maintian leading zeros in BI ?

    Hi All,
    We have a requirement for one InfoObject called "0RPA_MEAN" EAN Assignment to Article for this info object i need to maintain a leading zeros as its coming from R/3 end?
    Ex: In R/3 side EAN 123 is different than EAN 0123,EAN 00123.
    But while extracting in BW end the the leading zeros is getting skipped off?How to retain the leading zeros?
    In rsa3 its coming with the same leading zeros but in psa its not showing it?
    This is very serious issue going on, need your valuable inputs on this?
    Many thanks in advance.
    *Points Assured*

    Hi Rakesh,
                       When you extract data to BI there won't be any leading zeroes. So in PSA there won't be any leading zeroes.
    To bring leading zeroes from PSA itself.
    Double click on your datasource in rsa1. Click on the 'Fields' tab. Type 'ALPHA' for the source system field under the column 'Conv. Routines'. I think that will solve the problem.
    To bring leading zeroes after PSA (ie. from transformation onwards)
    But when load data from PSA to further data targets using transformation we can add leading zeroes.
    So in transformation click on rule details for that info object. In the rule details you have to use a function module called 'CONVERSION_EXIT_ALPHA_INPUT'.  when you use this function module the leading zeroes will be added automatically.
    Thanking you,
    Jerry
    Edited by: jerryabap on Oct 14, 2010 5:52 AM

  • Add leading zero

    hi im trying to add leading zeros in vendor number
    im using the fm 'CONVERSION_EXIT_ALPHA_INPUT', its not working
    anybody knows how else i can do that

    Well, I made this example, adapt it to suit your needs.
    DATA: vendor(10) TYPE c VALUE '452'.
    START-OF-SELECTION.
      SHIFT vendor CIRCULAR RIGHT.
      WHILE vendor(1) = space.
        SHIFT vendor CIRCULAR RIGHT.
      ENDWHILE.
      SHIFT vendor CIRCULAR LEFT.
      OVERLAY vendor WITH '0000000000'.
      WRITE vendor.

  • How to add prefix zero to all matnr fields in itab

    Hi,
      I ve a internal table with following fields
      Matnr                                                  bwkey                            
      6                                                        678                                 
      67                                                      rty     
      678                                                    78k                                
      How to add prefix zero to all tha matnr fields.
      like
    matnr                                     bwkey
    00000000000000006                678
    00000000000000067                rty
    00000000000000678                78k
    Thanks in advance

    Hi,
    commonly used conversion routine is ALPHA.
    It is conversion used to insert leading zero for document number.
    For example, in sales order (VBAK-VBELN length 10),
    when we key in order no, for example we key in '4302',
    conversion routine input will automatically add leading zero,
    so it will become '0000004302', this is real value stored in table VBAK.
    On conversion routine output, it will delete leading zero
    function CONVERSION_EXIT_ALPHA_INPUT, this will add leading zeros to a character based field of any length.
    Ex:
    data: lv_c(10) type c value '123'.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                      input = lv_c
              importing
                     output = lv_c.
    write:/ lv_c.
    Regards.

  • File rename doesn't add leading zeros to renaming files sequence? And a pat on the back to the LR de

    First of all, LR truly rocks. Any Adobe folk reading this, please take this note as a massive pat on the back for your team. There's a lot of childish and naive negativity from people posting in this forum. And I suspect from folk who are not really your key market for this app. I feed my kids by running a photography business and have been shooting digital since the early 90s...ya know...
    LR will be looked at as a massive sea change in the development of digital photography. The first time the entire workflow process is truly viable from end to end. What will make LR the ultimate winner in it's field is simply the integration with Photoshop. Aperture, Capture One etc cannot ever beat LR regarding this and so, just like the way that Excel and Word and Powerpoint all work together and everyone uses them, LR will inevitably become the de facto standard way of managing RAW images for pro photographers.
    Even with the few bugs (specifically file movingon Mac OS10.4.9) LR has shaved HOURS off our workflow. We shoot around 250 gigs of images a month in our weddings and event business. Now all of our editors use LR. No more Capture One etc for us.
    Here's the question - There seems to be no way to add leading zeros to a file rename command. So if you rename a batch of images they appear as 1,2,3,4,5,6,7,8,9,10,11,12 etc so now when I look at them in Bridge or other apps, they are now sorted 1,10,11, etc
    Now let me tell ya this is a pain.
    Any comments or comfort that is is a known issue would be appreciated. All we want is a way to have the rename add the leading zeros like most other apps do...
    Best to all
    William Henshall
    www.californiaweddingphotos.com
    PS By the way, I am a HARD *** about shoddy unstable software sold to pro photographers as the "prefect solution" that doesnt work as advertised...I am that guy that the tech support guys at certain companies dread. Yep, I simply expect an app to do what it says, just like the car I buy. I once resorted to sending the CEO of a certain software company an invoice for my time restarting, reinstalling the OS and bug finding another similar app. You can image, I got a personal call...heh...

    William-
    <br />
    <br />I just changed a folder of 85 images' names, and typed in 001 as my starting number. While no zeroes were prepended, the pix show up in order both in the Finder and in Bridge CS3.
    <br />
    <br />Say a bit more about file moving on your Macs.....
    <br />
    <br />
    <span style="color: rgb(102, 0, 204);">John "McPhotoman"</span>
    <font br="" /></font> color="#800000" size="2"&gt;~~ John McWilliams
    <br />
    <br />
    <br />
    <br />MacBookPro 2 Ghz Intel Core Duo, G-5 Dual 1.8;
    <br />Canon DSLRs

  • Add leading zero's function

    Hey,
    can anyone tell me what is the java function for add leading zero's in xi mapping.
    TX

    Hi Zevik,
    As other threads mentioned used FormatNum and double click and put Zeros. Like if the lenght is 10 then put 10 zeros. Here one thing you should analyse is, if your input value has a string value it will fail in FormatNum becuase it expects only the numeric value.
    So if you dont know whether your input has numeric or alphanumeric then go to UDF. So create a udf with name AddZeros and as Value with one argument as input.
    Imports:  java.*;
    Then add this code:
    int len=input.length();
    for(int i=0; i<10-len;i++)
    input="0"+input;
    return input;
    Here I am assuming the total length is 10. If yours is 20 then put 20 instead of 10 in the second line of the code.
    Regards,
    ---Satish

  • How to remove leading zero from Material Number

    Hello Everyone,
    I need to figure it out how to remove leading zero from material number. Cureently extractor is sending material number as 100663. But when comes into BI i am getting as "000000000000100663" and similariy in report it is appearing as "000000000000100663". Now my client wants me to exclude preceeding zero for a material in all the reports.
    Is there any setting in query desinger to handle this issure or in the backend.
    Need your inputs.
    Thanks,
    Lasya.

    Hi
    you can use the function Module
    CONVERSION_EXIT_ALPHA_OUTPUT in the start routine
    to test this go to SE37  --- give the CONVERSION_EXIT_ALPHA_OUTPUT -
    >display -
    > F8
    in the input give 000000456
    and execute
    the out put will be 456
    for getting Zeros you can use
    CONVERSION_EXIT_ALPHA_INPUT--- to remove leading zeros
    Santosh
    Edited by: Santhosh Nagaraj on Oct 29, 2009 10:52 PM
    Edited by: Santhosh Nagaraj on Oct 29, 2009 10:54 PM

  • How to remove Leading zeros from MATNR "at Database Level"

    Hi,
    When we create a material in MM01 , we can either create material as Internal Material No. or External Material No. (By Explicitly entering a material No.)
    Our requirement is that: When we create an Internal Material , there should NOT be any Leading Zeros in MATNR.
    and for External Material No.  , Leading Zeros Should be there.  (In Database)
    1) Now , we can create the No. Range for material in such a way that it will allow only AlphaNumeric entries for Internal Material , and Only Numeric Entries for External Material No.
    This should slove the Purpose.
    But According to the Client's requirement , Material No can be Numeric OR Alphanumeric for Internal As well as External Material No.
    2) We can Add or Remove leading zeros from MATNR at application level.  i.e.  we can find some BADI / Enhancement where we will Use the Conversion FM (CONVERSION_EXIT_MATN1_OUTPUT or  CONVERSION_EXIT_ALPHA_OUTPUT) and remove Leading Zeros from MATNR. But these changes will NOT reflect at Database Level , Because in MATNR Domain , there is a conversion Routine  , That will Add Leading Zeros in MATNR While saving in the Database.
    3) While Displaying the Material In SE11 , we can also set the "Display Format" as With leading Zeros OR Without Leading Zeros.
    But we dont want to Just "Display" material with OR Without Leading Zeros.  we want to actually create materials in that way.
    What can we do , so that at Database Level our changes are Reflected.
    Thanks and Regards,
    Anand Gore
    Edited by: anandgore on May 18, 2011 3:47 PM

    That will Add Leading Zeros in MATNR While saving in the Database.
    That is because you have it configured that way.  You can configure the storage as you desire.  The default is the behavior you are describing.  You, or your functional analyst, need to review the documentation on the MM config settings for material master number storage.
    Never use CONVERSION_EXIT_ALPHA_OUTPUT for material conversion.  Also keep in mind that the MATN1 functions have their own BADI for extended formatting...

  • How to remove leading zeros from variable

    hi,
       how to remove leading zeros from variable like it_vbap-matnr.
    value in it_vbap-matnr is 000000000000000358
    i want to remove leading zeros so that it become 358
    regards
    deepak

    You can use Function Module <b>'CONVERSION_EXIT_MATN1_OUTPUT'</b>
    This Function Module will eliminate leading Zeros.
    For each MATNR Value read form DB Table,u can eliminate Leading zeros and then modify ur Internal table.
    I think u will not get leading Zeros into utr Internal table when u read from VBAP.
    Bcoz MATNR in VBAP itself have Conversion routine.
    If u r getting leading zeros,U can use following Logic.
    tables:
      vbap.
    data:
       t_vbap like standard table of vbap.
    select matnr
    from vbap
    into corresponding fields of table t_vbap.
    loop at t_vbap into vbap.
      CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
          EXPORTING
            INPUT         =  vbap-matnr
          IMPORTING
            OUTPUT        =  vbap-matnr
      modify t_vbap from vbap transporting matnr.
    endloop.
    Hope this will work.....

Maybe you are looking for

  • Error while running jsp page

    Hi, While running JSP page in weblogic I am getting following error. java.lang.NullPointerException      at java.util.Hashtable.put(Hashtable.java:396)      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)

  • How to read from a xml file(in String format) using a java program

    hi friends i have a string , which is xml format. i want read the values and display it.can any one suggest how to read a xml file of string format using a javaprogram thanks

  • Insert failed in Java Proc

    Here is my class public static String OnlyInsert( int v_AccommodationVendorID, int v_AccommodationTypeID, int v_AccommodationRateTypeID, int v_PeakPrice ) throws SQLException String val = "yes"; String x = ""; String insSql = ""; String tDate = "TO_D

  • R/3 to R/3 IDOC Sending with HTTP

    Hello everybody, I'm trying to send an Idoc from one R/3 System to another, I'm trying to use the function module IDOCS_OUTPUT_VIA_XML_HTTP and it requires an XML HTTP port in we21, now I'm trying to create an HTTP RFC connection but I'm lost with th

  • Dynamic vi not in memory in exe

    Hello, I am using LV 2009 SP1. I am trying to build a "Main.vi" into an exe, in which this Main.vi needs to dynamically call two vi "A.vi" and "B.vi" using call by reference node. Therefore in the Build Specs/Source Files, I've put A.vi and B.vi into