How could I delete leading zeros in a p decimals 2 field in an internal tab

how could I delete leading zeros in a p decimals 2 field in an internal table. Could you give me an short example

Hi,
Use SHIFT
Example..
DATA: V_CHAR(10) VALUE '0000012345'.
SHIFT V_CHAR LEFT DELETING LEADING '0'.
WRITE: / V_CHAR.
Thanks,
Naren

Similar Messages

  • How to delete leading zeros for amount  fields

    Hi all,
    I have problem with the leading zeros, where I am populating nearly 30 amount fileds in my  statement.i want to delete leading zeros.
    I have tried with shift and pack.
    and I cannot call every time the function module *alpha_output or input.
    can anybody suggest me the better solution.
    Regards,
    Sre

    You could use a syntax like 
    SHIFT: w10a LEFT DELETING LEADING '0',
           w10b LEFT DELETING LEADING '0',
           w10c LEFT DELETING LEADING '0',
           w10d LEFT DELETING LEADING '0'.
    or using macros like
    DEFINE delzero.
      shift &1 left deleting leading '0'.
    END-OF-DEFINITION.
    delzero: w10a, w10b, w10c, w10d.
    Regards

  • Delete leading zeros for material in mapping.

    Hi,
    How to delete leading zeros for material like 0000000128736 if so I am expecting 128736 only.
    We need to consider if I get  material number is like RPG2389 .
    Thanks,
    Vinay.

    Hi,
    If you will be getting alphanumeric codes, it would be best to use a UDF with a regex-expression.
    UDF Type:
    ContextType
    imports:
    java.util.regex; (if you are using PI 7.1 you must remove the semicolon)
    arguments:
    input1
    Here's the code (courtesy of Sun Developer Network):
            Pattern p = Pattern.compile("[^a-zA-Z]");
            Matcher m = p.matcher(input1[0]);
            StringBuffer sb = new StringBuffer();
            boolean output = m.find();
            while(output) {
                m.appendReplacement(sb, "");
                output = m.find();
            m.appendTail(sb);
    result.addValue(input1[1]);
    Now to solve the leading zeroes, just add formatNumber: 0 after the UDF and it will work.
    Hope this helps,

  • Delete leading zeroes

    Hello,
    Does anyone know how to delete leading zeroes in a mapping ?
    I don't think there is a standard function for this, or am I wrong ?
    Regards,
    Marco

    hi Marco,
    create a simple function that will use the code below:
    String stringWithZeros = "0000123490";  
    String stringWithoutZeros = stringWithZeros.replaceFirst("^0+", "");
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Deleting leading zeros - complication

    Hi ,
      i need to delete the leading zeros in a value .
    eg.
    gv_manuserf type c10.
    gv_manuserf = '0000B34234'.
    i need to delete the leading zeros in this . i tried conversion exit alpha output not working . also used shift statement still not working.
    can anyone help me in this how to remove the leading zeros for the above value.
    since the character B is there it's not deleting. if i remove that B FM is working. But my program has the valie B in that. Pls help me in this.
    Regards,
    Rose.

    Hi Rose,
    As far as i remember about this concept we use SHIFT or go for the splitting phenomenon
    gv_manuserf is character typr of length 10.
    gv_manuserf = '0000B34234'.
    To delete the leading zeros in this
    SHIFT <string> LEFT DELETING LEADING <symbol>. 
    <string> is  gv_manuserf  string,
    <symbol> is the symbol that you want to  shift out '0' in your case.
    Please let me know
    1) what is the syntax you have used in your program for SHIFT.
    2) Will the B always be the start of the string followed by zeros i mean is it constant.
    By giving the answers for the above i think it can be possible to go for other alternative of string splitting.
    Thanks
    Srikanth.P

  • Delete leading zeros for a field on the pdf form

    Hi,
    i know it is possible to delete leading zeros via abap coding in the interface.
    But is it also possible to this directly on the pdf form - scripting or a setting?
    Thank you
    Kind regards
    Manfred

    I believe you can set this up as a field display pattern (if you use LCD 8.1 or something like that).
    Or you can script that out. In formcalc you can easily process characater by character, test if that is zero and remove it.
    http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
    Otto

  • How could I delete an open item display?

    Hello,
    After creating and saving a new display in FBL1N t-code I realize that I don't need it any more but I am unable to delete it, how could I delete it?
    Regards,

    Hi,
    When you are in FBL1N results screen, go to Menu - Settings - Layout - Administration. You could mark the layout and delete it.
    Regards,
    Eli

  • 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

  • How load ean with leading zeros

    Hi,
    I need help for load leading zeros in ean. If someone can send me the documentation of why SAP delete leading zeros when to load ean code in the field mean-ean11 and mara-ean11. I'm consultan and the client need know this aswer. Because they no want load the articles without zeros. Now if knowledge a enhancement please.
    We are using SAP Retail ECC 6.0 and I finding to very notes and I can't find and answer.
    Thank you,

    Hi friends,
    My general problem is that I'm using the idoc ARTMAS05 but when to load data delete leading zeros in EAN fields.
    Example of my problem:
    I have a article with this ean code 0056789 and have other article with this ean 00056789, but when to load data the second article it is no stored because shows error message "Ean code already exits". Now I´m finding the way for to be able to load the zeros of the ean.
    I have 23000 article with this problem.
    Thank...

  • How could we delete transport request and task(the released one)

    Hello
    We have a released transport task(not request). Transport request is not released.
    How could we delete transport request and task(the released one). Namely we would not like to transport it to production

    Hi, never delete directly in table.
    There are more tables which depends each other...
    Here, you can find nice example how to do it: Help on ABAP: Few Tips for Transport Request Manipulation
    Using program: RDDIT076 and changing status.

  • How could I delete files with name string with "TAL" and older than 05.05.

    How could I delete files with name string with "TAL" and older than 05.05.2009 on unix

    Our ECC Ides system today was not responsible. For first time 17 users were working on the systtem (IWN2008/SQL2005 based). Before the people were maximally 5.
    The server is done by making a homogeneous system copy from an blade machine(now it is an VIrTUAL)
    There was enaught disk space. However I checked Wokload 03sdn transaction) inn system. and found out that at that time of restarting(I had to restart system 3 times to get logged on the system and even then it was almost unresponsive.
    I can found in there top abap."Login_Pw", "SESSION_MANAGER", "?". (BAtch), "ADMSBUF, >DEleyed Function call, RSPOWPOO""RSWWclear", ""VA01", "SAPMHHTP  "Buf  Sync" >DDLOC CLEANUP)""rsbtctE"
    What can I do?
    ¸
    Who could interfer SAP_CCMS_MONI_BATCH_DPSAP_CCMS_MONI_BATCH_DP
    the 2 main users under users profile were ZUGTIN running and SAPSYS( running many system jobs)
    How to approach the problem

  • HT4436 how could I delete my mail to decrease my storage of my iCloud storage coz I'm already on maximum storage.

    To whom it may concerne,
                      I avail maximum storage on ICLOUD which is 50GB but I found out that the mail apps took me so  much eaten my  storage which is not other email not important to me. so on this scenario how could I delete information to my MAIL section to lower and control my storage capacity.
    B/rgds
    Ricky

    iCloud: Managing your iCloud storage

  • How can we supress leading zeros?

    how can we supress leading zeros?

    use
    <b>CONVERSION_EXIT_ALPHA_OUTPUT</b>
    Conversion exit ALPHA, external->internal
    ALPHA conversion is used especially with account numbers. During conversion from the external to the internal format, the system checks to see if input in the INPUT field is purely numeric, that is, if this input consists only of numbers, possibly with spaces before and after them. If this is the case, then the number string is inserted right- justified in the display field OUTPUT and all spaces to the left of the value are filled with zeroes ('0'). If the input is not purely numeric, it is inserted in the display field from left to right and all extra spaces are filled with blanks.
    Example:
    (Input field and output field are both eight characters in length)
    1. '1234 ' --> '00001234'
    2. 'ABCD ' --> 'ABCD '
    3. ' 1234 ' --> '00001234'
    Conversion from the internal to the external format (function module CONVERSION_EXIT_ALPHA_OUTPUT) is undertaken in exactly the opposite manner.
    Usage:
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
    input = v_input
    importing
    output = v_output
    exceptions
    others = 1.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • 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

  • How to delete leading zeros in sap script

    Hi
    In sapscript iam facing an issue with num4 field.
    Iam using this field to display Serial.No
    it is displaying '1' as 0001 i want to display here 1 with out leading zeros.
    If there any solution let me know

    Hi,
    Try below code
    data: w_vbeln type vbak-vbeln,
    w_char(10).
    w_vbeln = '000012345'.
    write w_vbeln to w_char no-zero.
    or
    The function Module 'CONVERSION_EXIT_ALPHA_OUTPUT' is used to remove the leading zeros in a field.
    the following is a sample code which i have used for 'Commitment item' in my report. replace the field with your required field.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    EXPORTING
    INPUT = IT_FMIT1-RFIPEX
    IMPORTING
    OUTPUT = IT_FMIT1-RFIPEX.
    Regards,
    Chandru

Maybe you are looking for

  • Duplicate entries when syncing

    Hello--- Sort of MAC newbie here. Recently, when I've been syncing my TREO 650 phone to Entourage, I notice that holidays and some events and appointments are listed twice after the sync. Can anyone explain what's going on? Am I doing something wrong

  • Confition type FRC1- how to get the change log,

    Hi, When  the condition type FRC1 automatically gets deleted (deletion flag),. and we are not able to see the change log for the same. how the Conditions are deleted. Or if at all any one has deleted, how to get the change log,

  • Split View - Design side jumps

    I've come to the conclusion that the most exhausting part of working with Dreamweaver is chasing down my previous location on the Design side of the Split View after making a code change. What is it witth that? Example: If I select an area on the des

  • I have a Pop up blocker that i cannot uninstall

    For weeks, I have been experiencing an ongoing issue with my MacBook pro. I got my battery replaced, and then afterwards... I began getting all these unwanted pop ups, as well as ads regarding cleaning my MacBook.  Additionally, I cannot open ANY att

  • Blocky lettering from Photoshop file

    I am trying to lay some photoshop files of text over some video material. Unfortunately when I render the video the text comes out very blocky. It's a PAL DV project if that's makes any odds. Any help would be much appreciated. Thanks J