Supress preceding zeros in script

Hi Friends,
     Currently i am working on quotation. My main requirement is i want to suppress preceding zeros in the output, for that i am using (z) to the variable, but also it is not
suppressing the zeros in output .
ie
I am using &Zvalue(Z)&  but  i am getting out put as 00234.
I want to get output as 234.
kindly help me.
regards,
desha.

hi desha,
U can avoid preceding zeros by using 'no-zero' while printing.
for example,
data: v1(10) type c value '0002.800'.
write: / v1 no-zero.
i think it will useful for u.
Rewards points if useful,
Thanks,
Usha

Similar Messages

  • How to display preceding zero's

    hi,
    In the standard purchase order script i want to display material number including preceding zero's.
    can anyone suggest me the solution?
    regards
    prajwala

    In the standard purchase order script i want to display material number including preceding zero's.
    can anyone suggest me the solution?
    Hi,
    First you can create one Subroutine in Window to Transfer value from and to Subroutine pool program.
    in Subroutine pool program write one routine to Convert the Purchase Order number into you needed requirement. For that You use CONVERT_EXIT_ALPHA_*** Function module or UNPACK command.

  • How to supress blank page in scripts?

    Hi gurus.
    can any one let me know how to supress blank page in scripts? When one of my condition satisfies it should print two pages and its working fine. When condition fails, it should print one page but its printing blank page as second page.
    Waiting for your answer.
    Urgent
    Regards,
    surya.

    hi,
    1. By providing the control commands in scripts,u can supress the blank pages.
    2.write the data between protect and end protect.
    3.Enclose the text that you want to prevent page-break in PROTECT... ENDPROTECT
    SAPscript will ensure that each line of this text is printed together on the same page.
    /: PROTECT
    Text
    Within
    The same page
    /: ENDPROTECT
    Regards,
    SHIVA(reward if helpful).

  • Renaming image files - LR doesn't accept preceding zeros

    I have finished editing in the develop modules & deleted some additional photos in the shoot during the editing process. I do review & delete most of my unwanted images in advance, so please don't lecture me on this!
    Anyway, I went to the library module, selected all, & hit F2 to batch rename all selected images (DNG) in sequence. My problem is this - LR won't accept preceding zeros in the Start Number box. I would like for the first image to have 3 digits - that is: 001. LR eliminates the zeros, resulting in a single digit "1" instead.
    Is there a workaround for this?
    I can rename the images using another program I have, but I'm afraid that the editing adjustments performed in LR may get jumbled.

    Thanks, Dharma Sam!
    I never bothered to go into the edit > custom settings!    DUH!
    That enabled me to get the results I wanted.

  • Problem with preceding zeros

    Hi i have a problem with table entries. I have one table with name 'z*' having fields of vbeln ,date, plant.
    when i try to display the records it displays all the vbeln records. In that some of them are having vbeln with preceding
    zeros like 0009050750 and some are not having zeros like 9081059. When i try to display 0009050750 it executes and display
    that record but when i try to display 9081059 it doesnot execute and it displays "no table entries found for specific key".
    Plz give any suggesions on that.
    Plz solve my issue
    Shiva.

    TABLES : vbrk.
    TYPES : BEGIN OF it_t1,
            vbeln TYPE vbrk-vbeln,
            fkart TYPE vbrk-fkart,
            fktyp TYPE vbrk-fktyp,
            vbtyp TYPE vbrk-vbtyp,
            waerk TYPE vbrk-waerk,
            END OF it_t1.
    DATA : it_tab TYPE TABLE OF it_t1,
           wa_tab TYPE it_t1.
    SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln OBLIGATORY.
    SELECT vbeln
           fkart
           fktyp
           vbtyp
           waerk FROM vbrk INTO CORRESPONDING FIELDS OF TABLE it_tab WHERE vbeln IN s_vbeln.
    LOOP at it_tab INTO wa_tab.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = wa_tab-vbeln
    IMPORTING
       OUTPUT         = wa_tab-vbeln
    MODIFY it_tab FROM wa_tab INDEX sy-tabix.
    CLEAR : wa_tab.
    ENDLOOP.
    LOOP AT it_tab INTO wa_tab.
      WRITE : / wa_tab-vbeln , wa_tab-fkart , wa_tab-fktyp , wa_tab-vbtyp , wa_tab-waerk.
      CLEAR : wa_tab.
    ENDLOOP.

  • Removing preceding zeros

    Hi Friends,
    It is a outbound PO interface. The vendor number is coming from IDOC and it is being padded with zeros in the PO file. It shouldn’t have any zeros preceding the vendor number. For instance if the Vendor is "800012", the field is being created with 0000800012 as the vendor number when it should be created in the file as “800012”.
    Is there any code to remove the preceding zeros before sending it to the target system.
    Thanks in Advance,
    Meghna.

    Hi,
    Check the links for UDF.
    UDF
    http://flickr.com/photos/8764045@N06/
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd
    Example 1
    http://www.flickr.com/photo_zoom.gne?id=544183191&size=o
    http://www.flickr.com/photo_zoom.gne?id=544183195&size=o
    http://www.flickr.com/photo_zoom.gne?id=544183225&size=o
    http://www.flickr.com/photo_zoom.gne?id=544183233&size=o
    Example 2
    http://www.flickr.com/photo_zoom.gne?id=545133789&size=o
    http://www.flickr.com/photo_zoom.gne?id=545133791&size=o
    http://www.flickr.com/photo_zoom.gne?id=545133801&size=o
    http://www.flickr.com/photo_zoom.gne?id=545133807&size=o
    http://www.flickr.com/photo_zoom.gne?id=545133811&size=o
    http://www.flickr.com/photo_zoom.gne?id=545138911&size=o
    http://www.flickr.com/photo_zoom.gne?id=545138913&size=o
    http://www.flickr.com/photo_zoom.gne?id=545138915&size=o
    http://www.flickr.com/photo_zoom.gne?id=545138917&size=o
    http://www.flickr.com/photo_zoom.gne?id=545138947&size=o
    http://www.flickr.com/photo_zoom.gne?id=545138951&size=o
    http://www.flickr.com/photo_zoom.gne?id=545005958&size=o
    Example 3
    http://www.flickr.com/photo_zoom.gne?id=549186611&size=o
    http://www.flickr.com/photo_zoom.gne?id=549186651&size=o
    http://java.sun.com/j2se/1.5.0/docs/api/
    /people/krishna.moorthyp/blog/2006/07/29/documentation-html-editor-in-xi
    /people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
    /people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio
    http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d046c490-0201-0010-84b6-9df523cbca31
    Regards,
    Phani
    Reward points if Helpful

  • To Supress Leading Zeros

    Hi Gurus
       I am developing ALV Report.
    For my Header I have to display Material Number.
    It is displaying with Leading Zeros.
    I want to supress those Zeros.
    Please send me the sample code urgently.
    Regards,
    Kumar

    when you are storing the material no in your int table take it in a character variable
    and use
    SHIFT cmatnr left deleting leading '0'.
    now itab-matnr = cmatnr.
    append or modify your inttable.
    or
    loop at itab.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        INPUT         = itab-matnr
    IMPORTING
       OUTPUT        = itab-matnr
    modify itab.
    endloop.
    regards
    shiba dutta

  • Remove preceding zeros on BW Infoobject

    Dear Experts,
    My BW infoobjects showing preceding zeros in the BI4.1 WEBI Prompts LOVs, so user don't want the zeros and they need only values and also they compare BEx analyzer with BO since BEx analyzer LOVs shows only values without zeros.
    Is there any function or setting either in BO or BEx designer to remove zeros in the BW infoobjects? so that in BO LOVs display only values without zeros.
    Currently values is 0000123456 in BO LOVs and user want only 123456 as per BEx analyzer.
    Please help
    Thanks in advance.
    Regards
    Karuppiah N

    Hi Karuppiah,
    short answer: There is no way of removing those zeroes.
    long answer: Those zeroes araise from the conversion routine on the InfoObject, the standard conversion routine is called Alpha and does exactly what you describe with numeric keys in order to convert from external to internal key format. The standard 0GL_ACCOUNT characteristic uses the Alpha routine as delivered by SAP. BEx will display the external key format in the LOV, while Web Intelligence will use the internal key format, hence the zeroes at the start of numeric keys.
    This question was already raised here:
    How to remove leading zeros from WebI Userpromt variable.
    Best regards,
    Victor

  • Rename feature to allow "padding" with preceding zeros

    Hello,
    There are may photoservices out there that unfortunately don't support Alpha-Numeric sort (they are Alpha only). In order for images to be sorted correctly, I have to make all number "sequences" the same length so that it DOESN'T sort 1, 10, 100, 2, 20, 3,30 and so on. By padding a preceding zero, ie 01, 02, 03, etc it resolves the problem.
    I know photoshops' renaming supports this feature, it would be nice to see it in Lightroom.
    Thanks
    Jon

    LR allows for this in its naming tokens. Checkout Sequence # (01) or more under Edit... in a naming dialog like what F2 gets you.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/
    See LR Links list at my Blog for related sites.

  • Supress the zero's

    Hi,
    I have estimated qty(eqty) and actual qty(aqty) fields, they were declared in the table as NUMC(9), when I display these fields the values are comming like 000000050 and 000000040 instead of 50 and 40. How can I supress the zero's? Should I move this value in to a different variable and display that or is there any way to supress the zero's.
    Thanks,

    Hi Veni,
    U can use <b>shift <VAR> left deleting leading '0'.</b>
    Data: X(10) type N value '10'.
    write: x.
    shift x left deleting leading '0'.
    write: / x.
    *Output
    0000000010
    10        
    Regards
    Allan Cristian
    Message was edited by:
            Allan Cristian

  • Remove preceding zeroes from an integer number

    How can i remove preceding zeroes from and integer number.
    Please help...

    what are you talking about? How can an int not have preceding zeros?

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

  • Supressing Leading Zero's

    My database has a field that has a total of 30 characters.
    Depending on the data that was entered there could be a large number of leading zero's that is displayed within that field.  How do you supress the leading zero's for that field when the number of leading zero's could fluctuate?
    In addition to that, they are also using Bar Code Scanning on that same field.  How can you suppress the Leading zero information on the same field once it has been converted to Bar Code?

    I dont think cstr(val(x)) will work if the value is "001000000000000000005147002589" as val(x) will convert it to a number and due to the number of digits, CR will convert it to scientific notation, at least CR XI converts.
    One possible solution would be to loop through the digits and extract the data by eliminating the leading zeros.  For example:
    stringvar x := "001000000000000000005147002589";
    // Example, you don't need this in your formula
    numbervar i;
    for i := 1 to length(x) do
    if x<i> NOT EQUAL TO '0' then exit for
    // use the not equal sign (greater than and less than symbols)
    x[i to length(x)];
    You can use this formula for both display and bar code purposes by replacing X with the db field.
    Edited by: Sanjay Kodidine on Oct 21, 2009 4:50 AM

  • ZEROES in Scripts

    Hi all
    How to eliminate ZEROES in a script from a particular field.Is it possible to do without calling a driver program in Scripts.Please help
    With Regards
    Vijay G

    if you are working with sap  scripts you can put a condition
    in the first colum put
    :/   if &field& <> 0. "this will check the condition
    P1 &field& "this will print it
    :/  endif.
    if this heklps reward points

  • How to Supress Leading Zeros

    Hi,
    i am modifying standard rvorder0 form, from that i'm getting line item and material numbers as &vbdka-posnr& and &vbdka-matnr&. when i'm pringing these in my line items material number is printing 00000000000000049, its lenght is 18. but i need only 46 to print to accomdate line time width for other cols. how to do this for item number and material number in script. plss let me know its very urgent
    Regards
    Munna

    hi
    good
    use the function module
    CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer
    Example:
    input   = 00000000000123
    output  = 123
    thanks
    mrutyun^

Maybe you are looking for