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

Similar Messages

  • 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

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

  • 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 to remove leading zeros for an item number within quickviewer

    how to remove leading zeros for an item number within quickviewer. Pls help

    ask your abap guy to do  it. not portal guys business.

  • 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

  • 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 remove leading Zeroes in all fields in Payload

    Hi,
    How can I remove the leading Zeroes in every Filed I have in whole Payload Structure.there are around 10000 fields that have to be removed the leading Zeroes.any good idea please.
       <POSNR>000010</POSNR>
      <MATNR>000002465640</MATNR>
      <ARKTX>000012 KG D107</ARKTX>
      <MATKL>00030010000</MATKL>
      <WERKS>0000ORGC</WERKS>
      <LGORT>0000GC55</LGORT>
      <CHARG>000TEST</CHARG>
    like this mutliple segments and multiple Fields.so  I can take as whole payload with multiple fields should not have leading Zeroes.I can handle if they are 10 0r 20 fileds,but not like whole pay load/1000 fields right.
    thank you,
    Prem

    Hi
      You can have an additional XSLT mapping, to your existing one..
    use copy-of & apply-templates to copy the whole tree & make changes recursively.
    below is a sample code , the marked line is where you need to try your logic of trimming Zeros. (this code does upper case)
    add this below code in your interface mapping object, as XSLT mapping, which does the job (only try putting your logic)
    <xsl:stylesheet
                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                      version="2.0">
                <xsl:output  method="xml"
                            indent="yes"
                            omit-xml-declaration="yes"/>
                <xsl:template  match="*">
                      <xsl:copy>
                            <xsl:copy-of  select="@*"/>
                            <xsl:apply-templates/>
                      </xsl:copy>
                </xsl:template>
                <xsl:template  match="text()">
                      <xsl:value-of  select="upper-case(.)"/>
                </xsl:template>
          </xsl:stylesheet>
    hope this fixes your issue
    Regards
    Vishnu

  • Add leading zero for character field on ALV

    hi all , 
        i am currently making an ALV report. i have a field which is 'rassc' char(6) in the internal table which should be shown on the report.
    before i use function to show alv report , i saw the value of this field is '080' , but what i get on the report is '80'.  i want the leading zero . but i don't know how .
    plz guide me.
    regards
    Kevin

    hi,
    check this.
    DATA:
    var TYPE matnr.
    WRITE '80' TO var RIGHT-JUSTIFIED.
    TRANSLATE var USING ' 0'.
    WRITE: var.

  • How to avoid printing zero in amount field in adobe forms

    Hi All,
    If the amount is empty in the amount field then it is printing 0,00. I have written some peice of code to avoid printing that value. I wanted to print space.
    Below is the  logic which  i have tried in  javascript.
    if  ( this.WRSHB.rawValue == null )
    this.presence == "hidden";
    if  ( this.WRSHB.rawValue == '0,00' )
    this.presence == "hidden";
    I am still able to print 0,00 in the form output.
    Can anyone please help me out in achieveing the same ? Am I missing anything in the javascript coding?
    Thanks and Regards,
    Karthik Ganti.

    Hi,
    Issue is fixed. I have written the above code in Form ready event and changed the amount field type to text field. It worked. Thanks.
    Thanks and Regards,
    Karthik Ganti.

  • Leading zeros in Numc field

    Hi all,
            help me in  the issue . I am passing  value to a numc(3) field . lets take the value as '073' but it is showing as 073 in the output . How to acheive leading zero for the same in the output for a standard field.
    Thanks in advance

    data : num(3) TYPE C VALUE '073',
           val(3) type N.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = num
    IMPORTING
    OUTPUT = val .
    write : val
    No Eric FM CONVERSION_EXIT_ALPHA_INPUT also work. Try the above code.
    /Edit: Ohh.. Go as per my earlier post.
    Edited by: Mishra.Manas on May 5, 2010 1:39 PM

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

  • Leading Zeros for variable vlaues(Date)

    Hi,
    How to remove leading zeros for variable values.
    For example;
    Comapny Code by Auth: 007.2004(July 2004)
    How to take out the first two zeros or first zero.
    Any suggestions would be of great help.
    Regards,
    Suresh

    How is that related to sql develper?
    Did you read the forum title? - SQL Developer (Not for general SQLl/PLSQL questions)

  • How to delete table content for particular filed in a table?

    Hi Experts,
    How to delete table content for particular field in table?
    Thanks
    Ravilla

    Is it a standard or customer table, changing a standard table with non-standard tool can raise database inconsistencies...
    Then use search tool for &SAP_EDIT (*) or look for BAPI/BDC...
    Regards,
    Raymond
    (*) Also look for notes from 1420281 - CO-OM tools: SE16N: Deactivating &SAP_EDIT to 1915828 - CO-OM-Tools: Technical enhancement of SE16N

  • 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

Maybe you are looking for

  • Basic Ring Tones on iPhone are Very Poor

    As a business professional I am very pleased to pull out my iPhone and show it to other business associates. However, I am extremly dissapointed in the childish assortment of ridiculous ring tone options that are offered on this phone. I understand t

  • Resizing a photo ...

    I just downloaded Starter Edition and have a picture that is slightly over 3 MB that I want to make a copy of that is 1 MB or less to upload to a site. How do a make a copy with a different size in PSA Starter Edition 3.2?

  • Really ticked off with BT wasting customer's time ...

    It's the last bit of the post which I am even more ticked off about, today BT WASTED even more of my time for no reason.  Here's the background though, and the reason for asking (again) for my call back. During last year our area (Pembroke Dock, Pemb

  • Oracle soa suite

    Hi everybody Does anyone know if the oracle soa suite 11g can do the fault handling with the rollback mechanism??? or is the compensation activity the only alternative??. If the rollback mechanism does exist, since which version the rollback mechanis

  • OT: =?iso-8859-1?Q?L=E4nderlisten_f=FCr?= dropdowns

    Jahre ists es her, seit ich mich hier zuletzt blicken liess....hatte schon die Befürchtung dass es die NG gar nicht mehr gibt..und dann komm ich nun gleich mit nem OT.. Für eine neue Site bin welche in den Sprachen DE, EN, FR, IT, CN, JP benötige ich